mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
Add compile-time optional, non-sleeping fail points around every VF creation resource boundary, before VF VSI reconstruction, and in the GET_STATS validation path. Provide an ICE-wide wrapper and device selector so other driver subsystems can add scoped points without duplicating the failpoint plumbing. Keep the current SR-IOV points and VF selector in an iov child namespace. Compile the facility only with options DRIVER_FAILPOINTS. This shared option avoids a separate kernel option for every driver that provides test-only injection hooks. Ordinary kernels contain no ICE failpoint objects or sysctl nodes. Require an exact PF device name and optionally a VF index before any point can fire. This prevents a stale test setting from affecting another PF. The hooks exposed two reset-lifetime defects while validating the existing SR-IOV review series. A PF reset could discard a firmware VSI before teardown, and a rebuilt sibling could leave stale switch-filter state after IOV destroy. Tested on an E810-XXV with INVARIANTS and WITNESS. All twelve creation checkpoints rolled back and permitted immediate resource reuse. Forced reconstruction and malformed GET_STATS failures also preserved sibling operation and reply cardinality. Reviewed by: gallatin, nprice, ziaee MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D58940