net/igc: fix Rx error counter for bad length
authorAlvin Zhang <alvinx.zhang@intel.com>
Thu, 1 Apr 2021 05:20:43 +0000 (13:20 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Thu, 1 Apr 2021 07:47:35 +0000 (09:47 +0200)
commitc69abf624a3c84aa6b1cdfe953dcab9ff35deac2
treeae05cdab49678f9d30a31c13a5919d147fd3e29f
parent3c8bc29fd07006338e3460b03655a772cd36a9e7
net/igc: fix Rx error counter for bad length

When the size of a packet in Rx channel is less than the minimum
or greater than the maximum, the packet will be simultaneously
counted by RLEC(Receive Length Error Count) and
RUC(Receive Under Size Count)/ROC(Receive Oversize Count) registers.

This patch fixes the issue of counting a length error packet twice
when counting the total number of received error packets.

Fixes: e6defdfddc3b ("net/igc: enable statistics")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
drivers/net/igc/igc_ethdev.c