i40e: reset veb.tc_stats when resetting veb.stats
authorJacob Keller <jacob.e.keller@intel.com>
Tue, 23 Jul 2019 10:01:37 +0000 (06:01 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 22 Aug 2019 20:24:13 +0000 (13:24 -0700)
The stats structure for the VEB switch statistics is reset periodically,
but the tc_stats are not reset at the same time.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 4551d97771c97462dd7b1609f5858c6c9057b51f..5c280c02508520253342cac83f7ad0d1cac191e5 100644 (file)
@@ -534,6 +534,10 @@ void i40e_pf_reset_stats(struct i40e_pf *pf)
                               sizeof(pf->veb[i]->stats));
                        memset(&pf->veb[i]->stats_offsets, 0,
                               sizeof(pf->veb[i]->stats_offsets));
+                       memset(&pf->veb[i]->tc_stats, 0,
+                              sizeof(pf->veb[i]->tc_stats));
+                       memset(&pf->veb[i]->tc_stats_offsets, 0,
+                              sizeof(pf->veb[i]->tc_stats_offsets));
                        pf->veb[i]->stat_offsets_loaded = false;
                }
        }