diff mbox

[rdma-core,08/17] verbs: Use kernel uapi header for ibv_cq_moderation_caps_resp

Message ID 20180111221340.965-9-jgg@ziepe.ca (mailing list archive)
State Not Applicable
Headers show

Commit Message

Jason Gunthorpe Jan. 11, 2018, 10:13 p.m. UTC
From: Jason Gunthorpe <jgg@mellanox.com>

For some reason the struct member names do not match the kernel version,
fix it.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 libibverbs/cmd.c      | 4 ++--
 libibverbs/kern-abi.h | 8 +-------
 2 files changed, 3 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index a675bfb7d02fd3..ad0e0dc3736756 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -257,8 +257,8 @@  int ibv_cmd_query_device_ex(struct ibv_context *context,
 		if (resp->response_length >=
 		    offsetof(struct ibv_query_device_resp_ex, cq_mod_caps) +
 		    sizeof(resp->cq_mod_caps)) {
-			attr->cq_mod_caps.max_cq_count = resp->cq_mod_caps.cq_count;
-			attr->cq_mod_caps.max_cq_period = resp->cq_mod_caps.cq_period;
+			attr->cq_mod_caps.max_cq_count = resp->cq_mod_caps.max_cq_moderation_count;
+			attr->cq_mod_caps.max_cq_period = resp->cq_mod_caps.max_cq_moderation_period;
 		}
 	}
 
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index 3468e5497c3531..6a697987799c68 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -110,12 +110,6 @@  struct ibv_query_device_ex {
 	__u32		reserved;
 };
 
-struct ibv_cq_moderation_caps_resp {
-	__u16  cq_count;
-	__u16  cq_period;
-	__u32  reserved;
-};
-
 struct ibv_query_device_resp_ex {
 	struct ib_uverbs_query_device_resp base;
 	__u32 comp_mask;
@@ -128,7 +122,7 @@  struct ibv_query_device_resp_ex {
 	__u32  max_wq_type_rq;
 	__u32 raw_packet_caps;
 	struct ib_uverbs_tm_caps tm_caps;
-	struct ibv_cq_moderation_caps_resp cq_mod_caps;
+	struct ib_uverbs_cq_moderation_caps cq_mod_caps;
 };
 
 struct ibv_query_port {