Subject: Re: [PATCH v2 net] ipv4: do not use this_cpu_ptr() in preemptible context

From: Joe M <[email-masked]>
Date: Mon, 22 Sep 2014 14:34:51 -0500

Hello Eric,

> > > v2: use latest and shiny raw_cpu_ptr(), as it seems the latest
> > > incantation of ever changing percpu interface.
> > >
> > >  net/ipv4/ip_tunnel.c |    4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> The below grep shows 3 uses of this_cpu_ptr, whereas the patch only
> replaces 2 instances. Just want to check if that is ok.
> 
> grep --ignore-case --exclude-dir=".git" --recursive this_cpu_ptr ip_tunnel.c
>         __tunnel_dst_set(this_cpu_ptr(t->dst_cache), dst, saddr);
>         idst = this_cpu_ptr(t->dst_cache);
>         tstats = this_cpu_ptr(tunnel->dev->tstats);

grep --ignore-case --exclude-dir=".git" --recursive this_cpu_ptr *.c
ip_input.c:             struct ip_rt_acct *st = this_cpu_ptr(ip_rt_acct);
ip_vti.c:       tstats = this_cpu_ptr(dev->tstats);
route.c:                p = (struct rtable **)__this_cpu_ptr(nh->nh_pcpu_rth_output);
route.c:                        prth = __this_cpu_ptr(nh->nh_pcpu_rth_output);
tcp.c:          return __this_cpu_ptr(p);

Is it ok for ip_vti.c and ip_input.c to use this_cpu_ptr?

Thanks
Joe