From nobody Fri Aug 21 00:44:51 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 4hR1mN5MpHz6pPFK for ; Fri, 21 Aug 2026 00:44:52 +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 4hR1mM6GZdz45FQ for ; Fri, 21 Aug 2026 00:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787273091; 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=IrFdaN8BfUSd8OAA4Ecl47/in1XR+kQ0ttklLDsIbC4=; b=FDaid/JJupfdfD2cP6r8rW2lzuV9+7PIsVEFZ8aW34vRNMlmS1secQQScQVXww9A9qfMmh sG6ibx6suko71U7fc6No/PtSRKlwNRoa9ZSSvQ6eRUoyRB3L1xOTvcdcTEdejLKeND9wkS JwPIge8kAjS0LE6g9IitayVT6hnNXqWhl7sFJ2SvvUD7Adm0Wqd22HIeumuVNfHZz5919a nRhSRc7xkSPMysaZBb8aBVbMiLsZbfWLUiKe2EnWpaa0LpF1FGTR04FUBbHT9udnmDFFoI GabuYehZ8ymlZOoSPafAsSCc76Vko7LmhR8Nc4eessgwv0zkDHRF7TisKEqCiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787273091; a=rsa-sha256; cv=none; b=MVg+J3FMCTYLvqOKVJxJGkbxXuwS7cwa0xCYFrlZFzVgvwuSv1T/ZyhHqdNvzE4xjDZfVC k+Xw9WUiA0OVHPMVzJpHVBsERGgveOhfwwGO0TbtN0wDmdootDbiup9DAbqrQYMGOtnL2F VK8IMLHemz/a78OBWmRhW8OsYADLZUI9uD3+4wqoBD/NW06vbFdwmnUeSW3fJ31drJshFv iR/BDoOJ9cXnCdLx+svTA5O5J5X2FKpTvD/kB8MCDCURrdVfJ7DiVn2LbeWR1tBkFaBnQQ edX+x5OoV640N7oU2yszMFLgDKaO8x3DLno7dfhrW/1c5wBJPgQ5/QL0IllQQA== 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=1787273091; 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=IrFdaN8BfUSd8OAA4Ecl47/in1XR+kQ0ttklLDsIbC4=; b=pBc39oMAX/MK7sHAQFD9HT+9P8ZCUtePSIqN1quPiTghzp0pwGOShXG8YFxsxhFeZgnS+2 pBZ5njp+37yWdEBnGRdtJR4cKgFZuuGmQI5ZLZz/YRpQltn5zfarqoFiMA87uyNdoQxtws COsZPvH3TrNthWqwH6eAfrVig3JiWvFMVVi1tVU/DURmpMrzlceosLytfF8Osp7nEq1W/u 338bWdDJIqjdj5LKSksgNA9k7os+etECwjVZr8X+cAKzHzceNNvqqBz/Ynk1BCMytcb8H3 vdOQpKZ/36SbBTsBDZVJ8FJdGYO5y7Pu4zdsKFiEqqshKvb7/N2BxhKkQBakkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hR1mM4q7SzhVm for ; Fri, 21 Aug 2026 00:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22ec6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 21 Aug 2026 00:44:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 097430cb4c10 - stable/14 - ixgbe: force receive drops on every VF queue 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/14 X-Git-Reftype: branch X-Git-Commit: 097430cb4c10b0680609d2e32ae4b05c3e9593e5 Auto-Submitted: auto-generated Date: Fri, 21 Aug 2026 00:44:51 +0000 Message-Id: <6a879f83.22ec6.79720a15@gitrepo.freebsd.org> The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=097430cb4c10b0680609d2e32ae4b05c3e9593e5 commit 097430cb4c10b0680609d2e32ae4b05c3e9593e5 Author: Kevin Bowling AuthorDate: 2026-08-01 06:43:08 +0000 Commit: Kevin Bowling CommitDate: 2026-08-21 00:42:53 +0000 ixgbe: force receive drops on every VF queue PFQDE is indexed by absolute receive queue, but the driver programs one index per VF. Only the first quarter or half of the VF queues therefore have queue-drop isolation, depending on the virtualization mode. The flow-control path can also clear those bits even though SR-IOV requires them independently of the PF pause policy. Program every queue in a VF pool before enabling receive for that VF. For an X550-family VF with an administrative port VLAN, also hide the VLAN tag as the hardware requires. Keep PF flow-control changes confined to the PF SRRCTL registers, and clear the VF queue settings when SR-IOV is torn down and the queues can be reassigned to the PF. (cherry picked from commit 4383ab82b0bbaf1c78ecdf4eb7628f1e154db24b) --- sys/dev/ixgbe/if_ix.c | 12 ------------ sys/dev/ixgbe/if_sriov.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index e4ea801b6dc4..8f4d08ba5494 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -5256,13 +5256,6 @@ ixgbe_enable_rx_drop(struct ixgbe_softc *sc) IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(rxr->me), srrctl); } - /* enable drop for each vf */ - for (int i = 0; i < sc->num_vfs; i++) { - IXGBE_WRITE_REG(hw, IXGBE_QDE, - (IXGBE_QDE_WRITE | - (i << IXGBE_QDE_IDX_SHIFT) | - IXGBE_QDE_ENABLE)); - } } /* ixgbe_enable_rx_drop */ /************************************************************************ @@ -5282,11 +5275,6 @@ ixgbe_disable_rx_drop(struct ixgbe_softc *sc) IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(rxr->me), srrctl); } - /* disable drop for each vf */ - for (int i = 0; i < sc->num_vfs; i++) { - IXGBE_WRITE_REG(hw, IXGBE_QDE, - (IXGBE_QDE_WRITE | (i << IXGBE_QDE_IDX_SHIFT))); - } } /* ixgbe_disable_rx_drop */ /************************************************************************ diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index 98c31b3d7a17..7987009eb8f0 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -587,6 +587,31 @@ ixgbe_vf_enable_transmit(struct ixgbe_softc *sc, struct ixgbe_vf *vf) } /* ixgbe_vf_enable_transmit */ +static void +ixgbe_vf_set_rx_drop(struct ixgbe_softc *sc, struct ixgbe_vf *vf, + bool enable) +{ + struct ixgbe_hw *hw; + u32 qde; + int i, queue_count; + + hw = &sc->hw; + queue_count = ixgbe_vf_queues(sc->iov_mode); + for (i = 0; i < queue_count; i++) { + qde = IXGBE_QDE_WRITE | + (ixgbe_vf_que_index(sc->iov_mode, vf->pool, i) << + IXGBE_QDE_IDX_SHIFT); + if (enable) { + qde |= IXGBE_QDE_ENABLE; + if (vf->default_vlan != 0 && + hw->mac.type >= ixgbe_mac_X550) + qde |= IXGBE_QDE_HIDE_VLAN; + } + IXGBE_WRITE_REG(hw, IXGBE_QDE, qde); + IXGBE_WRITE_FLUSH(hw); + } +} + static void ixgbe_vf_enable_receive(struct ixgbe_softc *sc, struct ixgbe_vf *vf) { @@ -594,6 +619,8 @@ ixgbe_vf_enable_receive(struct ixgbe_softc *sc, struct ixgbe_vf *vf) uint32_t vf_index, vfre; hw = &sc->hw; + /* Keep one VF without receive descriptors from blocking its peers. */ + ixgbe_vf_set_rx_drop(sc, vf, true); vf_index = IXGBE_VF_INDEX(vf->pool); vfre = IXGBE_READ_REG(hw, IXGBE_VFRE(vf_index)); @@ -1442,6 +1469,7 @@ ixgbe_if_iov_uninit(if_ctx_t ctx) for (i = 0; i < sc->num_vfs; i++) { if (!(sc->vfs[i].flags & IXGBE_VF_ACTIVE)) continue; + ixgbe_vf_set_rx_drop(sc, &sc->vfs[i], false); ixgbe_vf_clear_mac_filters(sc, &sc->vfs[i], true); sc->vfs[i].flags &= ~IXGBE_VF_ANTI_SPOOF; ixgbe_vf_set_anti_spoof(sc, &sc->vfs[i]);