Thread (19 messages) flat view 19 messages, 3 authors, 2018-11-02

Re: [RFC PATCH v3 01/10] udp: implement complete book-keeping for encap_needed

From: Paolo Abeni <pabeni@redhat.com>
Date: 2018-11-02 22:38:04

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 [off-list ref] wrote:
quoted
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 <pabeni@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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help