ice_iov_uninit() freed each VF interrupt-map array without returning the reserved indices to the device interrupt resource manager. Repeated VF create and destroy cycles therefore exhausted the PF interrupt map even though no VFs remained. Return the interrupt allocation before freeing its map. Also split software-only VSI release from hardware teardown so failures before ice_initialize_vsi() do not issue invalid RSS, scheduler, and Free VSI commands for an object firmware has never seen. Keep a VF disabled until all of its resources and hardware state have been created successfully. Clear the enabled state before teardown and after any failed add so asynchronous mailbox processing cannot use a partial or freed VSI. Consume VFLR status for inactive VF slots without trying to reset a nonexistent VSI. Track whether firmware currently owns each VSI and clear that ownership after resets. Teardown can then skip AdminQ commands for VSIs which were not rebuilt. Remove every VSI switch filter before firmware teardown, matching Linux and preventing filter-list leaks across create and destroy cycles. This also applies to the PF VSI detach path. Validated on an E810-XXV with two consecutive create and destroy cycles of 128 four-queue VFs. A 16-queue VF could then be created. Two oversized 128-VF configurations each failed at VF 59, cleaned back to zero VFs without invalid firmware teardown commands, and were each followed by a successful 16-queue VF creation. MFC after: 2 weeks
Details
Details
- Reviewers
kgalazka - Group Reviewers
Intel Networking Restricted Owners Package (Owns No Changed Paths)
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
Delay VF_FLAG_ENABLED until setup succeeds, clears enabled state before teardown, consume inactive VF VFLR events
Comment Actions
Tracks actual firmware VSI ownership across resets, prevents invalid Free-VSI requests after failed rebuilds, removes VSI switch filters before firmware teardown, preventing stale rules from breaking later configurations