Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vxlan: allow L4 GRO passthrough

When passing up an UDP GSO packet with L4 aggregation, there is
no need to segment it at the vxlan level. We can propagate the
packet untouched and let it be segmented later, if needed.

Introduce an helper to allow let the UDP socket to accept any
L4 aggregation and use it in the vxlan driver.

v1 -> v2:
- updated to use the newly introduced UDP socket 'accept*' fields

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Paolo Abeni and committed by
David S. Miller
d18931a9 78352f73

+7
+1
drivers/net/vxlan.c
··· 3484 3484 if (err < 0) 3485 3485 return ERR_PTR(err); 3486 3486 3487 + udp_allow_gso(sock->sk); 3487 3488 return sock; 3488 3489 } 3489 3490
+6
include/linux/udp.h
··· 145 145 return false; 146 146 } 147 147 148 + static inline void udp_allow_gso(struct sock *sk) 149 + { 150 + udp_sk(sk)->accept_udp_l4 = 1; 151 + udp_sk(sk)->accept_udp_fraglist = 1; 152 + } 153 + 148 154 #define udp_portaddr_for_each_entry(__sk, list) \ 149 155 hlist_for_each_entry(__sk, list, __sk_common.skc_portaddr_node) 150 156