Skip to contentSkip to conversation

i40e: Fix ntuple setting change

PATCH New Mateusz Palczewski 1 participant 1 message Dec 13, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 i40e: Fix ntuple setting change

Previous commit disabled hw-tc-offload netdev feature flag on driver probe. Fix checking of NETIF_F_HW_TC flag during netdev feature change. Without this patch, it would not be possible to change ntuple feature state.

---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +2 -1
index a7db6db..53ca517 100644
@@ -12724,7 +12724,8 @@ static int i40e_set_features(struct net_device *netdev,
 	else
 		i40e_vlan_stripping_disable(vsi);
 
-	if (!(features & NETIF_F_HW_TC) && pf->num_cloud_filters) {
+	if (!(features & NETIF_F_HW_TC) &&
+	    (netdev->features & NETIF_F_HW_TC) && pf->num_cloud_filters) {
 		dev_err(&pf->pdev->dev,
 			"Offloaded tc filters active, can't turn hw_tc_offload off");
 		return -EINVAL;
Signature · 1 line
2.27.0