@@ -35,9 +35,7 @@
#define nes_ABI_H
#include <infiniband/kern-abi.h>
-
-#define NES_ABI_USERSPACE_VER 2
-#define NES_ABI_KERNEL_VER 2
+#include <rdma/nes-abi.h>
struct nes_get_context {
struct ibv_get_context cmd;
@@ -78,12 +76,6 @@ struct nes_ucreate_cq_resp {
__u32 reserved;
};
-enum nes_umemreg_type {
- NES_UMEMREG_TYPE_MEM = 0x0000,
- NES_UMEMREG_TYPE_QP = 0x0001,
- NES_UMEMREG_TYPE_CQ = 0x0002,
-};
-
struct nes_ureg_mr {
struct ibv_reg_mr ibv_cmd;
__u32 reg_type; /* indicates if id is memory, QP or CQ */
@@ -106,11 +98,4 @@ struct nes_ucreate_qp_resp {
__u32 nes_drv_opt;
};
-struct nes_cqe {
- __u32 header;
- __u32 len;
- __u32 wrid_hi_stag;
- __u32 wrid_low_msn;
-};
-
#endif /* nes_ABI_H */
@@ -176,7 +176,7 @@ struct ibv_mr *nes_ureg_mr(struct ibv_pd *pd, void *addr,
if (!mr)
return NULL;
- cmd.reg_type = NES_UMEMREG_TYPE_MEM;
+ cmd.reg_type = IWNES_MEMREG_TYPE_MEM;
if (ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr,
access, mr, &cmd.ibv_cmd, sizeof cmd,
&resp, sizeof resp)) {
@@ -239,7 +239,7 @@ struct ibv_cq *nes_ucreate_cq(struct ibv_context *context, int cqe,
goto err;
/* Register the memory for the CQ */
- reg_mr_cmd.reg_type = NES_UMEMREG_TYPE_CQ;
+ reg_mr_cmd.reg_type = IWNES_MEMREG_TYPE_CQ;
ret = ibv_cmd_reg_mr(&nesvctx->nesupd->ibv_pd, (void *)nesucq->cqes,
(nesucq->size*sizeof(struct nes_hw_cqe)),
@@ -951,7 +951,7 @@ static int nes_vmapped_qp(struct nes_uqp *nesuqp, struct ibv_pd *pd, struct ibv_
nesuqp->rq_vbase = (struct nes_hw_qp_wqe *) (((char *) nesuqp->sq_vbase) +
(nesuqp->sq_size * sizeof(struct nes_hw_qp_wqe)));
- reg_mr_cmd.reg_type = NES_UMEMREG_TYPE_QP;
+ reg_mr_cmd.reg_type = IWNES_MEMREG_TYPE_QP;
//fprintf(stderr, PFX "qp_rq_vbase = %p qp_sq_vbase=%p reg_mr = %p\n",
// nesuqp->rq_vbase, nesuqp->sq_vbase, &nesuqp->mr);