Page MenuHomeFreeBSD

Fix ixl SR-IOV.
ClosedPublic

Authored by nyan_myuji.xyz on Jun 29 2022, 4:01 AM.
Tags
None
Referenced Files
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
Unknown Object (File)
Nov 6 2024, 7:42 AM
Unknown Object (File)
Oct 27 2024, 7:50 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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