Skip to contentSkip to conversation

IB/core: Pass imm_data from ib_uverbs_send_wr to ib_send_wr correctly when sending UD messages

PATCH New Latchesar Ionkov 1 participant 1 message Oct 19, 2013 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IB/core: Pass imm_data from ib_uverbs_send_wr to ib_send_wr correctly when sending UD messages

Currently, the infiniband subsystem doesn't copy the immediate data from the userspace struct to the kernel one when UD messages are being sent.

This patch makes sure that the immediate data is set correctly.

---
 drivers/infiniband/core/uverbs_cmd.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/infiniband/core/uverbs_cmd.c +3 -0
index f2b81b9..ba207e1 100644
@@ -2126,6 +2126,9 @@ ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file,
 			}
 			next->wr.ud.remote_qpn  = user_wr->wr.ud.remote_qpn;
 			next->wr.ud.remote_qkey = user_wr->wr.ud.remote_qkey;
+			if (next->opcode == IB_WR_SEND_WITH_IMM)
+				next->ex.imm_data =
+					(__be32 __force) user_wr->ex.imm_data;
 		} else {
 			switch (next->opcode) {
 			case IB_WR_RDMA_WRITE_WITH_IMM:
Signature · 6 lines
1.8.1.2

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