From nobody Sat Aug 22 00:37:56 2026 X-Original-To: dev-commits-src-branches@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 4hRdYx02BXz6pqg2 for ; Sat, 22 Aug 2026 00:37:57 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hRdYw6PQmz3HVJ for ; Sat, 22 Aug 2026 00:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787359076; 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=IuQK4tQJYKMKPtAyl2iHnLec8E5iFfajEVeeIoynIrI=; b=xidb3WMVMRlPmmJbVwJtPAKA7wfFtoCDk0c0r8xiIgpw5L0BMsPTH8BpmQDODm/+S+JoQi P3ncsce7OminooBGQqXrDVJSqWLalYRZilCAqWWJfk8x4mO89+KitDwEWyBKhFy0PjD3Lj 4jzuHzoVSv5XQBAb8V9scJD+hnZI4ntd9P3Gxsv5b5zFqbKjdLfcOLWw/AV/0AxYes59Qz CaZ6sf2kwfu+tnt0MgYbbXz0y+EC/lm3fhwK8WDv4wUAP5fh/gtWQpHtWVHXHH304JO3AX nFbWQKemjmVdCoC07NwNhwJToWGuBez2VHi4+rnrMgVN3itiLD+ejAHko74siw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787359076; a=rsa-sha256; cv=none; b=LCtyJ27zeiyzXA8aHx0137pNsn3pE6RK10QpQeKE1ZQWnBdB/1tF7G2EMvV8s7RRLBdYeR 4QLDJNoRDH47CTEkgpJQuIxaa7LSXFnWtdU33knqD6RMsgZXvZmXLwUiaUa6zM4e5Wqdcl AsT0fRY1gaPH3fphAyybu/+kRvvhW9/XgCWZQAgMIFKIEsX9zwHZVwgyF7FX6qsydG8ZEP zuKnwYH4Ttxx569/GORl3HsYgoukGD7k2coGmV5O5s/cTYTy3+3AugHt/FsI0r2/8m0mDy CX53OGKrqn6s5K8W21joOACk4Bn6hOBZiykZ9+YTFOUYW11VkFmb3xSMRWtRRw== 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=1787359076; 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=IuQK4tQJYKMKPtAyl2iHnLec8E5iFfajEVeeIoynIrI=; b=nqWMzW7/8uzhwFRXZtZHQEpfp145qeyWAmMsb773NOD8XNfWReoM4nr8zAXlQ+mOteymJ4 08QKFEENV6qJpRJ21Kdw5Gw2uHaPK5TrKJfzUsdxqPIH4Ug/V/fo6zpN+UJ6iAZhFbbbul ddw6d2BRJPU0saznStmGY9siuueKc02sDjRfQvuChaylt4PKrIXYS+Qlt/39HruViNtmBc aOmhYAmxI1U4PD+Vle7xDhuDd1mV+PNNc8oSPXDRLSAFfBgxyaCuPCXLqvhzxzOtz/HdOt lTluF/8X9n34cPst4Yepini4B7ZMomIbFOeAiYJhD0POJXDSRCMieAOn2Lq3rg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hRdYw58YTzBLf for ; Sat, 22 Aug 2026 00:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24f8e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 22 Aug 2026 00:37:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 07d27349c110 - stable/15 - igb: Match Tx descriptor control to iflib List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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: 07d27349c11082ecd9a43b5e5b9b2306941d5ac6 Auto-Submitted: auto-generated Date: Sat, 22 Aug 2026 00:37:56 +0000 Message-Id: <6a88ef64.24f8e.51bd6189@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=07d27349c11082ecd9a43b5e5b9b2306941d5ac6 commit 07d27349c11082ecd9a43b5e5b9b2306941d5ac6 Author: Kevin Bowling AuthorDate: 2026-08-08 11:29:44 +0000 Commit: Kevin Bowling CommitDate: 2026-08-22 00:32:30 +0000 igb: Match Tx descriptor control to iflib iflib requests transmit completion status only on selected descriptors. Program a zero writeback threshold so igb hardware honors those sparse RS bits instead of writing back every descriptor in threshold-sized batches. Use the existing family specific prefetch threshold: eight descriptors on most controllers and 20 on I354, with a host threshold of one. These values match the Intel-derived Linux and DPDK drivers. Their nonzero writeback settings are not appropriate here because those drivers set RS on every packet. A zero writeback threshold also avoids depending on interrupt timer flushes affected by 82576 specification update erratum 26. Remove the old IGB_TX_WTHRESH macro as well. It has had no callers since the iflib conversion, so its 82575 conditional no longer implements any policy. (cherry picked from commit fddc393d93169b428fe64e9513ee463b5154b62a) --- sys/dev/e1000/if_em.c | 41 +++++++++++++++++++++++++++++++++-------- sys/dev/e1000/if_em.h | 7 +++---- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 0d0a2d2fe6b0..54302fe01b4b 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -3754,6 +3754,36 @@ em_legacy_txdctl(struct e1000_hw *hw) return (txdctl); } +static u32 +igb_txdctl(struct e1000_hw *hw) +{ + u32 pthresh; + + switch (hw->mac.type) { + case e1000_i354: + pthresh = I354_TX_PTHRESH; + break; + case e1000_82575: + case e1000_82576: + case e1000_82580: + case e1000_i350: + case e1000_i210: + case e1000_i211: + case e1000_vfadapt: + case e1000_vfadapt_i350: + pthresh = IGB_TX_PTHRESH; + break; + default: + KASSERT(0, ("%s: unsupported MAC type %d", __func__, + hw->mac.type)); + pthresh = IGB_TX_PTHRESH; + break; + } + + return (pthresh | (IGB_TX_HTHRESH << 8) | + E1000_TXDCTL_QUEUE_ENABLE); +} + /********************************************************************* * * Enable transmit unit. @@ -3804,15 +3834,10 @@ em_initialize_transmit_unit(if_ctx_t ctx) E1000_READ_REG(hw, E1000_TDBAL(i)), E1000_READ_REG(hw, E1000_TDLEN(i))); - if (hw->mac.type < igb_mac_min) { + if (hw->mac.type < igb_mac_min) txdctl = em_legacy_txdctl(hw); - } else { - txdctl = 0; - txdctl |= 0x1f; /* PTHRESH */ - txdctl |= 1 << 8; /* HTHRESH */ - txdctl |= 1 << 16; /* WTHRESH */ - txdctl |= E1000_TXDCTL_QUEUE_ENABLE; - } + else + txdctl = igb_txdctl(hw); E1000_WRITE_REG(hw, E1000_TXDCTL(i), txdctl); } diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index 07a92bef1d21..749cb66424bd 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -316,10 +316,9 @@ #define IGB_RX_WTHRESH ((hw->mac.type == e1000_82576 && \ (sc->intr_type == IFLIB_INTR_MSIX)) ? 1 : 4) -#define IGB_TX_PTHRESH ((hw->mac.type == e1000_i354) ? 20 : 8) -#define IGB_TX_HTHRESH 1 -#define IGB_TX_WTHRESH ((hw->mac.type != e1000_82575 && \ - sc->intr_type == IFLIB_INTR_MSIX) ? 1 : 16) +#define IGB_TX_PTHRESH 8 +#define I354_TX_PTHRESH 20 +#define IGB_TX_HTHRESH 1 /* * TDBA/RDBA should be aligned on 16 byte boundary. But TDLEN/RDLEN should be