Page MenuHomeFreeBSD

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

Authored by gallatin on Dec 6 2025, 2:12 AM.
Tags
None
Referenced Files
F167242300: D54096.diff
Thu, Aug 20, 7:08 AM
F167242283: D54096.diff
Thu, Aug 20, 7:08 AM
F167190762: D54096.diff
Wed, Aug 19, 7:03 PM
Unknown Object (File)
Sat, Aug 8, 9:47 AM
Unknown Object (File)
Sat, Aug 1, 8:36 AM
Unknown Object (File)
Thu, Jul 30, 8:41 PM
Unknown Object (File)
Sun, Jul 26, 2:03 PM
Unknown Object (File)
Fri, Jul 24, 9:04 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

Event Timeline

erj added a subscriber: erj.

I like the idea.

Confirmed safe for all in tree drivers. Maybe worth a man page update in iflibdd(9).

This revision is now accepted and ready to land.Thu, Aug 20, 7:21 AM