0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 #ifndef OCRDMA_ABI_USER_H
0045 #define OCRDMA_ABI_USER_H
0046
0047 #include <linux/types.h>
0048
0049 #define OCRDMA_ABI_VERSION 2
0050 #define OCRDMA_BE_ROCE_ABI_VERSION 1
0051
0052
0053 struct ocrdma_alloc_ucontext_resp {
0054 __u32 dev_id;
0055 __u32 wqe_size;
0056 __u32 max_inline_data;
0057 __u32 dpp_wqe_size;
0058 __aligned_u64 ah_tbl_page;
0059 __u32 ah_tbl_len;
0060 __u32 rqe_size;
0061 __u8 fw_ver[32];
0062
0063 __aligned_u64 rsvd1;
0064 __aligned_u64 rsvd2;
0065 };
0066
0067 struct ocrdma_alloc_pd_ureq {
0068 __u32 rsvd[2];
0069 };
0070
0071 struct ocrdma_alloc_pd_uresp {
0072 __u32 id;
0073 __u32 dpp_enabled;
0074 __u32 dpp_page_addr_hi;
0075 __u32 dpp_page_addr_lo;
0076 __u32 rsvd[2];
0077 };
0078
0079 struct ocrdma_create_cq_ureq {
0080 __u32 dpp_cq;
0081 __u32 rsvd;
0082 };
0083
0084 #define MAX_CQ_PAGES 8
0085 struct ocrdma_create_cq_uresp {
0086 __u32 cq_id;
0087 __u32 page_size;
0088 __u32 num_pages;
0089 __u32 max_hw_cqe;
0090 __aligned_u64 page_addr[MAX_CQ_PAGES];
0091 __aligned_u64 db_page_addr;
0092 __u32 db_page_size;
0093 __u32 phase_change;
0094
0095 __aligned_u64 rsvd1;
0096 __aligned_u64 rsvd2;
0097 };
0098
0099 #define MAX_QP_PAGES 8
0100 #define MAX_UD_AV_PAGES 8
0101
0102 struct ocrdma_create_qp_ureq {
0103 __u8 enable_dpp_cq;
0104 __u8 rsvd;
0105 __u16 dpp_cq_id;
0106 __u32 rsvd1;
0107 };
0108
0109 struct ocrdma_create_qp_uresp {
0110 __u16 qp_id;
0111 __u16 sq_dbid;
0112 __u16 rq_dbid;
0113 __u16 resv0;
0114 __u32 sq_page_size;
0115 __u32 rq_page_size;
0116 __u32 num_sq_pages;
0117 __u32 num_rq_pages;
0118 __aligned_u64 sq_page_addr[MAX_QP_PAGES];
0119 __aligned_u64 rq_page_addr[MAX_QP_PAGES];
0120 __aligned_u64 db_page_addr;
0121 __u32 db_page_size;
0122 __u32 dpp_credit;
0123 __u32 dpp_offset;
0124 __u32 num_wqe_allocated;
0125 __u32 num_rqe_allocated;
0126 __u32 db_sq_offset;
0127 __u32 db_rq_offset;
0128 __u32 db_shift;
0129 __aligned_u64 rsvd[11];
0130 };
0131
0132 struct ocrdma_create_srq_uresp {
0133 __u16 rq_dbid;
0134 __u16 resv0;
0135 __u32 resv1;
0136
0137 __u32 rq_page_size;
0138 __u32 num_rq_pages;
0139
0140 __aligned_u64 rq_page_addr[MAX_QP_PAGES];
0141 __aligned_u64 db_page_addr;
0142
0143 __u32 db_page_size;
0144 __u32 num_rqe_allocated;
0145 __u32 db_rq_offset;
0146 __u32 db_shift;
0147
0148 __aligned_u64 rsvd2;
0149 __aligned_u64 rsvd3;
0150 };
0151
0152 #endif