svcrdma: Clean up comment in svc_rdma_accept()
authorChuck Lever <chuck.lever@oracle.com>
Mon, 11 Dec 2023 15:24:34 +0000 (10:24 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 7 Jan 2024 22:54:32 +0000 (17:54 -0500)
The comment that starts "Qualify ..." applies to only some of the
following code paragraph. Re-arrange the lines so the comment makes
more sense.

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

index 040d2ef6400cc97177ebbf5046e30c8b891f2e0f..8127c711fa3b36e4af6b18e8a79c242c74998198 100644 (file)
@@ -397,18 +397,22 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
        dev = newxprt->sc_cm_id->device;
        newxprt->sc_port_num = newxprt->sc_cm_id->port_num;
 
-       /* Qualify the transport resource defaults with the
-        * capabilities of this particular device */
+       newxprt->sc_max_req_size = svcrdma_max_req_size;
+       newxprt->sc_max_requests = svcrdma_max_requests;
+       newxprt->sc_max_bc_requests = svcrdma_max_bc_requests;
+       newxprt->sc_recv_batch = RPCRDMA_MAX_RECV_BATCH;
+       newxprt->sc_fc_credits = cpu_to_be32(newxprt->sc_max_requests);
+
+       /* Qualify the transport's resource defaults with the
+        * capabilities of this particular device.
+        */
+
        /* Transport header, head iovec, tail iovec */
        newxprt->sc_max_send_sges = 3;
        /* Add one SGE per page list entry */
        newxprt->sc_max_send_sges += (svcrdma_max_req_size / PAGE_SIZE) + 1;
        if (newxprt->sc_max_send_sges > dev->attrs.max_send_sge)
                newxprt->sc_max_send_sges = dev->attrs.max_send_sge;
-       newxprt->sc_max_req_size = svcrdma_max_req_size;
-       newxprt->sc_max_requests = svcrdma_max_requests;
-       newxprt->sc_max_bc_requests = svcrdma_max_bc_requests;
-       newxprt->sc_recv_batch = RPCRDMA_MAX_RECV_BATCH;
        rq_depth = newxprt->sc_max_requests + newxprt->sc_max_bc_requests +
                   newxprt->sc_recv_batch;
        if (rq_depth > dev->attrs.max_qp_wr) {
@@ -417,7 +421,6 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
                newxprt->sc_max_requests = rq_depth - 2;
                newxprt->sc_max_bc_requests = 2;
        }
-       newxprt->sc_fc_credits = cpu_to_be32(newxprt->sc_max_requests);
        ctxts = rdma_rw_mr_factor(dev, newxprt->sc_port_num, RPCSVC_MAXPAGES);
        ctxts *= newxprt->sc_max_requests;
        newxprt->sc_sq_depth = rq_depth + ctxts;