projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
datapath: use this_cpu_ptr per-cpu helper
[openvswitch]
/
datapath
/
datapath.c
diff --git
a/datapath/datapath.c
b/datapath/datapath.c
index e359ac034039b683985b3b80a1ec4e8fd5eadcaa..ade9de53b8e4381d86acef71f47a884cb94cae10 100644
(file)
--- a/
datapath/datapath.c
+++ b/
datapath/datapath.c
@@
-309,7
+309,7
@@
void ovs_dp_process_received_packet(struct vport *p, struct sk_buff *skb)
u64 *stats_counter;
int error;
u64 *stats_counter;
int error;
- stats =
per_cpu_ptr(dp->stats_percpu, smp_processor_id()
);
+ stats =
this_cpu_ptr(dp->stats_percpu
);
if (!OVS_CB(skb)->flow) {
struct sw_flow_key key;
if (!OVS_CB(skb)->flow) {
struct sw_flow_key key;
@@
-391,7
+391,7
@@
int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb,
return 0;
err:
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++;
u64_stats_update_begin(&stats->sync);
stats->n_lost++;