Message ID | 20200125111709.14566-1-jiri@resnulli.us |
---|---|
Headers | show |
Series | net: allow per-net notifier to follow netdev into namespace | expand |
From: Jiri Pirko <jiri@resnulli.us> Date: Sat, 25 Jan 2020 12:17:05 +0100 > From: Jiri Pirko <jiri@mellanox.com> > > Currently we have per-net notifier, which allows to get only > notifications relevant to particular network namespace. That is enough > for drivers that have netdevs local in a particular namespace (cannot > move elsewhere). > > However if netdev can change namespace, per-net notifier cannot be used. > Introduce dev_net variant that is basically per-net notifier with an > extension that re-registers the per-net notifier upon netdev namespace > change. Basically the per-net notifier follows the netdev into > namespace. Series applied, thanks Jiri.
From: Jiri Pirko <jiri@mellanox.com> Currently we have per-net notifier, which allows to get only notifications relevant to particular network namespace. That is enough for drivers that have netdevs local in a particular namespace (cannot move elsewhere). However if netdev can change namespace, per-net notifier cannot be used. Introduce dev_net variant that is basically per-net notifier with an extension that re-registers the per-net notifier upon netdev namespace change. Basically the per-net notifier follows the netdev into namespace. Jiri Pirko (4): net: call call_netdevice_unregister_net_notifiers from unregister net: push code from net notifier reg/unreg into helpers net: introduce dev_net notifier register/unregister variants mlx5: Use dev_net netdevice notifier registrations .../net/ethernet/mellanox/mlx5/core/en/fs.h | 1 + .../net/ethernet/mellanox/mlx5/core/en_main.c | 3 +- .../net/ethernet/mellanox/mlx5/core/en_rep.c | 13 +- .../net/ethernet/mellanox/mlx5/core/en_rep.h | 1 + .../net/ethernet/mellanox/mlx5/core/en_tc.c | 9 +- drivers/net/ethernet/mellanox/mlx5/core/lag.c | 8 +- drivers/net/ethernet/mellanox/mlx5/core/lag.h | 1 + .../ethernet/mellanox/mlx5/core/mlx5_core.h | 2 +- include/linux/netdevice.h | 17 +++ net/core/dev.c | 118 +++++++++++++----- 10 files changed, 131 insertions(+), 42 deletions(-)