Skip to content

Commit f4c1204

Browse files
Dean Luickweiny2
authored andcommitted
qperf: Add IBV_QP_CAP to ibv_query_qp call
Add IBV_QP_CAP to make sure the capabilities field is returned by the device. According to the man page devices are allowed to abbreviate the data returned. This ensures we get the capabilities at a minimum. Reviewed-by: Dean Luick <[email protected]> Signed-off-by: Somnath Kotur <[email protected]> Signed-off-by: Ira Weiny <[email protected]>
1 parent 37018ef commit f4c1204

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ rd_open(DEVICE *dev, int trans, int max_send_wr, int max_recv_wr)
14941494
struct ibv_qp_attr qp_attr;
14951495
struct ibv_qp_init_attr qp_init_attr;
14961496

1497-
if (ibv_query_qp(dev->qp, &qp_attr, 0, &qp_init_attr) != 0)
1497+
if (ibv_query_qp(dev->qp, &qp_attr, IBV_QP_CAP, &qp_init_attr) != 0)
14981498
error(SYS, "query QP failed");
14991499
dev->max_inline = qp_attr.cap.max_inline_data;
15001500
}

0 commit comments

Comments
 (0)