ipv6: icmp6: avoid indirect call for icmpv6_send()
If IPv6 is builtin, we do not need an expensive indirect call to reach icmp6_send(). v2: put inline keyword before the type to avoid sparse warnings. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e9f0809fb9
commit
cc7a21b6fb
@@ -439,8 +439,8 @@ static int icmp6_iif(const struct sk_buff *skb)
|
||||
/*
|
||||
* Send an ICMP message in response to a packet in error
|
||||
*/
|
||||
static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,
|
||||
const struct in6_addr *force_saddr)
|
||||
void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,
|
||||
const struct in6_addr *force_saddr)
|
||||
{
|
||||
struct inet6_dev *idev = NULL;
|
||||
struct ipv6hdr *hdr = ipv6_hdr(skb);
|
||||
@@ -625,6 +625,7 @@ out:
|
||||
out_bh_enable:
|
||||
local_bh_enable();
|
||||
}
|
||||
EXPORT_SYMBOL(icmp6_send);
|
||||
|
||||
/* Slightly more convenient version of icmp6_send.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user