blob: 2e666f3bbcbb60daa960824a914fdd07d9078855 [file] [log] [blame]
Christopher Ferris6a9755d2017-01-13 14:09:31 -08001/****************************************************************************
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 __QEDR_USER_H__
20#define __QEDR_USER_H__
21#include <linux/types.h>
22#define QEDR_ABI_VERSION (8)
Christopher Ferrisd32ca142020-02-04 16:16:51 -080023enum qedr_alloc_ucontext_flags {
24 QEDR_ALLOC_UCTX_RESERVED = 1 << 0,
25 QEDR_ALLOC_UCTX_DB_REC = 1 << 1
26};
27struct qedr_alloc_ucontext_req {
28 __u32 context_flags;
29 __u32 reserved;
30};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070031#define QEDR_LDPM_MAX_SIZE (8192)
32#define QEDR_EDPM_TRANS_SIZE (64)
33enum qedr_rdma_dpm_type {
34 QEDR_DPM_TYPE_NONE = 0,
35 QEDR_DPM_TYPE_ROCE_ENHANCED = 1 << 0,
36 QEDR_DPM_TYPE_ROCE_LEGACY = 1 << 1,
37 QEDR_DPM_TYPE_IWARP_LEGACY = 1 << 2,
38 QEDR_DPM_TYPE_RESERVED = 1 << 3,
39 QEDR_DPM_SIZES_SET = 1 << 4,
40};
Christopher Ferris6a9755d2017-01-13 14:09:31 -080041struct qedr_alloc_ucontext_resp {
Christopher Ferris76a1d452018-06-27 14:12:29 -070042 __aligned_u64 db_pa;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080043 __u32 db_size;
44 __u32 max_send_wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080045 __u32 max_recv_wr;
46 __u32 max_srq_wr;
47 __u32 sges_per_send_wr;
48 __u32 sges_per_recv_wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080049 __u32 sges_per_srq_wr;
50 __u32 max_cqes;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070051 __u8 dpm_flags;
Christopher Ferris1308ad32017-11-14 17:32:13 -080052 __u8 wids_enabled;
53 __u16 wid_count;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070054 __u16 ldpm_limit_size;
55 __u8 edpm_trans_size;
56 __u8 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080057};
58struct qedr_alloc_pd_ureq {
Christopher Ferris76a1d452018-06-27 14:12:29 -070059 __aligned_u64 rsvd1;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080060};
61struct qedr_alloc_pd_uresp {
62 __u32 pd_id;
Christopher Ferris76a1d452018-06-27 14:12:29 -070063 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080064};
65struct qedr_create_cq_ureq {
Christopher Ferris76a1d452018-06-27 14:12:29 -070066 __aligned_u64 addr;
67 __aligned_u64 len;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080068};
69struct qedr_create_cq_uresp {
70 __u32 db_offset;
71 __u16 icid;
Christopher Ferris76a1d452018-06-27 14:12:29 -070072 __u16 reserved;
Christopher Ferrisd32ca142020-02-04 16:16:51 -080073 __aligned_u64 db_rec_addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080074};
75struct qedr_create_qp_ureq {
76 __u32 qp_handle_hi;
77 __u32 qp_handle_lo;
Christopher Ferris76a1d452018-06-27 14:12:29 -070078 __aligned_u64 sq_addr;
79 __aligned_u64 sq_len;
80 __aligned_u64 rq_addr;
81 __aligned_u64 rq_len;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080082};
83struct qedr_create_qp_uresp {
84 __u32 qp_id;
85 __u32 atomic_supported;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080086 __u32 sq_db_offset;
87 __u16 sq_icid;
88 __u32 rq_db_offset;
89 __u16 rq_icid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080090 __u32 rq_db2_offset;
Christopher Ferris76a1d452018-06-27 14:12:29 -070091 __u32 reserved;
Christopher Ferrisd32ca142020-02-04 16:16:51 -080092 __aligned_u64 sq_db_rec_addr;
93 __aligned_u64 rq_db_rec_addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080094};
Christopher Ferris9ce28842018-10-25 12:11:39 -070095struct qedr_create_srq_ureq {
96 __aligned_u64 prod_pair_addr;
97 __aligned_u64 srq_addr;
98 __aligned_u64 srq_len;
99};
100struct qedr_create_srq_uresp {
101 __u16 srq_id;
102 __u16 reserved0;
103 __u32 reserved1;
104};
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800105struct qedr_user_db_rec {
106 __aligned_u64 db_data;
107};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800108#endif