Commit dedc33e7 authored by Jakub Kicinski's avatar Jakub Kicinski

udp_tunnel: remove REGISTER/UNREGISTER handling from tunnel drivers

udp_tunnel_nic handles REGISTER and UNREGISTER event, now that all
drivers use that infra we can drop the event handling in the tunnel
drivers.
Reviewed-by: default avatarAlexander Duyck <alexanderduyck@fb.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 876c4384
...@@ -1851,16 +1851,10 @@ static int geneve_netdevice_event(struct notifier_block *unused, ...@@ -1851,16 +1851,10 @@ static int geneve_netdevice_event(struct notifier_block *unused,
{ {
struct net_device *dev = netdev_notifier_info_to_dev(ptr); struct net_device *dev = netdev_notifier_info_to_dev(ptr);
if (event == NETDEV_UDP_TUNNEL_PUSH_INFO || if (event == NETDEV_UDP_TUNNEL_PUSH_INFO)
event == NETDEV_UDP_TUNNEL_DROP_INFO) { geneve_offload_rx_ports(dev, true);
geneve_offload_rx_ports(dev, event == NETDEV_UDP_TUNNEL_PUSH_INFO); else if (event == NETDEV_UDP_TUNNEL_DROP_INFO)
} else if (event == NETDEV_UNREGISTER) { geneve_offload_rx_ports(dev, false);
if (!dev->udp_tunnel_nic_info)
geneve_offload_rx_ports(dev, false);
} else if (event == NETDEV_REGISTER) {
if (!dev->udp_tunnel_nic_info)
geneve_offload_rx_ports(dev, true);
}
return NOTIFY_DONE; return NOTIFY_DONE;
} }
......
...@@ -4521,17 +4521,12 @@ static int vxlan_netdevice_event(struct notifier_block *unused, ...@@ -4521,17 +4521,12 @@ static int vxlan_netdevice_event(struct notifier_block *unused,
struct net_device *dev = netdev_notifier_info_to_dev(ptr); struct net_device *dev = netdev_notifier_info_to_dev(ptr);
struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id); struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id);
if (event == NETDEV_UNREGISTER) { if (event == NETDEV_UNREGISTER)
if (!dev->udp_tunnel_nic_info)
vxlan_offload_rx_ports(dev, false);
vxlan_handle_lowerdev_unregister(vn, dev); vxlan_handle_lowerdev_unregister(vn, dev);
} else if (event == NETDEV_REGISTER) { else if (event == NETDEV_UDP_TUNNEL_PUSH_INFO)
if (!dev->udp_tunnel_nic_info) vxlan_offload_rx_ports(dev, true);
vxlan_offload_rx_ports(dev, true); else if (event == NETDEV_UDP_TUNNEL_DROP_INFO)
} else if (event == NETDEV_UDP_TUNNEL_PUSH_INFO || vxlan_offload_rx_ports(dev, false);
event == NETDEV_UDP_TUNNEL_DROP_INFO) {
vxlan_offload_rx_ports(dev, event == NETDEV_UDP_TUNNEL_PUSH_INFO);
}
return NOTIFY_DONE; return NOTIFY_DONE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment