blob: 68cb06a81c7294445f950ac865fad1b95adfb8d5 [file] [log] [blame]
Christopher Ferris525ce912017-07-26 13:12:53 -07001/****************************************************************************
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 Ferris8666d042023-09-06 14:55:31 -070022#include <rdma/ib_user_ioctl_cmds.h>
Christopher Ferris525ce912017-07-26 13:12:53 -070023#define BNXT_RE_ABI_VERSION 1
Christopher Ferris24f97eb2019-05-20 12:58:13 -070024#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
27enum {
Christopher Ferris3a39c0b2021-09-02 00:03:38 +000028 BNXT_RE_UCNTX_CMASK_HAVE_CCTX = 0x1ULL,
29 BNXT_RE_UCNTX_CMASK_HAVE_MODE = 0x02ULL,
Christopher Ferris8666d042023-09-06 14:55:31 -070030 BNXT_RE_UCNTX_CMASK_WC_DPI_ENABLED = 0x04ULL,
Christopher Ferris3a39c0b2021-09-02 00:03:38 +000031};
32enum 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 Ferris24f97eb2019-05-20 12:58:13 -070036};
Christopher Ferris525ce912017-07-26 13:12:53 -070037struct 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 Ferris24f97eb2019-05-20 12:58:13 -070044 __aligned_u64 comp_mask;
45 __u32 chip_id0;
46 __u32 chip_id1;
Christopher Ferris3a39c0b2021-09-02 00:03:38 +000047 __u32 mode;
48 __u32 rsvd1;
Christopher Ferris525ce912017-07-26 13:12:53 -070049};
50struct bnxt_re_pd_resp {
51 __u32 pdid;
52 __u32 dpi;
53 __u64 dbr;
Christopher Ferris76a1d452018-06-27 14:12:29 -070054} __attribute__((packed, aligned(4)));
Christopher Ferris525ce912017-07-26 13:12:53 -070055struct bnxt_re_cq_req {
Christopher Ferris76a1d452018-06-27 14:12:29 -070056 __aligned_u64 cq_va;
57 __aligned_u64 cq_handle;
Christopher Ferris525ce912017-07-26 13:12:53 -070058};
59struct bnxt_re_cq_resp {
60 __u32 cqid;
61 __u32 tail;
62 __u32 phase;
63 __u32 rsvd;
64};
Christopher Ferris37c3f3c2023-07-10 10:59:05 -070065struct bnxt_re_resize_cq_req {
66 __aligned_u64 cq_va;
67};
Christopher Ferris525ce912017-07-26 13:12:53 -070068struct bnxt_re_qp_req {
Christopher Ferris76a1d452018-06-27 14:12:29 -070069 __aligned_u64 qpsva;
70 __aligned_u64 qprva;
71 __aligned_u64 qp_handle;
Christopher Ferris525ce912017-07-26 13:12:53 -070072};
73struct bnxt_re_qp_resp {
74 __u32 qpid;
75 __u32 rsvd;
76};
Christopher Ferris76a1d452018-06-27 14:12:29 -070077struct bnxt_re_srq_req {
78 __aligned_u64 srqva;
79 __aligned_u64 srq_handle;
80};
81struct bnxt_re_srq_resp {
82 __u32 srqid;
83};
Christopher Ferris525ce912017-07-26 13:12:53 -070084enum 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 Ferris8666d042023-09-06 14:55:31 -070090enum bnxt_re_objects {
91 BNXT_RE_OBJECT_ALLOC_PAGE = (1U << UVERBS_ID_NS_SHIFT),
92};
93enum bnxt_re_alloc_page_type {
94 BNXT_RE_ALLOC_WC_PAGE = 0,
95};
96enum 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};
103enum bnxt_re_alloc_page_attrs {
104 BNXT_RE_DESTROY_PAGE_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
105};
106enum bnxt_re_alloc_page_methods {
107 BNXT_RE_METHOD_ALLOC_PAGE = (1U << UVERBS_ID_NS_SHIFT),
108 BNXT_RE_METHOD_DESTROY_PAGE,
109};
Christopher Ferris525ce912017-07-26 13:12:53 -0700110#endif