Commit 156878d0 authored by Maor Dickman's avatar Maor Dickman Committed by Saeed Mahameed
Browse files

net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled



The cited commit introduce new CONFIG_MLX5_CLS_ACT kconfig variable
to control compilation of TC hardware offloads implementation.
When this configuration is disabled the driver is still wrongly
reports in ethtool that hw-tc-offload is supported.

Fixed by reporting hw-tc-offload is supported only when
CONFIG_MLX5_CLS_ACT is enabled.

Fixes: d956873f ("net/mlx5e: Introduce kconfig var for TC support")
Signed-off-by: default avatarMaor Dickman <maord@nvidia.com>
Reviewed-by: default avatarVlad Buslov <vladbu@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 0aa12847
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5027,7 +5027,7 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)
	    FT_CAP(modify_root) &&
	    FT_CAP(identified_miss_table_mode) &&
	    FT_CAP(flow_table_modify)) {
#ifdef CONFIG_MLX5_ESWITCH
#if IS_ENABLED(CONFIG_MLX5_CLS_ACT)
		netdev->hw_features      |= NETIF_F_HW_TC;
#endif
#ifdef CONFIG_MLX5_EN_ARFS
+2 −0
Original line number Diff line number Diff line
@@ -737,7 +737,9 @@ static void mlx5e_build_rep_netdev(struct net_device *netdev)

	netdev->features       |= NETIF_F_NETNS_LOCAL;

#if IS_ENABLED(CONFIG_MLX5_CLS_ACT)
	netdev->hw_features    |= NETIF_F_HW_TC;
#endif
	netdev->hw_features    |= NETIF_F_SG;
	netdev->hw_features    |= NETIF_F_IP_CSUM;
	netdev->hw_features    |= NETIF_F_IPV6_CSUM;