]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
svcrdma: Update max_send_sges after QP is created
authorChuck Lever <chuck.lever@oracle.com>
Sun, 4 Feb 2024 23:16:50 +0000 (18:16 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Fri, 1 Mar 2024 14:12:26 +0000 (09:12 -0500)
rdma_create_qp() can modify cap.max_send_sges. Copy the new value
to the svcrdma transport so it is bound by the new limit instead
of the requested one.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/xprtrdma/svc_rdma_transport.c

index 8be0493797cf55e00084a2a08de7d815b42c83f3..839c0e80e5cd4a4263424e765a6ae0fdffd2cf28 100644 (file)
@@ -467,6 +467,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
                trace_svcrdma_qp_err(newxprt, ret);
                goto errout;
        }
+       newxprt->sc_max_send_sges = qp_attr.cap.max_send_sge;
        newxprt->sc_qp = newxprt->sc_cm_id->qp;
 
        if (!(dev->attrs.device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS))