From nobody Thu Sep 17 05:33:16 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 4hlktp2sp3z6sRK9 for ; Thu, 17 Sep 2026 05:33:22 +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 4hlktp1cX0z4QGw for ; Thu, 17 Sep 2026 05:33:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789623202; 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=QvIyTNhnZx98W/jM+ZfI95/1AiZk1QdRSVhYEWTmw7o=; b=jBEae7hYjR5r01hHmTSt6PJGPCQwKrtSG6FkCkS4GE0tYHdg+9Rgpvf4lZrgwmGrsiXykw BPUOoOH3ppSouF/slhAYBe6eKah0xL20XAE/fH8uOH89c/qoboIaO9FXGmByesiTeggvsq 3lO0pr9SdjDqsR4IhLl3ANP/lcNG39m49viH1KkiKfOY2NQVtVknDLQUpn+0gaDFaVSCRz FH1RbPzV8n5NSimXSHaCPeFPOvykPyzRs+F+fCopQIXHW4mbJspAk/TVNQJjXybaPB2FvD 3fun2hMRZhYW9lh9fspJW7+HddMg0E/CCFxxYD6JMoPltb9Pt0Tg7ULsqaR20A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789623202; b=hUjeKcccbN/1QG7Ft6UGhA/AOxMhBLMDqvx50jiUFD0TLS6rTTzjblNIu7oDwHc/4FiiA/ SRqxOvuVzMCwbbK9R8cU5Gzxk1sVVCtsnk5U02jj0lzjNpVFnD0k479HR5OIisUQNieFrE wIZa5RMMFWhFyZw0ZIVbR9zO+K2IAoJXgOof+du+X9+xDfmwn174dqsGte2uhqpPcgpva9 SarCY6DmW2yI+fIbi9YTSk6M59iX+NNTxwpyWEAgmbGHLgUGSQT5J6MO3oGPoRTOA/0nRH DwogmTDi3dgspFoBiYNGBo/ccbULxjkJVkJCH3K1tteYqvGRR7ZbwiPl5YetVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789623202; 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=QvIyTNhnZx98W/jM+ZfI95/1AiZk1QdRSVhYEWTmw7o=; b=btt33r9w2mElgCdViB1wiGje6JAel15HXb7IBgfI9yFgE+nL6h/ifMb8C4HMBjnY9/NT/+ sLHQZvMX9dxagWeqMPsGxmeQjHvNruprw2qyA+5/4a5h/6HQ10UQoLkXciPSwKgVJpKtSY f2EhlGGDMzF29kA4zwnl0NLD9FIbnydDvaeRzu4zqN7SwbH+tV83EYmWINrmYKl8b8PeIO dkJ3YouK47Ia3PXTZEyVYvW8DDqF/u9g9+zAL9IzXKEKZ0tArGRyxCVHFzaFsAXT7kcS85 zkAJabufZTpsAF6miThUFbzHB4R577ruTu5EGf9T6VyQYlvK49efLQDT/9dcsg== 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 4hlktp0NR1zK4C for ; Thu, 17 Sep 2026 05:33:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 219e4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 17 Sep 2026 05:33:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: f5dc44c045c6 - main - ixgbe: Apply DMAC changes through an if-up reset request 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5dc44c045c6f03a0f1bb2e81b0172e0781faec4 Auto-Submitted: auto-generated Date: Thu, 17 Sep 2026 05:33:16 +0000 Message-Id: <6aab7b9c.219e4.12a9af9@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=f5dc44c045c6f03a0f1bb2e81b0172e0781faec4 commit f5dc44c045c6f03a0f1bb2e81b0172e0781faec4 Author: Kevin Bowling AuthorDate: 2026-09-11 21:48:43 +0000 Commit: Kevin Bowling CommitDate: 2026-09-17 05:32:42 +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. MFC after: 2 weeks Sponsored by: BBOX.io --- 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 f5ceb1f0b5eb..2ece3b7bc433 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -5968,11 +5968,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); @@ -5980,11 +5982,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: @@ -5995,18 +5996,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