提交 f6475223 编写于 作者: M Mike Marciniszyn 提交者: Doug Ledford

IB/rdmavt: Add swqe mr deref helper

Add a helper to release mr references held by
an swqe.
Reviewed-by: NBrian Welty <brian.welty@intel.com>
Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 9d8145a6
...@@ -485,6 +485,23 @@ static inline void rvt_put_qp(struct rvt_qp *qp) ...@@ -485,6 +485,23 @@ static inline void rvt_put_qp(struct rvt_qp *qp)
wake_up(&qp->wait); 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 * rvt_qp_wqe_reserve - reserve operation
* @qp - the rvt qp * @qp - the rvt qp
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册