net/e1000: fix Rx error counter for bad length
authorAlvin Zhang <alvinx.zhang@intel.com>
Thu, 1 Apr 2021 05:21:32 +0000 (13:21 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Thu, 1 Apr 2021 07:47:43 +0000 (09:47 +0200)
commit7b0a60dd394969fb17409519fd673e61b05f284e
tree477d62af5966c5350b383e1bfc767ebb66c2e0a3
parentc69abf624a3c84aa6b1cdfe953dcab9ff35deac2
net/e1000: 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: 70bdb18657da ("ethdev: add Rx error counters for missed, badcrc and badlen packets")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
drivers/net/e1000/em_ethdev.c
drivers/net/e1000/igb_ethdev.c