|SUCCESS| net/ixgbe: fix good octets CRC adjustment
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Wed May 6 02:10:45 CEST 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/163590
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-05-06
git sha: (not provided in patch)
Author: Daniil Iskhakov <dish at amicon.ru>
Subject: [PATCH] net/ixgbe: fix good octets CRC adjustment
This patch fixes a potential 32-bit overflow in the calculation of CRC
byte adjustments for the GORC (Good Octets Received Count) statistic in
the ixgbe driver.
> diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.c b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
> index 57d929cf2c..71243610ee 100644
> --- a/drivers/net/intel/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
> @@ -3182,7 +3182,7 @@ ixgbe_read_stats_registers(struct ixgbe_hw *hw,
> uint64_t *total_qprc, uint64_t *total_qprdc)
> {
> uint32_t bprc, lxon, lxoff, total;
> - uint32_t delta_gprc = 0;
> + uint64_t delta_gprc = 0;
> unsigned i;
> /* Workaround for RX byte count not including CRC bytes when CRC
> * strip is enabled. CRC bytes are removed from counters when crc_strip
The change from uint32_t to uint64_t for delta_gprc looks correct given
the description, but I need to verify how this variable is used in the
rest of ixgbe_read_stats_registers().
Can you confirm that all arithmetic operations involving delta_gprc are
compatible with the type change? Specifically:
1. How is delta_gprc accumulated from the per-queue QPRC values?
2. How is it used in the CRC byte adjustment calculation?
3. Are there any comparisons or assignments involving delta_gprc that
might be affected by the widening to 64-bit?
Without seeing the full context of the function, does this code properly
handle the case where the accumulated packet count exceeds 2^32 packets?
Are the QPRC register reads themselves returning 32-bit values that get
summed into this 64-bit accumulator?
More information about the test-report
mailing list