diff options
author | Bodong Wang | 2016-10-31 11:15:21 +0100 |
---|---|---|
committer | Doug Ledford | 2016-12-13 19:33:25 +0100 |
commit | 191ded4a4d991acf17207e0b4370fef070bce3e9 (patch) | |
tree | 7354d327a5cdbade2797b7adcc0dbface23d925b /drivers | |
parent | net/mlx5: Report multi packet WQE capabilities (diff) | |
download | kernel-qcow2-linux-191ded4a4d991acf17207e0b4370fef070bce3e9.tar.gz kernel-qcow2-linux-191ded4a4d991acf17207e0b4370fef070bce3e9.tar.xz kernel-qcow2-linux-191ded4a4d991acf17207e0b4370fef070bce3e9.zip |
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: Bodong Wang <bodong@mellanox.com>
Reviewed-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mlx5/main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 46facd30e672..a16207c33333 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -672,6 +672,17 @@ static int mlx5_ib_query_device(struct ib_device *ibdev, 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) { err = ib_copy_to_udata(uhw, &resp, resp.response_length); |