blob: b9a84bba8e911227d76ff814fccd209bc7425447 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferris6a9755d2017-01-13 14:09:31 -08007#ifndef __QEDR_USER_H__
8#define __QEDR_USER_H__
9#include <linux/types.h>
10#define QEDR_ABI_VERSION (8)
Christopher Ferrisd32ca142020-02-04 16:16:51 -080011enum qedr_alloc_ucontext_flags {
Christopher Ferris25c18d42020-10-14 17:42:58 -070012 QEDR_ALLOC_UCTX_EDPM_MODE = 1 << 0,
13 QEDR_ALLOC_UCTX_DB_REC = 1 << 1,
14 QEDR_SUPPORT_DPM_SIZES = 1 << 2,
Christopher Ferrisd32ca142020-02-04 16:16:51 -080015};
16struct qedr_alloc_ucontext_req {
17 __u32 context_flags;
18 __u32 reserved;
19};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070020#define QEDR_LDPM_MAX_SIZE (8192)
21#define QEDR_EDPM_TRANS_SIZE (64)
Christopher Ferris25c18d42020-10-14 17:42:58 -070022#define QEDR_EDPM_MAX_SIZE (ROCE_REQ_MAX_INLINE_DATA_SIZE)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070023enum qedr_rdma_dpm_type {
24 QEDR_DPM_TYPE_NONE = 0,
25 QEDR_DPM_TYPE_ROCE_ENHANCED = 1 << 0,
26 QEDR_DPM_TYPE_ROCE_LEGACY = 1 << 1,
27 QEDR_DPM_TYPE_IWARP_LEGACY = 1 << 2,
Christopher Ferris25c18d42020-10-14 17:42:58 -070028 QEDR_DPM_TYPE_ROCE_EDPM_MODE = 1 << 3,
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070029 QEDR_DPM_SIZES_SET = 1 << 4,
30};
Christopher Ferris6a9755d2017-01-13 14:09:31 -080031struct qedr_alloc_ucontext_resp {
Christopher Ferris76a1d452018-06-27 14:12:29 -070032 __aligned_u64 db_pa;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080033 __u32 db_size;
34 __u32 max_send_wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080035 __u32 max_recv_wr;
36 __u32 max_srq_wr;
37 __u32 sges_per_send_wr;
38 __u32 sges_per_recv_wr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080039 __u32 sges_per_srq_wr;
40 __u32 max_cqes;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070041 __u8 dpm_flags;
Christopher Ferris1308ad32017-11-14 17:32:13 -080042 __u8 wids_enabled;
43 __u16 wid_count;
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070044 __u16 ldpm_limit_size;
45 __u8 edpm_trans_size;
46 __u8 reserved;
Christopher Ferris25c18d42020-10-14 17:42:58 -070047 __u16 edpm_limit_size;
48 __u8 padding[6];
Christopher Ferris6a9755d2017-01-13 14:09:31 -080049};
50struct qedr_alloc_pd_ureq {
Christopher Ferris76a1d452018-06-27 14:12:29 -070051 __aligned_u64 rsvd1;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080052};
53struct qedr_alloc_pd_uresp {
54 __u32 pd_id;
Christopher Ferris76a1d452018-06-27 14:12:29 -070055 __u32 reserved;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080056};
57struct qedr_create_cq_ureq {
Christopher Ferris76a1d452018-06-27 14:12:29 -070058 __aligned_u64 addr;
59 __aligned_u64 len;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080060};
61struct qedr_create_cq_uresp {
62 __u32 db_offset;
63 __u16 icid;
Christopher Ferris76a1d452018-06-27 14:12:29 -070064 __u16 reserved;
Christopher Ferrisd32ca142020-02-04 16:16:51 -080065 __aligned_u64 db_rec_addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080066};
67struct qedr_create_qp_ureq {
68 __u32 qp_handle_hi;
69 __u32 qp_handle_lo;
Christopher Ferris76a1d452018-06-27 14:12:29 -070070 __aligned_u64 sq_addr;
71 __aligned_u64 sq_len;
72 __aligned_u64 rq_addr;
73 __aligned_u64 rq_len;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080074};
75struct qedr_create_qp_uresp {
76 __u32 qp_id;
77 __u32 atomic_supported;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080078 __u32 sq_db_offset;
79 __u16 sq_icid;
80 __u32 rq_db_offset;
81 __u16 rq_icid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080082 __u32 rq_db2_offset;
Christopher Ferris76a1d452018-06-27 14:12:29 -070083 __u32 reserved;
Christopher Ferrisd32ca142020-02-04 16:16:51 -080084 __aligned_u64 sq_db_rec_addr;
85 __aligned_u64 rq_db_rec_addr;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080086};
Christopher Ferris9ce28842018-10-25 12:11:39 -070087struct qedr_create_srq_ureq {
88 __aligned_u64 prod_pair_addr;
89 __aligned_u64 srq_addr;
90 __aligned_u64 srq_len;
91};
92struct qedr_create_srq_uresp {
93 __u16 srq_id;
94 __u16 reserved0;
95 __u32 reserved1;
96};
Christopher Ferrisd32ca142020-02-04 16:16:51 -080097struct qedr_user_db_rec {
98 __aligned_u64 db_data;
99};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800100#endif