netdev
[Top] [All Lists]

Re: PROBLEM: IProute hangs after running traffic shaping scripts

To: Patrick McHardy <kaber@xxxxxxxxx>
Subject: Re: PROBLEM: IProute hangs after running traffic shaping scripts
From: Thomas Graf <tgraf@xxxxxxx>
Date: Mon, 8 Nov 2004 19:33:00 +0100
Cc: Szymon Miotk <spam@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <418F9AD0.1040701@xxxxxxxxx>
References: <418B4C7C.8000402@xxxxxxxxxxxxx> <418EA032.7050507@xxxxxxxxx> <418ECE85.9090203@xxxxxxxxx> <20041108135431.GE31969@xxxxxxxxxxxxxx> <418F9AD0.1040701@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
* Patrick McHardy <418F9AD0.1040701@xxxxxxxxx> 2004-11-08 17:12
> Thomas Graf wrote:
> 
> >>+   /* unlink inner qdiscs from dev->qdisc_list immediately */
> >>+   if (qdisc->ops->cl_ops != NULL)
> >>+           list_add(&qdisc->list, &cql);
> >>   
> >>
> >
> >I think you should extend the above to:
> >
> >if (qdisc->ops->cl_ops != NULL && !list_empty(&qdisc->list))
> >
> >Otherwise you might unlink entries just added before the
> >rcu callback and it prevents an unneeded attempt to delete
> >qdiscs for inner classful qdiscs
> > 
> >
> There is some optimization possible, I will do this for the final
> patch. But I don't understand the problem you refer to, can you
> please explain ?

I don't have the time to verify this at the moment but:

1) qdisc_destroy unlinking all the lists
2) RTM_NEWQDISC creating a new qdisc with the same major classid as the old one
   which will suceed since the old one cannot be found anymore.
3) rcu callback __qdisc_destroy -> qdisc_destroy looking through qdisc_list
   again and then deleting the new entries because their major classid matches.

I might be missing something though.

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