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>
This commit is contained in:

committed by
David S. Miller

parent
653864d9dd
commit
8f84985fec
@@ -210,21 +210,13 @@ static inline struct net_bridge_port *br_port_get_rtnl(const struct net_device *
|
||||
rtnl_dereference(dev->rx_handler_data) : NULL;
|
||||
}
|
||||
|
||||
struct br_cpu_netstats {
|
||||
u64 rx_packets;
|
||||
u64 rx_bytes;
|
||||
u64 tx_packets;
|
||||
u64 tx_bytes;
|
||||
struct u64_stats_sync syncp;
|
||||
};
|
||||
|
||||
struct net_bridge
|
||||
{
|
||||
spinlock_t lock;
|
||||
struct list_head port_list;
|
||||
struct net_device *dev;
|
||||
|
||||
struct br_cpu_netstats __percpu *stats;
|
||||
struct pcpu_sw_netstats __percpu *stats;
|
||||
spinlock_t hash_lock;
|
||||
struct hlist_head hash[BR_HASH_SIZE];
|
||||
#ifdef CONFIG_BRIDGE_NETFILTER
|
||||
|
Reference in New Issue
Block a user