The *encap_needed static keys are enabled by UDP tunnels and several UDP encapsulations type, but they are never turned off. This can cause unneeded overall performance degradation for systems where such features are used transiently. This patch introduces complete book-keeping for such keys, decreasing the usage at socket destruction time, if needed, and avoiding that the same socket could increase the key usage multiple times. rfc v3 -> v1: - add socket lock around udp_tunnel_encap_enable() rfc v2 -> rfc v3: - use udp_tunnel_encap_enable() in setsockopt() Change-Id: Ie2faefd68ef38dd40494046b9db481044b7c5b3a CRs-Fixed: 2351793 Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git Git-commit: 60fb9567bf30937e6bedfa939d7c8fd4ee6a1b1c Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>tirimbino
parent
4fb57e94f9
commit
1ec4c359de
Loading…
Reference in new issue