diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-01-06 13:06:35 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-07 12:53:29 -0800 |
commit | dedc33e7dff1a743787324773d8f3e77e7d567da (patch) | |
tree | dda1dad4c45bdfa8d2df0e1ed5083a4770658ef8 /drivers/net/geneve.c | |
parent | 876c4384aecc173a05d912e075a62232ea1be120 (diff) | |
download | linux-stable-dedc33e7dff1a743787324773d8f3e77e7d567da.tar.gz linux-stable-dedc33e7dff1a743787324773d8f3e77e7d567da.tar.bz2 linux-stable-dedc33e7dff1a743787324773d8f3e77e7d567da.zip |
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>
Diffstat (limited to 'drivers/net/geneve.c')
-rw-r--r-- | drivers/net/geneve.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index 5523f069b9a5..6aa775d60c57 100644 --- a/drivers/net/geneve.c +++ b/drivers/net/geneve.c @@ -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; } |