Page MenuHomeFreeBSD

iflib: Add registration failure injection points
ClosedPublic

Authored by kbowling on Aug 8 2026, 6:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 5, 9:55 PM
Unknown Object (File)
Sat, Sep 5, 11:31 AM
Unknown Object (File)
Fri, Sep 4, 2:13 PM
Unknown Object (File)
Fri, Sep 4, 1:59 PM
Unknown Object (File)
Fri, Sep 4, 4:57 AM
Unknown Object (File)
Wed, Sep 2, 2:23 PM
Unknown Object (File)
Wed, Sep 2, 12:02 PM
Unknown Object (File)
Wed, Sep 2, 10:57 AM

Details

Summary
Add six device-scoped fail(9) points at the registration milestones
needed to exercise each unwind path. An exact, runtime-only device
selector prevents unrelated iflib devices from consuming an armed point.

Mark the points non-sleepable because registration holds the ifnet and
context locks. Document one-shot operation and bus-address reprobe so a
failed attach can be recovered without another kernel build.

MFC after:      2 weeks

Diff Detail

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

Event Timeline

share/man/man4/iflib.4
251

I think this should be a Ss of DESCRIPTION or SYSCTL VARIABLES.

sys/net/iflib.c
5289

is this assignment needed? How did err become non-zero? IFDI_ATTACH_PRE(ctx) must have set err to 0 in order to reach this code.
similar logic applies to all these err=0 assignments except the first.

I might consider making the label a macro arg so as to eliminate the if (err=0) goto label check after each macro invocation. That would make this less obtrusive.

IFLIB_REGISTER_FAIL_POINT takes label param

This revision is now accepted and ready to land.Wed, Aug 12, 9:26 PM