diff mbox series

[rdma-core,01/10] verbs: Fix wrong command structure usage

Message ID 20181122232416.30132-2-jgg@ziepe.ca (mailing list archive)
State Not Applicable
Headers show
Series Command execution rework | expand

Commit Message

Jason Gunthorpe Nov. 22, 2018, 11:24 p.m. UTC
From: Jason Gunthorpe <jgg@mellanox.com>

Several places were using the wrong command buffer type for the command
being executed. It turns out none of these are bugs since both structs
have identical members and layouts, but it causes the type checking in later
patches to get angry.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 libibverbs/cmd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index d88b3aa816eac4..af6ea5cfe12a0f 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -1425,7 +1425,7 @@  int ibv_cmd_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,
 		      struct ibv_recv_wr **bad_wr)
 {
 	struct ibv_post_recv     *cmd;
-	struct ib_uverbs_post_send_resp resp;
+	struct ib_uverbs_post_recv_resp resp;
 	struct ibv_recv_wr       *i;
 	struct ib_uverbs_recv_wr  *n, *tmp;
 	struct ibv_sge           *s;
@@ -1486,7 +1486,7 @@  int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
 		      struct ibv_recv_wr **bad_wr)
 {
 	struct ibv_post_srq_recv *cmd;
-	struct ib_uverbs_post_recv_resp resp;
+	struct ib_uverbs_post_srq_recv_resp resp;
 	struct ibv_recv_wr       *i;
 	struct ib_uverbs_recv_wr  *n, *tmp;
 	struct ibv_sge           *s;
@@ -1841,7 +1841,7 @@  int ibv_cmd_create_flow(struct ibv_qp *qp,
 			size_t ucmd_size)
 {
 	struct ibv_create_flow *cmd;
-	struct ib_uverbs_destroy_flow  resp;
+	struct ib_uverbs_create_flow_resp resp;
 	size_t cmd_size;
 	size_t written_size;
 	int i, err;