netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: roy.qing.li@gmail.com
Cc: netdev@vger.kernel.org, Christoph Lameter <cl@linux.com>
Subject: Re: [PATCH net-next] core: simplify the getting percpu of flow_cache
Date: Thu, 28 Mar 2013 06:15:27 -0700	[thread overview]
Message-ID: <1364476527.15753.38.camel@edumazet-glaptop> (raw)
In-Reply-To: <1364473451-3640-1-git-send-email-roy.qing.li@gmail.com>

On Thu, 2013-03-28 at 20:24 +0800, roy.qing.li@gmail.com wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
> 
> replace per_cpu with per_cpu_ptr to save conversion between address and pointer
> 
> Signed-off-by: Li RongQing <roy.qing.li@gmail.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 ?

  reply	other threads:[~2013-03-28 13:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28 12:24 [PATCH net-next] core: simplify the getting percpu of flow_cache roy.qing.li
2013-03-28 13:15 ` Eric Dumazet [this message]
2013-03-29  1:07   ` RongQing Li
2013-03-29 19:15 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1364476527.15753.38.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=cl@linux.com \
    --cc=netdev@vger.kernel.org \
    --cc=roy.qing.li@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).