From nobody Thu Oct 29 06:03:26 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 4jFYZ72nLcz6xrlL for ; Thu, 29 Oct 2026 06:03:27 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jFYZ70RQPz4sj5 for ; Thu, 29 Oct 2026 06:03:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793253807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x2JigIbTf2TAIFuYeWlLwgrpWKw2fMfGMQytH8h3/+4=; b=byGr+DgTgdEVYAgNCtGU8En0f9ku7QOZr1KuO7HBhQ+lqtWJJf8XKLPdaPVLGLhLNadZRL bL4sCOYichXuFSKv/Ny7WS+UtVOflXY1ggjLCqUovwbxAhw0uPEQ9bUXOJPuQHfybXyaBs WaGMfnWbv2BegGYZbYTlez6qxKNEvA0Vsoo1IZJuikbQeqYqL3J0z23mrb87sLG+Ah4Cmv 9lfAiitAwzEAsnginzYUPgftoFT63Jmd4qHJvFkiUjieBjm865xJXk+Bl3S1G2OHbG55Zp 5a0sj0EWcNZViwJFqGg3EAv1FYEN8OXLieca/urCtiywbgazDsNExGlMt6ZwiA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793253807; b=Jl1ev/ryGDiH0PLcIQkqG39IPCFQaRZ6xmpzIpWTY8QOx4k+PdSrTN5rDVNeb39pRh9TX+ SPWssgUBfbB3BsxR35E21C76B5e23gRAXJJ5HNnEt2MOdGlTotphlZ3unsiisSPsq5Gs/J 1vevR1IPE32fvJu6Ukuha6TblCRUjg48Udb80BbfrrudWWAPtE1jYOT4uId5wI9bRuNORE KV9ZkKBdFVtTu2iszfNqDDnihMJsmIsa5yxAN9SNnRmGL08f6jWpGKHB/+GPuk7Ig8By0V fZrvs2CuWIwKg4hZrGkma4U+YGSh0vcSafpNMhLp62IKWGt1jC/gl3hY8TgttQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793253807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x2JigIbTf2TAIFuYeWlLwgrpWKw2fMfGMQytH8h3/+4=; b=e+ZKAyWfsRZKBWORy3au4juiR290yUfC7inC0tPHwmXW/hBaTteL/2BzD4IT1yk9D7r5Ot /6BVDtsIGKAzeo3ZehHQ9m1xooU8zQYjqwC1jLhDz+aLWXsDTqTd7BdVBr3FA2BiHmJNfh kl/h07bWk1k1mMT7/Hxq89dSBqEonV8n7nvGing+QJ4mH71F4wB0xqOqpj7DY2KKeIsjG7 G6SWfd+A1thh2ROWs9422Lf09A+xirTealKOq1PKJyZ7hZHOm2eVFM4lZiKtK107BsOeN7 lHny+HNqdl8H5cSzDi01M4yRchWHJNS/qYEj80oI7A2pyMHaXhrnjQBe7ZD99g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jFYZ66fCzzR86 for ; Thu, 29 Oct 2026 06:03:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3946b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Oct 2026 06:03:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: R. Christian McDonald From: Kevin Bowling Subject: git: cdf77394a8de - stable/15 - iflib: Make the deferral test in iflib_txd_db_check() an early return List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD src repository 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: cdf77394a8de2e00dc4c2ce4859552e77bb3aa91 Auto-Submitted: auto-generated Date: Thu, 29 Oct 2026 06:03:26 +0000 Message-Id: <6ae2e1ae.3946b.43c82476@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=cdf77394a8de2e00dc4c2ce4859552e77bb3aa91 commit cdf77394a8de2e00dc4c2ce4859552e77bb3aa91 Author: R. Christian McDonald AuthorDate: 2026-10-05 18:52:10 +0000 Commit: Kevin Bowling CommitDate: 2026-10-29 05:42:08 +0000 iflib: Make the deferral test in iflib_txd_db_check() an early return Invert the test so the doorbell write is no longer nested inside the conditional, and wrap its comments to 80 columns. Fix a typo in one of them. No functional change intended. Reviewed by: kbowling Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D60371 (cherry picked from commit ac24108dabcac04c7db351d33eb76f3ddee6073b) --- sys/net/iflib.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index a954011660e1..59b76974a3fc 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -3469,26 +3469,27 @@ iflib_txd_db_check(iflib_txq_t txq, int ring) max = TXQ_MAX_DB_DEFERRED(txq, txq->ift_in_use); - /* force || threshold exceeded || at the edge of the ring */ - if (ring || (txq->ift_db_pending >= max) || (TXQ_AVAIL(txq) <= MAX_TX_DESC(ctx))) { + /* Defer unless forced, at the threshold or at the edge of the ring. */ + if (!ring && txq->ift_db_pending < max && + TXQ_AVAIL(txq) > MAX_TX_DESC(ctx)) + return (false); - /* - * 'npending' is used if the card's doorbell is in terms of the number of descriptors - * pending flush (BRCM). 'pidx' is used in cases where the card's doorbeel uses the - * producer index explicitly (INTC). - */ - dbval = txq->ift_npending ? txq->ift_npending : txq->ift_pidx; - bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_ifdi->idi_map, - BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - ctx->isc_txd_flush(ctx->ifc_softc, txq->ift_id, dbval); + /* + * 'npending' is used if the card's doorbell is in terms of the number + * of descriptors pending flush (BRCM). 'pidx' is used in cases where + * the card's doorbell uses the producer index explicitly (INTC). + */ + dbval = txq->ift_npending ? txq->ift_npending : txq->ift_pidx; + bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_ifdi->idi_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + ctx->isc_txd_flush(ctx->ifc_softc, txq->ift_id, dbval); - /* - * Absent bugs there are zero packets pending so reset pending counts to zero. - */ - txq->ift_db_pending = txq->ift_npending = 0; - return (true); - } - return (false); + /* + * Absent bugs there are zero packets pending so reset pending counts + * to zero. + */ + txq->ift_db_pending = txq->ift_npending = 0; + return (true); } #ifdef PKT_DEBUG