From nobody Sun Aug 16 01:15:48 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 4hMyhT4lk1z6p94R for ; Sun, 16 Aug 2026 01:15:53 +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 4hMyhT39Kyz3TGd for ; Sun, 16 Aug 2026 01:15:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786842953; 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=wIeS8xBuDIcDRPpMwipyxTgk0tBd2lg7zebuMyWlDhztg/YMSuI2clAYELiiDBAll6m10A fz1Za2hxCCqEKVZn5HVSTNe9AlVMXMVBKDwrfcvOl23AhLaVtJLUe6o5LqFO8iePJwijpp fOP/r6Fa/MXFDTjetZB29M54zep9PGDk95q8xwmW5FjGUmxr/YUfZWhnp8pEdjvboaFkRe KPF70CyNY2JwvtM00yiLduYaC/NPiz2RMQU6DL75PIVayFhkHRFcucpuFuHiDy94L2e+LJ OG93FQ1JyJeeVavTVGOIyU2BmAxkASEQ1PsZ9AWtbn4jh4Rdyzq/vOqjnnuRrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786842953; a=rsa-sha256; cv=none; b=q2don4jMHiZVC4GYf0X3/mBirFQwtJeoS1zfIuLBXltSGLKqGTJeeOfqIPSffVHcvKOFXK Z9J9ownw+EkiuAqGtnw6t1dLFIBdKexMUkcCFsCo1ciHGvfJRnm1R83JlRekdS7Zs7eSAC fI9GlHXRrpH0OdfiXeOA5IFJKTyLiSc8Gvx3t0KJ8dNkq79vyQPgdsRaWCg5iQtiWyuwYK GmX6biU/0eOAt3fhv7pJq8c9jR/2dhMMy8eIf2nHVXIKKqbMofF4RW0jprTFtTujn9ab+X TxBV8xATebKOOxIcgjLNdrfNRa8U/73g2M0KRbZWyroWQb6OV/PkBrrDlst1eA== 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=1786842953; 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=l8cAvE6cgjR2ZBw4UZlCyrcECVjo0GD8OP1/G9Qj7jELIgD0tRhQr/aq6Op2H2xLm047Mp NLfNptDRNUGdMsGkkz0L7JhzUeAlgojlPDadG+someE83TkuJYaEh4xYzHoe1QvMPM2gXg ITJgbB35DUuiClHHQWzrp+Dw2RDkZ7cWNdJkfZEmdD/sYTYr2vh4RB3/gkb6HV894yVybL IyDB2rjN/2KoF7nF4AhWVpt2bFV08I+6vcCUy8rz/LbTzW9sXJM85kitxH1Pj4UXiVQuzM jhQ8SnHovFHkWH52YvhwdtYeVLJkMG99RLsFdWV6l7p6akdVgAZekhMVqMF5wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hMyhT2F93z15qV for ; Sun, 16 Aug 2026 01:15:53 +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 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: 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