mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 00:08:50 +00:00
xprtrdma: Clean up synopsis of rpcrdma_flush_disconnect()
Refactor: Pass struct rpcrdma_xprt instead of an IB layer object. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
2d97f46376
commit
f423f755f4
@ -367,7 +367,7 @@ static void frwr_wc_fastreg(struct ib_cq *cq, struct ib_wc *wc)
|
|||||||
trace_xprtrdma_wc_fastreg(wc, frwr);
|
trace_xprtrdma_wc_fastreg(wc, frwr);
|
||||||
/* The MR will get recycled when the associated req is retransmitted */
|
/* The MR will get recycled when the associated req is retransmitted */
|
||||||
|
|
||||||
rpcrdma_flush_disconnect(cq, wc);
|
rpcrdma_flush_disconnect(cq->cq_context, wc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -452,7 +452,7 @@ static void frwr_wc_localinv(struct ib_cq *cq, struct ib_wc *wc)
|
|||||||
trace_xprtrdma_wc_li(wc, frwr);
|
trace_xprtrdma_wc_li(wc, frwr);
|
||||||
__frwr_release_mr(wc, mr);
|
__frwr_release_mr(wc, mr);
|
||||||
|
|
||||||
rpcrdma_flush_disconnect(cq, wc);
|
rpcrdma_flush_disconnect(cq->cq_context, wc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -474,7 +474,7 @@ static void frwr_wc_localinv_wake(struct ib_cq *cq, struct ib_wc *wc)
|
|||||||
__frwr_release_mr(wc, mr);
|
__frwr_release_mr(wc, mr);
|
||||||
complete(&frwr->fr_linv_done);
|
complete(&frwr->fr_linv_done);
|
||||||
|
|
||||||
rpcrdma_flush_disconnect(cq, wc);
|
rpcrdma_flush_disconnect(cq->cq_context, wc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -582,7 +582,7 @@ static void frwr_wc_localinv_done(struct ib_cq *cq, struct ib_wc *wc)
|
|||||||
smp_rmb();
|
smp_rmb();
|
||||||
rpcrdma_complete_rqst(rep);
|
rpcrdma_complete_rqst(rep);
|
||||||
|
|
||||||
rpcrdma_flush_disconnect(cq, wc);
|
rpcrdma_flush_disconnect(cq->cq_context, wc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -132,14 +132,13 @@ static void rpcrdma_qp_event_handler(struct ib_event *event, void *context)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* rpcrdma_flush_disconnect - Disconnect on flushed completion
|
* rpcrdma_flush_disconnect - Disconnect on flushed completion
|
||||||
* @cq: completion queue
|
* @r_xprt: transport to disconnect
|
||||||
* @wc: work completion entry
|
* @wc: work completion entry
|
||||||
*
|
*
|
||||||
* Must be called in process context.
|
* Must be called in process context.
|
||||||
*/
|
*/
|
||||||
void rpcrdma_flush_disconnect(struct ib_cq *cq, struct ib_wc *wc)
|
void rpcrdma_flush_disconnect(struct rpcrdma_xprt *r_xprt, struct ib_wc *wc)
|
||||||
{
|
{
|
||||||
struct rpcrdma_xprt *r_xprt = cq->cq_context;
|
|
||||||
struct rpc_xprt *xprt = &r_xprt->rx_xprt;
|
struct rpc_xprt *xprt = &r_xprt->rx_xprt;
|
||||||
|
|
||||||
if (wc->status != IB_WC_SUCCESS &&
|
if (wc->status != IB_WC_SUCCESS &&
|
||||||
@ -160,11 +159,12 @@ static void rpcrdma_wc_send(struct ib_cq *cq, struct ib_wc *wc)
|
|||||||
struct ib_cqe *cqe = wc->wr_cqe;
|
struct ib_cqe *cqe = wc->wr_cqe;
|
||||||
struct rpcrdma_sendctx *sc =
|
struct rpcrdma_sendctx *sc =
|
||||||
container_of(cqe, struct rpcrdma_sendctx, sc_cqe);
|
container_of(cqe, struct rpcrdma_sendctx, sc_cqe);
|
||||||
|
struct rpcrdma_xprt *r_xprt = cq->cq_context;
|
||||||
|
|
||||||
/* WARNING: Only wr_cqe and status are reliable at this point */
|
/* WARNING: Only wr_cqe and status are reliable at this point */
|
||||||
trace_xprtrdma_wc_send(sc, wc);
|
trace_xprtrdma_wc_send(sc, wc);
|
||||||
rpcrdma_sendctx_put_locked((struct rpcrdma_xprt *)cq->cq_context, sc);
|
rpcrdma_sendctx_put_locked(r_xprt, sc);
|
||||||
rpcrdma_flush_disconnect(cq, wc);
|
rpcrdma_flush_disconnect(r_xprt, wc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -199,7 +199,7 @@ static void rpcrdma_wc_receive(struct ib_cq *cq, struct ib_wc *wc)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
out_flushed:
|
out_flushed:
|
||||||
rpcrdma_flush_disconnect(cq, wc);
|
rpcrdma_flush_disconnect(r_xprt, wc);
|
||||||
rpcrdma_rep_destroy(rep);
|
rpcrdma_rep_destroy(rep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -446,7 +446,7 @@ extern unsigned int xprt_rdma_memreg_strategy;
|
|||||||
/*
|
/*
|
||||||
* Endpoint calls - xprtrdma/verbs.c
|
* Endpoint calls - xprtrdma/verbs.c
|
||||||
*/
|
*/
|
||||||
void rpcrdma_flush_disconnect(struct ib_cq *cq, struct ib_wc *wc);
|
void rpcrdma_flush_disconnect(struct rpcrdma_xprt *r_xprt, struct ib_wc *wc);
|
||||||
int rpcrdma_xprt_connect(struct rpcrdma_xprt *r_xprt);
|
int rpcrdma_xprt_connect(struct rpcrdma_xprt *r_xprt);
|
||||||
void rpcrdma_xprt_disconnect(struct rpcrdma_xprt *r_xprt);
|
void rpcrdma_xprt_disconnect(struct rpcrdma_xprt *r_xprt);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user