hisi_qm.h 982 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
  2. #ifndef _HISI_QM_H
  3. #define _HISI_QM_H
  4. #include <linux/types.h>
  5. /**
  6. * struct hisi_qp_ctx - User data for hisi qp.
  7. * @id: qp_index return to user space
  8. * @qc_type: Accelerator algorithm type
  9. */
  10. struct hisi_qp_ctx {
  11. __u16 id;
  12. __u16 qc_type;
  13. };
  14. /**
  15. * struct hisi_qp_info - User data for hisi qp.
  16. * @sqe_size: Submission queue element size
  17. * @sq_depth: The number of sqe
  18. * @cq_depth: The number of cqe
  19. * @reserved: Reserved data
  20. */
  21. struct hisi_qp_info {
  22. __u32 sqe_size;
  23. __u16 sq_depth;
  24. __u16 cq_depth;
  25. __u64 reserved;
  26. };
  27. #define HISI_QM_API_VER_BASE "hisi_qm_v1"
  28. #define HISI_QM_API_VER2_BASE "hisi_qm_v2"
  29. #define HISI_QM_API_VER3_BASE "hisi_qm_v3"
  30. /* UACCE_CMD_QM_SET_QP_CTX: Set qp algorithm type */
  31. #define UACCE_CMD_QM_SET_QP_CTX _IOWR('H', 10, struct hisi_qp_ctx)
  32. /* UACCE_CMD_QM_SET_QP_INFO: Set qp depth and BD size */
  33. #define UACCE_CMD_QM_SET_QP_INFO _IOWR('H', 11, struct hisi_qp_info)
  34. #endif