common/mlx5: read FCS scattering capability from DevX
authorTal Shnaiderman <talshn@nvidia.com>
Tue, 12 Oct 2021 12:45:52 +0000 (15:45 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Tue, 12 Oct 2021 13:29:38 +0000 (15:29 +0200)
mlx5 in Windows needs the hca capability scatter_fcs
to query the NIC support for the CRC keeping offload.

Added the capability as part of the capabilities
queried by the PMD using DevX.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tested-by: Idan Hackmon <idanhac@nvidia.com>
drivers/common/mlx5/mlx5_devx_cmds.c
drivers/common/mlx5/mlx5_devx_cmds.h

index e61dfac..6538bce 100644 (file)
@@ -1000,6 +1000,8 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
                                 lro_cap);
        attr->max_lso_cap = MLX5_GET(per_protocol_networking_offload_caps,
                                 hcattr, max_lso_cap);
+       attr->scatter_fcs = MLX5_GET(per_protocol_networking_offload_caps,
+                                hcattr, scatter_fcs);
        attr->tunnel_lro_gre = MLX5_GET(per_protocol_networking_offload_caps,
                                        hcattr, tunnel_lro_gre);
        attr->tunnel_lro_vxlan = MLX5_GET(per_protocol_networking_offload_caps,
index 05aa01b..6948cad 100644 (file)
@@ -115,6 +115,7 @@ struct mlx5_hca_attr {
        uint32_t geneve_max_opt_len:1; /* 0x0: 14DW, 0x1: 63DW */
        uint32_t tunnel_stateless_gtp:1;
        uint32_t max_lso_cap;
+       uint32_t scatter_fcs:1;
        uint32_t lro_cap:1;
        uint32_t tunnel_lro_gre:1;
        uint32_t tunnel_lro_vxlan:1;