HomeFreeBSD

iflib: Add support for SIOCGIFDOWNREASON ioctl

Description

iflib: Add support for SIOCGIFDOWNREASON ioctl

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.

Reviewed by: gallatin, erj, kgalazka, ssaxena, iflib
Differential Revision: https://reviews.freebsd.org/D54045
MFC After: 1 week

Details

Provenance
chandrakanth.patil_broadcom.comAuthored on Jan 30 2026, 7:15 AM
sumit.saxena_broadcom.comCommitted on Feb 10 2026, 9:30 AM
Reviewer
iflib
Differential Revision
D54045: iflib: Add support for SIOCGIFDOWNREASON IOCtl
Parents
rGfeb0a7e19f3c: pci_iov: Reuse downstream bridge bus window if it already covers VF bus
Branches
Unknown
Tags
Unknown