mirror of
https://github.com/torvalds/linux
synced 2024-09-20 19:17:24 +00:00
xprtrdma: Avoid Receive Queue wrapping
Commite340c2d6ef
("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:e340c2d6ef
("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>
This commit is contained in:
parent
d99f2487e1
commit
32e6b68167
|
@ -257,6 +257,7 @@ int frwr_query_device(struct rpcrdma_ep *ep, const struct ib_device *device)
|
|||
ep->re_attr.cap.max_send_wr += 1; /* for ib_drain_sq */
|
||||
ep->re_attr.cap.max_recv_wr = ep->re_max_requests;
|
||||
ep->re_attr.cap.max_recv_wr += RPCRDMA_BACKWARD_WRS;
|
||||
ep->re_attr.cap.max_recv_wr += RPCRDMA_MAX_RECV_BATCH;
|
||||
ep->re_attr.cap.max_recv_wr += 1; /* for ib_drain_rq */
|
||||
|
||||
ep->re_max_rdma_segs =
|
||||
|
|
Loading…
Reference in a new issue