Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef __BNXT_RE_UVERBS_ABI_H__ |
| 20 | #define __BNXT_RE_UVERBS_ABI_H__ |
| 21 | #include <linux/types.h> |
Christopher Ferris | 8666d04 | 2023-09-06 14:55:31 -0700 | [diff] [blame^] | 22 | #include <rdma/ib_user_ioctl_cmds.h> |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 23 | #define BNXT_RE_ABI_VERSION 1 |
Christopher Ferris | 24f97eb | 2019-05-20 12:58:13 -0700 | [diff] [blame] | 24 | #define BNXT_RE_CHIP_ID0_CHIP_NUM_SFT 0x00 |
| 25 | #define BNXT_RE_CHIP_ID0_CHIP_REV_SFT 0x10 |
| 26 | #define BNXT_RE_CHIP_ID0_CHIP_MET_SFT 0x18 |
| 27 | enum { |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 28 | BNXT_RE_UCNTX_CMASK_HAVE_CCTX = 0x1ULL, |
| 29 | BNXT_RE_UCNTX_CMASK_HAVE_MODE = 0x02ULL, |
Christopher Ferris | 8666d04 | 2023-09-06 14:55:31 -0700 | [diff] [blame^] | 30 | BNXT_RE_UCNTX_CMASK_WC_DPI_ENABLED = 0x04ULL, |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 31 | }; |
| 32 | enum bnxt_re_wqe_mode { |
| 33 | BNXT_QPLIB_WQE_MODE_STATIC = 0x00, |
| 34 | BNXT_QPLIB_WQE_MODE_VARIABLE = 0x01, |
| 35 | BNXT_QPLIB_WQE_MODE_INVALID = 0x02, |
Christopher Ferris | 24f97eb | 2019-05-20 12:58:13 -0700 | [diff] [blame] | 36 | }; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 37 | struct bnxt_re_uctx_resp { |
| 38 | __u32 dev_id; |
| 39 | __u32 max_qp; |
| 40 | __u32 pg_size; |
| 41 | __u32 cqe_sz; |
| 42 | __u32 max_cqd; |
| 43 | __u32 rsvd; |
Christopher Ferris | 24f97eb | 2019-05-20 12:58:13 -0700 | [diff] [blame] | 44 | __aligned_u64 comp_mask; |
| 45 | __u32 chip_id0; |
| 46 | __u32 chip_id1; |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 47 | __u32 mode; |
| 48 | __u32 rsvd1; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 49 | }; |
| 50 | struct bnxt_re_pd_resp { |
| 51 | __u32 pdid; |
| 52 | __u32 dpi; |
| 53 | __u64 dbr; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 54 | } __attribute__((packed, aligned(4))); |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 55 | struct bnxt_re_cq_req { |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 56 | __aligned_u64 cq_va; |
| 57 | __aligned_u64 cq_handle; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 58 | }; |
| 59 | struct bnxt_re_cq_resp { |
| 60 | __u32 cqid; |
| 61 | __u32 tail; |
| 62 | __u32 phase; |
| 63 | __u32 rsvd; |
| 64 | }; |
Christopher Ferris | 37c3f3c | 2023-07-10 10:59:05 -0700 | [diff] [blame] | 65 | struct bnxt_re_resize_cq_req { |
| 66 | __aligned_u64 cq_va; |
| 67 | }; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 68 | struct bnxt_re_qp_req { |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 69 | __aligned_u64 qpsva; |
| 70 | __aligned_u64 qprva; |
| 71 | __aligned_u64 qp_handle; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 72 | }; |
| 73 | struct bnxt_re_qp_resp { |
| 74 | __u32 qpid; |
| 75 | __u32 rsvd; |
| 76 | }; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 77 | struct bnxt_re_srq_req { |
| 78 | __aligned_u64 srqva; |
| 79 | __aligned_u64 srq_handle; |
| 80 | }; |
| 81 | struct bnxt_re_srq_resp { |
| 82 | __u32 srqid; |
| 83 | }; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 84 | enum bnxt_re_shpg_offt { |
| 85 | BNXT_RE_BEG_RESV_OFFT = 0x00, |
| 86 | BNXT_RE_AVID_OFFT = 0x10, |
| 87 | BNXT_RE_AVID_SIZE = 0x04, |
| 88 | BNXT_RE_END_RESV_OFFT = 0xFF0 |
| 89 | }; |
Christopher Ferris | 8666d04 | 2023-09-06 14:55:31 -0700 | [diff] [blame^] | 90 | enum bnxt_re_objects { |
| 91 | BNXT_RE_OBJECT_ALLOC_PAGE = (1U << UVERBS_ID_NS_SHIFT), |
| 92 | }; |
| 93 | enum bnxt_re_alloc_page_type { |
| 94 | BNXT_RE_ALLOC_WC_PAGE = 0, |
| 95 | }; |
| 96 | enum bnxt_re_var_alloc_page_attrs { |
| 97 | BNXT_RE_ALLOC_PAGE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), |
| 98 | BNXT_RE_ALLOC_PAGE_TYPE, |
| 99 | BNXT_RE_ALLOC_PAGE_DPI, |
| 100 | BNXT_RE_ALLOC_PAGE_MMAP_OFFSET, |
| 101 | BNXT_RE_ALLOC_PAGE_MMAP_LENGTH, |
| 102 | }; |
| 103 | enum bnxt_re_alloc_page_attrs { |
| 104 | BNXT_RE_DESTROY_PAGE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), |
| 105 | }; |
| 106 | enum bnxt_re_alloc_page_methods { |
| 107 | BNXT_RE_METHOD_ALLOC_PAGE = (1U << UVERBS_ID_NS_SHIFT), |
| 108 | BNXT_RE_METHOD_DESTROY_PAGE, |
| 109 | }; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 110 | #endif |