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
/
vport.c
diff --git
a/datapath/vport.c
b/datapath/vport.c
index bb2bd27c7650136deedf2487d9df1d4734cc888a..4934ac1f57f3e663af0a789c26700d43d9940958 100644
(file)
--- a/
datapath/vport.c
+++ b/
datapath/vport.c
@@
-453,8
+453,7
@@
void ovs_vport_receive(struct vport *vport, struct sk_buff *skb)
{
struct vport_percpu_stats *stats;
{
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;
u64_stats_update_begin(&stats->sync);
stats->rx_packets++;
stats->rx_bytes += skb->len;
@@
-485,7
+484,7
@@
int ovs_vport_send(struct vport *vport, struct sk_buff *skb)
if (likely(sent)) {
struct vport_percpu_stats *stats;
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++;
u64_stats_update_begin(&stats->sync);
stats->tx_packets++;