diff options
Diffstat (limited to 'net/sched/sch_mq.c')
-rw-r--r-- | net/sched/sch_mq.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/net/sched/sch_mq.c b/net/sched/sch_mq.c index dd5ee022f1f7..600c50143cc7 100644 --- a/net/sched/sch_mq.c +++ b/net/sched/sch_mq.c | |||
@@ -125,13 +125,18 @@ static struct netdev_queue *mq_queue_get(struct Qdisc *sch, unsigned long cl) | |||
125 | return netdev_get_tx_queue(dev, ntx); | 125 | return netdev_get_tx_queue(dev, ntx); |
126 | } | 126 | } |
127 | 127 | ||
128 | static unsigned int mq_select_queue(struct Qdisc *sch, struct tcmsg *tcm) | 128 | static struct netdev_queue *mq_select_queue(struct Qdisc *sch, |
129 | struct tcmsg *tcm) | ||
129 | { | 130 | { |
130 | unsigned int ntx = TC_H_MIN(tcm->tcm_parent); | 131 | unsigned int ntx = TC_H_MIN(tcm->tcm_parent); |
132 | struct netdev_queue *dev_queue = mq_queue_get(sch, ntx); | ||
131 | 133 | ||
132 | if (!mq_queue_get(sch, ntx)) | 134 | if (!dev_queue) { |
133 | return 0; | 135 | struct net_device *dev = qdisc_dev(sch); |
134 | return ntx - 1; | 136 | |
137 | return netdev_get_tx_queue(dev, 0); | ||
138 | } | ||
139 | return dev_queue; | ||
135 | } | 140 | } |
136 | 141 | ||
137 | static int mq_graft(struct Qdisc *sch, unsigned long cl, struct Qdisc *new, | 142 | static int mq_graft(struct Qdisc *sch, unsigned long cl, struct Qdisc *new, |