Subject: Re: [PATCH RFC 3/3] net_sched: Add size table for qdiscs

From: Patrick McHardy <[email-masked]>
Date: Mon, 21 Jul 2008 15:00:33 +0200

Jussi Kivilinna wrote:
> Quoting "Patrick McHardy" <[email-masked]>:
> 
>>> @@ -123,9 +123,9 @@ static int tbf_enqueue(struct sk_buff *skb,  
>>> struct Qdisc* sch)
>>>     struct tbf_sched_data *q = qdisc_priv(sch);
>>>     int ret;
>>> -    /* qdisc_tx_len() before qdisc_enqueue() wrapper, might return 
>>> different
>>> -     * length than after wrapper. Should recalculate tx_len here if 
>>> q->qdisc
>>> -     * has size table? */
>>> +    if (q->qdisc->stab)
>>> +        qdisc_calculate_tx_len(skb, q->qdisc->stab);
>>> +
>>
>> I don't think this will help, the inner qdisc might again have
>> an inner qdisc that increases the size. So this probably needs
>> to be handled during dequeue.
>>
> 
> I don't quite follow you here, what needs to be handled during dequeue? 
> tbf's q->max_size check?

Yes. You check on ->enqueue by using the inner qdiscs size table,
but that qdisc might again have an inner qdisc which increases
the size, which you can't check during ->enqueue.