Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32f16369 authored by Simon Horman's avatar Simon Horman Committed by David S. Miller
Browse files

net/dst: Make skb parameter of skb{metadata_dst, tunnel_info}() const



Make the skb parameter of skb_metadata_dst() and skb_tunnel_info()
const as they are not modified. This is in preparation for using
them in call-sites where skb is const.

Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0929567a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ struct metadata_dst {
	} u;
};

static inline struct metadata_dst *skb_metadata_dst(struct sk_buff *skb)
static inline struct metadata_dst *skb_metadata_dst(const struct sk_buff *skb)
{
	struct metadata_dst *md_dst = (struct metadata_dst *) skb_dst(skb);

@@ -34,7 +34,8 @@ static inline struct metadata_dst *skb_metadata_dst(struct sk_buff *skb)
	return NULL;
}

static inline struct ip_tunnel_info *skb_tunnel_info(struct sk_buff *skb)
static inline struct ip_tunnel_info *
skb_tunnel_info(const struct sk_buff *skb)
{
	struct metadata_dst *md_dst = skb_metadata_dst(skb);
	struct dst_entry *dst;