Commit c353071a authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

ipv6: use this_cpu_read() in rt6_get_pcpu_route()

this_cpu_read(*X) is faster than *this_cpu_ptr(X)
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4ebcfd9a
...@@ -1268,10 +1268,9 @@ static struct rt6_info *ip6_rt_pcpu_alloc(const struct fib6_result *res) ...@@ -1268,10 +1268,9 @@ static struct rt6_info *ip6_rt_pcpu_alloc(const struct fib6_result *res)
/* It should be called with rcu_read_lock() acquired */ /* It should be called with rcu_read_lock() acquired */
static struct rt6_info *rt6_get_pcpu_route(const struct fib6_result *res) static struct rt6_info *rt6_get_pcpu_route(const struct fib6_result *res)
{ {
struct rt6_info *pcpu_rt, **p; struct rt6_info *pcpu_rt;
p = this_cpu_ptr(res->nh->rt6i_pcpu); pcpu_rt = this_cpu_read(*res->nh->rt6i_pcpu);
pcpu_rt = *p;
if (pcpu_rt) if (pcpu_rt)
ip6_hold_safe(NULL, &pcpu_rt); ip6_hold_safe(NULL, &pcpu_rt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment