OSDN Git Service

xprtrdma: Fix max_send_wr computation
authorChuck Lever <chuck.lever@oracle.com>
Fri, 4 May 2018 19:34:48 +0000 (15:34 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 7 May 2018 13:20:03 +0000 (09:20 -0400)
commit914fcad9873cbd46e3a4c3c31551b98b15a49079
treed3a0779b4a7b0482728801b0ebec2c8ee110df22
parent107c4beb9bedd07d6e22f7010333dba3dc988292
xprtrdma: Fix max_send_wr computation

For FRWR, the computation of max_send_wr is split between
frwr_op_open and rpcrdma_ep_create, which makes it difficult to tell
that the max_send_wr result is currently incorrect if frwr_op_open
has to reduce the credit limit to accommodate a small max_qp_wr.
This is a problem now that extra WRs are needed for backchannel
operations and a drain CQE.

So, refactor the computation so that it is all done in ->ro_open,
and fix the FRWR version of this computation so that it
accommodates HCAs with small max_qp_wr correctly.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/fmr_ops.c
net/sunrpc/xprtrdma/frwr_ops.c
net/sunrpc/xprtrdma/verbs.c