File tree Expand file tree Collapse file tree 5 files changed +18
-18
lines changed Expand file tree Collapse file tree 5 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ int xprt_rdma_bc_send_reply(struct rpc_rqst *rqst)
115
115
if (rc < 0 )
116
116
goto failed_marshal ;
117
117
118
- if (rpcrdma_ep_post ( & r_xprt -> rx_ia , & r_xprt -> rx_ep , req ))
118
+ if (rpcrdma_post_sends ( r_xprt , req ))
119
119
goto drop_connection ;
120
120
return 0 ;
121
121
Original file line number Diff line number Diff line change @@ -374,18 +374,22 @@ static void frwr_wc_fastreg(struct ib_cq *cq, struct ib_wc *wc)
374
374
}
375
375
376
376
/**
377
- * frwr_send - post Send WR containing the RPC Call message
378
- * @ia: interface adapter
379
- * @req: Prepared RPC Call
377
+ * frwr_send - post Send WRs containing the RPC Call message
378
+ * @r_xprt: controlling transport instance
379
+ * @req: prepared RPC Call
380
380
*
381
381
* For FRWR, chain any FastReg WRs to the Send WR. Only a
382
382
* single ib_post_send call is needed to register memory
383
383
* and then post the Send WR.
384
384
*
385
- * Returns the result of ib_post_send.
385
+ * Returns the return code from ib_post_send.
386
+ *
387
+ * Caller must hold the transport send lock to ensure that the
388
+ * pointers to the transport's rdma_cm_id and QP are stable.
386
389
*/
387
- int frwr_send (struct rpcrdma_ia * ia , struct rpcrdma_req * req )
390
+ int frwr_send (struct rpcrdma_xprt * r_xprt , struct rpcrdma_req * req )
388
391
{
392
+ struct rpcrdma_ia * ia = & r_xprt -> rx_ia ;
389
393
struct ib_send_wr * post_wr ;
390
394
struct rpcrdma_mr * mr ;
391
395
Original file line number Diff line number Diff line change @@ -688,7 +688,7 @@ xprt_rdma_send_request(struct rpc_rqst *rqst)
688
688
goto drop_connection ;
689
689
rqst -> rq_xtime = ktime_get ();
690
690
691
- if (rpcrdma_ep_post ( & r_xprt -> rx_ia , & r_xprt -> rx_ep , req ))
691
+ if (rpcrdma_post_sends ( r_xprt , req ))
692
692
goto drop_connection ;
693
693
694
694
rqst -> rq_xmit_bytes_sent += rqst -> rq_snd_buf .len ;
Original file line number Diff line number Diff line change @@ -1461,20 +1461,17 @@ static void rpcrdma_regbuf_free(struct rpcrdma_regbuf *rb)
1461
1461
}
1462
1462
1463
1463
/**
1464
- * rpcrdma_ep_post - Post WRs to a transport's Send Queue
1465
- * @ia: transport's device information
1466
- * @ep: transport's RDMA endpoint information
1464
+ * rpcrdma_post_sends - Post WRs to a transport's Send Queue
1465
+ * @r_xprt: controlling transport instance
1467
1466
* @req: rpcrdma_req containing the Send WR to post
1468
1467
*
1469
1468
* Returns 0 if the post was successful, otherwise -ENOTCONN
1470
1469
* is returned.
1471
1470
*/
1472
- int
1473
- rpcrdma_ep_post (struct rpcrdma_ia * ia ,
1474
- struct rpcrdma_ep * ep ,
1475
- struct rpcrdma_req * req )
1471
+ int rpcrdma_post_sends (struct rpcrdma_xprt * r_xprt , struct rpcrdma_req * req )
1476
1472
{
1477
1473
struct ib_send_wr * send_wr = & req -> rl_wr ;
1474
+ struct rpcrdma_ep * ep = & r_xprt -> rx_ep ;
1478
1475
int rc ;
1479
1476
1480
1477
if (!ep -> rep_send_count || kref_read (& req -> rl_kref ) > 1 ) {
@@ -1485,7 +1482,7 @@ rpcrdma_ep_post(struct rpcrdma_ia *ia,
1485
1482
-- ep -> rep_send_count ;
1486
1483
}
1487
1484
1488
- rc = frwr_send (ia , req );
1485
+ rc = frwr_send (r_xprt , req );
1489
1486
trace_xprtrdma_post_send (req , rc );
1490
1487
if (rc )
1491
1488
return - ENOTCONN ;
Original file line number Diff line number Diff line change @@ -467,8 +467,7 @@ void rpcrdma_ia_close(struct rpcrdma_ia *);
467
467
int rpcrdma_ep_connect (struct rpcrdma_ep * , struct rpcrdma_ia * );
468
468
void rpcrdma_ep_disconnect (struct rpcrdma_ep * , struct rpcrdma_ia * );
469
469
470
- int rpcrdma_ep_post (struct rpcrdma_ia * , struct rpcrdma_ep * ,
471
- struct rpcrdma_req * );
470
+ int rpcrdma_post_sends (struct rpcrdma_xprt * r_xprt , struct rpcrdma_req * req );
472
471
void rpcrdma_post_recvs (struct rpcrdma_xprt * r_xprt , bool temp );
473
472
474
473
/*
@@ -542,7 +541,7 @@ struct rpcrdma_mr_seg *frwr_map(struct rpcrdma_xprt *r_xprt,
542
541
struct rpcrdma_mr_seg * seg ,
543
542
int nsegs , bool writing , __be32 xid ,
544
543
struct rpcrdma_mr * mr );
545
- int frwr_send (struct rpcrdma_ia * ia , struct rpcrdma_req * req );
544
+ int frwr_send (struct rpcrdma_xprt * r_xprt , struct rpcrdma_req * req );
546
545
void frwr_reminv (struct rpcrdma_rep * rep , struct list_head * mrs );
547
546
void frwr_unmap_sync (struct rpcrdma_xprt * r_xprt , struct rpcrdma_req * req );
548
547
void frwr_unmap_async (struct rpcrdma_xprt * r_xprt , struct rpcrdma_req * req );
You can’t perform that action at this time.
0 commit comments