]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
i40evf: use spinlock to protect (mac|vlan)_filter_list
authorJacob Keller <jacob.e.keller@intel.com>
Fri, 27 Oct 2017 15:06:50 +0000 (11:06 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 10 Jan 2018 20:41:21 +0000 (12:41 -0800)
commit504398f0a78e724775d75abb3a0379ca04211a95
tree780bfdddcd832d55372cc18318226da39f883a94
parent44b034b406211fc103159f82b9e601e05675c739
i40evf: use spinlock to protect (mac|vlan)_filter_list

Stop overloading the __I40EVF_IN_CRITICAL_TASK bit lock to protect the
mac_filter_list and vlan_filter_list. Instead, implement a spinlock to
protect these two lists, similar to how we protect the hash in the i40e
PF code.

Ensure that every place where we access the list uses the spinlock to
ensure consistency, and stop holding the critical section around blocks
of code which only need access to the macvlan filter lists.

This refactor helps simplify the locking behavior, and is necessary as
a future refactor to the __I40EVF_IN_CRITICAL_TASK would cause
a deadlock otherwise.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40evf/i40evf.h
drivers/net/ethernet/intel/i40evf/i40evf_main.c
drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c