IB/{rdmavt, qib, hfi1}: Use new routine to release reference counts
The reference count adjustments on reference count completion are open coded throughout. Add a routine to do all reference count adjustments and use. Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Este cometimento está contido em:

cometido por
Jason Gunthorpe

ascendente
52cdbcc2b1
cometimento
d40f69c9b9
@@ -1834,7 +1834,7 @@ void hfi1_rc_send_complete(struct rvt_qp *qp, struct hfi1_opa_header *opah)
|
||||
qp->s_last = s_last;
|
||||
/* see post_send() */
|
||||
barrier();
|
||||
rvt_put_swqe(wqe);
|
||||
rvt_put_qp_swqe(qp, wqe);
|
||||
rvt_qp_swqe_complete(qp,
|
||||
wqe,
|
||||
ib_hfi1_wc_opcode[wqe->wr.opcode],
|
||||
@@ -1882,7 +1882,7 @@ struct rvt_swqe *do_rc_completion(struct rvt_qp *qp,
|
||||
u32 s_last;
|
||||
|
||||
trdma_clean_swqe(qp, wqe);
|
||||
rvt_put_swqe(wqe);
|
||||
rvt_put_qp_swqe(qp, wqe);
|
||||
rvt_qp_wqe_unreserve(qp, wqe);
|
||||
s_last = qp->s_last;
|
||||
trace_hfi1_qp_send_completion(qp, wqe, s_last);
|
||||
|
@@ -933,7 +933,7 @@ void qib_rc_send_complete(struct rvt_qp *qp, struct ib_header *hdr)
|
||||
qp->s_last = s_last;
|
||||
/* see post_send() */
|
||||
barrier();
|
||||
rvt_put_swqe(wqe);
|
||||
rvt_put_qp_swqe(qp, wqe);
|
||||
rvt_qp_swqe_complete(qp,
|
||||
wqe,
|
||||
ib_qib_wc_opcode[wqe->wr.opcode],
|
||||
@@ -975,7 +975,7 @@ static struct rvt_swqe *do_rc_completion(struct rvt_qp *qp,
|
||||
qib_cmp24(qp->s_sending_psn, qp->s_sending_hpsn) > 0) {
|
||||
u32 s_last;
|
||||
|
||||
rvt_put_swqe(wqe);
|
||||
rvt_put_qp_swqe(qp, wqe);
|
||||
s_last = qp->s_last;
|
||||
if (++s_last >= qp->s_size)
|
||||
s_last = 0;
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador