From nobody Fri Aug 7 01:47:44 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 4hGRqP2zxvz6nf1G for ; Fri, 07 Aug 2026 01:47:45 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hGRqP0PP2z3nWm for ; Fri, 07 Aug 2026 01:47:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786067265; 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=WgLtAiRt4sd6s7ZVqhtzLm6KyjgL2i4DfIhtV8fYBQk=; b=jqnPLIxJYBKhNSE8whUViFViWrwWYRAUAQ5zNMOAbnKIEnPgeRurS9Yqd6+5utE2ka3wHN jLfWI9geJLUueDlgMTriRPfnx/MyfzeeRkmEqfml7+ZHmdMad/WBrf7eeX+dJ2SfrtZQuF fSkxZIsMSB5zuulYNhaRnuhZPx8SWcBaOFLjmZwYeMegaBKVdbUfsL76JfxznTLdDmObZE k+4/lN//PKHPzHWeDfyWyxdZ+e9cxpLmg69eSckcJVwH4rLNPcVf7qCvH37LZQFasHWdEx 4Ou6Mcsl3oi5w8nk1qnB0PvDcej/A7DWvqN5tdwY5Vkc0NfApGMif9s432S0og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786067265; a=rsa-sha256; cv=none; b=cnnBp/DWUy4TemyqVRD5fNB8ZxuqODQtimWeqUEMsYZxfMFXSPu6lIrGVKbRkU48w3s3Cj 44xyEa+2wGo1P2fPLTQCGg+jStf3oYL7SY+fWNfvZRrcmKDreuQQ7LnVeSg+5PgSlbG+p3 n+LsfyEwYYsfdgnxrt4o2gMEKVuPZocCRF/kYIAK1MIuY8z1LzXoH/wUMX30mqd8wdPL+5 dJ3fsfM7i3SpGWuWY2DZf2ER0yDrpwuIkaEH604FmnXwrQZhG7Zkk5QFy5siimfg1dPyxp H+9wlgQ+hAoOwgHiHp27mGqid43Kj0HHLKY8Wtv17OftS95bbzfoL67s7hwyfQ== 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=1786067265; 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=WgLtAiRt4sd6s7ZVqhtzLm6KyjgL2i4DfIhtV8fYBQk=; b=TGOAARHKIXFpt4nnpesuuWV1Jn9lsHTqSOCdJ8QjLBV8qpNDTvnawAmy9W24NgYNJZ2+N+ qPEY7tYL53gCtREIr/fsyzeib/kj2Ns0y1596ao3TQAWgDqzk4OWCaN6n/gJc48dRjl3xF qWqw48GX8ZsgNceJ7m9CsTfocB+d1BwAFcUZqiALWA5uM2SgjZ4G1yHjEwnj9SzenpOFVd RO3EjDKOitKwhQXO24XHzqNR1mhiWaL2VqksBzPzjiNAN2MrWj0QW7moxqdSwydemVvW82 RUYwpku452+x+Q9jG13tTKgxcmhlozwHOe/mCJAvgyLEbqXtxciz6lTo0Dq86Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hGRqN6S3NzmYx for ; Fri, 07 Aug 2026 01:47:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3be9f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 07 Aug 2026 01:47:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: caa08ed331da - main - ixgbe: Preserve priority-tagged traffic with SR-IOV 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: caa08ed331da02a91f95472193e25e573c0ae1e3 Auto-Submitted: auto-generated Date: Fri, 07 Aug 2026 01:47:44 +0000 Message-Id: <6a753940.3be9f.1dc4de25@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=caa08ed331da02a91f95472193e25e573c0ae1e3 commit caa08ed331da02a91f95472193e25e573c0ae1e3 Author: Kevin Bowling AuthorDate: 2026-08-06 08:21:16 +0000 Commit: Kevin Bowling CommitDate: 2026-08-07 01:39:29 +0000 ixgbe: Preserve priority-tagged traffic with SR-IOV VID 0 carries only 802.1p priority and does not identify VLAN membership. Keep VFTA bit zero in the persistent PF shadow table so reset and SR-IOV replay admit priority-tagged frames while VLAN filtering is enabled. In virtualization mode, also reserve VLVF slot zero and restore PF and eligible VF pool memberships. A VFTA hit alone admits the tag globally but does not deliver it to the correct pools. This matches the priority-tag treatment in em/igb. MFC after: 1 week --- sys/dev/ixgbe/if_ix.c | 11 ++++++++++- sys/dev/ixgbe/if_sriov.c | 6 ++++-- sys/dev/ixgbe/ix_txrx.c | 5 +++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index e8aa81df229c..fe9d14fde2f9 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -2396,6 +2396,10 @@ ixgbe_iov_vlan_rebuild(struct ixgbe_softc *sc, bool promisc) vf = &sc->vfs[i]; if ((vf->flags & IXGBE_VF_ACTIVE) == 0) continue; + if (vf->default_vlan == 0 && + ixgbe_set_vfta(hw, 0, vf->pool, true, false) != + IXGBE_SUCCESS) + failures++; for (word = 0; word < IXGBE_VFTA_SIZE; word++) { bits = vf->vlans[word]; while (bits != 0) { @@ -2410,6 +2414,8 @@ ixgbe_iov_vlan_rebuild(struct ixgbe_softc *sc, bool promisc) } } } + if (ixgbe_set_vfta(hw, 0, sc->pool, true, false) != IXGBE_SUCCESS) + failures++; /* Add the PF to shared entries, or every entry in promiscuous mode. */ for (i = 1; i < IXGBE_VLVF_ENTRIES; i++) { @@ -2428,7 +2434,7 @@ ixgbe_iov_vlan_rebuild(struct ixgbe_softc *sc, bool promisc) IXGBE_WRITE_REG(hw, IXGBE_VFTA(i), vfta[i]); if (failures != 0) device_printf(sc->dev, - "VF VLAN restore failed for %d memberships\n", failures); + "VLAN pool restore failed for %d memberships\n", failures); } static void @@ -2481,6 +2487,9 @@ ixgbe_setup_vlan_hw_support(if_ctx_t ctx) ctrl &= ~IXGBE_VLNCTRL_VME; } + /* Always admit priority-tagged frames. */ + sc->shadow_vfta[0] |= 1U; + #ifdef PCI_IOV if ((sc->feat_en & IXGBE_FEATURE_SRIOV) != 0) { /* diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index 318e0fe70759..2a5fd6a864ee 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -408,8 +408,10 @@ ixgbe_vf_reset_vlan(struct ixgbe_softc *sc, struct ixgbe_vf *vf, s32 error; ixgbe_vf_clear_vlans(sc, vf, clear_hw); - error = IXGBE_SUCCESS; - if (vf->default_vlan != 0) { + if (vf->default_vlan == 0) { + /* VLAN 0 membership is implicit and not VF-removable. */ + error = ixgbe_vf_vlan_hw_update(sc, vf, 0, true); + } else { error = ixgbe_vf_vlan_hw_update(sc, vf, vf->default_vlan, true); if (error == IXGBE_SUCCESS) ixgbe_vf_vlan_record(vf, vf->default_vlan, true); diff --git a/sys/dev/ixgbe/ix_txrx.c b/sys/dev/ixgbe/ix_txrx.c index c95c3fc903ef..33203f28dd00 100644 --- a/sys/dev/ixgbe/ix_txrx.c +++ b/sys/dev/ixgbe/ix_txrx.c @@ -469,9 +469,10 @@ ixgbe_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) * A PF-assigned port VLAN is stripped before a VF receives the * frame, but it is not one of the VLANs registered by the VF. * Do not expose that administrative tag to the VF's network - * stack. Locally registered trunk VLANs retain M_VLANTAG. + * stack. Priority tags and locally registered trunk VLANs retain + * M_VLANTAG. */ - if ((sc->feat_en & IXGBE_FEATURE_VF) == 0 || + if ((sc->feat_en & IXGBE_FEATURE_VF) == 0 || vid == 0 || (sc->shadow_vfta[vid >> 5] & (1U << (vid & 0x1f))) != 0) { ri->iri_vtag = vtag;