From nobody Mon Aug 10 16:33:20 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 4hJgKs18Sqz6p2Kl for ; Mon, 10 Aug 2026 16:33:21 +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 4hJgKs0SSxz3xB6 for ; Mon, 10 Aug 2026 16:33:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786379601; 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=xpnQsvDbXd4Wb9SYjNntvoMiwXf8wRZG5eSb2xUHipU=; b=loJ3xFQIJ+YVTCHI/1P7s9ywwCdG6WSBsfmba2UqvkXbk9gD0hESpDh4tezo0QiLq9lRbb jLaQejX0CTaxrUu7WisavTdfPcCTwQvPdZef7w2g/v73i40oCvzZ8Ht2onwH+okb+OfHvu edQOayK8uwDtci90X896X2P7yDCodYe/IwrWv9CLwiX86uGJdvrCcJl/njpFdNkv2UcrQv Zvz9vGjLkyKpz7UO91Xn1iw0vxO30Mazk9yJtuONmThARL3LxVHodBx2mX/xfL7QXvA+6k O+fOJ56Cgo/BIx6OST7fpPJ06IdFU3jN9JxRYfLJEdGTmUgVsSvBIhHUVhLHnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786379601; a=rsa-sha256; cv=none; b=X3ne70prs06TmJhi7+vBcwPT2V4Ib4xySMZplo+f6ItweuqzURSOe9x5/DuDwhWLJMT38G hdIVn1tVsJ7kR4Ti/dCVPG+iICQ7p25b45hZ1NK2iO+DSf5VHKN2tyMfhfZlkEVY0z0Et5 TXn54RF7SThhzlZP8rf7xfS+VHmiydK8LdINvhW2N2RSd/OE4uJXMal53hWZzrXTyMH/aB xwG7+pl+1EmNUErcQ3M0vg0vaDZ8chE2QZm1rqGMwYSwIa+Q0DmIHjj0eooyk9ko4hU30d 5+qEMG1Ks4QUvaJDp0mLbmumgvNm1JW/M0VkMryWGPYH07CHEmV4M8ajVQBM5Q== 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=1786379601; 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=xpnQsvDbXd4Wb9SYjNntvoMiwXf8wRZG5eSb2xUHipU=; b=OhcSQzWiNJutIhKz6nUWzqkKVRbvUSFDZk/osT4FLnKjyNuebXVYcUvTeOL3deATmQixd5 pouFJv1X2rHUeCRc2swuHikPTwbB1H04a8GdMmU2dbnbkgQHypqyMcoU//o20GkwLhp64F sEQIk624kNTmNyO4cvjOjGQ6Hc5brKwZ+M2LyZNv0xDB2CyDG8IR0WR2guP4jzWHPq9Oki Q9ACZdvKQy+CpdYEzjqG4DoT3ECz2rIXGOfPA9AcGII2mVe3XVJjBQClo6vbo6yJjvsgzH DUEFeF+8QaznF3II41oic6SbZH6tEAyiIoUTCI225u9R7avAzr09OcVCj/JJlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hJgKr6LK6z2Cl for ; Mon, 10 Aug 2026 16:33:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39916 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 10 Aug 2026 16:33:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 877f0ee40c2a - main - 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/main X-Git-Reftype: branch X-Git-Commit: 877f0ee40c2af801c5ca758a37b3ebddc560dad2 Auto-Submitted: auto-generated Date: Mon, 10 Aug 2026 16:33:20 +0000 Message-Id: <6a79fd50.39916.57b0d63a@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=877f0ee40c2af801c5ca758a37b3ebddc560dad2 commit 877f0ee40c2af801c5ca758a37b3ebddc560dad2 Author: Kevin Bowling AuthorDate: 2026-08-10 15:08:49 +0000 Commit: Kevin Bowling CommitDate: 2026-08-10 16:33:12 +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. MFC after: 2 weeks --- 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 cd8acf6685a8..252ae352829e 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -3973,6 +3973,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); @@ -4010,7 +4014,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 93555d11e72e..4ca61d078c8e 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); @@ -2107,12 +2107,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)