• Greg Rose's avatar
    ixgbevf: Fix VF Stats accounting after reset · 33bd9f60
    Greg Rose authored
    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: default avatarGreg Rose <gregory.v.rose@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    33bd9f60
ixgbevf_main.c 97.6 KB