ipv4: icmp: use this_cpu_read() in icmp_sk()
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- net/ipv4/icmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/icmp.c +1 -1
@@ -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 */
Signature · 1 line
2.22.0.rc1.257.g3120a18244-goog
From: Eric Dumazet <[email protected]>
Date: Fri, 31 May 2019 19:09:02 -0700
Quoted 3 lines
this_cpu_read(*X)is faster than*this_cpu_ptr(X)Signed-off-by Eric Dumazet <[email protected]>
Applied.