From nobody Mon Oct 05 18:53:11 2026 X-Original-To: dev-commits-src-main@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 4hz7nN0Tkhz6vFHm for ; Mon, 05 Oct 2026 18:53:12 +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 4hz7nM75nQz4lwC for ; Mon, 05 Oct 2026 18:53:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791226392; 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=jbiONKdl0AVKCufltzcG9BiUoz9ye9tvTXm45AZ1zaE=; b=Zh6TuOz7ACNROWmxirS6rZNVdyY1kuoNR/odNhwwf/rHSK43vmddIhB6841I/3ckBbeYJG FYbDo56xlpq23y3xO99I1TANPavOpQb61rNokxyvv4UrLDeXU/t+or8zd+ZvKWH4H0SNdo vravfblEAgoJvWcF3epetwHEiS+D679oxgblV3wmtiXHeUtVeTK3/MU6qX89vu3zP+HT+k lBnKfRg6SWcppuwsVsLdPHkuZ0L4YUpML3sxoZtn28XpASUsT08jLIixvZGN17cBASb664 ASnXNSRPObZriyqYDI+aaDji8pDUTJvt5kLvJkYMBKObqlPJzMfW7uwSoT2Xzw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1791226392; b=Trwo7dpoxjW7/17mPNTXF5pLtfTao5nytx3iOccKBqwuFdouRnop+fVN16kQdV3FAWaL3Y 7MKFPPQM1J3j47eFKRJyfdIkNAhPCOyRQLO09J8EjNunRZTdSpvkyhbDcY8aNOKALq/drz IUztdw9E6q3YzvLgRo1Unaj5l/8gN1NsRcCj7MGjt6JHzWOGWO7ZuWoO6I66cNgNHJXrrh zPSDgpmZbTyUPGqC+P7InLlxO3MQQko6OKftKcZlf2nV/g6MhushtKOXl3nLHNeoeHonPO 0gUx+LVkK+nqEtMywQ+VIK7Y0CibFeAUE/DBRkS58/q2g6ilaU2BGK3ZMt2XmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791226392; 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=jbiONKdl0AVKCufltzcG9BiUoz9ye9tvTXm45AZ1zaE=; b=ApkidG/oNqjODHfd/LKiqlSu5H+p1ZVi8Ti421r4SQsVqEuP9Y54f7kwTNYtcvCo19cnhM mBeUBt+boV9VkC+WAyhcVI1f6cYulg82uyOcVsat6Rqsl82sX5U0bj/TVv3+IrNQ92YFZR 4UPsxiaUYG8mO7vwMIsQ3UerdS4GljPDwnghcaLAz3i3RAOX8ZFAaRpdxO5Asxq1W+WeG6 htl4qRTa89vMWu40jRGlH78qzgM9eDg9ColeeDeqRwicME0Z7MV+81JGMwKAuni5r+uITG wXWx5A897gH/r9LfLbxGsGQ8Smj2qR8DtC6Jzo1Svpj7SuxGaxHax5eyZXuECA== 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 4hz7nM670WzY3f for ; Mon, 05 Oct 2026 18:53:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d13b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Oct 2026 18:53:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: R. Christian McDonald Subject: git: ac24108dabca - main - iflib: Make the deferral test in iflib_txd_db_check() an early return List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: rcm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac24108dabcac04c7db351d33eb76f3ddee6073b Auto-Submitted: auto-generated Date: Mon, 05 Oct 2026 18:53:11 +0000 Message-Id: <6ac3f217.3d13b.36889286@gitrepo.freebsd.org> The branch main has been updated by rcm: URL: https://cgit.FreeBSD.org/src/commit/?id=ac24108dabcac04c7db351d33eb76f3ddee6073b commit ac24108dabcac04c7db351d33eb76f3ddee6073b Author: R. Christian McDonald AuthorDate: 2026-10-05 18:52:10 +0000 Commit: R. Christian McDonald CommitDate: 2026-10-05 18:52:10 +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 --- 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 834cc37cb6ab..358e2f03aded 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -3466,26 +3466,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