net/i40e: fix packet count for PF
authorQi Zhang <qi.z.zhang@intel.com>
Sun, 20 Aug 2017 20:05:35 +0000 (04:05 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 6 Oct 2017 00:49:48 +0000 (02:49 +0200)
commit763de290cbd1dd4ed7f5319e4f5fa8a84d990e06
tree349b0dd6fa740d781abed3b9c46ca1bc06e51e0d
parent093e1afa24f93b4ae619c0534f1b4fe44e30d11b
net/i40e: fix packet count for PF

Previously, for PF statistics we use VSI register for packet count
but use port's register for packet bytes, that cause inconsistent
situation of PF statistics when some VF is active, since it will
cover VF's packet bytes but not packet count.

The patch will take port register for PF packet count back, but still
exclude main vsi's discard packet count.
Just like previous fix, its still not perfect, (since RX packet number
is over counted when there is VF discard packet) but seems it make the
overall better.

Fixes: 9aace75fc82e ("i40e: fix statistics")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/i40e/i40e_ethdev.c