Subject: [PATCH 5/5] PKT_SCHED: Qdisc are not supposed to dump TCA_STATS themselves

From: Thomas Graf <[email-masked]>
Date: Thu, 7 Oct 2004 03:08:19 +0200

hfsc and htb qdisc are not supposed to copy TCA_STATS
on their own and queue length statistic is already
updated in generic code part.

Signed-off-by: Thomas Graf <[email-masked]>

diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_hfsc.c linux-2.6.9-rc3-bk6/net/sched/sch_hfsc.c
--- linux-2.6.9-rc3-bk6.orig/net/sched/sch_hfsc.c	2004-10-07 00:32:25.000000000 +0200
+++ linux-2.6.9-rc3-bk6/net/sched/sch_hfsc.c	2004-10-07 00:55:35.000000000 +0200
@@ -1653,11 +1653,6 @@
 
 	qopt.defcls = q->defcls;
 	RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt);
-
-	sch->stats.qlen = sch->q.qlen;
-	if (qdisc_copy_stats(skb, &sch->stats, sch->stats_lock) < 0)
-		goto rtattr_failure;
-
 	return skb->len;
 
  rtattr_failure:
diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_htb.c linux-2.6.9-rc3-bk6/net/sched/sch_htb.c
--- linux-2.6.9-rc3-bk6.orig/net/sched/sch_htb.c	2004-10-07 00:32:25.000000000 +0200
+++ linux-2.6.9-rc3-bk6/net/sched/sch_htb.c	2004-10-07 00:55:22.000000000 +0200
@@ -1332,8 +1332,6 @@
 	RTA_PUT(skb, TCA_OPTIONS, 0, NULL);
 	RTA_PUT(skb, TCA_HTB_INIT, sizeof(gopt), &gopt);
 	rta->rta_len = skb->tail - b;
-	sch->stats.qlen = sch->q.qlen;
-	RTA_PUT(skb, TCA_STATS, sizeof(sch->stats), &sch->stats);
 	HTB_QUNLOCK(sch);
 	return skb->len;
 rtattr_failure: