aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtrdma/rpc_rdma.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2016-09-15 10:56:43 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-09-19 13:08:38 -0400
commit90aab6029606152d3d7ea91b41064580f77d7d19 (patch)
treea227e7a1576ed9691bda90df8d507c4d881c222c /net/sunrpc/xprtrdma/rpc_rdma.c
parentb157380af1941a43f3cfa244db1018f717031a42 (diff)
xprtrdma: Move send_wr to struct rpcrdma_req
Clean up: Most of the fields in each send_wr do not vary. There is no need to initialize them before each ib_post_send(). This removes a large-ish data structure from the stack. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/rpc_rdma.c')
-rw-r--r--net/sunrpc/xprtrdma/rpc_rdma.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
index 6187cee87fa9..c2906e314287 100644
--- a/net/sunrpc/xprtrdma/rpc_rdma.c
+++ b/net/sunrpc/xprtrdma/rpc_rdma.c
@@ -687,7 +687,7 @@ rpcrdma_marshal_req(struct rpc_rqst *rqst)
687 req->rl_send_iov[0].length = hdrlen; 687 req->rl_send_iov[0].length = hdrlen;
688 req->rl_send_iov[0].lkey = rdmab_lkey(req->rl_rdmabuf); 688 req->rl_send_iov[0].lkey = rdmab_lkey(req->rl_rdmabuf);
689 689
690 req->rl_niovs = 1; 690 req->rl_send_wr.num_sge = 1;
691 if (rtype == rpcrdma_areadch) 691 if (rtype == rpcrdma_areadch)
692 return 0; 692 return 0;
693 693
@@ -697,7 +697,8 @@ rpcrdma_marshal_req(struct rpc_rqst *rqst)
697 req->rl_send_iov[1].length = rpclen; 697 req->rl_send_iov[1].length = rpclen;
698 req->rl_send_iov[1].lkey = rdmab_lkey(req->rl_sendbuf); 698 req->rl_send_iov[1].lkey = rdmab_lkey(req->rl_sendbuf);
699 699
700 req->rl_niovs = 2; 700 req->rl_send_wr.num_sge = 2;
701
701 return 0; 702 return 0;
702 703
703out_overflow: 704out_overflow: