提交 27815032 编写于 作者: L Li RongQing 提交者: David S. Miller

net: simplify the getting percpu of flow_cache

replace per_cpu with per_cpu_ptr to save conversion between address and pointer
Signed-off-by: NLi RongQing <roy.qing.li@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 10c9cbb1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册