]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
IB/mlx5: Report mlx5 enhanced multi packet WQE capability
authorBodong Wang <bodong@mellanox.com>
Thu, 17 Aug 2017 12:52:35 +0000 (15:52 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 24 Aug 2017 21:47:35 +0000 (17:47 -0400)
Expose enhanced multi packet WQE capability to user space through
query_device by uhw.

Signed-off-by: Bodong Wang <bodong@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c
include/linux/mlx5/mlx5_ifc.h
include/uapi/rdma/mlx5-abi.h

index ba0a97d6f6772a71bfa0a3585b1268172a27caaa..62e6298810e7d2b9fc6eb2d461eee4406d8cc6bf 100644 (file)
@@ -805,6 +805,11 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
                if (MLX5_CAP_ETH(mdev, multi_pkt_send_wqe))
                        resp.mlx5_ib_support_multi_pkt_send_wqes =
                                MLX5_IB_ALLOW_MPW;
+
+               if (MLX5_CAP_ETH(mdev, enhanced_multi_pkt_send_wqe))
+                       resp.mlx5_ib_support_multi_pkt_send_wqes |=
+                               MLX5_IB_SUPPORT_EMPW;
+
                resp.response_length +=
                        sizeof(resp.mlx5_ib_support_multi_pkt_send_wqes);
        }
index 6865e60ba4733c695921d5931d327494a84f04dc..4eff0b8a148254ed0f95ab3ece18460db758c589 100644 (file)
@@ -604,7 +604,7 @@ struct mlx5_ifc_per_protocol_networking_offload_caps_bits {
        u8         rss_ind_tbl_cap[0x4];
        u8         reg_umr_sq[0x1];
        u8         scatter_fcs[0x1];
-       u8         reserved_at_1a[0x1];
+       u8         enhanced_multi_pkt_send_wqe[0x1];
        u8         tunnel_lso_const_out_ip_id[0x1];
        u8         reserved_at_1c[0x2];
        u8         tunnel_statless_gre[0x1];
index a61a512e57479a964983790bf9851c6ba97cac9f..1791bf123ba96453564ec65fda99c27af062c052 100644 (file)
@@ -171,6 +171,7 @@ struct mlx5_packet_pacing_caps {
 enum mlx5_ib_mpw_caps {
        MPW_RESERVED            = 1 << 0,
        MLX5_IB_ALLOW_MPW       = 1 << 1,
+       MLX5_IB_SUPPORT_EMPW    = 1 << 2,
 };
 
 enum mlx5_ib_sw_parsing_offloads {