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
Unknown Object (File)
Tue, Sep 29, 5:39 AM
Unknown Object (File)
Mon, Sep 28, 12:33 PM
Unknown Object (File)
Sun, Sep 27, 4:59 AM
Unknown Object (File)
Thu, Sep 24, 3:49 AM
Unknown Object (File)
Thu, Sep 24, 2:34 AM
Unknown Object (File)
Thu, Sep 24, 1:37 AM
Unknown Object (File)
Wed, Sep 23, 10:05 PM
Unknown Object (File)
Thu, Sep 17, 1:44 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