aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h3
-rw-r--r--include/net/sch_generic.h12
2 files changed, 11 insertions, 4 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 40291f375024..5e6188d9f017 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1656,6 +1656,9 @@ static inline int netif_is_multiqueue(const struct net_device *dev)
1656 return (dev->num_tx_queues > 1); 1656 return (dev->num_tx_queues > 1);
1657} 1657}
1658 1658
1659extern void netif_set_real_num_tx_queues(struct net_device *dev,
1660 unsigned int txq);
1661
1659/* Use this variant when it is known for sure that it 1662/* Use this variant when it is known for sure that it
1660 * is executing from hardware interrupt context or with hardware interrupts 1663 * is executing from hardware interrupt context or with hardware interrupts
1661 * disabled. 1664 * disabled.
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index ba749be1e354..433604bb3fe8 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -313,13 +313,12 @@ extern void qdisc_calculate_pkt_len(struct sk_buff *skb,
313extern void tcf_destroy(struct tcf_proto *tp); 313extern void tcf_destroy(struct tcf_proto *tp);
314extern void tcf_destroy_chain(struct tcf_proto **fl); 314extern void tcf_destroy_chain(struct tcf_proto **fl);
315 315
316/* Reset all TX qdiscs of a device. */ 316/* Reset all TX qdiscs greater then index of a device. */
317static inline void qdisc_reset_all_tx(struct net_device *dev) 317static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i)
318{ 318{
319 unsigned int i;
320 struct Qdisc *qdisc; 319 struct Qdisc *qdisc;
321 320
322 for (i = 0; i < dev->num_tx_queues; i++) { 321 for (; i < dev->num_tx_queues; i++) {
323 qdisc = netdev_get_tx_queue(dev, i)->qdisc; 322 qdisc = netdev_get_tx_queue(dev, i)->qdisc;
324 if (qdisc) { 323 if (qdisc) {
325 spin_lock_bh(qdisc_lock(qdisc)); 324 spin_lock_bh(qdisc_lock(qdisc));
@@ -329,6 +328,11 @@ static inline void qdisc_reset_all_tx(struct net_device *dev)
329 } 328 }
330} 329}
331 330
331static inline void qdisc_reset_all_tx(struct net_device *dev)
332{
333 qdisc_reset_all_tx_gt(dev, 0);
334}
335
332/* Are all TX queues of the device empty? */ 336/* Are all TX queues of the device empty? */
333static inline bool qdisc_all_tx_empty(const struct net_device *dev) 337static inline bool qdisc_all_tx_empty(const struct net_device *dev)
334{ 338{