]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: ipv6: rpl_iptunnel: mitigate 2-realloc issue
authorJustin Iurman <justin.iurman@uliege.be>
Tue, 3 Dec 2024 12:49:45 +0000 (13:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:58 +0000 (12:50 +0100)
commitc0b11dc50590e10590b39dcda79835cd32f49d00
treeeb0c98499a5d4d3ae6a3e86fef0ca37b2577a683
parentdbd4f89a4a58f4a1ef568605d53ab6c045c8cb4c
net: ipv6: rpl_iptunnel: mitigate 2-realloc issue

[ Upstream commit 985ec6f5e6235242191370628acb73d7a9f0c0ea ]

This patch mitigates the two-reallocations issue with rpl_iptunnel by
providing the dst_entry (in the cache) to the first call to
skb_cow_head(). As a result, the very first iteration would still
trigger two reallocations (i.e., empty cache), while next iterations
would only trigger a single reallocation.

Performance tests before/after applying this patch, which clearly shows
there is no impact (it even shows improvement):
- before: https://ibb.co/nQJhqwc
- after: https://ibb.co/4ZvW6wV

Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
Cc: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Stable-dep-of: 13e55fbaec17 ("net: ipv6: fix dst ref loop on input in rpl lwt")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv6/rpl_iptunnel.c