mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
52cdbcc2b1
commit
d40f69c9b9
4 changed files with 20 additions and 11 deletions
|
@ -723,6 +723,20 @@ static inline void rvt_mod_retry_timer(struct rvt_qp *qp)
|
|||
return rvt_mod_retry_timer_ext(qp, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* rvt_put_qp_swqe - drop refs held by swqe
|
||||
* @qp: the send qp
|
||||
* @wqe: the send wqe
|
||||
*
|
||||
* This drops any references held by the swqe
|
||||
*/
|
||||
static inline void rvt_put_qp_swqe(struct rvt_qp *qp, struct rvt_swqe *wqe)
|
||||
{
|
||||
rvt_put_swqe(wqe);
|
||||
if (qp->allowed_ops == IB_OPCODE_UD)
|
||||
atomic_dec(&ibah_to_rvtah(wqe->ud_wr.ah)->refcount);
|
||||
}
|
||||
|
||||
extern const int ib_rvt_state_ops[];
|
||||
|
||||
struct rvt_dev_info;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue