net/ixgbe: fix Rx errors statistics for UDP checksum
authorHaiyue Wang <haiyue.wang@intel.com>
Thu, 8 Apr 2021 06:30:00 +0000 (14:30 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Tue, 13 Apr 2021 14:18:27 +0000 (16:18 +0200)
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")
Cc: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ixgbe/ixgbe_ethdev.c

index 4ee709b..ff65145 100644 (file)
@@ -3344,6 +3344,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;