Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 7 | #ifndef HNS_ABI_USER_H |
| 8 | #define HNS_ABI_USER_H |
| 9 | #include <linux/types.h> |
| 10 | struct hns_roce_ib_create_cq { |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 11 | __aligned_u64 buf_addr; |
| 12 | __aligned_u64 db_addr; |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 13 | __u32 cqe_size; |
| 14 | __u32 reserved; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 15 | }; |
Christopher Ferris | 05667cd | 2021-02-16 16:01:34 -0800 | [diff] [blame] | 16 | enum hns_roce_cq_cap_flags { |
| 17 | HNS_ROCE_CQ_FLAG_RECORD_DB = 1 << 0, |
| 18 | }; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 19 | struct hns_roce_ib_create_cq_resp { |
| 20 | __aligned_u64 cqn; |
| 21 | __aligned_u64 cap_flags; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 22 | }; |
Christopher Ferris | 0f79521 | 2024-01-17 14:17:28 -0800 | [diff] [blame] | 23 | enum hns_roce_srq_cap_flags { |
| 24 | HNS_ROCE_SRQ_CAP_RECORD_DB = 1 << 0, |
| 25 | }; |
| 26 | enum hns_roce_srq_cap_flags_resp { |
| 27 | HNS_ROCE_RSP_SRQ_CAP_RECORD_DB = 1 << 0, |
| 28 | }; |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 29 | struct hns_roce_ib_create_srq { |
| 30 | __aligned_u64 buf_addr; |
| 31 | __aligned_u64 db_addr; |
| 32 | __aligned_u64 que_addr; |
Christopher Ferris | 0f79521 | 2024-01-17 14:17:28 -0800 | [diff] [blame] | 33 | __u32 req_cap_flags; |
| 34 | __u32 reserved; |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 35 | }; |
| 36 | struct hns_roce_ib_create_srq_resp { |
| 37 | __u32 srqn; |
Christopher Ferris | 0f79521 | 2024-01-17 14:17:28 -0800 | [diff] [blame] | 38 | __u32 cap_flags; |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 39 | }; |
Christopher Ferris | 7f4c837 | 2024-06-03 14:22:19 -0700 | [diff] [blame] | 40 | enum hns_roce_congest_type_flags { |
| 41 | HNS_ROCE_CREATE_QP_FLAGS_DCQCN, |
| 42 | HNS_ROCE_CREATE_QP_FLAGS_LDCP, |
| 43 | HNS_ROCE_CREATE_QP_FLAGS_HC3, |
| 44 | HNS_ROCE_CREATE_QP_FLAGS_DIP, |
| 45 | }; |
| 46 | enum hns_roce_create_qp_comp_mask { |
| 47 | HNS_ROCE_CREATE_QP_MASK_CONGEST_TYPE = 1 << 0, |
| 48 | }; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 49 | struct hns_roce_ib_create_qp { |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 50 | __aligned_u64 buf_addr; |
| 51 | __aligned_u64 db_addr; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 52 | __u8 log_sq_bb_count; |
| 53 | __u8 log_sq_stride; |
| 54 | __u8 sq_no_prefetch; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 55 | __u8 reserved[5]; |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 56 | __aligned_u64 sdb_addr; |
Christopher Ferris | 7f4c837 | 2024-06-03 14:22:19 -0700 | [diff] [blame] | 57 | __aligned_u64 comp_mask; |
| 58 | __aligned_u64 create_flags; |
| 59 | __aligned_u64 cong_type_flags; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 60 | }; |
Christopher Ferris | 05667cd | 2021-02-16 16:01:34 -0800 | [diff] [blame] | 61 | enum hns_roce_qp_cap_flags { |
| 62 | HNS_ROCE_QP_CAP_RQ_RECORD_DB = 1 << 0, |
| 63 | HNS_ROCE_QP_CAP_SQ_RECORD_DB = 1 << 1, |
| 64 | HNS_ROCE_QP_CAP_OWNER_DB = 1 << 2, |
Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 65 | HNS_ROCE_QP_CAP_DIRECT_WQE = 1 << 5, |
Christopher Ferris | 05667cd | 2021-02-16 16:01:34 -0800 | [diff] [blame] | 66 | }; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 67 | struct hns_roce_ib_create_qp_resp { |
| 68 | __aligned_u64 cap_flags; |
Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 69 | __aligned_u64 dwqe_mmap_key; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 70 | }; |
Christopher Ferris | 7ac54f5 | 2024-08-07 21:07:12 +0000 | [diff] [blame] | 71 | struct hns_roce_ib_modify_qp_resp { |
| 72 | __u8 tc_mode; |
| 73 | __u8 priority; |
| 74 | __u8 reserved[6]; |
| 75 | }; |
Christopher Ferris | 8b7fdc9 | 2023-02-21 13:36:32 -0800 | [diff] [blame] | 76 | enum { |
| 77 | HNS_ROCE_EXSGE_FLAGS = 1 << 0, |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 78 | HNS_ROCE_RQ_INLINE_FLAGS = 1 << 1, |
| 79 | HNS_ROCE_CQE_INLINE_FLAGS = 1 << 2, |
Christopher Ferris | 8b7fdc9 | 2023-02-21 13:36:32 -0800 | [diff] [blame] | 80 | }; |
| 81 | enum { |
| 82 | HNS_ROCE_RSP_EXSGE_FLAGS = 1 << 0, |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 83 | HNS_ROCE_RSP_RQ_INLINE_FLAGS = 1 << 1, |
| 84 | HNS_ROCE_RSP_CQE_INLINE_FLAGS = 1 << 2, |
Christopher Ferris | 8b7fdc9 | 2023-02-21 13:36:32 -0800 | [diff] [blame] | 85 | }; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 86 | struct hns_roce_ib_alloc_ucontext_resp { |
| 87 | __u32 qp_tab_size; |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 88 | __u32 cqe_size; |
Christopher Ferris | fcc3b4f | 2021-07-01 01:30:21 +0000 | [diff] [blame] | 89 | __u32 srq_tab_size; |
| 90 | __u32 reserved; |
Christopher Ferris | 8b7fdc9 | 2023-02-21 13:36:32 -0800 | [diff] [blame] | 91 | __u32 config; |
| 92 | __u32 max_inline_data; |
Christopher Ferris | 7f4c837 | 2024-06-03 14:22:19 -0700 | [diff] [blame] | 93 | __u8 congest_type; |
| 94 | __u8 reserved0[7]; |
Christopher Ferris | 8b7fdc9 | 2023-02-21 13:36:32 -0800 | [diff] [blame] | 95 | }; |
| 96 | struct hns_roce_ib_alloc_ucontext { |
| 97 | __u32 config; |
| 98 | __u32 reserved; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 99 | }; |
| 100 | struct hns_roce_ib_alloc_pd_resp { |
| 101 | __u32 pdn; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 102 | }; |
Christopher Ferris | b830ddf | 2024-03-28 11:48:08 -0700 | [diff] [blame] | 103 | struct hns_roce_ib_create_ah_resp { |
| 104 | __u8 dmac[6]; |
Christopher Ferris | 7ac54f5 | 2024-08-07 21:07:12 +0000 | [diff] [blame] | 105 | __u8 priority; |
| 106 | __u8 tc_mode; |
Christopher Ferris | b830ddf | 2024-03-28 11:48:08 -0700 | [diff] [blame] | 107 | }; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 108 | #endif |