diff options
-rw-r--r-- | net/openvswitch/datapath.c | 4 | ||||
-rw-r--r-- | net/openvswitch/vport.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index fd4a6a4ce3cd..7b1d6d2b0c1a 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
@@ -208,7 +208,7 @@ void ovs_dp_process_received_packet(struct vport *p, struct sk_buff *skb) | |||
208 | int error; | 208 | int error; |
209 | int key_len; | 209 | int key_len; |
210 | 210 | ||
211 | stats = per_cpu_ptr(dp->stats_percpu, smp_processor_id()); | 211 | stats = this_cpu_ptr(dp->stats_percpu); |
212 | 212 | ||
213 | /* Extract flow from 'skb' into 'key'. */ | 213 | /* Extract flow from 'skb' into 'key'. */ |
214 | error = ovs_flow_extract(skb, p->port_no, &key, &key_len); | 214 | error = ovs_flow_extract(skb, p->port_no, &key, &key_len); |
@@ -282,7 +282,7 @@ int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb, | |||
282 | return 0; | 282 | return 0; |
283 | 283 | ||
284 | err: | 284 | err: |
285 | stats = per_cpu_ptr(dp->stats_percpu, smp_processor_id()); | 285 | stats = this_cpu_ptr(dp->stats_percpu); |
286 | 286 | ||
287 | u64_stats_update_begin(&stats->sync); | 287 | u64_stats_update_begin(&stats->sync); |
288 | stats->n_lost++; | 288 | stats->n_lost++; |
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) | |||
333 | { | 333 | { |
334 | struct vport_percpu_stats *stats; | 334 | struct vport_percpu_stats *stats; |
335 | 335 | ||
336 | stats = per_cpu_ptr(vport->percpu_stats, smp_processor_id()); | 336 | stats = this_cpu_ptr(vport->percpu_stats); |
337 | |||
338 | u64_stats_update_begin(&stats->sync); | 337 | u64_stats_update_begin(&stats->sync); |
339 | stats->rx_packets++; | 338 | stats->rx_packets++; |
340 | stats->rx_bytes += skb->len; | 339 | stats->rx_bytes += skb->len; |
@@ -359,7 +358,7 @@ int ovs_vport_send(struct vport *vport, struct sk_buff *skb) | |||
359 | if (likely(sent)) { | 358 | if (likely(sent)) { |
360 | struct vport_percpu_stats *stats; | 359 | struct vport_percpu_stats *stats; |
361 | 360 | ||
362 | stats = per_cpu_ptr(vport->percpu_stats, smp_processor_id()); | 361 | stats = this_cpu_ptr(vport->percpu_stats); |
363 | 362 | ||
364 | u64_stats_update_begin(&stats->sync); | 363 | u64_stats_update_begin(&stats->sync); |
365 | stats->tx_packets++; | 364 | stats->tx_packets++; |