Skip to content

Commit d7989b2

Browse files
Guofeng Yuesshaulnv
authored andcommitted
Perftest: Fix TD lock-free mode not working for QP
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 <[email protected]> Signed-off-by: Junxian Huang <[email protected]>
1 parent 8f87972 commit d7989b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/perftest_resources.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,7 +2384,13 @@ struct ibv_qp* ctx_qp_create(struct pingpong_context *ctx,
23842384
else if (opcode == IBV_WR_RDMA_READ)
23852385
attr_ex.send_ops_flags |= IBV_QP_EX_WITH_RDMA_READ;
23862386
}
2387+
2388+
#ifdef HAVE_TD_API
2389+
attr_ex.pd = user_param->no_lock ? ctx->pad : ctx->pd;
2390+
#else
23872391
attr_ex.pd = ctx->pd;
2392+
#endif
2393+
23882394
attr_ex.comp_mask |= IBV_QP_INIT_ATTR_SEND_OPS_FLAGS | IBV_QP_INIT_ATTR_PD;
23892395
attr_ex.send_cq = attr.send_cq;
23902396
attr_ex.recv_cq = attr.recv_cq;

0 commit comments

Comments
 (0)