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 */ 7 #ifndef __BNXT_RE_UVERBS_ABI_H__ 8 #define __BNXT_RE_UVERBS_ABI_H__ 9 #include <linux/types.h> 10 #include <rdma/ib_user_ioctl_cmds.h> 11 #define BNXT_RE_ABI_VERSION 1 12 #define BNXT_RE_CHIP_ID0_CHIP_NUM_SFT 0x00 13 #define BNXT_RE_CHIP_ID0_CHIP_REV_SFT 0x10 14 #define BNXT_RE_CHIP_ID0_CHIP_MET_SFT 0x18 15 enum { 16 BNXT_RE_UCNTX_CMASK_HAVE_CCTX = 0x1ULL, 17 BNXT_RE_UCNTX_CMASK_HAVE_MODE = 0x02ULL, 18 BNXT_RE_UCNTX_CMASK_WC_DPI_ENABLED = 0x04ULL, 19 BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED = 0x08ULL, 20 BNXT_RE_UCNTX_CMASK_POW2_DISABLED = 0x10ULL, 21 BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED = 0x40, 22 }; 23 enum bnxt_re_wqe_mode { 24 BNXT_QPLIB_WQE_MODE_STATIC = 0x00, 25 BNXT_QPLIB_WQE_MODE_VARIABLE = 0x01, 26 BNXT_QPLIB_WQE_MODE_INVALID = 0x02, 27 }; 28 enum { 29 BNXT_RE_COMP_MASK_REQ_UCNTX_POW2_SUPPORT = 0x01, 30 }; 31 struct bnxt_re_uctx_req { 32 __aligned_u64 comp_mask; 33 }; 34 struct bnxt_re_uctx_resp { 35 __u32 dev_id; 36 __u32 max_qp; 37 __u32 pg_size; 38 __u32 cqe_sz; 39 __u32 max_cqd; 40 __u32 rsvd; 41 __aligned_u64 comp_mask; 42 __u32 chip_id0; 43 __u32 chip_id1; 44 __u32 mode; 45 __u32 rsvd1; 46 }; 47 struct bnxt_re_pd_resp { 48 __u32 pdid; 49 __u32 dpi; 50 __u64 dbr; 51 } __attribute__((packed, aligned(4))); 52 struct bnxt_re_cq_req { 53 __aligned_u64 cq_va; 54 __aligned_u64 cq_handle; 55 }; 56 enum bnxt_re_cq_mask { 57 BNXT_RE_CQ_TOGGLE_PAGE_SUPPORT = 0x1, 58 }; 59 struct bnxt_re_cq_resp { 60 __u32 cqid; 61 __u32 tail; 62 __u32 phase; 63 __u32 rsvd; 64 __aligned_u64 comp_mask; 65 }; 66 struct bnxt_re_resize_cq_req { 67 __aligned_u64 cq_va; 68 }; 69 struct bnxt_re_qp_req { 70 __aligned_u64 qpsva; 71 __aligned_u64 qprva; 72 __aligned_u64 qp_handle; 73 }; 74 struct bnxt_re_qp_resp { 75 __u32 qpid; 76 __u32 rsvd; 77 }; 78 struct bnxt_re_srq_req { 79 __aligned_u64 srqva; 80 __aligned_u64 srq_handle; 81 }; 82 struct bnxt_re_srq_resp { 83 __u32 srqid; 84 }; 85 enum bnxt_re_shpg_offt { 86 BNXT_RE_BEG_RESV_OFFT = 0x00, 87 BNXT_RE_AVID_OFFT = 0x10, 88 BNXT_RE_AVID_SIZE = 0x04, 89 BNXT_RE_END_RESV_OFFT = 0xFF0 90 }; 91 enum bnxt_re_objects { 92 BNXT_RE_OBJECT_ALLOC_PAGE = (1U << UVERBS_ID_NS_SHIFT), 93 BNXT_RE_OBJECT_NOTIFY_DRV, 94 BNXT_RE_OBJECT_GET_TOGGLE_MEM, 95 }; 96 enum bnxt_re_alloc_page_type { 97 BNXT_RE_ALLOC_WC_PAGE = 0, 98 BNXT_RE_ALLOC_DBR_BAR_PAGE, 99 BNXT_RE_ALLOC_DBR_PAGE, 100 }; 101 enum bnxt_re_var_alloc_page_attrs { 102 BNXT_RE_ALLOC_PAGE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 103 BNXT_RE_ALLOC_PAGE_TYPE, 104 BNXT_RE_ALLOC_PAGE_DPI, 105 BNXT_RE_ALLOC_PAGE_MMAP_OFFSET, 106 BNXT_RE_ALLOC_PAGE_MMAP_LENGTH, 107 }; 108 enum bnxt_re_alloc_page_attrs { 109 BNXT_RE_DESTROY_PAGE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 110 }; 111 enum bnxt_re_alloc_page_methods { 112 BNXT_RE_METHOD_ALLOC_PAGE = (1U << UVERBS_ID_NS_SHIFT), 113 BNXT_RE_METHOD_DESTROY_PAGE, 114 }; 115 enum bnxt_re_notify_drv_methods { 116 BNXT_RE_METHOD_NOTIFY_DRV = (1U << UVERBS_ID_NS_SHIFT), 117 }; 118 enum bnxt_re_get_toggle_mem_type { 119 BNXT_RE_CQ_TOGGLE_MEM = 0, 120 BNXT_RE_SRQ_TOGGLE_MEM, 121 }; 122 enum bnxt_re_var_toggle_mem_attrs { 123 BNXT_RE_TOGGLE_MEM_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 124 BNXT_RE_TOGGLE_MEM_TYPE, 125 BNXT_RE_TOGGLE_MEM_RES_ID, 126 BNXT_RE_TOGGLE_MEM_MMAP_PAGE, 127 BNXT_RE_TOGGLE_MEM_MMAP_OFFSET, 128 BNXT_RE_TOGGLE_MEM_MMAP_LENGTH, 129 }; 130 enum bnxt_re_toggle_mem_attrs { 131 BNXT_RE_RELEASE_TOGGLE_MEM_HANDLE = (1U << UVERBS_ID_NS_SHIFT), 132 }; 133 enum bnxt_re_toggle_mem_methods { 134 BNXT_RE_METHOD_GET_TOGGLE_MEM = (1U << UVERBS_ID_NS_SHIFT), 135 BNXT_RE_METHOD_RELEASE_TOGGLE_MEM, 136 }; 137 #endif 138