39e4a2577f
Some packets are discarded by the NIC because they are larger than the MTU, these packets should be counted as "RX error" instead of "RX packet", for example: pkt1 = Ether()/IP()/Raw('x' * 1400) pkt2 = Ether()/IP()/Raw('x' * 1500) ---------------- Forward statistics for port 0 ----------------- RX-packets: 2 RX-dropped: 0 RX-total: 2 TX-packets: 1 TX-dropped: 0 TX-total: 1 ---------------------------------------------------------------- Here the packet pkt2 has been discarded, but still was counted by "RX-packets" The register 'GL_RXERR1' can count above discarded packets. This patch adds reading and calculation of the 'GL_RXERR1' counter when reporting DPDK statistics. Fixes: f4a91c38b4ad ("i40e: add extended stats") Cc: stable@dpdk.org Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>