From nobody Mon Aug 24 09:14:22 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 4hT4wv2kbMz6p6jr for ; Mon, 24 Aug 2026 09:14:23 +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 4hT4wv0Hymz3vtB for ; Mon, 24 Aug 2026 09:14:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787562863; 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=h6yL8eNU7R7yyV7blWGgqlqEL4sZ/JK5pTIYZ/BqB+U=; b=UYRpx7fl6IaQyQP1+DK5FThT1P8LgKP6iUHjd3fFK8/k4dtRozyexpJ33EciClLik0G1W+ monJgVSGSEWyWZiLcro8SCcGb2SLWHzP0niHoaDznl64u41RJGjnn6dYLPITWe4mcZRdgM MqztYy73L2nRd1MMVLFuamsHuLzKDkV0i5Y8bWpvpAfHS4FqKqSCNVN86Epr1xcl/jy2Oa LmzgVRBWqd4IKnjei3N11Eewx7UQ3GRVWvQFSTaUTMak2hiHQUziK5mRRvfMH3IxyLm2Ce JU2w6/IDCuKBtKQlmaBS8zda1KYGQiX+2v/uWvzc7OAwQw4f7DhWCwqoQIcefg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787562863; a=rsa-sha256; cv=none; b=kLzlxNk1pVFE/vH4dcbrLMvEDMwXaksnBWX69YvoKe+0kgulhIpcDea8W8TITxdKHnpo0T eZS+AegP9uA9kEU8ZzKU7k7R+1U9Mrte7nqs9Xx8Gp0UhvhRkOmfl4259q9TaJp4zWW7MB jYiyrtfzmJzOk2Mfx6Qn8luzpxsoF6p2iruOlMwdrqY1wrluWybHqwN5R+lbFkUwNQENUE JqD+NlJshDOe47vukrReB9FOO1x3mR1dPBeoDGKl1b0Kywm0z24ynIxlpM7G5pKOjA4jly XtU9mFyLvHLOSGq+q6/G3EO9A+6QRzAw1oZB4EcuYu2EyUJuPAzn40fMc693+w== 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=1787562863; 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=h6yL8eNU7R7yyV7blWGgqlqEL4sZ/JK5pTIYZ/BqB+U=; b=QgmZHTPzxTkmYoZFytIT5J84Kq7eKIuma99t8hYz25F82pSsu3oqcCUahDMHWMsW59znV1 abqEk4J9T6mqj6WQi44a2sJ7es6DyXikFwogiuQLBsPbjiozEjgSmW8wY8bnJFCpWZLzO5 OIdHS4Xxt8lJBmbjZZfa1dME7lKoN5FkbG0qn/TGirLIi38opEAg+PAgw6JQAANP6Lbwwl QH2NQyzYYlzmz/0ZJwriJBNHdjfSxvN37rT2Y1QSlrOZKGdXYmfagZcy+9PJJ5MPxE0+SL DkJT0Opz2lBD0kLoxlC0eujzXitnG2Kj4mphhShzq6vHiMK/bVxmqeEMFFN6AQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hT4wt607hzyP3 for ; Mon, 24 Aug 2026 09:14:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18f28 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Aug 2026 09:14:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 0adc18f9f8d7 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 0adc18f9f8d7c7e3c81e7cd5384f872de7bceb52 Auto-Submitted: auto-generated Date: Mon, 24 Aug 2026 09:14:22 +0000 Message-Id: <6a8c0b6e.18f28.5805ebaf@gitrepo.freebsd.org> The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=0adc18f9f8d7c7e3c81e7cd5384f872de7bceb52 commit 0adc18f9f8d7c7e3c81e7cd5384f872de7bceb52 Author: Kevin Bowling AuthorDate: 2026-08-10 15:08:49 +0000 Commit: Kevin Bowling CommitDate: 2026-08-24 09:12:22 +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)