]> git.baikalelectronics.ru Git - kernel.git/commit
iavf: use mutexes for locking of critical sections
authorStefan Assmann <sassmann@kpanic.de>
Wed, 4 Aug 2021 08:22:24 +0000 (10:22 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 17 Aug 2021 16:45:45 +0000 (09:45 -0700)
commit04ce4f2480886dc58d55fc639ef9dfe846db8478
tree37ab0e415b57bf38074d592906caea0d16f448df
parent35a4df131fbdafe77df790a72e66344e5a38fe0b
iavf: use mutexes for locking of critical sections

As follow-up to the discussion with Jakub Kicinski about iavf locking
being insufficient [1] convert iavf to use mutexes instead of bitops.
The locking logic is kept as is, just a drop-in replacement of
enum iavf_critical_section_t with separate mutexes.
The only difference is that the mutexes will be destroyed before the
module is unloaded.

[1] https://lwn.net/ml/netdev/20210316150210.00007249%40intel.com/

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Marek Szlosek <marek.szlosek@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/iavf/iavf.h
drivers/net/ethernet/intel/iavf/iavf_ethtool.c
drivers/net/ethernet/intel/iavf/iavf_main.c