• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This header was generated from the Linux kernel headers by update_headers.py,
3  * to provide necessary information from kernel to userspace, such as constants,
4  * structures, and macros, and thus, contains no copyrightable information.
5  */
6 #ifndef NES_ABI_USER_H
7 #define NES_ABI_USER_H
8 #include <linux/types.h>
9 #define NES_ABI_USERSPACE_VER 2
10 #define NES_ABI_KERNEL_VER    2
11 struct nes_alloc_ucontext_req {
12 	__u32 reserved32;
13 	__u8  userspace_ver;
14 	__u8  reserved8[3];
15 };
16 struct nes_alloc_ucontext_resp {
17 	__u32 max_pds;
18 	__u32 max_qps;
19 	__u32 wq_size;
20 	__u8  virtwq;
21 	__u8  kernel_ver;
22 	__u8  reserved[2];
23 };
24 struct nes_alloc_pd_resp {
25 	__u32 pd_id;
26 	__u32 mmap_db_index;
27 };
28 struct nes_create_cq_req {
29 	__aligned_u64 user_cq_buffer;
30 	__u32 mcrqf;
31 	__u8 reserved[4];
32 };
33 struct nes_create_qp_req {
34 	__aligned_u64 user_wqe_buffers;
35 	__aligned_u64 user_qp_buffer;
36 };
37 enum iwnes_memreg_type {
38 	IWNES_MEMREG_TYPE_MEM = 0x0000,
39 	IWNES_MEMREG_TYPE_QP = 0x0001,
40 	IWNES_MEMREG_TYPE_CQ = 0x0002,
41 	IWNES_MEMREG_TYPE_MW = 0x0003,
42 	IWNES_MEMREG_TYPE_FMR = 0x0004,
43 	IWNES_MEMREG_TYPE_FMEM = 0x0005,
44 };
45 struct nes_mem_reg_req {
46 	__u32 reg_type;
47 	__u32 reserved;
48 };
49 struct nes_create_cq_resp {
50 	__u32 cq_id;
51 	__u32 cq_size;
52 	__u32 mmap_db_index;
53 	__u32 reserved;
54 };
55 struct nes_create_qp_resp {
56 	__u32 qp_id;
57 	__u32 actual_sq_size;
58 	__u32 actual_rq_size;
59 	__u32 mmap_sq_db_index;
60 	__u32 mmap_rq_db_index;
61 	__u32 nes_drv_opt;
62 };
63 #endif
64