From: Tal Shnaiderman Date: Tue, 12 Oct 2021 12:45:48 +0000 (+0300) Subject: common/mlx5: read TSO capability from DevX X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d338df9969700627772a833a6d05499cbf21527c;p=dpdk.git common/mlx5: read TSO capability from DevX mlx5 in Windows needs the hca capability max_lso_cap to query the NIC for TSO offloading support. Added the capability as part of the capabilities queried by the PMD using DevX. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad Tested-by: Idan Hackmon --- diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index 372da993b3..da465e1bbc 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -996,6 +996,8 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, hcattr, csum_cap); attr->lro_cap = MLX5_GET(per_protocol_networking_offload_caps, hcattr, lro_cap); + attr->max_lso_cap = MLX5_GET(per_protocol_networking_offload_caps, + hcattr, max_lso_cap); 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, diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h index f65dfc0397..6c3119e714 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.h +++ b/drivers/common/mlx5/mlx5_devx_cmds.h @@ -113,6 +113,7 @@ struct mlx5_hca_attr { uint32_t tunnel_stateless_geneve_rx:1; uint32_t geneve_max_opt_len:1; /* 0x0: 14DW, 0x1: 63DW */ uint32_t tunnel_stateless_gtp:1; + uint32_t max_lso_cap; uint32_t lro_cap:1; uint32_t tunnel_lro_gre:1; uint32_t tunnel_lro_vxlan:1;