diff options
| author | 2022-04-13 10:43:03 +0200 | |
|---|---|---|
| committer | 2022-04-13 10:43:28 +0200 | |
| commit | 651a88798412e216f337d70181127e847f00a4b7 (patch) | |
| tree | 5fefb107fa9b3fa74dcc3e7ce410c5a1d571549d /drivers/net/netdevsim/netdevsim.h | |
| parent | ALSA: jack: Access input_dev under mutex (diff) | |
| parent | ASoC: cs35l41: Support external boost (diff) | |
Merge branch 'topic/cs35l41' into for-next
Pull CS35L41 codec updates
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/net/netdevsim/netdevsim.h')
| -rw-r--r-- | drivers/net/netdevsim/netdevsim.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h index c49771f27f17..0b122872b2c9 100644 --- a/drivers/net/netdevsim/netdevsim.h +++ b/drivers/net/netdevsim/netdevsim.h @@ -184,6 +184,28 @@ struct nsim_dev_health { int nsim_dev_health_init(struct nsim_dev *nsim_dev, struct devlink *devlink); void nsim_dev_health_exit(struct nsim_dev *nsim_dev); +struct nsim_dev_hwstats_netdev { + struct list_head list; + struct net_device *netdev; + struct rtnl_hw_stats64 stats; + bool enabled; + bool fail_enable; +}; + +struct nsim_dev_hwstats { + struct dentry *ddir; + struct dentry *l3_ddir; + + struct mutex hwsdev_list_lock; /* protects hwsdev list(s) */ + struct list_head l3_list; + + struct notifier_block netdevice_nb; + struct delayed_work traffic_dw; +}; + +int nsim_dev_hwstats_init(struct nsim_dev *nsim_dev); +void nsim_dev_hwstats_exit(struct nsim_dev *nsim_dev); + #if IS_ENABLED(CONFIG_PSAMPLE) int nsim_dev_psample_init(struct nsim_dev *nsim_dev); void nsim_dev_psample_exit(struct nsim_dev *nsim_dev); @@ -239,7 +261,6 @@ struct nsim_dev { struct dentry *take_snapshot; struct dentry *nodes_ddir; - struct mutex vfs_lock; /* Protects vfconfigs */ struct nsim_vf_config *vfconfigs; struct bpf_offload_dev *bpf_dev; @@ -252,7 +273,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; @@ -261,6 +281,7 @@ struct nsim_dev { bool fail_reload; struct devlink_region *dummy_region; struct nsim_dev_health health; + struct nsim_dev_hwstats hwstats; struct flow_action_cookie *fa_cookie; spinlock_t fa_cookie_lock; /* protects fa_cookie */ bool fail_trap_group_set; |
