From nobody Sun Aug 16 01:15:48 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 4hMyhN3gcCz6p994 for ; Sun, 16 Aug 2026 01:15:48 +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 4hMyhN38c6z3TZC for ; Sun, 16 Aug 2026 01:15:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786842948; 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=jIVHQWgq6d2VVwUnbneFkG6/J0s+foUXGbjr6Rxngkk=; b=B7uLGnW5aRV/T71lI07spUMyJ7xFIYkRJkO4FSA8NKLeSrQHxs6EhkEhVS3GJ3Bl7jYrWN yLftMoqNTn/12blLWejRJi4/9jNZV+fBU20pMtqjpt0db7z0PJoQuGBC45zMePpXM3iKRl yjjmuOqosIkLdp3AAbOjT9VYPP9uEysGpQRfBrOQxh22gKloGds605cH1qg2uDrVUDvZ/4 Vp4H1FFDnnNb3OAmao7DzZk1cA3Xr33+oKMD+B3S4tj0XOYH7ajNbPzaRpjqe4sp/jM4Gs s9BqI8RswtJ7tNCrUEyhH1rBO7ypQm0tEadp05zPjuwMzpWhtAR2mKUBWyRD5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786842948; a=rsa-sha256; cv=none; b=d9ezRfg7L1qkL3ppDS6Txs9GI48JBhUF6H4mWP3032k9WtyzpkBzzf2WlyurcTcvz8pRXo GRvBpb8MzX9TwKCZYuPcEkPuNXhKhihugojwvWxU8pROlXIb0tOqKlg5xrFKLHGzY51BT/ bovDIMKnRI8zYe6hoNUvYeE/09gESZ7Rlaka716+IFRx5cTYPwPNt89dTyknC9vzUsbS+E vwSO/n6VcnB9EH8riHac3RXrubDEuGbmUx6/9VqyNFrDYO06bJXkLpO8Rw9zhKckLiCkXg mnZcrQcSvhxC50+GEcoGjCwEvyhD7O8LJGregLM5VSoSPFA/rZxzaz7bHftXog== 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=1786842948; 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=jIVHQWgq6d2VVwUnbneFkG6/J0s+foUXGbjr6Rxngkk=; b=fIENykLgWuTw2U9e6ifcviG06VPNlGzMiFkbVfOSb4OE+kthYG8FbKo6gyObeUjtXb/GiK untYtSQkF7btA60yigm8p/59HoQpztTiGC4uJJwjqAlZU94OeYCW5fYQGfOT4hL5OUlqqa LRpClZtlEYcWTK1Evx8Soe1F26wCapDCOEm4Xe3J7GHJA4pGwbuc4QdN10JvJVJLTLdtTy RfojwQbRajP4gRnyoYHjmomdagZlDnAFwNr04CqVww8oPttdzoUrYCgFiJL4cMYquWvRoS A27LTHJeAhTyJHOExET7z8cxtFX9Ps9tD2dnESb8tugHv6AKt113zMpVTsh/Zw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hMyhN1xNVz15sX for ; Sun, 16 Aug 2026 01:15:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b715 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 16 Aug 2026 01:15:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: df02513fd44b - main - ixgbe: Enable SR-IOV on E610 PFs 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: df02513fd44bcede0aa8833ae5c2af826f63ce10 Auto-Submitted: auto-generated Date: Sun, 16 Aug 2026 01:15:48 +0000 Message-Id: <6a810f44.3b715.5295519@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=df02513fd44bcede0aa8833ae5c2af826f63ce10 commit df02513fd44bcede0aa8833ae5c2af826f63ce10 Author: Kevin Bowling AuthorDate: 2026-08-01 02:47:11 +0000 Commit: Kevin Bowling CommitDate: 2026-08-16 01:14:30 +0000 ixgbe: Enable SR-IOV on E610 PFs E610 inherits the X550-family virtualization registers, anti-spoofing controls, and malicious-driver operations, but the frontend does not advertise SR-IOV and cannot negotiate the mailbox revision needed by E610 VFs. Initialize the X550-family PF/VF mailbox registers for E610 and use PFVFLREC for its VF reset events, following DPDK shared ixgbe code. Advertise the E610 SR-IOV capability, accept API 1.6 only on E610, carry the existing xcast and queue operations forward to that revision, and return the cached physical link speed and state with the three-dword E610 operation. Unsupported RSS and optional feature requests continue to receive explicit failures. SR-IOV activation also enables the existing X550-derived per-pool MDD recovery path on E610. Document the expanded protection and link-state coverage. Hardware validation created 63 VFs and rejected a 64th without flapping the running PF. Invalid TX and RX descriptor DMA independently asserted the offender's WQBR bit, gated only that VF, preserved sibling traffic, and recovered after the VF reset. FreeBSD ixv, FreeBSD DPDK, Linux ixgbevf, and Linux DPDK exercised the PF mailbox and data paths. MFC after: 2 weeks Relnotes: yes Sponsored by: Dirk-Willem van Gulik from Web Weaving (E610 hardware) Sponsored by: BBOX.io --- share/man/man4/ix.4 | 5 +++- sys/dev/ixgbe/if_ix.c | 1 + sys/dev/ixgbe/if_sriov.c | 61 ++++++++++++++++++++++++++++++++++++++++++--- sys/dev/ixgbe/ixgbe_mbx.c | 3 +++ sys/dev/ixgbe/ixgbe_sriov.h | 1 + 5 files changed, 67 insertions(+), 4 deletions(-) diff --git a/share/man/man4/ix.4 b/share/man/man4/ix.4 index 433ec164688e..e175d3c7aea8 100644 --- a/share/man/man4/ix.4 +++ b/share/man/man4/ix.4 @@ -107,7 +107,7 @@ source address, so the driver does not silently weaken an enabled policy to install secondary addresses. .Pp Ethertype anti-spoofing and malicious-driver detection and recovery are -available only on X550-family devices. +available only on X550-family devices, including X552 and X553, and on E610. The driver cannot enable those hardware protections on earlier devices such as 82599. After a malicious-driver event, the PF keeps the offending VF's transmit and @@ -123,6 +123,9 @@ configuration is destroyed and recreated. The read-only .Va dev.ix.N.iov_quarantined_vfs sysctl reports quarantined VF pools as a bitmap. +.Pp +E610 PFs provide physical link state and speed to VFs that negotiate mailbox +API 1.6. .Sh HARDWARE The .Nm diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 7bc7a2fc831b..f581de8d7abc 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -6179,6 +6179,7 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) break; case ixgbe_mac_E610: sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE; + sc->feat_cap |= IXGBE_FEATURE_SRIOV; sc->feat_cap |= IXGBE_FEATURE_DBG_DUMP; sc->feat_cap |= IXGBE_FEATURE_FW_LOGGING; error = ixgbe_get_caps(&sc->hw); diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index 09954a519664..13ba3cdaf132 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -1252,6 +1252,14 @@ static void ixgbe_vf_api_negotiate(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) { + if (msg[1] == IXGBE_API_VER_1_6) { + if (sc->hw.mac.type != ixgbe_mac_E610) + goto failure; + vf->api_ver = msg[1]; + ixgbe_send_vf_success(sc, vf, msg[0]); + return; + } + switch (msg[1]) { case IXGBE_API_VER_1_0: case IXGBE_API_VER_1_1: @@ -1261,10 +1269,13 @@ ixgbe_vf_api_negotiate(struct ixgbe_softc *sc, struct ixgbe_vf *vf, ixgbe_send_vf_success(sc, vf, msg[0]); break; default: - vf->api_ver = IXGBE_API_VER_UNKNOWN; - ixgbe_send_vf_failure(sc, vf, msg[0]); - break; + goto failure; } + return; + +failure: + vf->api_ver = IXGBE_API_VER_UNKNOWN; + ixgbe_send_vf_failure(sc, vf, msg[0]); } /* ixgbe_vf_api_negotiate */ static void @@ -1282,6 +1293,7 @@ ixgbe_vf_update_xcast_mode(struct ixgbe_softc *sc, struct ixgbe_vf *vf, goto failure; break; case IXGBE_API_VER_1_3: + case IXGBE_API_VER_1_6: break; default: goto failure; @@ -1339,6 +1351,43 @@ ixgbe_vf_get_queues(struct ixgbe_softc *sc, struct ixgbe_vf *vf, ixgbe_write_mbx(hw, resp, IXGBE_VF_GET_QUEUES_RESP_LEN, vf->pool); } /* ixgbe_vf_get_queues */ +static void +ixgbe_vf_get_link_state(struct ixgbe_softc *sc, struct ixgbe_vf *vf, + uint32_t *msg) +{ + switch (vf->api_ver) { + case IXGBE_API_VER_1_2: + case IXGBE_API_VER_1_3: + case IXGBE_API_VER_1_6: + break; + default: + ixgbe_send_vf_failure(sc, vf, msg[0]); + return; + } + + msg[0] = IXGBE_VF_GET_LINK_STATE | IXGBE_VT_MSGTYPE_SUCCESS | + IXGBE_VT_MSGTYPE_CTS; + msg[1] = 1; + ixgbe_write_mbx(&sc->hw, msg, 2, vf->pool); +} /* ixgbe_vf_get_link_state */ + +static void +ixgbe_vf_get_pf_link_state(struct ixgbe_softc *sc, struct ixgbe_vf *vf, + uint32_t *msg) +{ + if (sc->hw.mac.type != ixgbe_mac_E610 || + vf->api_ver != IXGBE_API_VER_1_6) { + ixgbe_send_vf_failure(sc, vf, msg[0]); + return; + } + + msg[0] = IXGBE_VF_GET_PF_LINK_STATE | IXGBE_VT_MSGTYPE_SUCCESS | + IXGBE_VT_MSGTYPE_CTS; + msg[1] = sc->link_speed; + msg[2] = sc->link_up; + ixgbe_write_mbx(&sc->hw, msg, 3, vf->pool); +} /* ixgbe_vf_get_pf_link_state */ + static bool ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf, bool reset_pending) @@ -1409,6 +1458,12 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf, bool reset_pending) case IXGBE_VF_UPDATE_XCAST_MODE: ixgbe_vf_update_xcast_mode(sc, vf, msg); break; + case IXGBE_VF_GET_LINK_STATE: + ixgbe_vf_get_link_state(sc, vf, msg); + break; + case IXGBE_VF_GET_PF_LINK_STATE: + ixgbe_vf_get_pf_link_state(sc, vf, msg); + break; default: ixgbe_send_vf_failure(sc, vf, msg[0]); } diff --git a/sys/dev/ixgbe/ixgbe_mbx.c b/sys/dev/ixgbe/ixgbe_mbx.c index a6a2721d7132..584eb62e4fd7 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.c +++ b/sys/dev/ixgbe/ixgbe_mbx.c @@ -854,6 +854,7 @@ static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_id) case ixgbe_mac_X550: case ixgbe_mac_X550EM_x: case ixgbe_mac_X550EM_a: + case ixgbe_mac_E610: case ixgbe_mac_X540: vflre = IXGBE_READ_REG(hw, IXGBE_PFVFLREC(index)); break; @@ -1246,6 +1247,7 @@ void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw) hw->mac.type != ixgbe_mac_X550 && hw->mac.type != ixgbe_mac_X550EM_x && hw->mac.type != ixgbe_mac_X550EM_a && + hw->mac.type != ixgbe_mac_E610 && hw->mac.type != ixgbe_mac_X540) return; @@ -1288,6 +1290,7 @@ void ixgbe_upgrade_mbx_params_pf(struct ixgbe_hw *hw, u16 vf_id) hw->mac.type != ixgbe_mac_X550 && hw->mac.type != ixgbe_mac_X550EM_x && hw->mac.type != ixgbe_mac_X550EM_a && + hw->mac.type != ixgbe_mac_E610 && hw->mac.type != ixgbe_mac_X540) return; diff --git a/sys/dev/ixgbe/ixgbe_sriov.h b/sys/dev/ixgbe/ixgbe_sriov.h index de0485f6e9a2..0a1eeb642366 100644 --- a/sys/dev/ixgbe/ixgbe_sriov.h +++ b/sys/dev/ixgbe/ixgbe_sriov.h @@ -75,6 +75,7 @@ #define IXGBE_API_VER_1_1 2 #define IXGBE_API_VER_1_2 3 #define IXGBE_API_VER_1_3 4 +#define IXGBE_API_VER_1_6 ixgbe_mbox_api_16 #define IXGBE_API_VER_UNKNOWN UINT16_MAX #define IXGBE_NO_VM 0