diff mbox

[rdma-core,1/2] providers/i40iw: Remove setting of rem_addr.len

Message ID 20180227205633.8292-2-tatyana.e.nikolova@intel.com (mailing list archive)
State Accepted
Delegated to: Leon Romanovsky
Headers show

Commit Message

Nikolova, Tatyana E Feb. 27, 2018, 8:56 p.m. UTC
From: Mustafa Ismail <mustafa.ismail@intel.com>

Remove setting of rem_addr.len before calling iw_rdma_write,
iw_inline_rdma_write and rdma_read, rem_addr.len is not used
in those functions.

Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
---
 providers/i40iw/i40iw_uverbs.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox

Patch

diff --git a/providers/i40iw/i40iw_uverbs.c b/providers/i40iw/i40iw_uverbs.c
index 7cde4457..bb3cfd43 100644
--- a/providers/i40iw/i40iw_uverbs.c
+++ b/providers/i40iw/i40iw_uverbs.c
@@ -835,17 +835,15 @@  int i40iw_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr, struct ibv
 			info.op_type = I40IW_OP_TYPE_RDMA_WRITE;
 
 			if (ib_wr->send_flags & IBV_SEND_INLINE) {
-			  info.op.inline_rdma_write.data = (void *)(uintptr_t)ib_wr->sg_list[0].addr;
+				info.op.inline_rdma_write.data = (void *)(uintptr_t)ib_wr->sg_list[0].addr;
 				info.op.inline_rdma_write.len = ib_wr->sg_list[0].length;
 				info.op.inline_rdma_write.rem_addr.tag_off = ib_wr->wr.rdma.remote_addr;
-				info.op.inline_rdma_write.rem_addr.len = ib_wr->sg_list->length;
 				info.op.inline_rdma_write.rem_addr.stag = ib_wr->wr.rdma.rkey;
 				ret = iwuqp->qp.ops.iw_inline_rdma_write(&iwuqp->qp, &info, false);
 			} else {
 				info.op.rdma_write.lo_sg_list = (void *)ib_wr->sg_list;
 				info.op.rdma_write.num_lo_sges = ib_wr->num_sge;
 				info.op.rdma_write.rem_addr.tag_off = ib_wr->wr.rdma.remote_addr;
-				info.op.rdma_write.rem_addr.len = ib_wr->sg_list->length;
 				info.op.rdma_write.rem_addr.stag = ib_wr->wr.rdma.rkey;
 				ret = iwuqp->qp.ops.iw_rdma_write(&iwuqp->qp, &info, false);
 			}
@@ -866,7 +864,6 @@  int i40iw_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr, struct ibv
 			info.op_type = I40IW_OP_TYPE_RDMA_READ;
 			info.op.rdma_read.rem_addr.tag_off = ib_wr->wr.rdma.remote_addr;
 			info.op.rdma_read.rem_addr.stag = ib_wr->wr.rdma.rkey;
-			info.op.rdma_read.rem_addr.len = ib_wr->sg_list->length;
 			info.op.rdma_read.lo_addr.tag_off = ib_wr->sg_list->addr;
 			info.op.rdma_read.lo_addr.stag = ib_wr->sg_list->lkey;
 			info.op.rdma_read.lo_addr.len = ib_wr->sg_list->length;