diff --git a/patches/0005-batman-adv-improve-fragmentation-performance.patch b/patches/0005-batman-adv-improve-fragmentation-performance.patch deleted file mode 100644 index d758b1e0..00000000 --- a/patches/0005-batman-adv-improve-fragmentation-performance.patch +++ /dev/null @@ -1,142 +0,0 @@ -From ad9d77de22ca5bb27b8544c1c57fa8b6afa9fba8 Mon Sep 17 00:00:00 2001 -From: CodeFetch -Date: Tue, 22 Dec 2020 05:24:06 +0100 -Subject: [PATCH] batman-adv: improve fragmentation performance - -This commit fixes the fragmentation issues mentioned in issue #2155. ---- - ...dv-improve-fragmentation-performance.patch | 122 ++++++++++++++++++ - 1 file changed, 122 insertions(+) - create mode 100644 patches/packages/routing/0004-batman-adv-improve-fragmentation-performance.patch - -diff --git a/patches/packages/routing/0004-batman-adv-improve-fragmentation-performance.patch b/patches/packages/routing/0004-batman-adv-improve-fragmentation-performance.patch -new file mode 100644 -index 00000000..6556ad8a ---- /dev/null -+++ b/patches/packages/routing/0004-batman-adv-improve-fragmentation-performance.patch -@@ -0,0 +1,122 @@ -+From: CodeFetch -+Date: Tue, 22 Dec 2020 05:07:17 +0100 -+Subject: batman-adv: improve fragmentation performance -+ -+See freifunk-gluon issue #2155 for details. -+ -+Signed-off-by: Vincent Wiemann -+ -+diff --git a/batman-adv/patches/1100-batman-adv-consider-fragmentation-for-needed_headroom.patch b/batman-adv/patches/1100-batman-adv-consider-fragmentation-for-needed_headroom.patch -+new file mode 100644 -+index 0000000000000000000000000000000000000000..95fc85a3ea27cd5c16657e986bfaffddb9c326c4 -+--- /dev/null -++++ b/batman-adv/patches/1100-batman-adv-consider-fragmentation-for-needed_headroom.patch -+@@ -0,0 +1,12 @@ -++--- a/net/batman-adv/hard-interface.c -+++++ b/net/batman-adv/hard-interface.c -++@@ -553,6 +553,9 @@ static void batadv_hardif_recalc_extra_s -++ needed_headroom = lower_headroom + (lower_header_len - ETH_HLEN); -++ needed_headroom += batadv_max_header_len(); -++ -+++ /* fragmentation headers don't strip the unicast/... header */ -+++ needed_headroom += sizeof(struct batadv_frag_packet); -+++ -++ soft_iface->needed_headroom = needed_headroom; -++ soft_iface->needed_tailroom = lower_tailroom; -++ } -+diff --git a/batman-adv/patches/1101-batman-adv-reserve-needed-room-for-fragments.patch b/batman-adv/patches/1101-batman-adv-reserve-needed-room-for-fragments.patch -+new file mode 100644 -+index 0000000000000000000000000000000000000000..59e02149b49210dae0700d943a0310b3dce054f8 -+--- /dev/null -++++ b/batman-adv/patches/1101-batman-adv-reserve-needed-room-for-fragments.patch -+@@ -0,0 +1,62 @@ -++--- a/net/batman-adv/fragmentation.c -+++++ b/net/batman-adv/fragmentation.c -++@@ -391,6 +391,7 @@ out: -++ -++ /** -++ * batadv_frag_create() - create a fragment from skb -+++ * @net_dev: outgoing device for fragment -++ * @skb: skb to create fragment from -++ * @frag_head: header to use in new fragment -++ * @fragment_size: size of new fragment -++@@ -401,22 +402,25 @@ out: -++ * -++ * Return: the new fragment, NULL on error. -++ */ -++-static struct sk_buff *batadv_frag_create(struct sk_buff *skb, -+++static struct sk_buff *batadv_frag_create(struct net_device *net_dev, -+++ struct sk_buff *skb, -++ struct batadv_frag_packet *frag_head, -++ unsigned int fragment_size) -++ { -+++ unsigned int ll_reserved = LL_RESERVED_SPACE(net_dev); -+++ unsigned int tailroom = net_dev->needed_tailroom; -++ struct sk_buff *skb_fragment; -++ unsigned int header_size = sizeof(*frag_head); -++ unsigned int mtu = fragment_size + header_size; -++ -++- skb_fragment = netdev_alloc_skb(NULL, mtu + ETH_HLEN); -+++ skb_fragment = dev_alloc_skb(ll_reserved + mtu + tailroom); -++ if (!skb_fragment) -++ goto err; -++ -++ skb_fragment->priority = skb->priority; -++ -++ /* Eat the last mtu-bytes of the skb */ -++- skb_reserve(skb_fragment, header_size + ETH_HLEN); -+++ skb_reserve(skb_fragment, ll_reserved + header_size); -++ skb_split(skb, skb_fragment, skb->len - fragment_size); -++ -++ /* Add the header */ -++@@ -439,11 +443,12 @@ int batadv_frag_send_packet(struct sk_bu -++ struct batadv_orig_node *orig_node, -++ struct batadv_neigh_node *neigh_node) -++ { -+++ struct net_device *net_dev = neigh_node->if_incoming->net_dev; -++ struct batadv_priv *bat_priv; -++ struct batadv_hard_iface *primary_if = NULL; -++ struct batadv_frag_packet frag_header; -++ struct sk_buff *skb_fragment; -++- unsigned int mtu = neigh_node->if_incoming->net_dev->mtu; -+++ unsigned int mtu = net_dev->mtu; -++ unsigned int header_size = sizeof(frag_header); -++ unsigned int max_fragment_size, num_fragments; -++ int ret; -++@@ -503,7 +508,7 @@ int batadv_frag_send_packet(struct sk_bu -++ goto put_primary_if; -++ } -++ -++- skb_fragment = batadv_frag_create(skb, &frag_header, -+++ skb_fragment = batadv_frag_create(net_dev, skb, &frag_header, -++ max_fragment_size); -++ if (!skb_fragment) { -++ ret = -ENOMEM; -+diff --git a/batman-adv/patches/1102-batman-adv-dont-always-reallocate-the-fragmentation-skb-head.patch b/batman-adv/patches/1102-batman-adv-dont-always-reallocate-the-fragmentation-skb-head.patch -+new file mode 100644 -+index 0000000000000000000000000000000000000000..4ba8b2f755925c37a1365e59842612dbe0febbfb -+--- /dev/null -++++ b/batman-adv/patches/1102-batman-adv-dont-always-reallocate-the-fragmentation-skb-head.patch -+@@ -0,0 +1,22 @@ -++--- a/net/batman-adv/fragmentation.c -+++++ b/net/batman-adv/fragmentation.c -++@@ -527,13 +527,14 @@ int batadv_frag_send_packet(struct sk_bu -++ frag_header.no++; -++ } -++ -++- /* Make room for the fragment header. */ -++- if (batadv_skb_head_push(skb, header_size) < 0 || -++- pskb_expand_head(skb, header_size + ETH_HLEN, 0, GFP_ATOMIC) < 0) { -++- ret = -ENOMEM; -+++ /* make sure that there is at least enough head for the fragmentation -+++ * and ethernet headers -+++ */ -+++ ret = skb_cow_head(skb, ETH_HLEN + header_size); -+++ if (ret < 0) -++ goto put_primary_if; -++- } -++ -+++ skb_push(skb, header_size); -++ memcpy(skb->data, &frag_header, header_size); -++ -++ /* Send the last fragment */ --- -2.29.2 -