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.h29
1 files changed, 4 insertions, 25 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ba72f6baae1a..ae721f53739e 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -543,7 +543,7 @@ struct netdev_queue {
543 * read mostly part 543 * read mostly part
544 */ 544 */
545 struct net_device *dev; 545 struct net_device *dev;
546 struct Qdisc *qdisc; 546 struct Qdisc __rcu *qdisc;
547 struct Qdisc *qdisc_sleeping; 547 struct Qdisc *qdisc_sleeping;
548#ifdef CONFIG_SYSFS 548#ifdef CONFIG_SYSFS
549 struct kobject kobj; 549 struct kobject kobj;
@@ -2356,12 +2356,7 @@ static inline void input_queue_tail_incr_save(struct softnet_data *sd,
2356DECLARE_PER_CPU_ALIGNED(struct softnet_data, softnet_data); 2356DECLARE_PER_CPU_ALIGNED(struct softnet_data, softnet_data);
2357 2357
2358void __netif_schedule(struct Qdisc *q); 2358void __netif_schedule(struct Qdisc *q);
2359 2359void netif_schedule_queue(struct netdev_queue *txq);
2360static inline void netif_schedule_queue(struct netdev_queue *txq)
2361{
2362 if (!(txq->state & QUEUE_STATE_ANY_XOFF))
2363 __netif_schedule(txq->qdisc);
2364}
2365 2360
2366static inline void netif_tx_schedule_all(struct net_device *dev) 2361static inline void netif_tx_schedule_all(struct net_device *dev)
2367{ 2362{
@@ -2397,11 +2392,7 @@ static inline void netif_tx_start_all_queues(struct net_device *dev)
2397 } 2392 }
2398} 2393}
2399 2394
2400static inline void netif_tx_wake_queue(struct netdev_queue *dev_queue) 2395void netif_tx_wake_queue(struct netdev_queue *dev_queue);
2401{
2402 if (test_and_clear_bit(__QUEUE_STATE_DRV_XOFF, &dev_queue->state))
2403 __netif_schedule(dev_queue->qdisc);
2404}
2405 2396
2406/** 2397/**
2407 * netif_wake_queue - restart transmit 2398 * netif_wake_queue - restart transmit
@@ -2673,19 +2664,7 @@ static inline bool netif_subqueue_stopped(const struct net_device *dev,
2673 return __netif_subqueue_stopped(dev, skb_get_queue_mapping(skb)); 2664 return __netif_subqueue_stopped(dev, skb_get_queue_mapping(skb));
2674} 2665}
2675 2666
2676/** 2667void netif_wake_subqueue(struct net_device *dev, u16 queue_index);
2677 * netif_wake_subqueue - allow sending packets on subqueue
2678 * @dev: network device
2679 * @queue_index: sub queue index
2680 *
2681 * Resume individual transmit queue of a device with multiple transmit queues.
2682 */
2683static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index)
2684{
2685 struct netdev_queue *txq = netdev_get_tx_queue(dev, queue_index);
2686 if (test_and_clear_bit(__QUEUE_STATE_DRV_XOFF, &txq->state))
2687 __netif_schedule(txq->qdisc);
2688}
2689 2668
2690#ifdef CONFIG_XPS 2669#ifdef CONFIG_XPS
2691int netif_set_xps_queue(struct net_device *dev, const struct cpumask *mask, 2670int netif_set_xps_queue(struct net_device *dev, const struct cpumask *mask,