* [PATCH net-next] ipv4: icmp: use this_cpu_read() in icmp_sk()
@ 2019-06-01 2:09 Eric Dumazet
2019-06-03 22:09 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2019-06-01 2:09 UTC (permalink / raw)
To: David S . Miller; +Cc: netdev, Eric Dumazet, Eric Dumazet
this_cpu_read(*X) is faster than *this_cpu_ptr(X)
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/ipv4/icmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index f3a5893b1e8619716f19f85dc77f2e1e12284b4d..49d6b037b113e85877f8e689e690f1c0d3427386 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -206,7 +206,7 @@ static const struct icmp_control icmp_pointers[NR_ICMP_TYPES+1];
*/
static struct sock *icmp_sk(struct net *net)
{
- return *this_cpu_ptr(net->ipv4.icmp_sk);
+ return this_cpu_read(*net->ipv4.icmp_sk);
}
/* Called with BH disabled */
--
2.22.0.rc1.257.g3120a18244-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] ipv4: icmp: use this_cpu_read() in icmp_sk()
2019-06-01 2:09 [PATCH net-next] ipv4: icmp: use this_cpu_read() in icmp_sk() Eric Dumazet
@ 2019-06-03 22:09 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-06-03 22:09 UTC (permalink / raw)
To: edumazet; +Cc: netdev, eric.dumazet
From: Eric Dumazet <edumazet@google.com>
Date: Fri, 31 May 2019 19:09:02 -0700
> this_cpu_read(*X) is faster than *this_cpu_ptr(X)
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-03 22:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-01 2:09 [PATCH net-next] ipv4: icmp: use this_cpu_read() in icmp_sk() Eric Dumazet
2019-06-03 22:09 ` 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.