
Currently there is no way to observe whether the lock-free mode is configured from the driver's perspective. Add some debug logs for this. Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> --- providers/hns/hns_roce_u_verbs.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/providers/hns/hns_roce_u_verbs.c b/providers/hns/hns_roce_u_verbs.c index 6fc8ece32..ed8a9c538 100644 --- a/providers/hns/hns_roce_u_verbs.c +++ b/providers/hns/hns_roce_u_verbs.c @@ -550,6 +550,10 @@ static struct ibv_cq_ex *create_cq(struct ibv_context *context, cq->arm_sn = 1; + if (!cq->hr_lock.need_lock) + verbs_debug(verbs_get_ctx(context), + "set CQ(0x%x) to lock-free mode.\n", cq->cqn); + return &cq->verbs_cq.cq_ex; err_cmd: @@ -872,6 +876,10 @@ static struct ibv_srq *create_srq(struct ibv_context *context, init_attr->attr.max_sge = min(init_attr->attr.max_sge - srq->rsv_sge, hr_ctx->max_srq_sge); + if (!srq->hr_lock.need_lock) + verbs_debug(verbs_get_ctx(context), + "set SRQ(0x%x) to lock-free mode.\n", srq->srqn); + return &srq->verbs_srq.srq; err_destroy_srq: @@ -1627,6 +1635,11 @@ static struct ibv_qp *create_qp(struct ibv_context *ibv_ctx, qp_setup_config(attr, qp, context); + if (!qp->sq.hr_lock.need_lock) + verbs_debug(verbs_get_ctx(ibv_ctx), + "set QP(0x%x) to lock-free mode.\n", + qp->verbs_qp.qp.qp_num); + return &qp->verbs_qp.qp; err_dwqe: -- 2.33.0