aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/sched/sch_api.c10
-rw-r--r--net/sched/sch_mq.c13
2 files changed, 16 insertions, 7 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index c6e4063f698c..1367aa21fad5 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1116,12 +1116,16 @@ create_n_graft:
1116 tcm->tcm_parent, tcm->tcm_parent, 1116 tcm->tcm_parent, tcm->tcm_parent,
1117 tca, &err); 1117 tca, &err);
1118 else { 1118 else {
1119 unsigned int ntx = 0; 1119 struct netdev_queue *dev_queue;
1120 1120
1121 if (p && p->ops->cl_ops && p->ops->cl_ops->select_queue) 1121 if (p && p->ops->cl_ops && p->ops->cl_ops->select_queue)
1122 ntx = p->ops->cl_ops->select_queue(p, tcm); 1122 dev_queue = p->ops->cl_ops->select_queue(p, tcm);
1123 else if (p)
1124 dev_queue = p->dev_queue;
1125 else
1126 dev_queue = netdev_get_tx_queue(dev, 0);
1123 1127
1124 q = qdisc_create(dev, netdev_get_tx_queue(dev, ntx), p, 1128 q = qdisc_create(dev, dev_queue, p,
1125 tcm->tcm_parent, tcm->tcm_handle, 1129 tcm->tcm_parent, tcm->tcm_handle,
1126 tca, &err); 1130 tca, &err);
1127 } 1131 }
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
128static unsigned int mq_select_queue(struct Qdisc *sch, struct tcmsg *tcm) 128static 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
137static int mq_graft(struct Qdisc *sch, unsigned long cl, struct Qdisc *new, 142static int mq_graft(struct Qdisc *sch, unsigned long cl, struct Qdisc *new,