Subject: Re: Question about HFSC atm+man patches

From: Michal Soltys <[email-masked]>
Date: Fri, 28 Nov 2008 00:17:47 +0100

Patrick McHardy wrote:
> 
> Using different size tables for inner qdiscs is supposed to work. 
> What is the "wrong size"? ->peek() should return a packet with the 
> size the same as ->dequeue() would, which I think it does.
> 

That's not what I meant.

((struct qdisc_skb_cb*)skb->cb)->pkt_len

This is the value returned by qdisc_pkt_len() (now used whenever length 
is required, instead of skb->len), and it's recalculated during 
qdisc_calculate_pkt_len() called from qdisc_enqueue() - if a qdisc has 
stab. So the inner(most) qdisc with a size table, will be the last one 
setting that field.

Now, if an outer qdisc, e.g. HFSC, does peek() or dequeue() later, 
qdisc_pkt_len() will return overridden value.

If no qdiscs in "chain" have stab, then the field will be equal to 
skb->len - which is set in qdisc_enqueue_root() (otherwise uninitialzed 
value would be used later).

Am I seeing this right ?