Skip to contentSkip to conversation

net: add dev_txq_stats_fold() helper

PATCH Applied Eric Dumazet 2 participants 2 messages Nov 16, 2009 – Nov 18, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 net: add dev_txq_stats_fold() helper

Some drivers ndo_get_stats() method need to perform txqueue stats folding.

Move folding from dev_get_stats() to a new dev_txq_stats_fold() function

---
 include/linux/netdevice.h |    1 
 net/core/dev.c            |   48 +++++++++++++++++++++---------------
 2 files changed, 30 insertions(+), 19 deletions(-)
include/linux/netdevice.h +1 -0
index 7043f85..c8fa462 100644
@@ -1941,6 +1941,7 @@ extern void		netdev_features_change(struct net_device *dev);
 extern void		dev_load(struct net *net, const char *name);
 extern void		dev_mcast_init(void);
 extern const struct net_device_stats *dev_get_stats(struct net_device *dev);
+extern void		dev_txq_stats_fold(const struct net_device *dev, struct net_device_stats *stats);
 
 extern int		netdev_max_backlog;
 extern int		weight_p;
net/core/dev.c +29 -19

60 lines not on this page · raw message

maintainer Applied
#1 lore raw

From: Eric Dumazet <[email protected]>
Date: Mon, 16 Nov 2009 14:36:51 +0100

Quoted 5 lines

Some drivers ndo_get_stats() method need to perform txqueue stats folding.

Move folding from dev_get_stats() to a new dev_txq_stats_fold() function

Applied.