Skip to content

Commit

Permalink
Perftest: Fix TD lock-free mode not working for QP
Browse files Browse the repository at this point in the history
When creating QP in TD lock-free mode, set attr_ex.pd with ctx->pad
instead of ctx->pd, otherwise the lock-free won't work.

Fixes: 38d9fcf ("Perftest: Add support for TD lock-free mode")
Signed-off-by: Guofeng Yue <yueguofeng@h-partners.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
  • Loading branch information
Guofeng Yue authored and sshaulnv committed Aug 28, 2024
1 parent 8f87972 commit d7989b2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/perftest_resources.c
Original file line number Diff line number Diff line change
Expand Up @@ -2384,7 +2384,13 @@ struct ibv_qp* ctx_qp_create(struct pingpong_context *ctx,
else if (opcode == IBV_WR_RDMA_READ)
attr_ex.send_ops_flags |= IBV_QP_EX_WITH_RDMA_READ;
}

#ifdef HAVE_TD_API
attr_ex.pd = user_param->no_lock ? ctx->pad : ctx->pd;
#else
attr_ex.pd = ctx->pd;
#endif

attr_ex.comp_mask |= IBV_QP_INIT_ATTR_SEND_OPS_FLAGS | IBV_QP_INIT_ATTR_PD;
attr_ex.send_cq = attr.send_cq;
attr_ex.recv_cq = attr.recv_cq;
Expand Down

0 comments on commit d7989b2

Please sign in to comment.