From nobody Thu Sep 17 05:17:12 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 4hlkX90lZvz6sQcT for ; Thu, 17 Sep 2026 05:17:13 +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 4hlkX90CCbz4Mnk for ; Thu, 17 Sep 2026 05:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789622233; 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=VO2R8/jE51tiqs398trYpT8cO3kfGVTxt4LWG9mRKL0=; b=FCN8K/TnkvehrE/d4+Y+jYAHqBR07YcYJdROnI1gLs3IlDo8BYThZSxwOtD68JkORbQqFo fhbqYwF88n4HhfUq5TKRE7hHLdxK1bMSh6n3wVW9RMqgOZxgsR4wCAQhGu7yWtDbeZY4g4 Su4qy31+lwTQpGt5sdnURnCnHpur+YtCWgiZDi84Y6X5OB1wMUNKKMbeufeLBCt4trINVH azUC3YQ8rg8iggEesWLQwXJz/i8eLJAR40clCjWpQMFvMgEThVlkPwc+O21fTmOFI9jrmj 1355SZIpe/fT3y7ea/A3HzR4Q+U9Vq+ATxQLqVyQgUQxSezUZ/uPUSyOOT6+Xg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789622233; b=G+gejSACpw0idM4I3A1QG1szsPbwLBXPeWaGaEgEbMXhxQpNye8DqwNjygMp6O3gDgmMsK eYqLlZVlWEx7FKq3s9nN9fEpln4chmYDeJRk41cFStje0ykbSnSmmG1nNnmBVxcXyvVt59 CZ8kcyJB4PAT8srtJNjzxsGf+uWT+nidhVGYU47vvmpXLt4u94P/3a+kCvFqpZVKSkyfQ7 Re8JqzWfaSAMjHzk53ovZ7N1sa7Il+muvrpsbb/vqUvWb8dd6H2g7wmzdASb8/vcU7iC8p eZmgAZCh9lr4HIJCPWMHrYPUFUTN4YpQQPR54Fe0nJSuaWP/EnCO1goz7Ws5Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789622233; 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=VO2R8/jE51tiqs398trYpT8cO3kfGVTxt4LWG9mRKL0=; b=fbl5RTfuZDd12ACwE6JA52lc2ebWuDNpayu5B7aUFoK/POXrgkEmEkNCON5m01ljX0XbUd v3xytwwdlM/0C+lwBb+9cPNbQOuvleRyGeUrh/vtpsKhvdHjHvj341Q0sg1+3N9gQRCH5E M6Rx7N025T/jSoA5eJ3eQl5lofV1uJalga2/jJP/fOVzsV+f2dGU1PD4Pk09L8WagC/a2v feiDvNJ/D2HQbTSETRvqJr5i5rGCUF+HXxuJPFEhE6+osnUxTQrb7eXcG+7WpgQz3Ydfm7 Qu3DOUO1OZVb0XIKwI5pRlI9pBvEp3jZu/K9pEUEChr78FEudt0FFgV1vruaCg== 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 4hlkX86MwgzHph for ; Thu, 17 Sep 2026 05:17:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f035 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 17 Sep 2026 05:17:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 24f8c4e852d6 - main - enic: Report device enable failures to iflib 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: 24f8c4e852d69189a1de1ff51c351ae8ee603dfa Auto-Submitted: auto-generated Date: Thu, 17 Sep 2026 05:17:12 +0000 Message-Id: <6aab77d8.1f035.2c036340@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=24f8c4e852d69189a1de1ff51c351ae8ee603dfa commit 24f8c4e852d69189a1de1ff51c351ae8ee603dfa Author: Kevin Bowling AuthorDate: 2026-09-07 11:13:26 +0000 Commit: Kevin Bowling CommitDate: 2026-09-17 05:16:42 +0000 enic: Report device enable failures to iflib Do not publish a running interface after vnic_dev_enable_wait() fails. Run the existing stop cleanup for the queues configured before the enable request, then report initialization failure to iflib. Mark those queues as needing cleanup before submitting the enable request so the stopped-state shortcut cannot skip the unwind. MFC after: 2 weeks Sponsored by: BBOX.io --- sys/dev/enic/if_enic.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/dev/enic/if_enic.c b/sys/dev/enic/if_enic.c index aa80ee6bafde..afdc39685aee 100644 --- a/sys/dev/enic/if_enic.c +++ b/sys/dev/enic/if_enic.c @@ -984,6 +984,7 @@ enic_init(if_ctx_t ctx) struct enic *enic; if_softc_ctx_t scctx; unsigned int index; + int error; softc = iflib_get_softc(ctx); scctx = softc->scctx; @@ -1005,11 +1006,17 @@ enic_init(if_ctx_t ctx) bcopy(if_getlladdr(softc->ifp), softc->lladdr, ETHER_ADDR_LEN); enic_set_lladdr(softc); + /* Queue setup above needs normal stop cleanup even if enable fails. */ + softc->stopped = 0; ENIC_LOCK(softc); - vnic_dev_enable_wait(enic->vdev); + error = vnic_dev_enable_wait(enic->vdev); ENIC_UNLOCK(softc); - - softc->stopped = 0; + if (error != 0) { + device_printf(softc->dev, "Device enable failed: %d\n", error); + enic_stop(ctx); + iflib_init_failed(ctx); + return; + } enic_link_status(softc); }