Skip to content

Commit

Permalink
qperf: Add IBV_QP_CAP to ibv_query_qp call
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Dean Luick authored and weiny2 committed Feb 14, 2017
1 parent 37018ef commit f4c1204
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,7 @@ rd_open(DEVICE *dev, int trans, int max_send_wr, int max_recv_wr)
struct ibv_qp_attr qp_attr;
struct ibv_qp_init_attr qp_init_attr;

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

0 comments on commit f4c1204

Please sign in to comment.