aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_dsmark.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-06-02 11:39:11 -0400
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-06-02 11:39:11 -0400
commit1c3f45ab2f7f879ea482501c83899505c31f7539 (patch)
tree672465b3b9b3e2e26a8caf74ed64aa6885c52c13 /net/sched/sch_dsmark.c
parent4bcff1b37e7c3aed914d1ce5b45994adc7dbf455 (diff)
parente0d6d71440a3a35c6fc2dde09f8e8d4d7bd44dda (diff)
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'net/sched/sch_dsmark.c')
-rw-r--r--net/sched/sch_dsmark.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index 8a3db9d95bab..d8bd2a569c7c 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -18,7 +18,7 @@
18#include <asm/byteorder.h> 18#include <asm/byteorder.h>
19 19
20 20
21#if 1 /* control */ 21#if 0 /* control */
22#define DPRINTK(format,args...) printk(KERN_DEBUG format,##args) 22#define DPRINTK(format,args...) printk(KERN_DEBUG format,##args)
23#else 23#else
24#define DPRINTK(format,args...) 24#define DPRINTK(format,args...)
@@ -73,8 +73,13 @@ static int dsmark_graft(struct Qdisc *sch,unsigned long arg,
73 73
74 DPRINTK("dsmark_graft(sch %p,[qdisc %p],new %p,old %p)\n",sch,p,new, 74 DPRINTK("dsmark_graft(sch %p,[qdisc %p],new %p,old %p)\n",sch,p,new,
75 old); 75 old);
76 if (!new) 76
77 new = &noop_qdisc; 77 if (new == NULL) {
78 new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops);
79 if (new == NULL)
80 new = &noop_qdisc;
81 }
82
78 sch_tree_lock(sch); 83 sch_tree_lock(sch);
79 *old = xchg(&p->q,new); 84 *old = xchg(&p->q,new);
80 if (*old) 85 if (*old)
@@ -163,14 +168,15 @@ static void dsmark_walk(struct Qdisc *sch,struct qdisc_walker *walker)
163 return; 168 return;
164 for (i = 0; i < p->indices; i++) { 169 for (i = 0; i < p->indices; i++) {
165 if (p->mask[i] == 0xff && !p->value[i]) 170 if (p->mask[i] == 0xff && !p->value[i])
166 continue; 171 goto ignore;
167 if (walker->count >= walker->skip) { 172 if (walker->count >= walker->skip) {
168 if (walker->fn(sch, i+1, walker) < 0) { 173 if (walker->fn(sch, i+1, walker) < 0) {
169 walker->stop = 1; 174 walker->stop = 1;
170 break; 175 break;
171 } 176 }
172 } 177 }
173 walker->count++; 178ignore:
179 walker->count++;
174 } 180 }
175} 181}
176 182