git: 37513bf193d9 - stable/15 - igc: fix RX accounting for multi-descriptor packets
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 02 Aug 2026 04:23:03 UTC
The branch stable/15 has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=37513bf193d9ab0fd768621256c0d0b3bcb1ba14
commit 37513bf193d9ab0fd768621256c0d0b3bcb1ba14
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-07-25 23:56:29 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-02 04:21:17 +0000
igc: fix RX accounting for multi-descriptor packets
The receive path adds the running packet length to rx_bytes for every
descriptor. A packet spanning descriptors of length l1, l2, and l3 is
therefore counted as 3*l1 + 2*l2 + l3.
Add each descriptor length once. Single-descriptor accounting remains
unchanged.
(cherry picked from commit bbf0372feeb321a5bfeff7b1e79576ab01240441)
---
sys/dev/igc/igc_txrx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/igc/igc_txrx.c b/sys/dev/igc/igc_txrx.c
index 92ba81c79c58..d6d383b40127 100644
--- a/sys/dev/igc/igc_txrx.c
+++ b/sys/dev/igc/igc_txrx.c
@@ -488,7 +488,7 @@ igc_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
le32toh(rxd->wb.lower.lo_dword.data) & IGC_PKTTYPE_MASK;
ri->iri_len += len;
- rxr->rx_bytes += ri->iri_len;
+ rxr->rx_bytes += len;
rxd->wb.upper.status_error = 0;
eop = ((staterr & IGC_RXD_STAT_EOP) == IGC_RXD_STAT_EOP);