netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2 (resend)] Fix TBF class reporting (tc class show)
@ 2004-03-23  6:08 Dmitry Torokhov
  2004-03-23  6:08 ` [PATCH 2/2 (resend)] TBF trailing whitespace fixes Dmitry Torokhov
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2004-03-23  6:08 UTC (permalink / raw)
  To: linux-net; +Cc: netdev

Hi,

The patch below fixes issue with "tc class show dev <dev>" not showing any
classes when TBF qdisc is present in the chain. PLease copnsider for
inclusion.

-- 
Dmitry


===================================================================


ChangeSet@1.1648, 2004-03-05 01:02:36-05:00, dtor_core@ameritech.net
  NET: Fix class reporting in TBF qdisc


 sch_tbf.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)


===================================================================



diff -Nru a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
--- a/net/sched/sch_tbf.c	Fri Mar  5 01:26:33 2004
+++ b/net/sched/sch_tbf.c	Fri Mar  5 01:26:33 2004
@@ -434,8 +434,7 @@
 	if (cl != 1) 	/* only one class */ 
 		return -ENOENT;
     
-	tcm->tcm_parent = TC_H_ROOT;
-	tcm->tcm_handle = 1;
+	tcm->tcm_handle |= TC_H_MIN(1);
 	tcm->tcm_info = q->qdisc->handle;
 
 	return 0;
@@ -486,11 +485,9 @@
 
 static void tbf_walk(struct Qdisc *sch, struct qdisc_walker *walker)
 {
-	struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data;
-
 	if (!walker->stop) {
-		if (walker->count >= walker->skip) 
-			if (walker->fn(sch, (unsigned long)q, walker) < 0) { 
+		if (walker->count >= walker->skip)
+			if (walker->fn(sch, 1, walker) < 0) {
 				walker->stop = 1;
 				return;
 			}

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-03-25 20:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-23  6:08 [PATCH 1/2 (resend)] Fix TBF class reporting (tc class show) Dmitry Torokhov
2004-03-23  6:08 ` [PATCH 2/2 (resend)] TBF trailing whitespace fixes Dmitry Torokhov
2004-03-24 21:59   ` David S. Miller
2004-03-25  4:54     ` Dmitry Torokhov
2004-03-25 20:59       ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).