Re: HTB MPU

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andy Furniss wrote:

Hi.

I wrote in a reply to a mail on here recently that you can't set mpu (minimum packet unit) on HTB as you can on CBQ.

I've just noticed that there is a patch on devik's site which does mpu and overhead.

http://luxik.cdi.cz/~devik/qos/htb/

For dsl users mpu is, for practical purposes going to be 106 - overhead is still variable though, depending on packet size.

Having these should let you push upstream bandwidth rates a bit closer to the limit.


What about changing that patch a little (bear in mind I don't understand how it works though).

I appears that you could change the patch in tc/core in fn tc_calc_rtable, from:

 + if (overhead)
 +     sz += overhead;

to something like:

 + if (overhead)
 +     sz += (((sz-1)/mpu)+1) * overhead;

Where that little calculation is trying to turn the mpu into a packet size, work out how many packets would be required for the size (sz) of data, and apply the overhead per packet. You would then set mpu to be the atm packet size, ie 54

To be honest though, this packing of the params into a single var seems unneccessary. The function tc_calc_rtab is only obviously used in the tc code, and it could be easily changed to have a prototype with an extra param. I would have to have a flick through the rest of the code, but it might be quite easy to add per packet overhead to the cbq code in the same way, and also whatever m_police is?

Can someone with a working setup try this out and see if it helps?

Ed W

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux