summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Horman <simon.horman@netronome.com>2017-10-02 11:41:15 +0300
committerDavid S. Miller <davem@davemloft.net>2017-10-02 21:06:07 +0300
commit32f16369e59fcc505c5ed93a6a8cad3d5636b463 (patch)
treea7a825f893b53a374e9543ea942bfd4022461a1b /include
parent0929567a7a2dab8455a7313956973ff0d339709a (diff)
downloadlinux-32f16369e59fcc505c5ed93a6a8cad3d5636b463.tar.xz
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: Simon Horman <simon.horman@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/dst_metadata.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/dst_metadata.h b/include/net/dst_metadata.h
index a803129a4849..9fba2ebf6dda 100644
--- a/include/net/dst_metadata.h
+++ b/include/net/dst_metadata.h
@@ -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;