Page MenuHomeFreeBSD

iflib: don't update the admin status in if_media_status
Needs ReviewPublic

Authored by gallatin on Dec 6 2025, 2:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 18, 8:14 AM
Unknown Object (File)
Sun, Jul 12, 12:27 AM
Unknown Object (File)
Sun, Jul 5, 1:44 AM
Unknown Object (File)
Sat, Jul 4, 6:11 AM
Unknown Object (File)
Wed, Jul 1, 3:34 PM
Unknown Object (File)
Wed, Jul 1, 3:34 PM
Unknown Object (File)
Tue, Jun 30, 8:49 PM
Unknown Object (File)
Jun 19 2026, 9:48 PM

Details

Reviewers
kbowling
markj
mjg
glebius
shurd
erj
Group Reviewers
iflib
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 Skipped
Unit
Tests Skipped