]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
batman-adv: Reserve needed_*room for fragments
authorSven Eckelmann <sven@narfation.org>
Sat, 20 Nov 2021 12:40:43 +0000 (13:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 10:36:24 +0000 (11:36 +0100)
commitaef9f5fca2790681b5a64326b3d3fb8e98f20b3c
treebd4f32ee4e462a7b94d68ff5cc547ce173421100
parent069e51e9a425851848aa5d2a937555a5f509ebc6
batman-adv: Reserve needed_*room for fragments

commit c5cbfc87558168ef4c3c27ce36eba6b83391db19 upstream.

The batadv net_device is trying to propagate the needed_headroom and
needed_tailroom from the lower devices. This is needed to avoid cost
intensive reallocations using pskb_expand_head during the transmission.

But the fragmentation code split the skb's without adding extra room at the
end/beginning of the various fragments. This reduced the performance of
transmissions over complex scenarios (batadv on vxlan on wireguard) because
the lower devices had to perform the reallocations at least once.

Fixes: ee75ed88879a ("batman-adv: Fragment and send skbs larger than mtu")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
[ bp: 4.19 backported: adjust context. ]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/batman-adv/fragmentation.c