netdev
[Top] [All Lists]

Re: [PATCH 2.6 3/5]: Use double-linked list for dev->qdisc_list

To: Patrick McHardy <kaber@xxxxxxxxx>
Subject: Re: [PATCH 2.6 3/5]: Use double-linked list for dev->qdisc_list
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Wed, 4 Aug 2004 09:43:08 -0700
Cc: netdev@xxxxxxxxxxx
In-reply-to: <410FAE42.2050909@trash.net>
References: <410FAE42.2050909@trash.net>
Sender: netdev-bounce@xxxxxxxxxxx
On Tue, 03 Aug 2004 17:24:50 +0200
Patrick McHardy <kaber@xxxxxxxxx> 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:

@@ -831,7 +832,7 @@
        read_unlock(&dev_base_lock);
 
        cb->args[0] = idx;
-       cb->args[1] = q_idx;
+       cb->args[1] = q_idx - 1;
 
        return skb->len;
 }

The changes to the qdisc_list traversal loop above this hunk does not
change what the final q_idx value is going to be.  The simplest
example is if the list is empty, for which q_idx will end up being
zero both before and after your changes.

Please enlighten me :)

<Prev in Thread] Current Thread [Next in Thread>