net/mlx5: fix software parsing support query
authorTal Shnaiderman <talshn@nvidia.com>
Tue, 12 Oct 2021 12:45:42 +0000 (15:45 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Tue, 12 Oct 2021 13:29:25 +0000 (15:29 +0200)
commitaccf3cfce4cb531bb1d5aceb1c1c84cc36ae9175
treecbe32c870c570cbacaa45892cf64e005327b4896
parente200fb6ba15a24c967cb00b9c014cf855a8a1f75
net/mlx5: fix software parsing support query

Currently, the PMD decides if the software parsing
offload can enable outer IPv4 checksum and tunneled
TSO support by checking config->hw_csum and config->tso
respectively.

This is incorrect, the right way is to check the following
flags returned by the mlx5dv_query_device function:

MLX5DV_SW_PARSING - check general swp support.
MLX5DV_SW_PARSING_CSUM - check swp checksum support.
MLX5DV_SW_PARSING_LSO - check swp LSO/TSO support.

The fix enables the offloads according to the correct
flags returned by the kernel.

Fixes: e46821e9fcdc ("net/mlx5: separate generic tunnel TSO from the standard one")
Cc: stable@dpdk.org
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tested-by: Idan Hackmon <idanhac@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/linux/mlx5_os.h
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_txq.c