|
@@ -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++;
|