mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-19 03:53:51 -04:00
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>
This commit is contained in:
committed by
David S. Miller
parent
57ce977495
commit
f9d9db47d3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user