aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index dc1d9ed33b31..857f8abf7b91 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3190,6 +3190,26 @@ static inline void netdev_tx_sent_queue(struct netdev_queue *dev_queue,
3190#endif 3190#endif
3191} 3191}
3192 3192
3193/* Variant of netdev_tx_sent_queue() for drivers that are aware
3194 * that they should not test BQL status themselves.
3195 * We do want to change __QUEUE_STATE_STACK_XOFF only for the last
3196 * skb of a batch.
3197 * Returns true if the doorbell must be used to kick the NIC.
3198 */
3199static inline bool __netdev_tx_sent_queue(struct netdev_queue *dev_queue,
3200 unsigned int bytes,
3201 bool xmit_more)
3202{
3203 if (xmit_more) {
3204#ifdef CONFIG_BQL
3205 dql_queued(&dev_queue->dql, bytes);
3206#endif
3207 return netif_tx_queue_stopped(dev_queue);
3208 }
3209 netdev_tx_sent_queue(dev_queue, bytes);
3210 return true;
3211}
3212
3193/** 3213/**
3194 * netdev_sent_queue - report the number of bytes queued to hardware 3214 * netdev_sent_queue - report the number of bytes queued to hardware
3195 * @dev: network device 3215 * @dev: network device