net: devlink: allow to change namespaces during reload

All devlink instances are created in init_net and stay there for a
lifetime. Allow user to be able to move devlink instances into
namespaces during devlink reload operation. That ensures proper
re-instantiation of driver objects, including netdevices.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko
2019-10-03 11:49:39 +02:00
committed by David S. Miller
parent 4f174bbcc9
commit 070c63f20f
6 changed files with 158 additions and 11 deletions

View File

@@ -643,7 +643,7 @@ enum devlink_trap_group_generic_id {
}
struct devlink_ops {
int (*reload_down)(struct devlink *devlink,
int (*reload_down)(struct devlink *devlink, bool netns_change,
struct netlink_ext_ack *extack);
int (*reload_up)(struct devlink *devlink,
struct netlink_ext_ack *extack);