git: bbf0372feeb3 - main - igc: fix RX accounting for multi-descriptor packets
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 26 Jul 2026 01:01:14 UTC
The branch main has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=bbf0372feeb321a5bfeff7b1e79576ab01240441
commit bbf0372feeb321a5bfeff7b1e79576ab01240441
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-07-25 23:56:29 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-07-26 01:00:02 +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.
MFC after: 1 week
---
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 7ab09078d8f4..526631528f51 100644
--- a/sys/dev/igc/igc_txrx.c
+++ b/sys/dev/igc/igc_txrx.c
@@ -486,7 +486,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);