mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-08 15:04:45 +00:00
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: Alexander Duyck <alexanderduyck@fb.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
876c4384ae
commit
dedc33e7df
@ -1851,16 +1851,10 @@ static int geneve_netdevice_event(struct notifier_block *unused,
|
||||
{
|
||||
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
|
||||
|
||||
if (event == NETDEV_UDP_TUNNEL_PUSH_INFO ||
|
||||
event == NETDEV_UDP_TUNNEL_DROP_INFO) {
|
||||
geneve_offload_rx_ports(dev, event == NETDEV_UDP_TUNNEL_PUSH_INFO);
|
||||
} else if (event == NETDEV_UNREGISTER) {
|
||||
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);
|
||||
}
|
||||
if (event == NETDEV_UDP_TUNNEL_PUSH_INFO)
|
||||
geneve_offload_rx_ports(dev, true);
|
||||
else if (event == NETDEV_UDP_TUNNEL_DROP_INFO)
|
||||
geneve_offload_rx_ports(dev, false);
|
||||
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
@ -4521,17 +4521,12 @@ static int vxlan_netdevice_event(struct notifier_block *unused,
|
||||
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
|
||||
struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id);
|
||||
|
||||
if (event == NETDEV_UNREGISTER) {
|
||||
if (!dev->udp_tunnel_nic_info)
|
||||
vxlan_offload_rx_ports(dev, false);
|
||||
if (event == NETDEV_UNREGISTER)
|
||||
vxlan_handle_lowerdev_unregister(vn, dev);
|
||||
} else if (event == NETDEV_REGISTER) {
|
||||
if (!dev->udp_tunnel_nic_info)
|
||||
vxlan_offload_rx_ports(dev, true);
|
||||
} else if (event == NETDEV_UDP_TUNNEL_PUSH_INFO ||
|
||||
event == NETDEV_UDP_TUNNEL_DROP_INFO) {
|
||||
vxlan_offload_rx_ports(dev, event == NETDEV_UDP_TUNNEL_PUSH_INFO);
|
||||
}
|
||||
else if (event == NETDEV_UDP_TUNNEL_PUSH_INFO)
|
||||
vxlan_offload_rx_ports(dev, true);
|
||||
else if (event == NETDEV_UDP_TUNNEL_DROP_INFO)
|
||||
vxlan_offload_rx_ports(dev, false);
|
||||
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user