Subject: Re: [PATCH] hfsc: add link layer overhead adaption

From: Patrick McHardy <[email-masked]>
Date: Mon, 23 Jun 2008 13:27:26 +0200

Jussi Kivilinna wrote:
> Quoting Patrick McHardy <[email-masked]>:
>>
>> This looks like an abuse of rate tables, which usually convert
>> packet sizes to transmission times. You undo that above using
>> expensive calculations.
>>
>> I think this should be done by performing the length calculation
>> in the kernel directly.
> 
> Yes, it's abuse, and actually table is created using false rate (rate = 
> PSCHED_TICKS_PER_SEC) so div_u64 is avoided. Div_u64 is there just in 
> case something goes wrong in userspace. Using rate table allows 
> changes/updates to link layer emulation with only userspace updates 
> avoiding, but maybe abuse of rate table isn't right way to do this after 
> all.
> 
> So would it be better if I add 'length table' to kernel&userspace and 
> use it instead?

Yes, I even posted an unfinished patch for this one or two years
ago, in response to the overhead calculation patches for HTB etc.

I can't find it right now, but haven't tried too hard. It was
called qdisc STABs (for size tables), you should be able to find
it in the archives.