netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] core: simplify the getting percpu of flow_cache
@ 2013-03-28 12:24 roy.qing.li
  2013-03-28 13:15 ` Eric Dumazet
  2013-03-29 19:15 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: roy.qing.li @ 2013-03-28 12:24 UTC (permalink / raw)
  To: netdev

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;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-29 19:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2013-03-29  1:07   ` RongQing Li
2013-03-29 19:15 ` David Miller

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).