@@ -40,6 +40,7 @@
#define __BNXT_RE_ABI_H__
#include <infiniband/kern-abi.h>
+#include <rdma/bnxt_re-abi.h>
#define BNXT_RE_ABI_VERSION 1
@@ -183,19 +184,12 @@ enum bnxt_re_ud_cqe_mask {
BNXT_RE_UD_CQE_SRCQPLO_SHIFT = 0x30
};
-enum bnxt_re_shpg_offt {
- BNXT_RE_SHPG_BEG_RESV_OFFT = 0x00,
- BNXT_RE_SHPG_AVID_OFFT = 0x10,
- BNXT_RE_SHPG_AVID_SIZE = 0x04,
- BNXT_RE_SHPG_END_RESV_OFFT = 0xFF0
-};
-
struct bnxt_re_db_hdr {
__le32 indx;
__le32 typ_qid; /* typ: 4, qid:20*/
};
-struct bnxt_re_cntx_resp {
+struct ubnxt_re_cntx_resp {
struct ib_uverbs_get_context_resp resp;
__u32 dev_id;
__u32 max_qp; /* To allocate qp-table */
@@ -205,24 +199,24 @@ struct bnxt_re_cntx_resp {
__u32 rsvd;
};
-struct bnxt_re_pd_resp {
+struct ubnxt_re_pd_resp {
struct ib_uverbs_alloc_pd_resp resp;
__u32 pdid;
__u32 dpi;
__u64 dbr;
};
-struct bnxt_re_mr_resp {
+struct ubnxt_re_mr_resp {
struct ib_uverbs_reg_mr_resp resp;
};
-struct bnxt_re_cq_req {
+struct ubnxt_re_cq_req {
struct ibv_create_cq cmd;
__u64 cq_va;
__u64 cq_handle;
};
-struct bnxt_re_cq_resp {
+struct ubnxt_re_cq_resp {
struct ib_uverbs_create_cq_resp resp;
__u32 cqid;
__u32 tail;
@@ -263,14 +257,14 @@ struct bnxt_re_term_cqe {
__le64 rsvd1;
};
-struct bnxt_re_qp_req {
+struct ubnxt_re_qp_req {
struct ibv_create_qp cmd;
__u64 qpsva;
__u64 qprva;
__u64 qp_handle;
};
-struct bnxt_re_qp_resp {
+struct ubnxt_re_qp_resp {
struct ib_uverbs_create_qp_resp resp;
__u32 qpid;
__u32 rsvd;
@@ -113,7 +113,7 @@ static struct verbs_context *bnxt_re_alloc_context(struct ibv_device *vdev,
int cmd_fd)
{
struct ibv_get_context cmd;
- struct bnxt_re_cntx_resp resp;
+ struct ubnxt_re_cntx_resp resp;
struct bnxt_re_dev *dev = to_bnxt_re_dev(vdev);
struct bnxt_re_context *cntx;
@@ -81,7 +81,7 @@ int bnxt_re_query_port(struct ibv_context *ibvctx, uint8_t port,
struct ibv_pd *bnxt_re_alloc_pd(struct ibv_context *ibvctx)
{
struct ibv_alloc_pd cmd;
- struct bnxt_re_pd_resp resp;
+ struct ubnxt_re_pd_resp resp;
struct bnxt_re_context *cntx = to_bnxt_re_context(ibvctx);
struct bnxt_re_dev *dev = to_bnxt_re_dev(ibvctx->device);
struct bnxt_re_pd *pd;
@@ -137,7 +137,7 @@ struct ibv_mr *bnxt_re_reg_mr(struct ibv_pd *ibvpd, void *sva, size_t len,
{
struct bnxt_re_mr *mr;
struct ibv_reg_mr cmd;
- struct bnxt_re_mr_resp resp;
+ struct ubnxt_re_mr_resp resp;
mr = calloc(1, sizeof(*mr));
if (!mr)
@@ -169,8 +169,8 @@ struct ibv_cq *bnxt_re_create_cq(struct ibv_context *ibvctx, int ncqe,
struct ibv_comp_channel *channel, int vec)
{
struct bnxt_re_cq *cq;
- struct bnxt_re_cq_req cmd;
- struct bnxt_re_cq_resp resp;
+ struct ubnxt_re_cq_req cmd;
+ struct ubnxt_re_cq_resp resp;
struct bnxt_re_context *cntx = to_bnxt_re_context(ibvctx);
struct bnxt_re_dev *dev = to_bnxt_re_dev(ibvctx->device);
@@ -873,8 +873,8 @@ struct ibv_qp *bnxt_re_create_qp(struct ibv_pd *ibvpd,
struct ibv_qp_init_attr *attr)
{
struct bnxt_re_qp *qp;
- struct bnxt_re_qp_req req;
- struct bnxt_re_qp_resp resp;
+ struct ubnxt_re_qp_req req;
+ struct ubnxt_re_qp_resp resp;
struct bnxt_re_qpcap *cap;
struct bnxt_re_context *cntx = to_bnxt_re_context(ibvpd->context);
@@ -1422,7 +1422,7 @@ struct ibv_ah *bnxt_re_create_ah(struct ibv_pd *ibvpd, struct ibv_ah_attr *attr)
goto failed;
}
/* read AV ID now. */
- ah->avid = *(uint32_t *)(uctx->shpg + BNXT_RE_SHPG_AVID_OFFT);
+ ah->avid = *(uint32_t *)(uctx->shpg + BNXT_RE_AVID_OFFT);
pthread_mutex_unlock(&uctx->shlock);
return &ah->ibvah;