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)
Feb 24 2024, 5:27 PM
Unknown Object (File)
Jan 27 2024, 7:11 PM
Unknown Object (File)
Jan 27 2024, 3:40 PM
Unknown Object (File)
Jan 25 2024, 12:02 AM
Unknown Object (File)
Jan 13 2024, 4:35 PM
Unknown Object (File)
Dec 24 2023, 1:41 PM
Unknown Object (File)
Dec 20 2023, 2:31 PM
Unknown Object (File)
Dec 20 2023, 3:56 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 46177
Build 43066: 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