Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341634
b: refs/heads/master
c: 404f2f1
h: refs/heads/master
v: v3
  • Loading branch information
Shan Wei authored and Jesse Gross committed Nov 16, 2012
1 parent dc117e3 commit bc84140
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3fdbd1ce11e5c0d7cafbe44c942c5cad61113d7b
refs/heads/master: 404f2f1019c0293bd91dc1c03c8557ec97d9d104
4 changes: 2 additions & 2 deletions trunk/net/openvswitch/datapath.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void ovs_dp_process_received_packet(struct vport *p, struct sk_buff *skb)
int error;
int key_len;

stats = per_cpu_ptr(dp->stats_percpu, smp_processor_id());
stats = this_cpu_ptr(dp->stats_percpu);

/* Extract flow from 'skb' into 'key'. */
error = ovs_flow_extract(skb, p->port_no, &key, &key_len);
Expand Down Expand Up @@ -282,7 +282,7 @@ int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb,
return 0;

err:
stats = per_cpu_ptr(dp->stats_percpu, smp_processor_id());
stats = this_cpu_ptr(dp->stats_percpu);

u64_stats_update_begin(&stats->sync);
stats->n_lost++;
Expand Down
5 changes: 2 additions & 3 deletions trunk/net/openvswitch/vport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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++;
Expand Down

0 comments on commit bc84140

Please sign in to comment.