| .. | .. |
|---|
| 38 | 38 | #define QEDR_ABI_VERSION (8) |
|---|
| 39 | 39 | |
|---|
| 40 | 40 | /* user kernel communication data structures. */ |
|---|
| 41 | +enum qedr_alloc_ucontext_flags { |
|---|
| 42 | + QEDR_ALLOC_UCTX_EDPM_MODE = 1 << 0, |
|---|
| 43 | + QEDR_ALLOC_UCTX_DB_REC = 1 << 1, |
|---|
| 44 | + QEDR_SUPPORT_DPM_SIZES = 1 << 2, |
|---|
| 45 | +}; |
|---|
| 46 | + |
|---|
| 47 | +struct qedr_alloc_ucontext_req { |
|---|
| 48 | + __u32 context_flags; |
|---|
| 49 | + __u32 reserved; |
|---|
| 50 | +}; |
|---|
| 51 | + |
|---|
| 52 | +#define QEDR_LDPM_MAX_SIZE (8192) |
|---|
| 53 | +#define QEDR_EDPM_TRANS_SIZE (64) |
|---|
| 54 | +#define QEDR_EDPM_MAX_SIZE (ROCE_REQ_MAX_INLINE_DATA_SIZE) |
|---|
| 55 | + |
|---|
| 56 | +enum qedr_rdma_dpm_type { |
|---|
| 57 | + QEDR_DPM_TYPE_NONE = 0, |
|---|
| 58 | + QEDR_DPM_TYPE_ROCE_ENHANCED = 1 << 0, |
|---|
| 59 | + QEDR_DPM_TYPE_ROCE_LEGACY = 1 << 1, |
|---|
| 60 | + QEDR_DPM_TYPE_IWARP_LEGACY = 1 << 2, |
|---|
| 61 | + QEDR_DPM_TYPE_ROCE_EDPM_MODE = 1 << 3, |
|---|
| 62 | + QEDR_DPM_SIZES_SET = 1 << 4, |
|---|
| 63 | +}; |
|---|
| 41 | 64 | |
|---|
| 42 | 65 | struct qedr_alloc_ucontext_resp { |
|---|
| 43 | 66 | __aligned_u64 db_pa; |
|---|
| .. | .. |
|---|
| 50 | 73 | __u32 sges_per_recv_wr; |
|---|
| 51 | 74 | __u32 sges_per_srq_wr; |
|---|
| 52 | 75 | __u32 max_cqes; |
|---|
| 53 | | - __u8 dpm_enabled; |
|---|
| 76 | + __u8 dpm_flags; |
|---|
| 54 | 77 | __u8 wids_enabled; |
|---|
| 55 | 78 | __u16 wid_count; |
|---|
| 56 | | - __u32 reserved; |
|---|
| 79 | + __u16 ldpm_limit_size; |
|---|
| 80 | + __u8 edpm_trans_size; |
|---|
| 81 | + __u8 reserved; |
|---|
| 82 | + __u16 edpm_limit_size; |
|---|
| 83 | + __u8 padding[6]; |
|---|
| 57 | 84 | }; |
|---|
| 58 | 85 | |
|---|
| 59 | 86 | struct qedr_alloc_pd_ureq { |
|---|
| .. | .. |
|---|
| 74 | 101 | __u32 db_offset; |
|---|
| 75 | 102 | __u16 icid; |
|---|
| 76 | 103 | __u16 reserved; |
|---|
| 104 | + __aligned_u64 db_rec_addr; |
|---|
| 77 | 105 | }; |
|---|
| 78 | 106 | |
|---|
| 79 | 107 | struct qedr_create_qp_ureq { |
|---|
| .. | .. |
|---|
| 109 | 137 | |
|---|
| 110 | 138 | __u32 rq_db2_offset; |
|---|
| 111 | 139 | __u32 reserved; |
|---|
| 140 | + |
|---|
| 141 | + /* address of SQ doorbell recovery user entry */ |
|---|
| 142 | + __aligned_u64 sq_db_rec_addr; |
|---|
| 143 | + |
|---|
| 144 | + /* address of RQ doorbell recovery user entry */ |
|---|
| 145 | + __aligned_u64 rq_db_rec_addr; |
|---|
| 146 | + |
|---|
| 112 | 147 | }; |
|---|
| 113 | 148 | |
|---|
| 114 | 149 | struct qedr_create_srq_ureq { |
|---|
| .. | .. |
|---|
| 128 | 163 | __u32 reserved1; |
|---|
| 129 | 164 | }; |
|---|
| 130 | 165 | |
|---|
| 166 | +/* doorbell recovery entry allocated and populated by userspace doorbelling |
|---|
| 167 | + * entities and mapped to kernel. Kernel uses this to register doorbell |
|---|
| 168 | + * information with doorbell drop recovery mechanism. |
|---|
| 169 | + */ |
|---|
| 170 | +struct qedr_user_db_rec { |
|---|
| 171 | + __aligned_u64 db_data; /* doorbell data */ |
|---|
| 172 | +}; |
|---|
| 173 | + |
|---|
| 131 | 174 | #endif /* __QEDR_USER_H__ */ |
|---|