Page MenuHomeFreeBSD

ice: Fix SR-IOV VF resource cleanup
Needs ReviewPublic

Authored by kbowling on Tue, Aug 18, 10:43 AM.
Tags
None
Referenced Files
F169763110: D58908.id184296.diff
Wed, Sep 2, 12:05 PM
F169706276: D58908.id184296.diff
Wed, Sep 2, 8:30 AM
F169704470: D58908.diff
Wed, Sep 2, 8:24 AM
F169562095: D58908.diff
Tue, Sep 1, 10:32 PM
Unknown Object (File)
Tue, Sep 1, 8:35 AM
Unknown Object (File)
Tue, Sep 1, 7:00 AM
Unknown Object (File)
Tue, Sep 1, 6:58 AM
Unknown Object (File)
Tue, Sep 1, 4:49 AM
Subscribers

Details

Reviewers
kgalazka
Group Reviewers
Intel Networking
Restricted Owners Package(Owns No Changed Paths)
Summary
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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Owners added a reviewer: Restricted Owners Package.Tue, Aug 18, 10:43 AM
kbowling edited the summary of this revision. (Show Details)

Delay VF_FLAG_ENABLED until setup succeeds, clears enabled state before teardown, consume inactive VF VFLR events

kbowling edited the summary of this revision. (Show Details)

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