netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: hadi@cyberus.ca, netdev@oss.sgi.com
Subject: Re: patch: annoying u32 double listing
Date: Mon, 07 Feb 2005 00:17:30 +0100	[thread overview]
Message-ID: <4206A58A.9050909@trash.net> (raw)
In-Reply-To: <1107727330.1053.44.camel@jzny.localdomain>

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

jamal wrote:

>I should have caught that output missing divisor ;->
>Dave please apply Patricks version. Should probably apply cleanly on
>2.4.x as well.
>
My last patch has a similar problem, new hash tables added with
"u32 divisor .." are skipped while walking. This patch is better
tested and should be fine. Applies to 2.4 and 2.6.

Regards
Patrick


[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1341 bytes --]

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/02/07 00:16:17+01:00 kaber@coreworks.de 
#   [PKT_SCHED]: Fix u32 double listing
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/sched/cls_u32.c
#   2005/02/07 00:16:08+01:00 kaber@coreworks.de +5 -0
#   [PKT_SCHED]: Fix u32 double listing
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
diff -Nru a/net/sched/cls_u32.c b/net/sched/cls_u32.c
--- a/net/sched/cls_u32.c	2005-02-07 00:16:37 +01:00
+++ b/net/sched/cls_u32.c	2005-02-07 00:16:37 +01:00
@@ -91,6 +91,7 @@
 {
 	struct tc_u_hnode	*next;
 	u32			handle;
+	u32			prio;
 	struct tc_u_common	*tp_c;
 	int			refcnt;
 	unsigned		divisor;
@@ -323,6 +324,7 @@
 	root_ht->divisor = 0;
 	root_ht->refcnt++;
 	root_ht->handle = tp_c ? gen_new_htid(tp_c) : 0x80000000;
+	root_ht->prio = tp->prio;
 
 	if (tp_c == NULL) {
 		tp_c = kmalloc(sizeof(*tp_c), GFP_KERNEL);
@@ -587,6 +589,7 @@
 		ht->refcnt = 0;
 		ht->divisor = divisor;
 		ht->handle = handle;
+		ht->prio = tp->prio;
 		ht->next = tp_c->hlist;
 		tp_c->hlist = ht;
 		*arg = (unsigned long)ht;
@@ -703,6 +706,8 @@
 		return;
 
 	for (ht = tp_c->hlist; ht; ht = ht->next) {
+		if (ht->prio != tp->prio)
+			continue;
 		if (arg->count >= arg->skip) {
 			if (arg->fn(tp, (unsigned long)ht, arg) < 0) {
 				arg->stop = 1;

  reply	other threads:[~2005-02-06 23:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-06 19:49 patch: annoying u32 double listing jamal
2005-02-06 20:44 ` 2.4.29 version: " jamal
2005-02-06 21:29 ` Thomas Graf
2005-02-06 21:42   ` jamal
2005-02-06 22:24     ` Thomas Graf
2005-02-06 21:47   ` Patrick McHardy
2005-02-06 22:12     ` Thomas Graf
2005-02-06 21:39 ` Patrick McHardy
2005-02-06 21:55   ` Patrick McHardy
2005-02-06 22:02   ` jamal
2005-02-06 23:17     ` Patrick McHardy [this message]
2005-02-07  6:36       ` David S. Miller
2005-02-07 13:49         ` jamal
2005-02-09  4:56       ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4206A58A.9050909@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=hadi@cyberus.ca \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).