--- v1
+++ v2
@@ -2,14 +2,17 @@
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 accepting any
+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>
---
drivers/net/vxlan.c | 1 +
- include/linux/udp.h | 5 +++++
- 2 files changed, 6 insertions(+)
+ include/linux/udp.h | 6 ++++++
+ 2 files changed, 7 insertions(+)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 7665817f3cb61..39ee1300cdd9d 100644
@@ -24,16 +27,17 @@
}
diff --git a/include/linux/udp.h b/include/linux/udp.h
-index 6da342f15f351..0444f2fb6002e 100644
+index ae58ff3b6b5b8..ae66dadd85434 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
-@@ -137,6 +137,11 @@ static inline bool udp_unexpected_gso(struct sock *sk, struct sk_buff *skb)
- return skb_is_gso(skb) && skb_shinfo(skb)->gso_type & udp_sk(sk)->unexpected_gso;
+@@ -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)->unexpected_gso = 0;
++ udp_sk(sk)->accept_udp_l4 = 1;
++ udp_sk(sk)->accept_udp_fraglist = 1;
+}
+
#define udp_portaddr_for_each_entry(__sk, list) \