git: ea71fa99827a - main - e1000: Express TSO restart policy without OACTIVE
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 15 Sep 2026 19:47:30 UTC
The branch main has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=ea71fa99827ad4b7099de87e41e7af39ee1c10f6
commit ea71fa99827ad4b7099de87e41e7af39ee1c10f6
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-09-11 19:00:54 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-09-15 19:45:46 +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)
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59599
---
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 4961dd94072e..3ca8253a1457 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -6571,7 +6571,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 &&
@@ -6591,16 +6590,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);