From: Tom Herbert Date: Mon, 28 Nov 2011 16:32:52 +0000 (+0000) Subject: net: Add netdev interfaces for recording sends/comp X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c5d67bd78c5dc540e3461c36fb3d389fbe0de4c3;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git net: Add netdev interfaces for recording sends/comp Add interfaces for drivers to call for recording number of packets and bytes at send time and transmit completion. Also, added a function to "reset" a queue. These will be used by Byte Queue Limits. Signed-off-by: Tom Herbert Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index d19f93265cac..9b24cc7a54d1 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1859,6 +1859,34 @@ static inline int netif_xmit_frozen_or_stopped(const struct netdev_queue *dev_qu return dev_queue->state & QUEUE_STATE_ANY_XOFF_OR_FROZEN; } +static inline void netdev_tx_sent_queue(struct netdev_queue *dev_queue, + unsigned int bytes) +{ +} + +static inline void netdev_sent_queue(struct net_device *dev, unsigned int bytes) +{ + netdev_tx_sent_queue(netdev_get_tx_queue(dev, 0), bytes); +} + +static inline void netdev_tx_completed_queue(struct netdev_queue *dev_queue, + unsigned pkts, unsigned bytes) +{ +} + +static inline void netdev_completed_queue(struct net_device *dev, + unsigned pkts, unsigned bytes) +{ + netdev_tx_completed_queue(netdev_get_tx_queue(dev, 0), pkts, bytes); +} + +static inline void netdev_tx_reset_queue(struct netdev_queue *q) +{ +} + +static inline void netdev_reset_queue(struct net_device *dev_queue) +{ + netdev_tx_reset_queue(netdev_get_tx_queue(dev_queue, 0)); } /**