diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2013-04-15 16:30:37 -0400 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2013-04-15 17:56:25 -0400 |
commit | e0f0ecf33c3f13401f90bff5afdc3ed1bb40b9af (patch) | |
tree | 128ce5d78983ae8df32a70a3fd4344ab5216448d /net/openvswitch/vport.h | |
parent | 8e4e1713e4978447c5f799aa668dcc6d2cb0dee9 (diff) |
openvswitch: Use generic struct pcpu_tstats.
Rather than defining ovs specific stats struct (vport_percpu_stats),
we can use existing pcpu_tstats to achieve exactly same functionality.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch/vport.h')
-rw-r--r-- | net/openvswitch/vport.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h index 7282b8436ba7..7ba08c30b853 100644 --- a/net/openvswitch/vport.h +++ b/net/openvswitch/vport.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #ifndef VPORT_H | 19 | #ifndef VPORT_H |
20 | #define VPORT_H 1 | 20 | #define VPORT_H 1 |
21 | 21 | ||
22 | #include <linux/if_tunnel.h> | ||
22 | #include <linux/list.h> | 23 | #include <linux/list.h> |
23 | #include <linux/netlink.h> | 24 | #include <linux/netlink.h> |
24 | #include <linux/openvswitch.h> | 25 | #include <linux/openvswitch.h> |
@@ -50,14 +51,6 @@ int ovs_vport_send(struct vport *, struct sk_buff *); | |||
50 | 51 | ||
51 | /* The following definitions are for implementers of vport devices: */ | 52 | /* The following definitions are for implementers of vport devices: */ |
52 | 53 | ||
53 | struct vport_percpu_stats { | ||
54 | u64 rx_bytes; | ||
55 | u64 rx_packets; | ||
56 | u64 tx_bytes; | ||
57 | u64 tx_packets; | ||
58 | struct u64_stats_sync sync; | ||
59 | }; | ||
60 | |||
61 | struct vport_err_stats { | 54 | struct vport_err_stats { |
62 | u64 rx_dropped; | 55 | u64 rx_dropped; |
63 | u64 rx_errors; | 56 | u64 rx_errors; |
@@ -89,7 +82,7 @@ struct vport { | |||
89 | struct hlist_node dp_hash_node; | 82 | struct hlist_node dp_hash_node; |
90 | const struct vport_ops *ops; | 83 | const struct vport_ops *ops; |
91 | 84 | ||
92 | struct vport_percpu_stats __percpu *percpu_stats; | 85 | struct pcpu_tstats __percpu *percpu_stats; |
93 | 86 | ||
94 | spinlock_t stats_lock; | 87 | spinlock_t stats_lock; |
95 | struct vport_err_stats err_stats; | 88 | struct vport_err_stats err_stats; |