diff options
author | Shan Wei <davidshan@tencent.com> | 2012-11-13 09:52:25 +0800 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2012-11-16 13:26:20 -0800 |
commit | 404f2f1019c0293bd91dc1c03c8557ec97d9d104 (patch) | |
tree | 4b7ae66191cd8734b7a1eded4158f1b2e9e149ba /net/openvswitch/vport.c | |
parent | 3fdbd1ce11e5c0d7cafbe44c942c5cad61113d7b (diff) | |
download | linux-stable-404f2f1019c0293bd91dc1c03c8557ec97d9d104.tar.gz linux-stable-404f2f1019c0293bd91dc1c03c8557ec97d9d104.tar.bz2 linux-stable-404f2f1019c0293bd91dc1c03c8557ec97d9d104.zip |
net: openvswitch: use this_cpu_ptr per-cpu helper
just use more faster this_cpu_ptr instead of per_cpu_ptr(p, smp_processor_id());
Signed-off-by: Shan Wei <davidshan@tencent.com>
Reviewed-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch/vport.c')
-rw-r--r-- | net/openvswitch/vport.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c index 03779e8a2622..70af0bedbac4 100644 --- a/net/openvswitch/vport.c +++ b/net/openvswitch/vport.c @@ -333,8 +333,7 @@ void ovs_vport_receive(struct vport *vport, struct sk_buff *skb) { struct vport_percpu_stats *stats; - stats = per_cpu_ptr(vport->percpu_stats, smp_processor_id()); - + stats = this_cpu_ptr(vport->percpu_stats); u64_stats_update_begin(&stats->sync); stats->rx_packets++; stats->rx_bytes += skb->len; @@ -359,7 +358,7 @@ int ovs_vport_send(struct vport *vport, struct sk_buff *skb) if (likely(sent)) { struct vport_percpu_stats *stats; - stats = per_cpu_ptr(vport->percpu_stats, smp_processor_id()); + stats = this_cpu_ptr(vport->percpu_stats); u64_stats_update_begin(&stats->sync); stats->tx_packets++; |