Browse Source

[PKT_SCHED]: make dsmark try using pfifo instead of noop while grafting

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Thomas Graf 20 years ago
parent
commit
486b53e59c
1 changed files with 7 additions and 2 deletions
  1. 7 2
      net/sched/sch_dsmark.c

+ 7 - 2
net/sched/sch_dsmark.c

@@ -73,8 +73,13 @@ static int dsmark_graft(struct Qdisc *sch,unsigned long arg,
 
 
 	DPRINTK("dsmark_graft(sch %p,[qdisc %p],new %p,old %p)\n",sch,p,new,
 	DPRINTK("dsmark_graft(sch %p,[qdisc %p],new %p,old %p)\n",sch,p,new,
 	    old);
 	    old);
-	if (!new)
-		new = &noop_qdisc;
+
+	if (new == NULL) {
+		new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops);
+		if (new == NULL)
+			new = &noop_qdisc;
+	}
+
 	sch_tree_lock(sch);
 	sch_tree_lock(sch);
 	*old = xchg(&p->q,new);
 	*old = xchg(&p->q,new);
 	if (*old)
 	if (*old)