aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLi RongQing <roy.qing.li@gmail.com>2014-01-04 00:57:59 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-04 20:10:24 -0500
commit8f84985fec10de64a6b4cdfea45f2b0ab8f07c78 (patch)
tree03d58e9d72384e8066a6232c793b3ee4242668f6 /include/linux
parent653864d9dd6ae26d884abfd53420e61e7383b1da (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 'include/linux')
-rw-r--r--include/linux/if_tunnel.h9
-rw-r--r--include/linux/netdevice.h11
2 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h
index f4e56ecd0b1a..712710bc0580 100644
--- a/include/linux/if_tunnel.h
+++ b/include/linux/if_tunnel.h
@@ -13,13 +13,4 @@
13#define for_each_ip_tunnel_rcu(pos, start) \ 13#define for_each_ip_tunnel_rcu(pos, start) \
14 for (pos = rcu_dereference(start); pos; pos = rcu_dereference(pos->next)) 14 for (pos = rcu_dereference(start); pos; pos = rcu_dereference(pos->next))
15 15
16/* often modified stats are per cpu, other are shared (netdev->stats) */
17struct pcpu_tstats {
18 u64 rx_packets;
19 u64 rx_bytes;
20 u64 tx_packets;
21 u64 tx_bytes;
22 struct u64_stats_sync syncp;
23};
24
25#endif /* _IF_TUNNEL_H_ */ 16#endif /* _IF_TUNNEL_H_ */
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index bec60c481966..51c0fe258163 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1409,7 +1409,7 @@ struct net_device {
1409 union { 1409 union {
1410 void *ml_priv; 1410 void *ml_priv;
1411 struct pcpu_lstats __percpu *lstats; /* loopback stats */ 1411 struct pcpu_lstats __percpu *lstats; /* loopback stats */
1412 struct pcpu_tstats __percpu *tstats; /* tunnel stats */ 1412 struct pcpu_sw_netstats __percpu *tstats;
1413 struct pcpu_dstats __percpu *dstats; /* dummy stats */ 1413 struct pcpu_dstats __percpu *dstats; /* dummy stats */
1414 struct pcpu_vstats __percpu *vstats; /* veth stats */ 1414 struct pcpu_vstats __percpu *vstats; /* veth stats */
1415 }; 1415 };
@@ -1685,6 +1685,15 @@ struct packet_offload {
1685 struct list_head list; 1685 struct list_head list;
1686}; 1686};
1687 1687
1688/* often modified stats are per cpu, other are shared (netdev->stats) */
1689struct pcpu_sw_netstats {
1690 u64 rx_packets;
1691 u64 rx_bytes;
1692 u64 tx_packets;
1693 u64 tx_bytes;
1694 struct u64_stats_sync syncp;
1695};
1696
1688#include <linux/notifier.h> 1697#include <linux/notifier.h>
1689 1698
1690/* netdevice notifier chain. Please remember to update the rtnetlink 1699/* netdevice notifier chain. Please remember to update the rtnetlink