netdevsim: replace port_list_lock with devlink instance lock
Take advantage of the devlink instance lock for protecting the port list. This will simplify locking even more once all devlink callbacks hold the instance lock. We need to add locking in nsim_dev_port_add_all() which used to assume higher layer protection when accessing the list. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8879b32a3a
commit
76eea6c2e6
2 changed files with 20 additions and 21 deletions
|
|
@ -274,7 +274,6 @@ struct nsim_dev {
|
|||
struct list_head bpf_bound_maps;
|
||||
struct netdev_phys_item_id switch_id;
|
||||
struct list_head port_list;
|
||||
struct mutex port_list_lock; /* protects port list */
|
||||
bool fw_update_status;
|
||||
u32 fw_update_overwrite_mask;
|
||||
u32 max_macs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue