summaryrefslogtreecommitdiffstats
path: root/drivers/net/netdevsim/netdevsim.h
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2019-10-05 08:10:32 +0200
committerDavid S. Miller <davem@davemloft.net>2019-10-05 16:34:15 -0700
commit7b60027bbc6738b067bb9ed732a8c56b0ac430b2 (patch)
treeadf5ca6c29ae0c28e23976bb1b2c4ede94878bdf /drivers/net/netdevsim/netdevsim.h
parent8273fd845447820c26b38821c8ac297f40a65260 (diff)
netdevsim: create devlink and netdev instances in namespace
When user does create new netdevsim instance using sysfs bus file, create the devlink instance and related netdev instance in the namespace of the caller. 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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h
index 198ca31cec94..8168a5475fe7 100644
--- a/drivers/net/netdevsim/netdevsim.h
+++ b/drivers/net/netdevsim/netdevsim.h
@@ -220,6 +220,9 @@ struct nsim_bus_dev {
struct device dev;
struct list_head list;
unsigned int port_count;
+ struct net *initial_net; /* Purpose of this is to carry net pointer
+ * during the probe time only.
+ */
unsigned int num_vfs;
struct nsim_vf_config *vfconfigs;
};