]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
include: net: add static inline dst_dev_overhead() to dst.h
authorJustin Iurman <justin.iurman@uliege.be>
Tue, 3 Dec 2024 12:49:42 +0000 (13:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:58 +0000 (12:50 +0100)
commit8513e56e31fcf22dc09ef2b841333a1825a06fa7
treef17d577fd2eb31fad42ea9c58bb2625c095d99e4
parent3e97606c954fb3453e8c203e1da8840e09afe157
include: net: add static inline dst_dev_overhead() to dst.h

[ Upstream commit 0600cf40e9b36fe17f9c9f04d4f9cef249eaa5e7 ]

Add static inline dst_dev_overhead() function to include/net/dst.h. This
helper function is used by ioam6_iptunnel, rpl_iptunnel and
seg6_iptunnel to get the dev's overhead based on a cache entry
(dst_entry). If the cache is empty, the default and generic value
skb->mac_len is returned. Otherwise, LL_RESERVED_SPACE() over dst's dev
is returned.

Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
Cc: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Stable-dep-of: c64a0727f9b1 ("net: ipv6: fix dst ref loop on input in seg6 lwt")
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/dst.h