OSDN Git Service

xprtrdma: Avoid Receive Queue wrapping
authorChuck Lever <chuck.lever@oracle.com>
Mon, 19 Apr 2021 18:02:03 +0000 (14:02 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 26 Apr 2021 13:21:36 +0000 (09:21 -0400)
commit32e6b68167f1d446111c973d57e6f52aee11897a
treeb95ff733cf09995ef2396f6749d0fa84c17bf6e9
parentd99f2487e1de23a2e902d1a359a85a48bfd21fe7
xprtrdma: Avoid Receive Queue wrapping

Commit e340c2d6ef2a ("xprtrdma: Reduce the doorbell rate (Receive)")
increased the number of Receive WRs that are posted by the client,
but did not increase the size of the Receive Queue allocated during
transport set-up.

This is usually not an issue because RPCRDMA_BACKWARD_WRS is defined
as (32) when SUNRPC_BACKCHANNEL is defined. In cases where it isn't,
there is a real risk of Receive Queue wrapping.

Fixes: e340c2d6ef2a ("xprtrdma: Reduce the doorbell rate (Receive)")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Tom Talpey <tom@talpey.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/xprtrdma/frwr_ops.c