]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ixl(4): Fix SR-IOV panics
authorYan Ka Chiu <nyan@myuji.xyz>
Wed, 13 Jul 2022 01:16:29 +0000 (18:16 -0700)
committerEric Joyner <erj@FreeBSD.org>
Wed, 13 Jul 2022 01:17:03 +0000 (18:17 -0700)
commite706512a2b64fa2741144caf056c9fe923b60004
tree0014c34520bc6734b7c939f6b71bcb6f7521d90b
parentbecd9908beb8f1b47ddc6628cb005185a26ec85c
ixl(4): Fix SR-IOV panics

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.

(erj's Note: The SR-IOV flows need revisiting; this will help
prevent panics for now)

Reviewed by: krzysztof.galazka@intel.com, erj@
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D35649
sys/dev/ixl/ixl_pf_main.c