iavf: Fix refreshing iavf adapter stats on ethtool request
authorJedrzej Jagielski <jedrzej.jagielski@intel.com>
Wed, 15 Sep 2021 09:01:00 +0000 (09:01 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Dec 2021 08:04:48 +0000 (09:04 +0100)
commit8d4b4e0f011479c17d588edbbba7b2a6de320ec6
treec9edc08af8a13e36fb3a5277339fc80ca743535f
parente4031c048f4806bee6c869b89582709e62d7739a
iavf: Fix refreshing iavf adapter stats on ethtool request

[ Upstream commit 3b5bdd18eb76e7570d9bacbcab6828a9b26ae121 ]

Currently iavf adapter statistics are refreshed only in a
watchdog task, triggered approximately every two seconds,
which causes some ethtool requests to return outdated values.

Add explicit statistics refresh when requested by ethtool -S.

Fixes: b476b0030e61 ("iavf: Move commands processing to the separate function")
Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/iavf/iavf.h
drivers/net/ethernet/intel/iavf/iavf_ethtool.c
drivers/net/ethernet/intel/iavf/iavf_main.c
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c