IB/mlx5: Fix the locking of SRQ objects in ODP events
QP and SRQ objects are stored in different containers so the action to get
and lock a common resource during ODP event needs to address that.
While here get rid of 'refcount' and 'free' fields in mlx5_core_srq struct
and use the fields with same semantics in common structure.
Fixes: 032080ab43
("IB/mlx5: Lock QP during page fault handling")
Signed-off-by: Moni Shoua <monis@mellanox.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Цей коміт міститься в:

зафіксовано
Jason Gunthorpe

джерело
e431a80a54
коміт
10f56242e3
@@ -187,8 +187,8 @@ static void handle_responder(struct ib_wc *wc, struct mlx5_cqe64 *cqe,
|
||||
wqe_ctr = be16_to_cpu(cqe->wqe_counter);
|
||||
wc->wr_id = srq->wrid[wqe_ctr];
|
||||
mlx5_ib_free_srq_wqe(srq, wqe_ctr);
|
||||
if (msrq && atomic_dec_and_test(&msrq->refcount))
|
||||
complete(&msrq->free);
|
||||
if (msrq)
|
||||
mlx5_core_res_put(&msrq->common);
|
||||
}
|
||||
} else {
|
||||
wq = &qp->rq;
|
||||
|
Посилання в новій задачі
Заблокувати користувача