aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_multiq.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /net/sched/sch_multiq.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'net/sched/sch_multiq.c')
-rw-r--r--net/sched/sch_multiq.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c
index 6ae251279fc2..edc1950e0e77 100644
--- a/net/sched/sch_multiq.c
+++ b/net/sched/sch_multiq.c
@@ -83,8 +83,6 @@ multiq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
83 83
84 ret = qdisc_enqueue(skb, qdisc); 84 ret = qdisc_enqueue(skb, qdisc);
85 if (ret == NET_XMIT_SUCCESS) { 85 if (ret == NET_XMIT_SUCCESS) {
86 sch->bstats.bytes += qdisc_pkt_len(skb);
87 sch->bstats.packets++;
88 sch->q.qlen++; 86 sch->q.qlen++;
89 return NET_XMIT_SUCCESS; 87 return NET_XMIT_SUCCESS;
90 } 88 }
@@ -113,6 +111,7 @@ static struct sk_buff *multiq_dequeue(struct Qdisc *sch)
113 qdisc = q->queues[q->curband]; 111 qdisc = q->queues[q->curband];
114 skb = qdisc->dequeue(qdisc); 112 skb = qdisc->dequeue(qdisc);
115 if (skb) { 113 if (skb) {
114 qdisc_bstats_update(sch, skb);
116 sch->q.qlen--; 115 sch->q.qlen--;
117 return skb; 116 return skb;
118 } 117 }
@@ -157,7 +156,7 @@ static unsigned int multiq_drop(struct Qdisc *sch)
157 unsigned int len; 156 unsigned int len;
158 struct Qdisc *qdisc; 157 struct Qdisc *qdisc;
159 158
160 for (band = q->bands-1; band >= 0; band--) { 159 for (band = q->bands - 1; band >= 0; band--) {
161 qdisc = q->queues[band]; 160 qdisc = q->queues[band];
162 if (qdisc->ops->drop) { 161 if (qdisc->ops->drop) {
163 len = qdisc->ops->drop(qdisc); 162 len = qdisc->ops->drop(qdisc);
@@ -227,8 +226,7 @@ static int multiq_tune(struct Qdisc *sch, struct nlattr *opt)
227 for (i = 0; i < q->bands; i++) { 226 for (i = 0; i < q->bands; i++) {
228 if (q->queues[i] == &noop_qdisc) { 227 if (q->queues[i] == &noop_qdisc) {
229 struct Qdisc *child, *old; 228 struct Qdisc *child, *old;
230 child = qdisc_create_dflt(qdisc_dev(sch), 229 child = qdisc_create_dflt(sch->dev_queue,
231 sch->dev_queue,
232 &pfifo_qdisc_ops, 230 &pfifo_qdisc_ops,
233 TC_H_MAKE(sch->handle, 231 TC_H_MAKE(sch->handle,
234 i + 1)); 232 i + 1));
@@ -267,7 +265,7 @@ static int multiq_init(struct Qdisc *sch, struct nlattr *opt)
267 for (i = 0; i < q->max_bands; i++) 265 for (i = 0; i < q->max_bands; i++)
268 q->queues[i] = &noop_qdisc; 266 q->queues[i] = &noop_qdisc;
269 267
270 err = multiq_tune(sch,opt); 268 err = multiq_tune(sch, opt);
271 269
272 if (err) 270 if (err)
273 kfree(q->queues); 271 kfree(q->queues);
@@ -348,7 +346,7 @@ static int multiq_dump_class(struct Qdisc *sch, unsigned long cl,
348 struct multiq_sched_data *q = qdisc_priv(sch); 346 struct multiq_sched_data *q = qdisc_priv(sch);
349 347
350 tcm->tcm_handle |= TC_H_MIN(cl); 348 tcm->tcm_handle |= TC_H_MIN(cl);
351 tcm->tcm_info = q->queues[cl-1]->handle; 349 tcm->tcm_info = q->queues[cl - 1]->handle;
352 return 0; 350 return 0;
353} 351}
354 352
@@ -380,7 +378,7 @@ static void multiq_walk(struct Qdisc *sch, struct qdisc_walker *arg)
380 arg->count++; 378 arg->count++;
381 continue; 379 continue;
382 } 380 }
383 if (arg->fn(sch, band+1, arg) < 0) { 381 if (arg->fn(sch, band + 1, arg) < 0) {
384 arg->stop = 1; 382 arg->stop = 1;
385 break; 383 break;
386 } 384 }