Page MenuHomeFreeBSD

Fix ixl SR-IOV.
ClosedPublic

Authored by nyan_myuji.xyz on Jun 29 2022, 4:01 AM.
Tags
None
Referenced Files
F106236419: D35649.id108089.diff
Fri, Dec 27, 4:35 PM
F106198977: D35649.diff
Fri, Dec 27, 12:58 AM
Unknown Object (File)
Tue, Dec 24, 9:44 AM
Unknown Object (File)
Mon, Dec 9, 4:59 AM
Unknown Object (File)
Thu, Dec 5, 1:31 PM
Unknown Object (File)
Wed, Nov 27, 8:38 PM
Unknown Object (File)
Nov 6 2024, 9:26 AM
Unknown Object (File)
Nov 6 2024, 9:26 AM

Details

Summary

The hw and ifp of a vsi will be NULL if such ixl_vsi is allocated
for a VF. When ixl_reconfigure_filters called, it is trying to
access vsi->ifp and hw->mac.addr and therefore is casuing panic.

This commit add checks to determine if vsi is a VF by checking
if vsi->hw is NULL, before adding IXL_VLAN_ANY filter (which
is already in a VF vsi's filter list) and VLAN filters.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 46176
Build 43065: arc lint + arc unit

Event Timeline

I think the SR-IOV flows need revisiting (why doesn't the vsi have a valid hw pointer?), but if your fix works, I think we should include it for now to prevent panics.

This revision is now accepted and ready to land.Jun 30 2022, 9:13 PM
krzysztof.galazka_intel.com added inline comments.
sys/dev/ixl/ixl_pf_main.c
1119

The part about a filter list does not seem correct to me. ixl_init_filters exits early in case of VF VSI. I think it is added later with a virtchnl message. Although as Eric said SR-IOV support needs more attention so getting rid of this panic is a good way to start. Thanks!

@erj @krzysztof.galazka_intel.com Thank you so much for reviewing. Do you mind to commit this as well? Thank you so much.

sys/dev/ixl/ixl_pf_main.c
1119

This is very interesting, as when I was tracking done the panic, the vsi->ftl contains exactly 1 filter of IXL_VLAN_ANY, and that lead me to think it was intended.

I'm back from vacation; I'll commit it tomorrow if there isn't anything else.

This revision was automatically updated to reflect the committed changes.
Owners added a reviewer: Restricted Owners Package.Jul 13 2022, 1:26 AM