git: 12b44201e47f - stable/15 - ixgbe: Defer flow control programming while admission is closed
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 29 Oct 2026 06:37:20 UTC
The branch stable/15 has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=12b44201e47f1f5d02840d07ada3eec5d631612b
commit 12b44201e47f1f5d02840d07ada3eec5d631612b
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-09-11 21:42:24 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-10-29 06:37:12 +0000
ixgbe: Defer flow control programming while admission is closed
Cache a validated flow control setting without touching hardware when
iflib has closed admission. The queues may still be live pending a
watchdog stop, or the device may already be stopped or suspended. RX
initialization and link setup replay the cached flow control policy.
For live updates, decide once under the context lock whether to touch
hardware, then mask MDD around SRRCTL writes regardless of a concurrent
watchdog closing admission. The context lock excludes actual stop and
reinitialization while these writes are in progress.
Sponsored by: BBOX.io
(cherry picked from commit 5abfd8fe4d1adb74863231f27a9958cf176e3ded)
---
sys/dev/ixgbe/if_ix.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
index 1b1c719a30e5..57c9a3e35300 100644
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -5665,10 +5665,16 @@ ixgbe_set_flowcntl(struct ixgbe_softc *sc, int fc)
return (EINVAL);
}
+ sc->hw.fc.requested_mode = fc;
+ /* Don't autoneg if forcing a value. */
+ sc->hw.fc.disable_fc_autoneg = true;
+ /* Init replays the policy; closed admission does not prove DMA stopped. */
+ if (!iflib_is_running(sc->ctx))
+ return (0);
+
/* Updating SRRCTL on a live queue is itself an MDD violation. */
mdd_active = sc->num_rx_queues > 1 &&
- (sc->feat_en & IXGBE_FEATURE_SRIOV) != 0 &&
- iflib_is_running(sc->ctx);
+ (sc->feat_en & IXGBE_FEATURE_SRIOV) != 0;
if (mdd_active)
ixgbe_disable_mdd(&sc->hw);
if (sc->num_rx_queues > 1) {
@@ -5687,10 +5693,6 @@ ixgbe_set_flowcntl(struct ixgbe_softc *sc, int fc)
}
}
- sc->hw.fc.requested_mode = fc;
-
- /* Don't autoneg if forcing a value */
- sc->hw.fc.disable_fc_autoneg = true;
ixgbe_fc_enable(&sc->hw);
return (0);