All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@redhat.com>
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH 2.6 3/5]: Use double-linked list for dev->qdisc_list
Date: Wed, 04 Aug 2004 21:55:34 +0200	[thread overview]
Message-ID: <41113F36.8050204@trash.net> (raw)
In-Reply-To: <20040804094308.606f79bd.davem@redhat.com>

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

David S. Miller wrote:

>On Tue, 03 Aug 2004 17:24:50 +0200
>Patrick McHardy <kaber@trash.net> wrote:
>
>  
>
>>This patch changes dev->qdisc_list to a double-linked list. This solves
>>the performance problems when destroying qdiscs with large number of inner
>>qdiscs.
>>    
>>
>
>I don't see how this bit is correct:
>  
>
You're right. This patch on top fixes the problem.


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

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/08/04 21:51:04+02:00 kaber@coreworks.de 
#   [PKT_SCHED]: Fix q_idx calculation in tc_dump_qdisc
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/sched/sch_api.c
#   2004/08/04 21:50:44+02:00 kaber@coreworks.de +5 -2
#   [PKT_SCHED]: Fix q_idx calculation in tc_dump_qdisc
# 
diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c
--- a/net/sched/sch_api.c	2004-08-04 21:55:13 +02:00
+++ b/net/sched/sch_api.c	2004-08-04 21:55:13 +02:00
@@ -817,13 +817,16 @@
 		read_lock_bh(&qdisc_tree_lock);
 		q_idx = 0;
 		list_for_each_entry(q, &dev->qdisc_list, list) {
-			if (q_idx++ < s_q_idx)
+			if (q_idx < s_q_idx) {
+				q_idx++;
 				continue;
+			}
 			if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid,
 					  cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) {
 				read_unlock_bh(&qdisc_tree_lock);
 				goto done;
 			}
+			q_idx++;
 		}
 		read_unlock_bh(&qdisc_tree_lock);
 	}
@@ -832,7 +835,7 @@
 	read_unlock(&dev_base_lock);
 
 	cb->args[0] = idx;
-	cb->args[1] = q_idx - 1;
+	cb->args[1] = q_idx;
 
 	return skb->len;
 }

  reply	other threads:[~2004-08-04 19:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-03 15:24 [PATCH 2.6 3/5]: Use double-linked list for dev->qdisc_list Patrick McHardy
2004-08-03 15:35 ` Stephen Hemminger
2004-08-03 19:22   ` Patrick McHardy
2004-08-03 15:38 ` [PATCH 2.6] cache align qdisc data Stephen Hemminger
2004-08-03 19:17   ` Patrick McHardy
2004-08-03 20:31     ` Stephen Hemminger
2004-08-03 20:42       ` Patrick McHardy
2004-08-03 21:05         ` Stephen Hemminger
2004-08-04 16:51           ` David S. Miller
2004-08-04 16:43 ` [PATCH 2.6 3/5]: Use double-linked list for dev->qdisc_list David S. Miller
2004-08-04 19:55   ` Patrick McHardy [this message]
2004-08-04 20:43     ` 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=41113F36.8050204@trash.net \
    --to=kaber@trash.net \
    --cc=davem@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.