Subject: Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().

From: Stephen Hemminger <[email-masked]>
Date: Tue, 26 Aug 2008 08:24:55 -0400

On Tue, 26 Aug 2008 17:47:02 +1000
Herbert Xu <[email-masked]> wrote:

> On Tue, Aug 26, 2008 at 05:35:08PM +1000, Herbert Xu wrote:
> > On Sun, Aug 24, 2008 at 08:29:22PM -0400, Stephen Hemminger wrote:
> > > 
> > > But then you couldn't replace tfifo with pfifo or tbf??
> > 
> > Couldn't the user install TBF as a parent of netem instead?
> 
> In fact, having tfifo there all the time gives us something
> that we couldn't do before.  Conceptually, whether TBF is above
> or below netem corresponds to a network topology where the shaping
> occurs after or before the segment that netem is simulating,
> respectively.
> 
> If you actually replaced tfifo with TBF (as we do now), then the
> shaping always occurs after the segment simulated by netem.  That
> is, this is pretty much the same as having TBF as the parent.
> 
> BTW, the use of the CB area conflicts with the new pkt_len stuff
> so either netem or the pkt_len code needs to be fixed.
> 
> Cheers,
> -- 
> Visit Openswan at http://www.openswan.org/
> Email: Herbert Xu ~{PmV>HI~} <[email-masked]>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

The problem with netem as child of TBF is that TBF counts the number
of packets in the queue to determine the rate. Therefore TBF gets confused
about the rate because of the large number of packets that are held in
netem when delaying. 

In an earlier version, I did rate control in netem but jamal thought
doing layering was better and it has worked until the redesign.