diff mbox

[libibverbs,v3,3/3] Provide remote XRC SRQ number in kernel post_send.

Message ID 7cbd28d106bbb49d03fbf0cac2e2948cb9e269bb.1474352400.git-series.knut.omang@oracle.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Knut Omang Sept. 20, 2016, 6:22 a.m. UTC
Also proper end align the ibv_kern_send_wr struct.

Requires a corresponding kernel change.

Signed-off-by: Knut Omang <knut.omang@oracle.com>
Reviewed-by: Mukesh Kacker <mukesh.kacker@oracle.com>
---
 include/infiniband/kern-abi.h | 1 +
 src/cmd.c                     | 2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/include/infiniband/kern-abi.h b/include/infiniband/kern-abi.h
index ddea393..a0b5315 100644
--- a/include/infiniband/kern-abi.h
+++ b/include/infiniband/kern-abi.h
@@ -821,6 +821,7 @@  struct ibv_kern_send_wr {
 	union {
 		struct {
 			__u32 remote_srqn;
+			__u32 reserved;
 		} xrc;
 	} qp_type;
 };
diff --git a/src/cmd.c b/src/cmd.c
index 381dcc7..bd85add 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1323,6 +1323,8 @@  int ibv_cmd_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 			tmp->wr.ud.remote_qpn  = i->wr.ud.remote_qpn;
 			tmp->wr.ud.remote_qkey = i->wr.ud.remote_qkey;
 		} else {
+			if (ibqp->qp_type == IBV_QPT_XRC_SEND)
+				tmp->qp_type.xrc.remote_srqn = i->qp_type.xrc.remote_srqn;
 			switch (i->opcode) {
 			case IBV_WR_RDMA_WRITE:
 			case IBV_WR_RDMA_WRITE_WITH_IMM: