Page MenuHomeFreeBSD

Fix ixl SR-IOV.
ClosedPublic

Authored by nyan_myuji.xyz on Jun 29 2022, 4:01 AM.
Tags
None
Referenced Files
F83672006: D35649.id107515.diff
Mon, May 13, 10:10 AM
Unknown Object (File)
Sun, May 12, 4:38 PM
Unknown Object (File)
Mon, May 6, 2:35 PM
Unknown Object (File)
Sat, May 4, 11:40 AM
Unknown Object (File)
Thu, May 2, 4:33 AM
Unknown Object (File)
Tue, Apr 30, 1:38 PM
Unknown Object (File)
Fri, Apr 19, 10:27 AM
Unknown Object (File)
Feb 24 2024, 5:27 PM

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