diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-06-23 20:52:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-29 02:24:29 -0400 |
commit | 7a9b2d59507d85569b8a456688ef40cf2ac73e48 (patch) | |
tree | 436533da6f680a0b4b6860e0219a2e594ac16735 /net/ipv4 | |
parent | b6b3ecc71a0664d44ed8d087d583aee98fbf492a (diff) |
net: use this_cpu_ptr()
use this_cpu_ptr(p) instead of per_cpu_ptr(p, smp_processor_id())
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ip_input.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index db47a5a00ed2..d859bcc26cb7 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -342,7 +342,7 @@ static int ip_rcv_finish(struct sk_buff *skb) | |||
342 | 342 | ||
343 | #ifdef CONFIG_NET_CLS_ROUTE | 343 | #ifdef CONFIG_NET_CLS_ROUTE |
344 | if (unlikely(skb_dst(skb)->tclassid)) { | 344 | if (unlikely(skb_dst(skb)->tclassid)) { |
345 | struct ip_rt_acct *st = per_cpu_ptr(ip_rt_acct, smp_processor_id()); | 345 | struct ip_rt_acct *st = this_cpu_ptr(ip_rt_acct); |
346 | u32 idx = skb_dst(skb)->tclassid; | 346 | u32 idx = skb_dst(skb)->tclassid; |
347 | st[idx&0xFF].o_packets++; | 347 | st[idx&0xFF].o_packets++; |
348 | st[idx&0xFF].o_bytes += skb->len; | 348 | st[idx&0xFF].o_bytes += skb->len; |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index d5f84bd5a455..4e6ddfbab09e 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2962,7 +2962,7 @@ struct tcp_md5sig_pool *tcp_get_md5sig_pool(void) | |||
2962 | spin_unlock(&tcp_md5sig_pool_lock); | 2962 | spin_unlock(&tcp_md5sig_pool_lock); |
2963 | 2963 | ||
2964 | if (p) | 2964 | if (p) |
2965 | return *per_cpu_ptr(p, smp_processor_id()); | 2965 | return *this_cpu_ptr(p); |
2966 | 2966 | ||
2967 | local_bh_enable(); | 2967 | local_bh_enable(); |
2968 | return NULL; | 2968 | return NULL; |