[PATCH rdma-core 09/20] nes: Use kernel uapi headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jason Gunthorpe <jgg@xxxxxxxxxxxx>

Remove duplicated loose definitions and one un-used struct

Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
---
 providers/nes/nes-abi.h    | 17 +----------------
 providers/nes/nes_uverbs.c |  6 +++---
 2 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/providers/nes/nes-abi.h b/providers/nes/nes-abi.h
index 3c3362a2ec5faf..54e8708cbf6471 100644
--- a/providers/nes/nes-abi.h
+++ b/providers/nes/nes-abi.h
@@ -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 */
diff --git a/providers/nes/nes_uverbs.c b/providers/nes/nes_uverbs.c
index a3bd65f6c743f6..be3b057c5bf7b4 100644
--- a/providers/nes/nes_uverbs.c
+++ b/providers/nes/nes_uverbs.c
@@ -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);
-- 
2.16.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux