summaryrefslogtreecommitdiff
path: root/include/linux/udp.h
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2021-03-30 13:28:53 +0300
committerDavid S. Miller <davem@davemloft.net>2021-03-31 03:06:49 +0300
commitd18931a92a0b5feddd8a39d097b90ae2867db02f (patch)
tree14b3afa1199747e6b479aef19c290b34a226e7d4 /include/linux/udp.h
parent78352f73dc5047f3f744764cc45912498c52f3c9 (diff)
downloadlinux-d18931a92a0b5feddd8a39d097b90ae2867db02f.tar.xz
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>
Diffstat (limited to 'include/linux/udp.h')
-rw-r--r--include/linux/udp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h
index ae58ff3b6b5b..ae66dadd8543 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -145,6 +145,12 @@ static inline bool udp_unexpected_gso(struct sock *sk, struct sk_buff *skb)
return false;
}
+static inline void udp_allow_gso(struct sock *sk)
+{
+ udp_sk(sk)->accept_udp_l4 = 1;
+ udp_sk(sk)->accept_udp_fraglist = 1;
+}
+
#define udp_portaddr_for_each_entry(__sk, list) \
hlist_for_each_entry(__sk, list, __sk_common.skc_portaddr_node)