Skip to contentSkip to conversation

i40e: Fix the timeliness of stats after deleting tc

PATCH New Jedrzej Jagielski 1 participant 1 message Dec 14, 2021

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

PATCH 1/1 i40e: Fix the timeliness of stats after deleting tc

There was an issue with ethtool stats that
have not been cleared after tc had been deleted.
Fix this by resetting stats after deleting tc
by calling i40e_vsi_reset_stats() function
after distroying qdisc.

Fixes 41c445ff0f48 ("i40e: main driver core")
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_main.c +5 -0
index 5322f44ed6ce..9a16874337ac 100644
@@ -5690,6 +5690,11 @@ static int i40e_vsi_config_tc(struct i40e_vsi *vsi, u8 enabled_tc)
 
 	/* Update the netdev TC setup */
 	i40e_vsi_config_netdev_tc(vsi, enabled_tc);
+
+	/* After distroying qdisc reset all stats of the vsi */
+	if (!vsi->mqprio_qopt.qopt.hw)
+		i40e_vsi_reset_stats(vsi);
+
 out:
 	return ret;
 }
Signature · 1 line
2.27.0