net/i40e: fix corruption of VF stats
authorRemy Horton <remy.horton@intel.com>
Fri, 18 May 2018 11:49:48 +0000 (12:49 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 22 May 2018 22:35:01 +0000 (00:35 +0200)
commitf2831f34c228c59ced27ebc65137ba1588f9c4cc
tree7a29501ddc2d49a2d323ddfed53af7b76b7b4c40
parent4724604a7db1b09ef4d17e445570bbd133249112
net/i40e: fix corruption of VF stats

The resetting of stats on a VF involves the setting of an offset
that is subtracted from future calls, rather zeroing of counters.
However doing a stats reset on the port representor was also
adjusting the values forwarded to the VF, which had the effect of
corrupting the VF's counters. The fix is for the port representor
to maintain its own stats offset, so the port representor and VF
maintain independently-resettable counters.

Fixes: e0cb96204b71 ("net/i40e: add support for representor ports")

Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/i40e/i40e_ethdev.h
drivers/net/i40e/i40e_vf_representor.c