[PATCH rdma-core 13/20] mthca: Use kernel uapi headers

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

 



From: Jason Gunthorpe <jgg@xxxxxxxxxxxx>

mthca just had one define that trivially duplicates, but needed to have
the structs renamed to avoid conflicts

Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
---
 providers/mthca/mthca-abi.h | 26 ++++++++++----------------
 providers/mthca/mthca.c     |  2 +-
 providers/mthca/verbs.c     | 16 ++++++++--------
 3 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/providers/mthca/mthca-abi.h b/providers/mthca/mthca-abi.h
index 396480f267d16a..e965d040e68b78 100644
--- a/providers/mthca/mthca-abi.h
+++ b/providers/mthca/mthca-abi.h
@@ -35,33 +35,27 @@
 #define MTHCA_ABI_H
 
 #include <infiniband/kern-abi.h>
+#include <rdma/mthca-abi.h>
 
-#define MTHCA_UVERBS_ABI_VERSION	1
-
-struct mthca_alloc_ucontext_resp {
+struct umthca_alloc_ucontext_resp {
 	struct ib_uverbs_get_context_resp	ibv_resp;
 	__u32				qp_tab_size;
 	__u32				uarc_size;
 };
 
-struct mthca_alloc_pd_resp {
+struct umthca_alloc_pd_resp {
 	struct ib_uverbs_alloc_pd_resp	ibv_resp;
 	__u32				pdn;
 	__u32				reserved;
 };
 
-struct mthca_reg_mr {
+struct umthca_reg_mr {
 	struct ibv_reg_mr		ibv_cmd;
-/*
- * Mark the memory region with a DMA attribute that causes
- * in-flight DMA to be flushed when the region is written to:
- */
-#define MTHCA_MR_DMASYNC	0x1
 	__u32				mr_attrs;
 	__u32				reserved;
 };
 
-struct mthca_create_cq {
+struct umthca_create_cq {
 	struct ibv_create_cq		ibv_cmd;
 	__u32				lkey;
 	__u32				pdn;
@@ -71,32 +65,32 @@ struct mthca_create_cq {
 	__u32				set_db_index;
 };
 
-struct mthca_create_cq_resp {
+struct umthca_create_cq_resp {
 	struct ib_uverbs_create_cq_resp	ibv_resp;
 	__u32				cqn;
 	__u32				reserved;
 };
 
-struct mthca_resize_cq {
+struct umthca_resize_cq {
 	struct ibv_resize_cq		ibv_cmd;
 	__u32				lkey;
 	__u32				reserved;
 };
 
-struct mthca_create_srq {
+struct umthca_create_srq {
 	struct ibv_create_srq		ibv_cmd;
 	__u32				lkey;
 	__u32				db_index;
 	__u64				db_page;
 };
 
-struct mthca_create_srq_resp {
+struct umthca_create_srq_resp {
 	struct ib_uverbs_create_srq_resp	ibv_resp;
 	__u32				srqn;
 	__u32				reserved;
 };
 
-struct mthca_create_qp {
+struct umthca_create_qp {
 	struct ibv_create_qp		ibv_cmd;
 	__u32				lkey;
 	__u32				reserved;
diff --git a/providers/mthca/mthca.c b/providers/mthca/mthca.c
index d2a9330dd05ce6..9ffc9797603601 100644
--- a/providers/mthca/mthca.c
+++ b/providers/mthca/mthca.c
@@ -134,7 +134,7 @@ static struct verbs_context *mthca_alloc_context(struct ibv_device *ibdev,
 {
 	struct mthca_context            *context;
 	struct ibv_get_context           cmd;
-	struct mthca_alloc_ucontext_resp resp;
+	struct umthca_alloc_ucontext_resp resp;
 	int                              i;
 
 	context = verbs_init_and_alloc_context(ibdev, cmd_fd, context, ibv_ctx,
diff --git a/providers/mthca/verbs.c b/providers/mthca/verbs.c
index df132576865a05..ebe804ac44b418 100644
--- a/providers/mthca/verbs.c
+++ b/providers/mthca/verbs.c
@@ -74,7 +74,7 @@ int mthca_query_port(struct ibv_context *context, uint8_t port,
 struct ibv_pd *mthca_alloc_pd(struct ibv_context *context)
 {
 	struct ibv_alloc_pd        cmd;
-	struct mthca_alloc_pd_resp resp;
+	struct umthca_alloc_pd_resp resp;
 	struct mthca_pd           *pd;
 
 	pd = malloc(sizeof *pd);
@@ -118,7 +118,7 @@ static struct ibv_mr *__mthca_reg_mr(struct ibv_pd *pd, void *addr,
 				     int dma_sync)
 {
 	struct ibv_mr *mr;
-	struct mthca_reg_mr cmd;
+	struct umthca_reg_mr cmd;
 	struct ib_uverbs_reg_mr_resp resp;
 	int ret;
 
@@ -177,8 +177,8 @@ struct ibv_cq *mthca_create_cq(struct ibv_context *context, int cqe,
 			       struct ibv_comp_channel *channel,
 			       int comp_vector)
 {
-	struct mthca_create_cq      cmd;
-	struct mthca_create_cq_resp resp;
+	struct umthca_create_cq      cmd;
+	struct umthca_create_cq_resp resp;
 	struct mthca_cq      	   *cq;
 	int                  	    ret;
 
@@ -272,7 +272,7 @@ err:
 int mthca_resize_cq(struct ibv_cq *ibcq, int cqe)
 {
 	struct mthca_cq *cq = to_mcq(ibcq);
-	struct mthca_resize_cq cmd;
+	struct umthca_resize_cq cmd;
 	struct ibv_mr *mr;
 	struct mthca_buf buf;
 	struct ib_uverbs_resize_cq_resp resp;
@@ -375,8 +375,8 @@ static int align_queue_size(struct ibv_context *context, int size, int spare)
 struct ibv_srq *mthca_create_srq(struct ibv_pd *pd,
 				 struct ibv_srq_init_attr *attr)
 {
-	struct mthca_create_srq      cmd;
-	struct mthca_create_srq_resp resp;
+	struct umthca_create_srq      cmd;
+	struct umthca_create_srq_resp resp;
 	struct mthca_srq            *srq;
 	int                          ret;
 
@@ -489,7 +489,7 @@ int mthca_destroy_srq(struct ibv_srq *srq)
 
 struct ibv_qp *mthca_create_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr)
 {
-	struct mthca_create_qp    cmd;
+	struct umthca_create_qp    cmd;
 	struct ib_uverbs_create_qp_resp resp;
 	struct mthca_qp          *qp;
 	int                       ret;
-- 
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