diff options
author | Eric Dumazet <edumazet@google.com> | 2019-05-31 19:09:02 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-03 15:08:53 -0700 |
commit | 046386ca0c48cca1d91563db63a8eb0aff71f2b7 (patch) | |
tree | ebbcd22afd226d801e7803eb6563295955e8b819 /net/ipv4/icmp.c | |
parent | c353071ad0a2ef754fcba4153098e3cdc5ca516e (diff) |
ipv4: icmp: use this_cpu_read() in icmp_sk()
this_cpu_read(*X) is faster than *this_cpu_ptr(X)
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r-- | net/ipv4/icmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index f3a5893b1e86..49d6b037b113 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 */ |