Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153064838
D54096.id167628.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
836 B
Referenced Files
None
Subscribers
None
D54096.id167628.diff
View Options
diff --git a/sys/net/iflib.c b/sys/net/iflib.c
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -2588,9 +2588,23 @@
iflib_media_status(if_t ifp, struct ifmediareq *ifmr)
{
if_ctx_t ctx = if_getsoftc(ifp);
+ bool oactive, running;
+
+ STATE_LOCK(ctx);
+ running = (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING);
+ oactive = (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_OACTIVE);
+ STATE_UNLOCK(ctx);
CTX_LOCK(ctx);
- IFDI_UPDATE_ADMIN_STATUS(ctx);
+ /*
+ * There is no need to update the admin status when it is done regularly by
+ * _task_fn_admin(), so only do it if that's not running. That can be quite
+ * expensive on some drivers.
+ */
+ if ((!running && !oactive) &&
+ !(ctx->ifc_sctx->isc_flags & IFLIB_ADMIN_ALWAYS_RUN)) {
+ IFDI_UPDATE_ADMIN_STATUS(ctx);
+ }
IFDI_MEDIA_STATUS(ctx, ifmr);
CTX_UNLOCK(ctx);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 19, 10:18 PM (11 h, 18 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31770072
Default Alt Text
D54096.id167628.diff (836 B)
Attached To
Mode
D54096: iflib: don't update the admin status in if_media_status
Attached
Detach File
Event Timeline
Log In to Comment