Hi, On Thu, 2018-11-01 at 16:59 -0400, Willem de Bruijn wrote: > On Tue, Oct 30, 2018 at 1:28 PM Paolo Abeni <pab...@redhat.com> wrote: > > > > 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 v2 - rfc v3: > > - use udp_tunnel_encap_enable() in setsockopt() > > > > Signed-off-by: Paolo Abeni <pab...@redhat.com> > > @@ -2447,7 +2452,7 @@ int udp_lib_setsockopt(struct sock *sk, int level, > > int optname, > > /* FALLTHROUGH */ > > case UDP_ENCAP_L2TPINUDP: > > up->encap_type = val; > > - udp_encap_enable(); > > + udp_tunnel_encap_enable(sk->sk_socket); > > this now also needs lock_sock?
Yep, you are right. I'll add it in the next iteration. Thanks, Paolo