From nobody Mon Aug 24 00:53: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 4hSsqF0Mmzz6q2Ty for ; Mon, 24 Aug 2026 00:53: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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hSsqD5Gq0z3w1y for ; Mon, 24 Aug 2026 00:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787532824; 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=ZzzhZD6L/47qpxuWCi+XORl4qw+JjSwBXNvK7xMd2EI=; b=MvBi6AjYAShZvIx/7jr7JQ30cm/9+pakMGzSWXre4XMPvEyk5eHj5nrXycKBGsb8gvxIn6 3gI6woX+DgHw8wITLH8fgKo6LiTbDOH+Xg8c2hCW8ds4K3V5rBnF1m7HcAwLkrhqanI1d7 xXzqoP+bwh1nhyGP/H88fsXIF/UVDJ/Ie4uJIaODw6/C7QYqjgo7DzDkbQfDisCVX4rM8T hRX8ol9szxcgGo97H0RlO0iY+cUSHjq87SoU0mIxqg2hKUAVC0AXIRiLKWxrFkTUmvASi7 Dveevlvi1b5R2Z2j8v2Hqi/u6dhpM5tLCPxA8ULUqMxwiAErNGXDgCpgfjIQpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787532824; a=rsa-sha256; cv=none; b=kdpUcInYTFHxL3dCq+uVCmeQJfUpYVg+JPT+WH+S1j5Ed8DvGuFONv9hP5B8HuF12Zgljp FS8J34GTyppT7T7VZxraj+16Lg5dFa/xoGCv6bG/SeDL4ld/sFM1lGUeXSj/JNqG+OHLn1 q3UT0OL+NMpj2COfXtpggv1s60M52s1d4hEOjlQduf07j/E8tR80o32G2QasJVYKIfY0WA fPDkM4i4Tp80NbaIoCkRuVOlIoaqbbzkG1wG6z1znXgVPRVZZy1gn6CqTg7cCKjlzNfDH1 BBgo9GMPUzdryf15zFU0fJPmYsp1vzvMR/kXagPWAvX+Aq7h7bLU4W9wgHoUBg== 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=1787532824; 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=ZzzhZD6L/47qpxuWCi+XORl4qw+JjSwBXNvK7xMd2EI=; b=lsKGSLyRd87ZAyHNVmclGcIooId3Ak5wCU0gdbTCNFvJrgkf6lXo67hNsMXM3ZbKMyY4ga ZmjX1UCtN/rXvAPfQy+0vki3A06Y390cn0F2aLww9zWe0tElt+VV/bxs3fVbh+dksqgg5V Xqy18m9WtTLDt7rqPecUSlLDU12ZuPdGjkTp3ZJkqPd+jalebCWXCMmeSeLAZrrL+hky/D GD0c4sHLEOSu7v9npupMvJ+f4291cIhqLUJ5EvL/6ueiHQrAqcTEcBXNU2AV6MVico8net bnJoVuu2Tncd7+nPtl/s6nmmGFnHbt4vTVpSnbY0oKaC+LE8Q+ToARAju+6Nug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hSsqD3qrGzh8J for ; Mon, 24 Aug 2026 00:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31efb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Aug 2026 00:53:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 09132e3cc15d - stable/15 - ixgbe: Preserve VF jumbo frame size across PF resets 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/15 X-Git-Reftype: branch X-Git-Commit: 09132e3cc15d6202cbc67310e5399358256baf4b Auto-Submitted: auto-generated Date: Mon, 24 Aug 2026 00:53:44 +0000 Message-Id: <6a8b9618.31efb.15723d23@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=09132e3cc15d6202cbc67310e5399358256baf4b commit 09132e3cc15d6202cbc67310e5399358256baf4b Author: Kevin Bowling AuthorDate: 2026-08-10 15:08:49 +0000 Commit: Kevin Bowling CommitDate: 2026-08-24 00:50:10 +0000 ixgbe: Preserve VF jumbo frame size across PF resets sc->max_frame_size represents the largest frame requested by the PF or an active VF. The MTU callback replaces it with the PF frame size, so a subsequent reinitialization can program MHADD below an active VF's jumbo-frame request. Recompute the aggregate before hardware initialization and use it when programming MHADD. Recompute after each VF LPE request as well, so a reduced request can lower the hardware limit when no other function needs the previous value. (cherry picked from commit 877f0ee40c2af801c5ca758a37b3ebddc560dad2) --- sys/dev/ixgbe/if_ix.c | 6 +++++- sys/dev/ixgbe/if_sriov.c | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index b77d48569d88..83848f4d1bd6 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -3963,6 +3963,10 @@ ixgbe_if_init(if_ctx_t ctx) INIT_DEBUGOUT("ixgbe_if_init: begin"); + /* Preserve the largest frame requested by the PF or an active VF. */ + sc->max_frame_size = if_getmtu(ifp) + IXGBE_MTU_HDR; + ixgbe_recalculate_max_frame(sc); + /* Queue indices may change with IOV mode */ ixgbe_align_all_queue_indices(sc); @@ -4000,7 +4004,7 @@ ixgbe_if_init(if_ctx_t ctx) ixgbe_config_gpie(sc); /* Set MTU size */ - if (if_getmtu(ifp) > ETHERMTU) { + if (sc->max_frame_size > ETHER_MAX_LEN) { /* aka IXGBE_MAXFRS on 82599 and newer */ mhadd = IXGBE_READ_REG(hw, IXGBE_MHADD); mhadd &= ~IXGBE_MHADD_MFS_MASK; diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index 4e98b2b5de0c..9fc3437a2cf3 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -1150,7 +1150,7 @@ ixgbe_vf_set_lpe(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) } vf->maximum_frame_size = vf_max_size; - ixgbe_update_max_frame(sc, vf->maximum_frame_size); + ixgbe_recalculate_max_frame(sc); /* * We might have to disable reception to this VF if the frame size is @@ -1161,7 +1161,7 @@ ixgbe_vf_set_lpe(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) mhadd = IXGBE_READ_REG(hw, IXGBE_MHADD); pf_max_size = (mhadd & IXGBE_MHADD_MFS_MASK) >> IXGBE_MHADD_MFS_SHIFT; - if (pf_max_size < sc->max_frame_size) { + if (pf_max_size != sc->max_frame_size) { mhadd &= ~IXGBE_MHADD_MFS_MASK; mhadd |= sc->max_frame_size << IXGBE_MHADD_MFS_SHIFT; IXGBE_WRITE_REG(hw, IXGBE_MHADD, mhadd); @@ -2017,12 +2017,13 @@ ixgbe_activate_vfs(struct ixgbe_softc *sc) } /* ixgbe_activate_vfs */ -/* Check the max frame setting of all active VF's */ +/* Recompute the maximum frame setting of the PF and all active VFs. */ void ixgbe_recalculate_max_frame(struct ixgbe_softc *sc) { struct ixgbe_vf *vf; + sc->max_frame_size = if_getmtu(iflib_get_ifp(sc->ctx)) + IXGBE_MTU_HDR; for (int i = 0; i < sc->num_vfs; i++) { vf = &sc->vfs[i]; if (vf->flags & IXGBE_VF_ACTIVE)