summaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorBrian Vazquez <brianvv@google.com>2021-02-01 17:41:32 +0000
committerJakub Kicinski <kuba@kernel.org>2021-02-03 14:51:40 -0800
commitbbd807dfbf20506f5548b0297c430a09326e7c4b (patch)
treecb2a2d1c678a1b3546d119d6b3a32ebb8ec7818e /net/ipv4/route.c
parentf67fbeaebdc0356e0cbc94f4b099f45ebe174b02 (diff)
downloadlinux-bbd807dfbf20506f5548b0297c430a09326e7c4b.tar.gz
linux-bbd807dfbf20506f5548b0297c430a09326e7c4b.tar.bz2
linux-bbd807dfbf20506f5548b0297c430a09326e7c4b.zip
net: indirect call helpers for ipv4/ipv6 dst_check functions
This patch avoids the indirect call for the common case: ip6_dst_check and ipv4_dst_check Signed-off-by: Brian Vazquez <brianvv@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 4fac91f8bd6c..9e6537709794 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -133,7 +133,8 @@ static int ip_rt_gc_timeout __read_mostly = RT_GC_TIMEOUT;
* Interface to generic destination cache.
*/
-static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie);
+INDIRECT_CALLABLE_SCOPE
+struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie);
static unsigned int ipv4_default_advmss(const struct dst_entry *dst);
INDIRECT_CALLABLE_SCOPE
unsigned int ipv4_mtu(const struct dst_entry *dst);
@@ -1188,7 +1189,8 @@ void ipv4_sk_redirect(struct sk_buff *skb, struct sock *sk)
}
EXPORT_SYMBOL_GPL(ipv4_sk_redirect);
-static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie)
+INDIRECT_CALLABLE_SCOPE struct dst_entry *ipv4_dst_check(struct dst_entry *dst,
+ u32 cookie)
{
struct rtable *rt = (struct rtable *) dst;
@@ -1204,6 +1206,7 @@ static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie)
return NULL;
return dst;
}
+EXPORT_SYMBOL(ipv4_dst_check);
static void ipv4_send_dest_unreach(struct sk_buff *skb)
{