Page MenuHomeFreeBSD

iflib: don't update the admin status in if_media_status
ClosedPublic

Authored by gallatin on Dec 6 2025, 2:12 AM.
Tags
None
Referenced Files
F174901471: D54096.diff
Tue, Oct 6, 8:58 PM
F174850440: D54096.id167628.diff
Tue, Oct 6, 12:44 PM
Unknown Object (File)
Mon, Oct 5, 9:17 AM
Unknown Object (File)
Mon, Oct 5, 9:03 AM
Unknown Object (File)
Sun, Oct 4, 6:57 PM
Unknown Object (File)
Sun, Oct 4, 1:02 AM
Unknown Object (File)
Sat, Oct 3, 9:04 PM
Unknown Object (File)
Thu, Oct 1, 3:20 PM

Details

Summary

When _task_fn_admin() is active, it will regularly call IFDI_UPDATE_ADMIN_STATUS(). So there is no need to do it in iflib_media_status. This can be fairly expensive on some drivers (long DELAY bussywait loops waiting for a NIC command), and there is no need to pause a userspace app in this DELAY() if it is happening asynchronously anyway.

Note the logic to detect if _task_fn_admin() is regularly calling IFDI_UPDATE_ADMIN_STATUS() was copied from that function.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable