summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtrdma/xprt_rdma.h
diff options
context:
space:
mode:
authorChuck Lever2016-03-04 17:28:27 +0100
committerAnna Schumaker2016-03-14 19:56:01 +0100
commit23826c7aeac7e333bfee6f10a3407a23c58b6147 (patch)
treeeeb5fe145b13b537658bb346e6dd958eaeb5e6d6 /net/sunrpc/xprtrdma/xprt_rdma.h
parentxprtrdma: Properly handle RDMA_ERROR replies (diff)
downloadkernel-qcow2-linux-23826c7aeac7e333bfee6f10a3407a23c58b6147.tar.gz
kernel-qcow2-linux-23826c7aeac7e333bfee6f10a3407a23c58b6147.tar.xz
kernel-qcow2-linux-23826c7aeac7e333bfee6f10a3407a23c58b6147.zip
xprtrdma: Serialize credit accounting again
Commit fe97b47cd623 ("xprtrdma: Use workqueue to process RPC/RDMA replies") replaced the reply tasklet with a workqueue that allows RPC replies to be processed in parallel. Thus the credit values in RPC-over-RDMA replies can be applied in a different order than in which the server sent them. To fix this, revert commit eba8ff660b2d ("xprtrdma: Move credit update to RPC reply handler"). Reverting is done by hand to accommodate code changes that have occurred since then. Fixes: fe97b47cd623 ("xprtrdma: Use workqueue to process . . .") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/xprt_rdma.h')
-rw-r--r--net/sunrpc/xprtrdma/xprt_rdma.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h
index 38fe11b09875..7bf6f43fa4b9 100644
--- a/net/sunrpc/xprtrdma/xprt_rdma.h
+++ b/net/sunrpc/xprtrdma/xprt_rdma.h
@@ -311,6 +311,7 @@ struct rpcrdma_buffer {
struct list_head rb_send_bufs;
struct list_head rb_recv_bufs;
u32 rb_max_requests;
+ atomic_t rb_credits; /* most recent credit grant */
u32 rb_bc_srv_max_requests;
spinlock_t rb_reqslock; /* protect rb_allreqs */