diff options
author | Jiri Pirko <jiri@mellanox.com> | 2019-04-25 16:59:48 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-26 08:52:02 +0300 |
commit | f9d9db47d3ba87309e022efa33b438e5ef329411 (patch) | |
tree | 55c5193aa0844514cdaadb22ac71ac086aeb8df4 /drivers/net/netdevsim/netdevsim.h | |
parent | 57ce9774951360aad66c48b1b30683ffb1b23f61 (diff) | |
download | linux-f9d9db47d3ba87309e022efa33b438e5ef329411.tar.xz |
netdevsim: add bus attributes to add new and delete devices
Add a way to add new netdevsim device on netdevsim bus and also to
delete existing netdevsim device from the bus. Track the bus devices
in using a list.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netdevsim/netdevsim.h')
-rw-r--r-- | drivers/net/netdevsim/netdevsim.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h index 528d1e7d3e6b..8d61fcb55f39 100644 --- a/drivers/net/netdevsim/netdevsim.h +++ b/drivers/net/netdevsim/netdevsim.h @@ -196,11 +196,13 @@ struct nsim_vf_config { struct nsim_bus_dev { struct device dev; + struct list_head list; + unsigned int port_count; unsigned int num_vfs; struct nsim_vf_config *vfconfigs; }; -struct nsim_bus_dev *nsim_bus_dev_new(void); +struct nsim_bus_dev *nsim_bus_dev_new(unsigned int id, unsigned int port_count); void nsim_bus_dev_del(struct nsim_bus_dev *nsim_bus_dev); int nsim_bus_init(void); void nsim_bus_exit(void); |