* [PATCH net-next] ipv6: icmp: use this_cpu_read() in icmpv6_sk()
@ 2019-05-31 22:27 Eric Dumazet
2019-06-03 21:59 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2019-05-31 22:27 UTC (permalink / raw)
To: David S . Miller; +Cc: netdev, Eric Dumazet, Eric Dumazet, Kefeng Wang
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 <edumazet@google.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
---
net/ipv6/icmp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index afb915807cd0109e02df6e0858319c0ff78c33e8..d274f5b64afe0c5325d6f14c33842b7da61653e8 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,
--
2.22.0.rc1.257.g3120a18244-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] ipv6: icmp: use this_cpu_read() in icmpv6_sk()
2019-05-31 22:27 [PATCH net-next] ipv6: icmp: use this_cpu_read() in icmpv6_sk() Eric Dumazet
@ 2019-06-03 21:59 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-06-03 21:59 UTC (permalink / raw)
To: edumazet; +Cc: netdev, eric.dumazet, wangkefeng.wang
From: Eric Dumazet <edumazet@google.com>
Date: Fri, 31 May 2019 15:27:00 -0700
> 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 <edumazet@google.com>
> Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-03 21:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31 22:27 [PATCH net-next] ipv6: icmp: use this_cpu_read() in icmpv6_sk() Eric Dumazet
2019-06-03 21:59 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.