From nobody Thu Oct 29 06:37:04 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 4jFZJw6cPJz6xtqG for ; Thu, 29 Oct 2026 06:37:04 +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 4jFZJw4Cg5z3CVF for ; Thu, 29 Oct 2026 06:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793255824; 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=nazlgjaSq6m3Iuyw5ALcLDgeTpO+Ndc+RZNYuZtuylQ=; b=uxlCgQNqEzFQatlPccCzpl4vlI+JWDbR9MQbmGmt2QacDXxM8nErBmAYgyVa5BZxBFFIa3 2LylK8wxBDWLZk07wfy06DY+Jw/fPBei1UCLbRkLPYEYMWhK3VnfkcUGvn7YIuwCld4Rki OkABM7eNeZtGcYtCjDwdCmGiwyOAwyUMmKOoCb5xOo0LFhYEJyyczOlqbThMKiNCp2lnLX uYhaUUIFErxFAYpzw8Q3WgES0fA4/SMYtOge1jp4EMdZQ34JPM0M+yNF/xULudy3gsCLN4 M6FTUgh3dmnjO2NeKUOqs3DMKDlFCqv3WFiZg0aDc4bQfRpdZQJ5+BQFbMjmTg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793255824; b=O3FYUaQWueHszAo+she7r38RW02uO7MPSPE+XXOPBVl45QCBPjeDf8ZdBpDyQrwZKe7gKh blYBUP9+glQVHkQMy0ADTdThuG437NgZTLc4C49xf12xZW5p2dTPWNnsHKyG6gg016BDfI F8BhI+4WQBdwzixg5SIPVBcP/aE/efPz37qOXMq2lpxU35+rzjUTDrbp0FZ+HBiVPjXGTy sO+/aK3z6i5Bo9zTY92sNG3SsEEM2T8EMyzXvYzgCAgf6vnhnz/ropKwdri8WlLLHum5no itRNQ7dWmQ5RXw5xq2wZO1lhy6R0k1zL4mliOU1mgMdHWUW7MatV3DCSIDk3tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793255824; 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=nazlgjaSq6m3Iuyw5ALcLDgeTpO+Ndc+RZNYuZtuylQ=; b=gJiwBsB7oTMh4Sgg7fWYSMYlq7DVUplqiyagZMSWEyPo3XKOd6y45v5PphbbkIuIFrD5cd Df9n0r380htJfK9RV7cfr+05m6r37P3aWrw7Tm2B9dIB/pJNPauIFqZq1q/xW+5nqrK2Fe tMbmneFg05ZhJKCdJdqN80Szz+t0W8lF+u12LmFzoSrtGPp9KzxjBWbDJ096cw6kawIsed +P4BoNBp7oTyYSU8WIDaeDc02hKHt9IHAiSe6HzZKzvqP/ICbQ0SXKR14N2bmjXESSb+PK BuQb96kc7Uk6CZQDpz6FoBPdjmyUZY9NaQ78mH/GHGWOf2qsN96WzwdbwuxOQg== 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 4jFZJw2w2pzS0v for ; Thu, 29 Oct 2026 06:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d3b8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Oct 2026 06:37:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: b138790973fe - stable/15 - ixgbe: Apply DMAC changes through an if-up reset request 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: b138790973fe03996153be013ee021d792a645d3 Auto-Submitted: auto-generated Date: Thu, 29 Oct 2026 06:37:04 +0000 Message-Id: <6ae2e990.3d3b8.6889db88@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=b138790973fe03996153be013ee021d792a645d3 commit b138790973fe03996153be013ee021d792a645d3 Author: Kevin Bowling AuthorDate: 2026-09-11 21:48:43 +0000 Commit: Kevin Bowling CommitDate: 2026-10-29 06:36:55 +0000 ixgbe: Apply DMAC changes through an if-up reset request Serialize cached DMA coalescing policy with initialization and schedule its application through the admin task. The old running check preceded if_init() acquiring the context lock, so an intervening down operation could be followed by an unconditional initialization. Use the deferred if-up request so restart permission is checked when the task runs. Changes made while stopped or suspended remain cached for the next initialization. Do not schedule a reset for an unchanged value. Sponsored by: BBOX.io (cherry picked from commit f5dc44c045c6f03a0f1bb2e81b0172e0781faec4) --- sys/dev/ixgbe/if_ix.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 60f8145932a8..1b1c719a30e5 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -5954,11 +5954,13 @@ static int ixgbe_sysctl_dmac(SYSCTL_HANDLER_ARGS) { struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; - if_t ifp = iflib_get_ifp(sc->ctx); + struct sx *ctx_lock = iflib_ctx_lock_get(sc->ctx); int error; u16 newval; + sx_xlock(ctx_lock); newval = sc->dmac; + sx_xunlock(ctx_lock); error = sysctl_handle_16(oidp, &newval, 0, req); if ((error) || (req->newptr == NULL)) return (error); @@ -5966,11 +5968,10 @@ ixgbe_sysctl_dmac(SYSCTL_HANDLER_ARGS) switch (newval) { case 0: /* Disabled */ - sc->dmac = 0; break; case 1: /* Enable and use default */ - sc->dmac = 1000; + newval = 1000; break; case 50: case 100: @@ -5981,18 +5982,24 @@ ixgbe_sysctl_dmac(SYSCTL_HANDLER_ARGS) case 5000: case 10000: /* Legal values - allow */ - sc->dmac = newval; break; default: /* Do nothing, illegal value */ return (EINVAL); } - /* Re-initialize hardware if it's already running */ - if (iflib_is_running(sc->ctx)) - if_init(ifp, ifp); + sx_xlock(ctx_lock); + if (iflib_in_detach(sc->ctx)) { + error = ENXIO; + } else if (sc->dmac != newval) { + sc->dmac = newval; + /* Apply through init only if still administratively up. */ + iflib_request_reset_if_up(sc->ctx); + iflib_admin_intr_deferred(sc->ctx); + } + sx_xunlock(ctx_lock); - return (0); + return (error); } /* ixgbe_sysctl_dmac */ #ifdef IXGBE_DEBUG