diff --git a/patches/0004-vxlan-fix-performance-issues.patch b/patches/0004-vxlan-fix-performance-issues.patch deleted file mode 100644 index 58e5cb31..00000000 --- a/patches/0004-vxlan-fix-performance-issues.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 486d735cb74f3c66ba08747de2b1cefc7e63b8d9 Mon Sep 17 00:00:00 2001 -From: CodeFetch -Date: Tue, 22 Dec 2020 04:44:39 +0100 -Subject: [PATCH 1/1] vxlan: fix performance issues - -This commit includes the patches for fixing issue #2155. ---- - ...ance-issues-with-VXLAN-encapsulation.patch | 80 +++++++++++++++++++ - 1 file changed, 80 insertions(+) - create mode 100644 patches/openwrt/9010-kernel-fix-performance-issues-with-VXLAN-encapsulation.patch - -diff --git a/patches/openwrt/9010-kernel-fix-performance-issues-with-VXLAN-encapsulation.patch b/patches/openwrt/9010-kernel-fix-performance-issues-with-VXLAN-encapsulation.patch -new file mode 100644 -index 00000000..14b4cc78 ---- /dev/null -+++ b/patches/openwrt/9010-kernel-fix-performance-issues-with-VXLAN-encapsulation.patch -@@ -0,0 +1,80 @@ -+From: CodeFetch -+Date: Tue, 22 Dec 2020 04:35:17 +0100 -+Subject: kernel: fix performance issues with VXLAN encapsulation -+ -+VXLAN did not consider the needed headroom of it's lower device which thus -+lead to costly expansions of the headroom. See: -+https://patchwork.ozlabs.org/project/netdev/list/?series=216897 -+ -+This commit includes the needed patches. -+ -+Signed-off-by: Vincent Wiemann -+ -+diff --git a/target/linux/generic/pending-4.14/690-vxlan-add_needed_headroom_for_lower_device.patch b/target/linux/generic/pending-4.14/690-vxlan-add_needed_headroom_for_lower_device.patch -+new file mode 100644 -+index 0000000000000000000000000000000000000000..1a380e62289094f0819a058ab07df0e60f0070cd -+--- /dev/null -++++ b/target/linux/generic/pending-4.14/690-vxlan-add_needed_headroom_for_lower_device.patch -+@@ -0,0 +1,35 @@ -++From: Sven Eckelmann -++Subject: [PATCH 1/2] vxlan: Add needed_headroom for lower device -++Date: Thu, 26 Nov 2020 13:52:46 +0100 -++ -++It was observed that sending data via batadv over vxlan (on top of -++wireguard) reduced the performance massively compared to raw ethernet or -++batadv on raw ethernet. A check of perf data showed that the -++vxlan_build_skb was calling all the time pskb_expand_head to allocate -++enough headroom for: -++ -++ min_headroom = LL_RESERVED_SPACE(dst->dev) + dst->header_len -++ + VXLAN_HLEN + iphdr_len; -++ -++But the vxlan_config_apply only requested needed headroom for: -++ -++ lowerdev->hard_header_len + VXLAN6_HEADROOM or VXLAN_HEADROOM -++ -++So it completely ignored the needed_headroom of the lower device. The first -++caller of net_dev_xmit could therefore never make sure that enough headroom -++was allocated for the rest of the transmit path. -++ -++Cc: Annika Wickert -++Signed-off-by: Sven Eckelmann -++Tested-by: Annika Wickert -++Signed-off-by: Vincent Wiemann -++--- a/drivers/net/vxlan.c -+++++ b/drivers/net/vxlan.c -++@@ -3184,6 +3184,7 @@ static void vxlan_config_apply(struct ne -++ dev->gso_max_segs = lowerdev->gso_max_segs; -++ -++ needed_headroom = lowerdev->hard_header_len; -+++ needed_headroom += lowerdev->needed_headroom; -++ -++ max_mtu = lowerdev->mtu - (use_ipv6 ? VXLAN6_HEADROOM : -++ VXLAN_HEADROOM); -+diff --git a/target/linux/generic/pending-4.14/691-vxlan-copy_needed_tailroom_from_lowerdev.patch b/target/linux/generic/pending-4.14/691-vxlan-copy_needed_tailroom_from_lowerdev.patch -+new file mode 100644 -+index 0000000000000000000000000000000000000000..a02aa2e1d84993b3fc994823978d8aee8dcc482e -+--- /dev/null -++++ b/target/linux/generic/pending-4.14/691-vxlan-copy_needed_tailroom_from_lowerdev.patch -+@@ -0,0 +1,21 @@ -++From: Sven Eckelmann -++Subject: [PATCH 2/2] vxlan: Copy needed_tailroom from lowerdev -++Date: Thu, 26 Nov 2020 13:52:47 +0100 -++ -++While vxlan doesn't need any extra tailroom, the lowerdev might need it. In -++that case, copy it over to reduce the chance for additional (re)allocations -++in the transmit path. -++ -++Signed-off-by: Sven Eckelmann -++Signed-off-by: Vincent Wiemann -++--- a/drivers/net/vxlan.c -+++++ b/drivers/net/vxlan.c -++@@ -3186,6 +3186,8 @@ static void vxlan_config_apply(struct ne -++ needed_headroom = lowerdev->hard_header_len; -++ needed_headroom += lowerdev->needed_headroom; -++ -+++ dev->needed_tailroom = lowerdev->needed_tailroom; -+++ -++ max_mtu = lowerdev->mtu - (use_ipv6 ? VXLAN6_HEADROOM : -++ VXLAN_HEADROOM); -++ if (max_mtu < ETH_MIN_MTU) --- -2.29.2 -