]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
xprtrdma: Eliminate rpcrdma_post_sends()
authorChuck Lever <chuck.lever@oracle.com>
Mon, 2 Aug 2021 18:44:42 +0000 (14:44 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 9 Aug 2021 20:42:25 +0000 (16:42 -0400)
Clean up.

Now that there is only one registration mode, there is only one
target "post_send" method: frwr_send(). rpcrdma_post_sends() no
longer adds much value, especially since all of its call sites
ignore the return code value except to check if it's non-zero.

Just have them call frwr_send() directly instead.

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

index 1151efd09b274da4edd86a3ca65df356ae6040b0..17f174d6ea3b9b29c26ea93987d8c593d132c4ef 100644 (file)
@@ -115,7 +115,7 @@ int xprt_rdma_bc_send_reply(struct rpc_rqst *rqst)
        if (rc < 0)
                goto failed_marshal;
 
-       if (rpcrdma_post_sends(r_xprt, req))
+       if (frwr_send(r_xprt, req))
                goto drop_connection;
        return 0;
 
index 9c2ffc67c0fde1940ac69dd9f76ed379637da1b7..a463400ed5a37a1d603aa45a10db1ed621fceff2 100644 (file)
@@ -661,7 +661,7 @@ xprt_rdma_send_request(struct rpc_rqst *rqst)
                goto drop_connection;
        rqst->rq_xtime = ktime_get();
 
-       if (rpcrdma_post_sends(r_xprt, req))
+       if (frwr_send(r_xprt, req))
                goto drop_connection;
 
        rqst->rq_xmit_bytes_sent += rqst->rq_snd_buf.len;
index 1e9041c022b6c2f6c5fbafe43af50df658b8fc53..aaec3c9be8db62d28a7d76bdc408d1e4678a9695 100644 (file)
@@ -1349,21 +1349,6 @@ static void rpcrdma_regbuf_free(struct rpcrdma_regbuf *rb)
        kfree(rb);
 }
 
-/**
- * rpcrdma_post_sends - Post WRs to a transport's Send Queue
- * @r_xprt: controlling transport instance
- * @req: rpcrdma_req containing the Send WR to post
- *
- * Returns 0 if the post was successful, otherwise -ENOTCONN
- * is returned.
- */
-int rpcrdma_post_sends(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req)
-{
-       if (frwr_send(r_xprt, req))
-               return -ENOTCONN;
-       return 0;
-}
-
 /**
  * rpcrdma_post_recvs - Refill the Receive Queue
  * @r_xprt: controlling transport instance
index 927e20a2c04e6288a6624b54b5f2534378298597..d91f54eae00b37c1312746958cf59009f0b719d8 100644 (file)
@@ -459,7 +459,6 @@ void rpcrdma_flush_disconnect(struct rpcrdma_xprt *r_xprt, struct ib_wc *wc);
 int rpcrdma_xprt_connect(struct rpcrdma_xprt *r_xprt);
 void rpcrdma_xprt_disconnect(struct rpcrdma_xprt *r_xprt);
 
-int rpcrdma_post_sends(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req);
 void rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, int needed, bool temp);
 
 /*