blob: 83249235f0c5e17e3eb344a0a206628cd5bc602d [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 Ferris67d1e5e2023-10-31 13:36:37 -070031 BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED = 0x08ULL,
Christopher Ferris3a39c0b2021-09-02 00:03:38 +000032};
33enum bnxt_re_wqe_mode {
34 BNXT_QPLIB_WQE_MODE_STATIC = 0x00,
35 BNXT_QPLIB_WQE_MODE_VARIABLE = 0x01,
36 BNXT_QPLIB_WQE_MODE_INVALID = 0x02,
Christopher Ferris24f97eb2019-05-20 12:58:13 -070037};
Christopher Ferris525ce912017-07-26 13:12:53 -070038struct bnxt_re_uctx_resp {
39 __u32 dev_id;
40 __u32 max_qp;
41 __u32 pg_size;
42 __u32 cqe_sz;
43 __u32 max_cqd;
44 __u32 rsvd;
Christopher Ferris24f97eb2019-05-20 12:58:13 -070045 __aligned_u64 comp_mask;
46 __u32 chip_id0;
47 __u32 chip_id1;
Christopher Ferris3a39c0b2021-09-02 00:03:38 +000048 __u32 mode;
49 __u32 rsvd1;
Christopher Ferris525ce912017-07-26 13:12:53 -070050};
51struct bnxt_re_pd_resp {
52 __u32 pdid;
53 __u32 dpi;
54 __u64 dbr;
Christopher Ferris76a1d452018-06-27 14:12:29 -070055} __attribute__((packed, aligned(4)));
Christopher Ferris525ce912017-07-26 13:12:53 -070056struct bnxt_re_cq_req {
Christopher Ferris76a1d452018-06-27 14:12:29 -070057 __aligned_u64 cq_va;
58 __aligned_u64 cq_handle;
Christopher Ferris525ce912017-07-26 13:12:53 -070059};
60struct bnxt_re_cq_resp {
61 __u32 cqid;
62 __u32 tail;
63 __u32 phase;
64 __u32 rsvd;
65};
Christopher Ferris37c3f3c2023-07-10 10:59:05 -070066struct bnxt_re_resize_cq_req {
67 __aligned_u64 cq_va;
68};
Christopher Ferris525ce912017-07-26 13:12:53 -070069struct bnxt_re_qp_req {
Christopher Ferris76a1d452018-06-27 14:12:29 -070070 __aligned_u64 qpsva;
71 __aligned_u64 qprva;
72 __aligned_u64 qp_handle;
Christopher Ferris525ce912017-07-26 13:12:53 -070073};
74struct bnxt_re_qp_resp {
75 __u32 qpid;
76 __u32 rsvd;
77};
Christopher Ferris76a1d452018-06-27 14:12:29 -070078struct bnxt_re_srq_req {
79 __aligned_u64 srqva;
80 __aligned_u64 srq_handle;
81};
82struct bnxt_re_srq_resp {
83 __u32 srqid;
84};
Christopher Ferris525ce912017-07-26 13:12:53 -070085enum 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};
Christopher Ferris8666d042023-09-06 14:55:31 -070091enum bnxt_re_objects {
92 BNXT_RE_OBJECT_ALLOC_PAGE = (1U << UVERBS_ID_NS_SHIFT),
Christopher Ferris67d1e5e2023-10-31 13:36:37 -070093 BNXT_RE_OBJECT_NOTIFY_DRV,
Christopher Ferris8666d042023-09-06 14:55:31 -070094};
95enum bnxt_re_alloc_page_type {
96 BNXT_RE_ALLOC_WC_PAGE = 0,
Christopher Ferris67d1e5e2023-10-31 13:36:37 -070097 BNXT_RE_ALLOC_DBR_BAR_PAGE,
98 BNXT_RE_ALLOC_DBR_PAGE,
Christopher Ferris8666d042023-09-06 14:55:31 -070099};
100enum bnxt_re_var_alloc_page_attrs {
101 BNXT_RE_ALLOC_PAGE_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
102 BNXT_RE_ALLOC_PAGE_TYPE,
103 BNXT_RE_ALLOC_PAGE_DPI,
104 BNXT_RE_ALLOC_PAGE_MMAP_OFFSET,
105 BNXT_RE_ALLOC_PAGE_MMAP_LENGTH,
106};
107enum bnxt_re_alloc_page_attrs {
108 BNXT_RE_DESTROY_PAGE_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
109};
110enum bnxt_re_alloc_page_methods {
111 BNXT_RE_METHOD_ALLOC_PAGE = (1U << UVERBS_ID_NS_SHIFT),
112 BNXT_RE_METHOD_DESTROY_PAGE,
113};
Christopher Ferris67d1e5e2023-10-31 13:36:37 -0700114enum bnxt_re_notify_drv_methods {
115 BNXT_RE_METHOD_NOTIFY_DRV = (1U << UVERBS_ID_NS_SHIFT),
116};
Christopher Ferris525ce912017-07-26 13:12:53 -0700117#endif