[RFC,10/12] net/mlx5: support VLAN stripping offload on Windows

Message ID 20210915104348.12920-11-talshn@nvidia.com (mailing list archive)
State RFC, archived
Delegated to: Raslan Darawsheh
Headers
Series Expand NIC offloads support on Windows |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tal Shnaiderman Sept. 15, 2021, 10:43 a.m. UTC
  Support of the VLAN stripping offloading by checking
the relevant FW capability (vlan_cap) for NIC support.

Supported offload:

DEV_RX_OFFLOAD_VLAN_STRIP

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 drivers/net/mlx5/windows/mlx5_os.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c
index 2aaacd0afb..4d4a7c19ac 100644
--- a/drivers/net/mlx5/windows/mlx5_os.c
+++ b/drivers/net/mlx5/windows/mlx5_os.c
@@ -475,8 +475,6 @@  mlx5_dev_spawn(struct rte_device *dpdk_dev,
 		config->ind_table_max_size = ETH_RSS_RETA_SIZE_512;
 	DRV_LOG(DEBUG, "maximum Rx indirection table size is %u",
 		config->ind_table_max_size);
-	DRV_LOG(DEBUG, "VLAN stripping is %ssupported",
-		(config->hw_vlan_strip ? "" : "not "));
 	if (config->hw_padding) {
 		DRV_LOG(DEBUG, "Rx end alignment padding isn't supported");
 		config->hw_padding = 0;
@@ -510,6 +508,9 @@  mlx5_dev_spawn(struct rte_device *dpdk_dev,
 		config->hw_csum = config->hca_attr.csum_cap;
 		DRV_LOG(DEBUG, "checksum offloading is %ssupported",
 		    (config->hw_csum ? "" : "not "));
+		config->hw_vlan_strip = config->hca_attr.vlan_cap;
+		DRV_LOG(DEBUG, "VLAN stripping is %ssupported",
+			(config->hw_vlan_strip ? "" : "not "));
 	}
 	if (config->devx) {
 		uint32_t reg[MLX5_ST_SZ_DW(register_mtutc)];