git: e1ea3d54244c - stable/15 - e1000: Express TSO restart policy without OACTIVE
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 29 Oct 2026 06:09:00 UTC
The branch stable/15 has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=e1ea3d54244c524b5aa62bf066936051ec07be42
commit e1ea3d54244c524b5aa62bf066936051ec07be42
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-09-11 19:00:54 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-10-29 06:08:49 +0000
e1000: Express TSO restart policy without OACTIVE
After a link speed change updates TSO capabilities, request a restart
when iflib is running or the interface is administratively up. Leave
an administratively down, stopped interface to apply the change at its
next initialization.
Do not infer initialization from IFF_DRV_OACTIVE, which also remains
set after stop and failed initialization. Use iflib_is_running() for
software admission and IFF_UP for intent; iflib retains responsibility
for quiescing any partially initialized queues before restarting.
This also permits a restart request for an administratively up
interface before its first initialization attempt.
Reviewed by: iflib (gallatin)
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59599
(cherry picked from commit ea71fa99827ad4b7099de87e41e7af39ee1c10f6)
---
sys/dev/e1000/if_em.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index 41198ff826e5..07aeea9d0476 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -5932,7 +5932,6 @@ em_automask_tso(if_ctx_t ctx)
if_softc_ctx_t scctx = iflib_get_softc_ctx(ctx);
if_t ifp = iflib_get_ifp(ctx);
bool reset_needed;
- int drvflags;
if (!em_unsupported_tso && sc->link_speed &&
sc->link_speed != SPEED_1000 &&
@@ -5952,16 +5951,13 @@ em_automask_tso(if_ctx_t ctx)
}
/*
- * Reset a running interface, or one being initialized while
- * administratively up. OACTIVE remains set after iflib_stop(), so
- * it alone cannot distinguish initialization from an interface that
- * is down. In other states, the next initialization will apply the
- * updated capabilities.
+ * Apply the new capabilities to a running or administratively-up
+ * interface, including one whose initialization has not completed.
+ * A stopped, administratively-down interface will apply them at the
+ * next initialization; driver flags do not describe that intent.
*/
- drvflags = if_getdrvflags(ifp);
- reset_needed = (drvflags & IFF_DRV_RUNNING) != 0 ||
- ((drvflags & IFF_DRV_OACTIVE) != 0 &&
- (if_getflags(ifp) & IFF_UP) != 0);
+ reset_needed = iflib_is_running(ctx) ||
+ (if_getflags(ifp) & IFF_UP) != 0;
if (!reset_needed)
return (false);