Page MenuHomeFreeBSD

iflib: Add support for SIOCGIFDOWNREASON IOCtl
ClosedPublic

Authored by chandrakanth.patil_broadcom.com on Dec 3 2025, 11:17 AM.
Tags
None
Referenced Files
F159714916: D54045.diff
Wed, Jun 17, 10:19 AM
Unknown Object (File)
Thu, Jun 11, 5:26 PM
Unknown Object (File)
Wed, Jun 10, 5:50 PM
Unknown Object (File)
Wed, Jun 10, 2:13 PM
Unknown Object (File)
Mon, Jun 8, 8:56 AM
Unknown Object (File)
Mon, Jun 8, 8:53 AM
Unknown Object (File)
Thu, Jun 4, 2:15 PM
Unknown Object (File)
Sat, May 30, 9:08 PM

Details

Summary

This change adds native support for the SIOCGIFDOWNREASON ioctl in iflib.

When ifconfig issues SIOCGIFDOWNREASON, the request is now routed through a
new driver callback (IFDI_GET_DOWNREASON). iflib allocates the ifdownreason
structure, calls the driver to fill the down-reason message, and then
returns the data back to ifconfig for display.

Without this change, iflib-based drivers cannot implement link-down reason
reporting even if the hardware provides the information.

No functional change for existing drivers unless they implement the new
IFDI_GET_DOWNREASON method. Existing drivers continue to behave as before.

Diff Detail

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