lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 3 Apr 2022 14:06:24 +0100 From: Pavel Begunkov <asml.silence@...il.com> To: netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org> Cc: Eric Dumazet <edumazet@...gle.com>, Wei Liu <wei.liu@...nel.org>, Paul Durrant <paul@....org>, Pavel Begunkov <asml.silence@...il.com> Subject: [PATCH net-next 12/27] ipv6: inline ip6_local_out() ip6_local_out() is simple, inline it. Signed-off-by: Pavel Begunkov <asml.silence@...il.com> --- include/net/ipv6.h | 13 ++++++++++++- net/ipv6/output_core.c | 12 ------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 213612f1680c..0320bea599c9 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -1074,7 +1074,18 @@ void ip6_protocol_deliver_rcu(struct net *net, struct sk_buff *skb, int nexthdr, bool have_final); int __ip6_local_out(struct net *net, struct sock *sk, struct sk_buff *skb); -int ip6_local_out(struct net *net, struct sock *sk, struct sk_buff *skb); + +static inline int ip6_local_out(struct net *net, struct sock *sk, + struct sk_buff *skb) +{ + int err; + + err = __ip6_local_out(net, sk, skb); + if (likely(err == 1)) + err = dst_output(net, sk, skb); + + return err; +} /* * Extension header (options) processing diff --git a/net/ipv6/output_core.c b/net/ipv6/output_core.c index 2880dc7d9a49..f657e713561b 100644 --- a/net/ipv6/output_core.c +++ b/net/ipv6/output_core.c @@ -151,15 +151,3 @@ int __ip6_local_out(struct net *net, struct sock *sk, struct sk_buff *skb) dst_output); } EXPORT_SYMBOL_GPL(__ip6_local_out); - -int ip6_local_out(struct net *net, struct sock *sk, struct sk_buff *skb) -{ - int err; - - err = __ip6_local_out(net, sk, skb); - if (likely(err == 1)) - err = dst_output(net, sk, skb); - - return err; -} -EXPORT_SYMBOL_GPL(ip6_local_out); -- 2.35.1
Powered by blists - more mailing lists