net/i40e: fix statistics inconsistency
authorXiaoyun Li <xiaoyun.li@intel.com>
Thu, 6 Dec 2018 06:03:42 +0000 (14:03 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 21 Dec 2018 15:22:40 +0000 (16:22 +0100)
commit63056c192005336d7c9d2639efe317639dd3baaa
tree4ab7c991624a9283d5c7d7bcfd15c244e8106994
parent0eaa1f8c75311b96d269a0195b80e80d6c27e83c
net/i40e: fix statistics inconsistency

While calculating the input packet count per port, discarded packets
should be reduced, right now only PF VSI discarded packets are reduced.
But while calculating the input byte count per port, Rx byte count is
used, which should take all discarded packets into account, including
VF VSI ones.
This will cause inconsistency in stat counters in some cases.

This patch would take all VSI stats as packet and byte count to address
the issue.

Fixes: 763de290cbd1 ("net/i40e: fix packet count for PF")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/i40e/i40e_ethdev.c