diff options
author | Brian Vazquez <brianvv@google.com> | 2021-02-01 20:41:31 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-02-04 01:51:39 +0300 |
commit | f67fbeaebdc0356e0cbc94f4b099f45ebe174b02 (patch) | |
tree | 77b794d20e7e5ebfdbe63a7c899c96e787c50a08 /net/ipv6 | |
parent | 6585d7dc491d9d5e323ed52ee32ad071e04c9dfa (diff) | |
download | linux-f67fbeaebdc0356e0cbc94f4b099f45ebe174b02.tar.xz |
net: use indirect call helpers for dst_mtu
This patch avoids the indirect call for the common case:
ip6_mtu and ipv4_mtu
Signed-off-by: Brian Vazquez <brianvv@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/route.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 92b400eb8476..886b2095097e 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -83,7 +83,8 @@ enum rt6_nud_state { static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie); static unsigned int ip6_default_advmss(const struct dst_entry *dst); -static unsigned int ip6_mtu(const struct dst_entry *dst); +INDIRECT_CALLABLE_SCOPE +unsigned int ip6_mtu(const struct dst_entry *dst); static struct dst_entry *ip6_negative_advice(struct dst_entry *); static void ip6_dst_destroy(struct dst_entry *); static void ip6_dst_ifdown(struct dst_entry *, @@ -3089,7 +3090,7 @@ static unsigned int ip6_default_advmss(const struct dst_entry *dst) return mtu; } -static unsigned int ip6_mtu(const struct dst_entry *dst) +INDIRECT_CALLABLE_SCOPE unsigned int ip6_mtu(const struct dst_entry *dst) { struct inet6_dev *idev; unsigned int mtu; @@ -3111,6 +3112,7 @@ out: return mtu - lwtunnel_headroom(dst->lwtstate, mtu); } +EXPORT_SYMBOL(ip6_mtu); /* MTU selection: * 1. mtu on route is locked - use it |