aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-01-12 07:13:14 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-14 00:44:34 -0500
commit1ac9ad1394fa542ac7ae0dc943ee3cda678799fa (patch)
treed846be421ed68f4fc612ae7c061783dab73d5fa2 /include/linux/netdevice.h
parent1949e084bfd143c76e22c0b37f370d6e7bf4bfdd (diff)
net: remove dev_txq_stats_fold()
After recent changes, (percpu stats on vlan/tunnels...), we dont need anymore per struct netdev_queue tx_bytes/tx_packets/tx_dropped counters. Only remaining users are ixgbe, sch_teql, gianfar & macvlan : 1) ixgbe can be converted to use existing tx_ring counters. 2) macvlan incremented txq->tx_dropped, it can use the dev->stats.tx_dropped counter. 3) sch_teql : almost revert ab35cd4b8f42 (Use net_device internal stats) Now we have ndo_get_stats64(), use it, even for "unsigned long" fields (No need to bring back a struct net_device_stats) 4) gianfar adds a stats structure per tx queue to hold tx_bytes/tx_packets This removes a lockdep warning (and possible lockup) in rndis gadget, calling dev_get_stats() from hard IRQ context. Ref: http://www.spinics.net/lists/netdev/msg149202.html Reported-by: Neil Jones <neiljay@gmail.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Jarek Poplawski <jarkao2@gmail.com> CC: Alexander Duyck <alexander.h.duyck@intel.com> CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com> CC: Sandeep Gopalpet <sandeep.kumar@freescale.com> CC: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index be4957cf6511..d971346b0340 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -520,9 +520,6 @@ struct netdev_queue {
520 * please use this field instead of dev->trans_start 520 * please use this field instead of dev->trans_start
521 */ 521 */
522 unsigned long trans_start; 522 unsigned long trans_start;
523 u64 tx_bytes;
524 u64 tx_packets;
525 u64 tx_dropped;
526} ____cacheline_aligned_in_smp; 523} ____cacheline_aligned_in_smp;
527 524
528static inline int netdev_queue_numa_node_read(const struct netdev_queue *q) 525static inline int netdev_queue_numa_node_read(const struct netdev_queue *q)
@@ -2265,8 +2262,6 @@ extern void dev_load(struct net *net, const char *name);
2265extern void dev_mcast_init(void); 2262extern void dev_mcast_init(void);
2266extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, 2263extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
2267 struct rtnl_link_stats64 *storage); 2264 struct rtnl_link_stats64 *storage);
2268extern void dev_txq_stats_fold(const struct net_device *dev,
2269 struct rtnl_link_stats64 *stats);
2270 2265
2271extern int netdev_max_backlog; 2266extern int netdev_max_backlog;
2272extern int netdev_tstamp_prequeue; 2267extern int netdev_tstamp_prequeue;