From: Eric Dumazet Date: Fri, 31 May 2019 22:27:00 +0000 (-0700) Subject: ipv6: icmp: use this_cpu_read() in icmpv6_sk() X-Git-Tag: v5.3-rc1~140^2~354 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=2789c14d198a4890f4c61ac5bf7cb02a14a6f99e;p=linux.git ipv6: icmp: use this_cpu_read() in icmpv6_sk() In general, this_cpu_read(*X) is faster than *this_cpu_ptr(X) Also remove the inline attibute, totally useless. Signed-off-by: Eric Dumazet Cc: Kefeng Wang Signed-off-by: David S. Miller --- diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index afb915807cd0..d274f5b64afe 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -79,9 +79,9 @@ * * On SMP we have one ICMP socket per-cpu. */ -static inline struct sock *icmpv6_sk(struct net *net) +static struct sock *icmpv6_sk(struct net *net) { - return *this_cpu_ptr(net->ipv6.icmp_sk); + return this_cpu_read(*net->ipv6.icmp_sk); } static int icmpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,