From nobody Fri Sep 11 21:07:54 2026 X-Original-To: dev-commits-src-main@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 4hhRvt3YQvz6rJrY for ; Fri, 11 Sep 2026 21:07:54 +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 4hhRvt36LHz4R3x for ; Fri, 11 Sep 2026 21:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789160874; 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=qnvqfiTeTwJOD2iS668Jr1ud3k8ApbXRg4O+FHYY3aQ=; b=Uz/O6CPsZ6wxucbMBJgLwNOTvpI5rmR43sXBOYSBDGEeDzlTVNCpKoktcxElu4K5g+BJqP q3/6sUOrsL8KjojM54PKhe13L89R3id1MriSkDuGqzKA7MLcUt5ylrlmB5OEy4OP92FJl3 G9Z49bVRQ5cO4qtXVeYvL/vq89dxIlXl3UMf4W9G+N+qOMvbT3TgW7y51nVSFXpVcHauvb 29cq6TTY3USojJvHtgtCGvSsJW0TOcmBMys4wEK+J2A4zut/aM/qcqh40ljypNW2G+v8Vw AdxrFEHMpzzaxamt+WGQhu60dB3EKPwCAblrI8Nit7LIUMfV/NjK5TfgA+3wuA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789160874; b=NQT0OozdV55ctNosEPhryy7ChAyfdxBEKrz3CtSNTjxRpH4cIOFjCn6CgUYmPZaOA7dooG Vi1vTzEKtuiW17BGfomng8fvhXAHnHOiX4JYN5gCzk3Ytabh3pnxqJ1YiFOlKjzSFXpyxM ssTFTyP1MeoTBkT9zxRX91YB8bFYNAcjqPtD/eDymNgJZ2pBWvussSwAmoYnJ1xF8/Lirj OpPTVVs6WHQmFjvvvi4DHUQjbL2Q5d0+BSntizlXvUMqEzKPBeJLWBKJrOSyj169qdkXdZ fEn1qNvSX93smrAnucCCKHlcNIgJ9MfD6S8WQn/4c6Cg7ck1J568Q/v6cWWvJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789160874; 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=qnvqfiTeTwJOD2iS668Jr1ud3k8ApbXRg4O+FHYY3aQ=; b=EYgjH1Vk4pIXWukJV9yV6Z8OFdi8oqMX9Qyd3V22mzQ6UlN5zjumGzbI767Cj37kxmRFXf wYn+UX+rVWIzg5SoTNIH13LFT10aVdCKpazZFQ3N7O/HFYZF6Uob9IAZbTSf8ZVGXturlZ MOS3Z6KczLV/Cbt7kUDOaNK+tunOLY3gGtBR+dlsRvNppIg/OF4SV0Bu06z1T9lE612CyB uU4cHdk5E6xDwOeBpU0ypErE3JiuAIiMjtMvoUtj8j84fKughQ+o5E68af/w50+X0xtOpf Ns6Q2kLhncUvG2wfokZW0XyitUozormeWEXAmvgVP6cKaYWCNUI2M8cwhl4Hyw== 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 4hhRvt1tBWzV2N for ; Fri, 11 Sep 2026 21:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3320d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 11 Sep 2026 21:07:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 33be59b660be - main - ice: Use the mirror interface softc in PF callbacks List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 33be59b660befb13cdcc38e52b1c9b4119a6a069 Auto-Submitted: auto-generated Date: Fri, 11 Sep 2026 21:07:54 +0000 Message-Id: <6aa46daa.3320d.a10df30@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=33be59b660befb13cdcc38e52b1c9b4119a6a069 commit 33be59b660befb13cdcc38e52b1c9b4119a6a069 Author: Kevin Bowling AuthorDate: 2026-09-07 13:43:20 +0000 Commit: Kevin Bowling CommitDate: 2026-09-11 20:58:35 +0000 ice: Use the mirror interface softc in PF callbacks PF iflib callbacks receive struct ice_softc, not struct ice_mirr_if. Resolve the mirror interface through sc->mirr_if before checking or resetting subinterface state. Use the same mirror softc when rebuilding its VSI. This records the required subinterface reset in the state consumed by the PF callback, rather than overlaying the PF softc and leaving rebuilt queues stopped. MFC after: 2 weeks Sponsored by: BBOX.io --- sys/dev/ice/if_ice_iflib.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sys/dev/ice/if_ice_iflib.c b/sys/dev/ice/if_ice_iflib.c index 2214be71f4de..41c34bcfc1e4 100644 --- a/sys/dev/ice/if_ice_iflib.c +++ b/sys/dev/ice/if_ice_iflib.c @@ -2069,12 +2069,13 @@ ice_update_rx_mbuf_sz(struct ice_softc *sc) static void ice_if_init(if_ctx_t ctx) { - struct ice_mirr_if *mif = (struct ice_mirr_if *)iflib_get_softc(ctx); + struct ice_mirr_if *mif; struct ice_softc *sc = (struct ice_softc *)iflib_get_softc(ctx); device_t dev = sc->dev; int err; ASSERT_CTX_LOCKED(sc); + mif = sc->mirr_if; /* * We've seen an issue with 11.3/12.1 where sideband routines are @@ -2163,10 +2164,11 @@ ice_if_init(if_ctx_t ctx) ice_set_state(&sc->state, ICE_STATE_DRIVER_INITIALIZED); - if (sc->mirr_if && ice_testandclear_state(&mif->state, ICE_STATE_SUBIF_NEEDS_REINIT)) { + if (mif != NULL && ice_testandclear_state(&mif->state, + ICE_STATE_SUBIF_NEEDS_REINIT)) { ice_clear_state(&mif->state, ICE_STATE_DRIVER_INITIALIZED); - iflib_request_reset(sc->mirr_if->subctx); - iflib_admin_intr_deferred(sc->mirr_if->subctx); + iflib_request_reset(mif->subctx); + iflib_admin_intr_deferred(mif->subctx); } return; @@ -3144,10 +3146,11 @@ ice_if_vlan_unregister(if_ctx_t ctx, u16 vtag) static void ice_if_stop(if_ctx_t ctx) { - struct ice_mirr_if *mif = (struct ice_mirr_if *)iflib_get_softc(ctx); + struct ice_mirr_if *mif; struct ice_softc *sc = (struct ice_softc *)iflib_get_softc(ctx); ASSERT_CTX_LOCKED(sc); + mif = sc->mirr_if; ice_led_restore(sc); /* @@ -3196,8 +3199,9 @@ ice_if_stop(if_ctx_t ctx) !(if_getflags(sc->ifp) & IFF_UP) && sc->link_up) ice_set_link(sc, false); - if (sc->mirr_if && ice_test_state(&mif->state, ICE_STATE_SUBIF_NEEDS_REINIT)) { - ice_subif_if_stop(sc->mirr_if->subctx); + if (mif != NULL && ice_test_state(&mif->state, + ICE_STATE_SUBIF_NEEDS_REINIT)) { + ice_subif_if_stop(mif->subctx); device_printf(sc->dev, "The subinterface also comes down and up after reset\n"); } } @@ -4038,7 +4042,7 @@ fail: static int ice_subif_rebuild(struct ice_softc *sc) { - struct ice_mirr_if *mif = (struct ice_mirr_if *)iflib_get_softc(sc->ctx); + struct ice_mirr_if *mif = sc->mirr_if; struct ice_vsi *vsi = sc->mirr_if->vsi; int err;