From nobody Sun Aug 16 20:57:04 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 4hNSvV0J4lz6pbbG for ; Sun, 16 Aug 2026 20:57:10 +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 4hNSvT5Tsyz3CLL for ; Sun, 16 Aug 2026 20:57:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786913829; 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=YMoPHFMiQVCfYrgXh/9ps9g97DiAcnFx70NI4lmLM1k=; b=INWQ74Z6lgR59NC0dUDodvwfKMmhPhopTb+bav+OCI+3TFkgbIwpcDXN6Uy4gljnrVOT6D uMkG0ZGSE5FBuawyCe8KfB/UJlVmcDlPXp8Zyvw4pLWybrW51+uyucw7htt/TDI6iwWZIA mhSf4uDo0lFpeX/Ja8aIIvpPt8QHnRWqp7iF4P3WpMTxDzRj+vjS9aHtodQMMUiwEe2Fqa cWycOcDnGsFsl/CnNp2+YEWHAxHlu+DzNzydJyWQ5OGRv06xp0GPsnfStWof+QIDE2XhrK gYVvTPT3CwcrfbpERPakRw+dS5OHvTs9XB8zGpGv22NfFf+y25iCYm+WwDjMfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786913829; a=rsa-sha256; cv=none; b=Uj8TOKk/gxoCk+60U9ezfDisiabQryBH9OOg3DMGVh4EHdG1bDfLh4hkpoOl8jKFdAkNKX JvRUND0iQ5C1IWXMpJmMTr3s2T7pKyFNR4JVtg5KB3jx7rCbtQAG7lIHrW6jwwE/hBqul4 pX5+stK2GP9OXQDFmw+dsgbWcO9+7veL/YabQIQJHa+Z0mRZrgC13cdxx5SEt4cdTnzyKh 0BYhiS97/Kf/DQpR45R1DshEVm8YOduxJRL0xkxrc9Lh6tOI1ge6ADvxxAZXPdV7CRdpEq 87MU6m8JK+Dm9VpCULPXAFQOdGdO6Gn7eEisQWHNiy0ozsndvmz3ipK5zNZymg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786913829; 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=YMoPHFMiQVCfYrgXh/9ps9g97DiAcnFx70NI4lmLM1k=; b=KpUUv8yPHpQU310H1zHpsSAE6JPwE9NIRdFlaMoQIZlUf44WvInHQanXGaDmxGKe2fdthZ FxKoZnTLFO2Q0QoUDdnWJMXTRgdXgxgmTkBSc3PUGjqEu5tjQz8Yl0bMg1NhIceDamdo7P LfVQzukDZVcWnK1fCGOPXSY6f/iDqQLpzRLlKXE/QnaYSfx+8w2+q7DH1rSvsrMgSWHctm bXmVGEUwyUgzdxNOappOiz5vY+d0sWZlQA4s0nurQWiaC+1G0yUNRZj52lZew5Vy9Ma3WC 7cnVKDm2dZMPrH1OFNxbi10Mv+or5goq/bqgv16PfheSmvAUlIWS5yIxkOUzrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hNSvT4Q0Tzkxg for ; Sun, 16 Aug 2026 20:57:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19901 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 16 Aug 2026 20:57:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 5cd4954f3283 - stable/15 - iflib: Permit SR-IOV configuration on a down interface 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 5cd4954f328331384510486a023e6f03d08ec6a9 Auto-Submitted: auto-generated Date: Sun, 16 Aug 2026 20:57:04 +0000 Message-Id: <6a822420.19901.4d672bad@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=5cd4954f328331384510486a023e6f03d08ec6a9 commit 5cd4954f328331384510486a023e6f03d08ec6a9 Author: Kevin Bowling AuthorDate: 2026-08-06 11:03:28 +0000 Commit: Kevin Bowling CommitDate: 2026-08-16 20:56:45 +0000 iflib: Permit SR-IOV configuration on a down interface Drivers which remap PF queues need a stop/mutate/restart transaction only when the interface has live queues. Permit their IOV initialization callback while the interface is administratively down and leave it down afterward. This restores the standard boot-time iovctl.conf workflow and lets other opt-in drivers configure VFs before netif brings the PF up. (cherry picked from commit 2cf580c694f6f392531a63f01c3fb89c0244f89a) --- sys/net/iflib.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 786e5484f542..711c27f62939 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -5445,6 +5445,37 @@ iflib_device_iov_init(device_t dev, uint16_t num_vfs, const nvlist_t *params) return (error); } +int +iflib_device_iov_init_restart(device_t dev, uint16_t num_vfs, + const nvlist_t *params) +{ + if_ctx_t ctx; + if_t ifp; + bool restart, running; + int error; + + ctx = device_get_softc(dev); + ifp = ctx->ifc_ifp; + + CTX_LOCK(ctx); + /* + * Drivers which change the PF queue layout need the complete iflib + * stop/init sequence around their IOV callback when the interface is + * active. An administratively-down interface has no live queues to + * quiesce, and must remain down after the new layout is installed. + * Keep the transition within one context-lock critical section. + */ + restart = (if_getflags(ifp) & IFF_UP) != 0; + running = (if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0; + if (restart || running) + iflib_stop(ctx); + error = IFDI_IOV_INIT(ctx, num_vfs, params); + if (restart) + iflib_init_locked(ctx); + CTX_UNLOCK(ctx); + return (error); +} + void iflib_device_iov_uninit(device_t dev) {