IB/hfi1,IB/qib: Use new send completion helper
Convert cq completion returns in both rdmavt drivers to use the new helper. Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
f2dc9cdce8
commit
0771da5a6e
@@ -1146,7 +1146,6 @@ void hfi1_rc_send_complete(struct rvt_qp *qp, struct ib_header *hdr)
|
||||
{
|
||||
struct ib_other_headers *ohdr;
|
||||
struct rvt_swqe *wqe;
|
||||
struct ib_wc wc;
|
||||
unsigned i;
|
||||
u32 opcode;
|
||||
u32 psn;
|
||||
@@ -1200,17 +1199,7 @@ void hfi1_rc_send_complete(struct rvt_qp *qp, struct ib_header *hdr)
|
||||
|
||||
rvt_put_mr(sge->mr);
|
||||
}
|
||||
/* Post a send completion queue entry if requested. */
|
||||
if (!(qp->s_flags & RVT_S_SIGNAL_REQ_WR) ||
|
||||
(wqe->wr.send_flags & IB_SEND_SIGNALED)) {
|
||||
memset(&wc, 0, sizeof(wc));
|
||||
wc.wr_id = wqe->wr.wr_id;
|
||||
wc.status = IB_WC_SUCCESS;
|
||||
wc.opcode = ib_hfi1_wc_opcode[wqe->wr.opcode];
|
||||
wc.byte_len = wqe->length;
|
||||
wc.qp = &qp->ibqp;
|
||||
rvt_cq_enter(ibcq_to_rvtcq(qp->ibqp.send_cq), &wc, 0);
|
||||
}
|
||||
rvt_qp_swqe_complete(qp, wqe, IB_WC_SUCCESS);
|
||||
}
|
||||
/*
|
||||
* If we were waiting for sends to complete before re-sending,
|
||||
@@ -1240,7 +1229,6 @@ static struct rvt_swqe *do_rc_completion(struct rvt_qp *qp,
|
||||
struct rvt_swqe *wqe,
|
||||
struct hfi1_ibport *ibp)
|
||||
{
|
||||
struct ib_wc wc;
|
||||
unsigned i;
|
||||
|
||||
lockdep_assert_held(&qp->s_lock);
|
||||
@@ -1264,17 +1252,7 @@ static struct rvt_swqe *do_rc_completion(struct rvt_qp *qp,
|
||||
qp->s_last = s_last;
|
||||
/* see post_send() */
|
||||
barrier();
|
||||
/* Post a send completion queue entry if requested. */
|
||||
if (!(qp->s_flags & RVT_S_SIGNAL_REQ_WR) ||
|
||||
(wqe->wr.send_flags & IB_SEND_SIGNALED)) {
|
||||
memset(&wc, 0, sizeof(wc));
|
||||
wc.wr_id = wqe->wr.wr_id;
|
||||
wc.status = IB_WC_SUCCESS;
|
||||
wc.opcode = ib_hfi1_wc_opcode[wqe->wr.opcode];
|
||||
wc.byte_len = wqe->length;
|
||||
wc.qp = &qp->ibqp;
|
||||
rvt_cq_enter(ibcq_to_rvtcq(qp->ibqp.send_cq), &wc, 0);
|
||||
}
|
||||
rvt_qp_swqe_complete(qp, wqe, IB_WC_SUCCESS);
|
||||
} else {
|
||||
struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
|
||||
|
||||
|
Reference in New Issue
Block a user