]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ixl(4): Fix VLAN HW filtering
authorKrzysztof Galazka <krzysztof.galazka@intel.com>
Wed, 3 Feb 2021 23:22:55 +0000 (15:22 -0800)
committerEric Joyner <erj@FreeBSD.org>
Fri, 5 Mar 2021 01:23:18 +0000 (17:23 -0800)
commit7e166d608eecf0188bbb7edf6b3d9abffe1dfc6b
tree57140ebf3e0b8017098e401cc1b9254a9be9e556
parent5ea5c72f5226a5d06e6e994ab45f889030f35fa4
ixl(4): Fix VLAN HW filtering

X700 family of controllers has limited number of available VLAN
HW filters. Driver did not handle properly a case when user
assigned more VLANs to the interface which had all filters
already in use. Fix that by disabling HW filtering when
it is impossible to create filters for all requested VLANs.
Keep track of registered VLANs using bitstring to be able
to re-enable HW filtering when number of requested VLANs
drops below the limit.

Also switch all allocations to use M_IXL malloc type
to ease detecting memory leaks in the driver.

Reviewed by: erj
Tested by: gowtham.kumar.ks@intel.com
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D28137

(cherry picked from commit 7d4dceec103039e2b2fa90793ceeb71a8d6684aa)
sys/dev/ixl/i40e_osdep.c
sys/dev/ixl/iavf.h
sys/dev/ixl/iavf_vc.c
sys/dev/ixl/if_iavf.c
sys/dev/ixl/if_ixl.c
sys/dev/ixl/ixl.h
sys/dev/ixl/ixl_iw.c
sys/dev/ixl/ixl_pf.h
sys/dev/ixl/ixl_pf_iflib.c
sys/dev/ixl/ixl_pf_iov.c
sys/dev/ixl/ixl_pf_main.c