ice: update ethtool stats on-demand
authorBruce Allan <bruce.w.allan@intel.com>
Thu, 25 Jul 2019 09:53:50 +0000 (02:53 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 23 Aug 2019 17:34:27 +0000 (10:34 -0700)
commit5a4a8673102761fb87c94ee20633bf1f2a6911ca
treea689624258193ae7b02215df8c11eb0085ec1fa9
parent3f416961b0a5000bf5556de1a53cc3cf87a6e744
ice: update ethtool stats on-demand

Users expect ethtool statistics to be updated on-demand when invoking
'ethtool -S <iface>' instead of providing a snapshot of statistics taken
once a second (the frequency of the watchdog task where stats are currently
updated).  Update stats every time 'ethtool -S <iface>' is run.

Also, fix an indentation style issue and an unnecessary local variable
initialization in ice_get_ethtool_stats() discovered while investigating
the subject issue.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_ethtool.c
drivers/net/ethernet/intel/ice/ice_main.c