From nobody Sat Aug 1 00:24:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hBkGQ3PzVz6mPYp for ; Sat, 01 Aug 2026 00:24:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hBkGP6sLPz3wYZ for ; Sat, 01 Aug 2026 00:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785543886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGAClPReo97P02FpKOZ/gm+WSPioijc1J6EmY6TpHbM=; b=UAi5/onzljQQcAo4zNVAm0r5Hp/J+W0/qj9utUERaLxWMLnF49Mb9B//9OTjKYSoY0dT5I YsHGwaeg/Shvc4j6G3MWJtCGvLMrJ1p1kfThBVrpM+1sxUR8FZDMu9Xu2IHvPg/AXOfbq4 /uc2DiHS7fICY7czjFjeC7EGZwDmr9IJNFHJx9zzLTU4avuVZjJ8l3dBcuZNwhQ1+NOBLG xpg0mviSYUNueOpiWi/tBMVd6AIowaDIK5v+jiKXivcjNb6I8vzb55PEO3gJZXotMECklP wJRYtx3csmOwbx30ZmotD6MTSL6Nd/94Z0SFgY8xQNIjuhKx1l0rxi9OhAdhxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785543886; a=rsa-sha256; cv=none; b=oX3/rCSaWtkkw3pMqPmjYBB8lfd9ESYGNegMaaKdiTJsmI3xD/dSNWdqKoMxc98IXSfjkM Eu3w6qWxgeEVZ6ansXpeaNW+m3aFValoKJI0sPR9ZfQ25xeBFgggwfxTq75gXSzp4WdWtH ZA0I1FwtM9wwQil0QIju+Gr33HANhIErt6FnMxHWpUEOA3kRC8q4WtDpPflUeSDsaDQvFv ve1bys5H7QfZkpNUsrMQfIoHgnN/HahSAmi1IN2KTT9vIKr+Hzw1JvBGN08Oq1f7vR2ARp BBdnCkYsQIYS+BYYzxTW+TtHoTABjZt4OVnhH8A/EEGqw+Tb13L1zuFt+9m5Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785543886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGAClPReo97P02FpKOZ/gm+WSPioijc1J6EmY6TpHbM=; b=wEN424JQpRHAWCt6wLhDY6+Dj+D/Fx57tYi5XTJJH5H44T/RSp99Zeoas72niIF9VHjSjl N5J1ThtwRrtslkfNR+E/3Px10AA50syIuZDUFBlUrcaN0cLkMoC//1QAQIuMngJFZtpcFn j9bOZPTmJr6hbtCS73oEq605sLOGAgHRnAlRH6u8u0N1JGs71edB+zi85/OrE0Y5c4TlV8 Nio8SycwKQ/k+2DIbVRzIgwWbEsPv4FLzWbyrY0qGpb355XDMRDalGFdqSA65rp+mhjaTG Dd32ftwKbVqUwRUhIIpemJLse5CCZPtoWsyqJm1oMVsGcBamD2F0kk4TIKji7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hBkGP5Z1fz6TD for ; Sat, 01 Aug 2026 00:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1868f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 01 Aug 2026 00:24:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 03125b959758 - stable/15 - e1000: fix rx accounting for multi-descriptor packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 03125b959758a5bfed0e4f10aa36a33fed279097 Auto-Submitted: auto-generated Date: Sat, 01 Aug 2026 00:24:45 +0000 Message-Id: <6a6d3ccd.1868f.431357f5@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=03125b959758a5bfed0e4f10aa36a33fed279097 commit 03125b959758a5bfed0e4f10aa36a33fed279097 Author: Kevin Bowling AuthorDate: 2026-07-25 11:02:36 +0000 Commit: Kevin Bowling CommitDate: 2026-08-01 00:24:33 +0000 e1000: fix rx accounting for multi-descriptor packets The receive paths accumulate ri->iri_len across the descriptors making up a packet, then add that running total to rxr->rx_bytes on every iteration of the loop. A packet spanning descriptors of length l1, l2 and l3 thus contributes 3*l1 + 2*l2 + l3 instead of l1 + l2 + l3. Single descriptor packets, the common case, are accounted correctly, so this only shows up on jumbo frames. Add the per descriptor length instead. iflib memsets the if_rxd_info before each isc_rxd_pkt_get() call, so summing len gives the same total as the final iri_len, and the frame error path that returns without incrementing rx_packets keeps counting bytes exactly as before. (cherry picked from commit 41a46c2d46aa4078c597ce3a0d19323cab988277) --- sys/dev/e1000/em_txrx.c | 4 ++-- sys/dev/e1000/igb_txrx.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index ced8d0f41d14..cfeb43036563 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -681,7 +681,7 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) len = le16toh(rxd->length); ri->iri_len += len; - rxr->rx_bytes += ri->iri_len; + rxr->rx_bytes += len; eop = (status & E1000_RXD_STAT_EOP) != 0; @@ -747,7 +747,7 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) len = le16toh(rxd->wb.upper.length); ri->iri_len += len; - rxr->rx_bytes += ri->iri_len; + rxr->rx_bytes += len; eop = (staterr & E1000_RXD_STAT_EOP) != 0; diff --git a/sys/dev/e1000/igb_txrx.c b/sys/dev/e1000/igb_txrx.c index 568d84807173..19b365bf020a 100644 --- a/sys/dev/e1000/igb_txrx.c +++ b/sys/dev/e1000/igb_txrx.c @@ -460,7 +460,7 @@ igb_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) le32toh(rxd->wb.lower.lo_dword.data) & IGB_PKTTYPE_MASK; ri->iri_len += len; - rxr->rx_bytes += ri->iri_len; + rxr->rx_bytes += len; rxd->wb.upper.status_error = 0; eop = ((staterr & E1000_RXD_STAT_EOP) == E1000_RXD_STAT_EOP);