Skip to content

Commit

Permalink
ixgbe: fix input error statistics for UDP checksum
Browse files Browse the repository at this point in the history
82599 errata "Integrity Error Reported for IPv4/UDP Packets
with Zero Checksum"

Obtained from: https://git.dpdk.org/dpdk/commit/?id=2ee14c8905e9
  • Loading branch information
fichtner committed Oct 18, 2022
1 parent ca9cdd5 commit 4a788be
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion sys/dev/ixgbe/if_ix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,7 @@ ixgbe_update_stats_counters(struct ixgbe_softc *sc)
u32 missed_rx = 0, bprc, lxon, lxoff, total;
u32 lxoffrxc;
u64 total_missed_rx = 0;
u64 xec_value = 0;

stats->crcerrs += IXGBE_READ_REG(hw, IXGBE_CRCERRS);
stats->illerrc += IXGBE_READ_REG(hw, IXGBE_ILLERRC);
Expand Down Expand Up @@ -1579,6 +1580,13 @@ ixgbe_update_stats_counters(struct ixgbe_softc *sc)
IXGBE_SET_COLLISIONS(sc, 0);
IXGBE_SET_IQDROPS(sc, total_missed_rx);

/*
* 82599 errata, UDP frames with a 0 checksum can be marked as checksum
* errors.
*/
if (hw->mac.type != ixgbe_mac_82599EB)
xec_value = stats->xec;

/*
* Aggregate following types of errors as RX errors:
* - CRC error count,
Expand All @@ -1591,7 +1599,7 @@ ixgbe_update_stats_counters(struct ixgbe_softc *sc)
* - oversized packets count,
* - jabber count.
*/
IXGBE_SET_IERRORS(sc, stats->crcerrs + stats->illerrc + stats->xec +
IXGBE_SET_IERRORS(sc, stats->crcerrs + stats->illerrc + xec_value +
stats->mpc[0] + stats->rlec + stats->ruc + stats->rfc + stats->roc +
stats->rjc);
} /* ixgbe_update_stats_counters */
Expand Down

0 comments on commit 4a788be

Please sign in to comment.