Patch "include: net: add static inline dst_dev_overhead() to dst.h" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    include: net: add static inline dst_dev_overhead() to dst.h

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     include-net-add-static-inline-dst_dev_overhead-to-ds.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2a95bdb541af9b0db397f9fd9c6c45bd621b0c44
Author: Justin Iurman <justin.iurman@xxxxxxxxx>
Date:   Tue Dec 3 13:49:42 2024 +0100

    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@xxxxxxxxx>
    Cc: Alexander Lobakin <aleksander.lobakin@xxxxxxxxx>
    Cc: Vadim Fedorenko <vadim.fedorenko@xxxxxxxxx>
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Stable-dep-of: c64a0727f9b1 ("net: ipv6: fix dst ref loop on input in seg6 lwt")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/net/dst.h b/include/net/dst.h
index d67fda89cd0fa..3a1a6f94a8092 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -434,6 +434,15 @@ static inline void dst_set_expires(struct dst_entry *dst, int timeout)
 		dst->expires = expires;
 }
 
+static inline unsigned int dst_dev_overhead(struct dst_entry *dst,
+					    struct sk_buff *skb)
+{
+	if (likely(dst))
+		return LL_RESERVED_SPACE(dst->dev);
+
+	return skb->mac_len;
+}
+
 INDIRECT_CALLABLE_DECLARE(int ip6_output(struct net *, struct sock *,
 					 struct sk_buff *));
 INDIRECT_CALLABLE_DECLARE(int ip_output(struct net *, struct sock *,




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux