From bb8e7233af0d94c2b5bf98305e223cbf738a295a Mon Sep 17 00:00:00 2001 From: Haiyue Wang Date: Thu, 8 Apr 2021 14:30:00 +0800 Subject: [PATCH] net/ixgbe: fix Rx errors statistics for UDP checksum [ upstream commit 2ee14c8905e9e39e2a5996b58fadd5403c808611 ] Restrict the "remove l3_l4_xsum_errors from rx_errors" to 82599 only for hardware errata. Fixes: 256ff05a9cae ("ixgbe: fix Rx errors statistics for UDP checksum") Signed-off-by: Haiyue Wang Acked-by: Qi Zhang --- drivers/net/ixgbe/ixgbe_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 9cb25bbf3a..2e424460d0 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3382,6 +3382,13 @@ ixgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) hw_stats->fccrc + hw_stats->fclast; + /* + * 82599 errata, UDP frames with a 0 checksum can be marked as checksum + * errors. + */ + if (hw->mac.type != ixgbe_mac_82599EB) + stats->ierrors += hw_stats->xec; + /* Tx Errors */ stats->oerrors = 0; return 0;