]> 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)
commit5ac49f3c2702f269d31cc37eb9308bc557953c4d
tree37ab0e415b57bf38074d592906caea0d16f448df
parent752be2976405b7499890c0b6bac6d30d34d08bd6
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