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)
Sun, Oct 27, 7:50 AM
Unknown Object (File)
Fri, Oct 18, 7:24 AM
Unknown Object (File)
Oct 2 2024, 1:37 PM
Unknown Object (File)
Oct 1 2024, 3:05 PM
Unknown Object (File)
Sep 30 2024, 6:11 PM
Unknown Object (File)
Sep 26 2024, 10:10 PM
Unknown Object (File)
Sep 15 2024, 3:45 AM
Unknown Object (File)
Sep 9 2024, 3:22 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