From nobody Mon Oct 05 18:53:11 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 4hz7nT68zRz6vF3l for ; Mon, 05 Oct 2026 18:53:17 +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 4hz7nT3K11z4ltH for ; Mon, 05 Oct 2026 18:53:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791226397; 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=hf+7vfo4i/pNd2sQ3gGOys0fx8CWh7eg71Dlj6gr4GcWgZDoRnYbSRpUUcKRyINx0ACYFk hTaZoCo8vZrV2V056YbwLGgKh+wQByUh5eEmLcyFaZZ5DLgZ8DUbcIxfXARmR8yTLio7R0 M1nmaONbOywEuHLHaSMwCmaq+tZty8H1vkujWczCMPcl7bBBixGDAQKEyuEnyaPaZUz10y eMNi3KH/Canh/IrC8SaM2RWT9nizUIs4ZYAKSZZykm7ANZz0yxNgRQOqCVxOmtb8h98Opj 8HvxqtirqcrEVOMV4JnoUP/nrTvOj3EkkhXl/7gz+042yQXoa5UTU0fbOFVE1Q== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1791226397; b=WKL7+ud/QrUseFcA1bNfztKMHQS7Q3JGFl3E/cN2tAa4AO1/N42QjeVJ3ASmKXUW0Dck+V 6OvIiyNCMAeifVooBFom/+JmTjATOk5wfQmKzz1cQIurpIOhQAXpY7Kgcq0udlmJl49qmp vkz2E6O0LxJmqdojNtcgIUnxEBbRwUxGAhj4i3qbl45wmdqO+y2aPVSTiSATJNr6S8umeJ Sa22Z9pIFLVuvXEVIsoEGwMANB8oOvmRCs5wme4N3F3yQa9k1ml42K5JRWaSVGZkXD23X8 Ro1BJ+ATXFclaXzJ/I0H6K8TWidhtTyBxKtJz3WkptV2iQ0V3Ov5n3seabUshQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791226397; 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=arl8GQbnHBLec4Nx/Vs0FlmBNam4r5uDEGkNiZyKQKPi6ymluUvnBJGdIhmWF3oTcEM2+t LAvtetVqTZviupLFCgsBCfIxqNAk11ioK6ueXOc91w+fvFRnxTo/+UJ+YyO0zIxh1M4uWL xN53GEZWBFIWoUb91DjUV2w4s+RByCiwYfK4HVUa3iZqrseFj2rzsZiyQgu0iyKalnBuTR GMBQHoIU3VSHYmjUEPlUnydwgI/2VFIW70OSw8scD+Y437FFKE5rdtUD3mrN3uICfunALl SnuNqCvqEPIq/aXxX2pChEP+b1eg4ERwimx1YFhZzv0KanahhIqJb4J1VMWELw== 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 4hz7nT1CsLzWyV for ; Mon, 05 Oct 2026 18:53:17 +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 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: 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