]> git.baikalelectronics.ru Git - kernel.git/commit
udp_tunnel: reshuffle NETIF_F_RX_UDP_TUNNEL_PORT checks
authorJakub Kicinski <kuba@kernel.org>
Wed, 6 Jan 2021 21:06:37 +0000 (13:06 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 Jan 2021 20:53:29 +0000 (12:53 -0800)
commit5cbdf329385f3de895f6de7e401766f660320dbe
treec051eea4572b565e57efb775a26f51ecc14cc007
parent5f5c3cae9ba13ae1455aa80ebe6fe3eb93d17d38
udp_tunnel: reshuffle NETIF_F_RX_UDP_TUNNEL_PORT checks

Move the NETIF_F_RX_UDP_TUNNEL_PORT feature check into
udp_tunnel_nic_*_port() helpers, since they're always
done right before the call.

Add similar checks before calling the notifier.
udp_tunnel_nic invokes the notifier without checking
features which could result in some wasted cycles.

Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/udp_tunnel.h
net/ipv4/udp_tunnel_core.c