diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2014-01-04 00:57:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-04 20:10:24 -0500 |
commit | 8f84985fec10de64a6b4cdfea45f2b0ab8f07c78 (patch) | |
tree | 03d58e9d72384e8066a6232c793b3ee4242668f6 /net/bridge/br_private.h | |
parent | 653864d9dd6ae26d884abfd53420e61e7383b1da (diff) |
net: unify the pcpu_tstats and br_cpu_netstats as one
They are same, so unify them as one, pcpu_sw_netstats.
Define pcpu_sw_netstat in netdevice.h, remove pcpu_tstats
from if_tunnel and remove br_cpu_netstats from br_private.h
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_private.h')
-rw-r--r-- | net/bridge/br_private.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 2e77d923c8ee..3733f152351c 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h | |||
@@ -210,21 +210,13 @@ static inline struct net_bridge_port *br_port_get_rtnl(const struct net_device * | |||
210 | rtnl_dereference(dev->rx_handler_data) : NULL; | 210 | rtnl_dereference(dev->rx_handler_data) : NULL; |
211 | } | 211 | } |
212 | 212 | ||
213 | struct br_cpu_netstats { | ||
214 | u64 rx_packets; | ||
215 | u64 rx_bytes; | ||
216 | u64 tx_packets; | ||
217 | u64 tx_bytes; | ||
218 | struct u64_stats_sync syncp; | ||
219 | }; | ||
220 | |||
221 | struct net_bridge | 213 | struct net_bridge |
222 | { | 214 | { |
223 | spinlock_t lock; | 215 | spinlock_t lock; |
224 | struct list_head port_list; | 216 | struct list_head port_list; |
225 | struct net_device *dev; | 217 | struct net_device *dev; |
226 | 218 | ||
227 | struct br_cpu_netstats __percpu *stats; | 219 | struct pcpu_sw_netstats __percpu *stats; |
228 | spinlock_t hash_lock; | 220 | spinlock_t hash_lock; |
229 | struct hlist_head hash[BR_HASH_SIZE]; | 221 | struct hlist_head hash[BR_HASH_SIZE]; |
230 | #ifdef CONFIG_BRIDGE_NETFILTER | 222 | #ifdef CONFIG_BRIDGE_NETFILTER |