Commit 191ded4a authored by Bodong Wang's avatar Bodong Wang Committed by Doug Ledford

IB/mlx5: Report mlx5 multi packet WQE caps during query

The capabilities whether hardware support multi packet WQE or not is
exposed to user space through query_device by uhw.
Signed-off-by: default avatarBodong Wang <bodong@mellanox.com>
Reviewed-by: default avatarMatan Barak <matanb@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent c226dc22
...@@ -672,6 +672,17 @@ static int mlx5_ib_query_device(struct ib_device *ibdev, ...@@ -672,6 +672,17 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
1 << MLX5_CAP_GEN(dev->mdev, log_max_rq); 1 << MLX5_CAP_GEN(dev->mdev, log_max_rq);
} }
if (field_avail(typeof(resp), mlx5_ib_support_multi_pkt_send_wqes,
uhw->outlen)) {
resp.mlx5_ib_support_multi_pkt_send_wqes =
MLX5_CAP_ETH(mdev, multi_pkt_send_wqe);
resp.response_length +=
sizeof(resp.mlx5_ib_support_multi_pkt_send_wqes);
}
if (field_avail(typeof(resp), reserved, uhw->outlen))
resp.response_length += sizeof(resp.reserved);
if (uhw->outlen) { if (uhw->outlen) {
err = ib_copy_to_udata(uhw, &resp, resp.response_length); err = ib_copy_to_udata(uhw, &resp, resp.response_length);
......
...@@ -129,6 +129,8 @@ struct mlx5_ib_query_device_resp { ...@@ -129,6 +129,8 @@ struct mlx5_ib_query_device_resp {
__u32 response_length; __u32 response_length;
struct mlx5_ib_tso_caps tso_caps; struct mlx5_ib_tso_caps tso_caps;
struct mlx5_ib_rss_caps rss_caps; struct mlx5_ib_rss_caps rss_caps;
__u32 mlx5_ib_support_multi_pkt_send_wqes;
__u32 reserved;
}; };
struct mlx5_ib_create_cq { struct mlx5_ib_create_cq {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment