diff options
author | Greg Rose <gregory.v.rose@intel.com> | 2010-03-19 02:59:52 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-19 21:00:44 -0700 |
commit | 33bd9f601ea21c4389870e425ae4eaf210d49b95 (patch) | |
tree | 067d6e6dc6de15b4dc56064ad31b67770e98a9fa /drivers/net/ixgbevf/vf.h | |
parent | fd3686a842717b890fbe3024b83a616c54d5dba0 (diff) | |
download | blackbird-op-linux-33bd9f601ea21c4389870e425ae4eaf210d49b95.tar.gz blackbird-op-linux-33bd9f601ea21c4389870e425ae4eaf210d49b95.zip |
ixgbevf: Fix VF Stats accounting after reset
The counters in the 82599 Virtual Function are not clear on read. They
accumulate to the maximum value and then roll over. They are also not
cleared when the VF executes a soft reset, so it is possible they are
non-zero when the driver loads and starts. This has all been accounted
for in the code that keeps the stats up to date but there is one case
that is not. When the PF driver is reset the counters in the VF are
all reset to zero. This adds an additional accounting overhead into
the VF driver when the PF is reset under its feet. This patch adds
additional counters that are used by the VF driver to accumulate and
save stats after a PF reset has been detected. Prior to this patch
displaying the stats in the VF after the PF has reset would show
bogus data.
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbevf/vf.h')
-rw-r--r-- | drivers/net/ixgbevf/vf.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ixgbevf/vf.h b/drivers/net/ixgbevf/vf.h index 799600e92700..1f31b052d4b4 100644 --- a/drivers/net/ixgbevf/vf.h +++ b/drivers/net/ixgbevf/vf.h @@ -157,6 +157,12 @@ struct ixgbevf_hw_stats { u64 vfgorc; u64 vfgotc; u64 vfmprc; + + u64 saved_reset_vfgprc; + u64 saved_reset_vfgptc; + u64 saved_reset_vfgorc; + u64 saved_reset_vfgotc; + u64 saved_reset_vfmprc; }; struct ixgbevf_info { |