[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1364476527.15753.38.camel@edumazet-glaptop>
Date: Thu, 28 Mar 2013 06:15:27 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: roy.qing.li@...il.com
Cc: netdev@...r.kernel.org, Christoph Lameter <cl@...ux.com>
Subject: Re: [PATCH net-next] core: simplify the getting percpu of flow_cache
On Thu, 2013-03-28 at 20:24 +0800, roy.qing.li@...il.com wrote:
> From: Li RongQing <roy.qing.li@...il.com>
>
> replace per_cpu with per_cpu_ptr to save conversion between address and pointer
>
> Signed-off-by: Li RongQing <roy.qing.li@...il.com>
> ---
> net/core/flow.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/flow.c b/net/core/flow.c
> index 7fae135..707fb7b 100644
> --- a/net/core/flow.c
> +++ b/net/core/flow.c
> @@ -334,7 +334,7 @@ static int flow_cache_percpu_empty(struct flow_cache *fc, int cpu)
> struct flow_cache_percpu *fcp;
> int i;
>
> - fcp = &per_cpu(*fc->percpu, cpu);
> + fcp = per_cpu_ptr(fc->percpu, cpu);
> for (i = 0; i < flow_cache_hash_size(fc); i++)
> if (!hlist_empty(&fcp->hash_table[i]))
> return 0;
This makes no difference at all, at least on x86
Care to elaborate ?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists