• Chuck Lever's avatar
    xprtrdma: Fix max_send_wr computation · 914fcad9
    Chuck Lever authored
    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: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    914fcad9
frwr_ops.c 16.5 KB