mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
IB/rdmavt: Add swqe mr deref helper
Add a helper to release mr references held by an swqe. Reviewed-by: Brian Welty <[email protected]> Signed-off-by: Mike Marciniszyn <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
This commit is contained in:
parent
9d8145a604
commit
f6475223b1
1 changed files with 17 additions and 0 deletions
|
|
@ -485,6 +485,23 @@ static inline void rvt_put_qp(struct rvt_qp *qp)
|
|||
wake_up(&qp->wait);
|
||||
}
|
||||
|
||||
/**
|
||||
* rvt_put_swqe - drop mr refs held by swqe
|
||||
* @wqe - the send wqe
|
||||
*
|
||||
* This drops any mr references held by the swqe
|
||||
*/
|
||||
static inline void rvt_put_swqe(struct rvt_swqe *wqe)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < wqe->wr.num_sge; i++) {
|
||||
struct rvt_sge *sge = &wqe->sg_list[i];
|
||||
|
||||
rvt_put_mr(sge->mr);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* rvt_qp_wqe_reserve - reserve operation
|
||||
* @qp - the rvt qp
|
||||
|
|
|
|||
Loading…
Reference in a new issue