Adds mpu support to HTB (ATM) queueing discipline
(Logical change 1.58)
This commit is contained in:
parent
ad273962a1
commit
934677a23e
|
|
@ -50,6 +50,8 @@ int tc_calc_rtable(unsigned bps, __u32 *rtab, int cell_log, unsigned mtu,
|
|||
unsigned mpu)
|
||||
{
|
||||
int i;
|
||||
unsigned overhead = (mpu >> 8) & 0xFF;
|
||||
mpu = mpu & 0xFF;
|
||||
|
||||
if (mtu == 0)
|
||||
mtu = 2047;
|
||||
|
|
@ -61,6 +63,8 @@ int tc_calc_rtable(unsigned bps, __u32 *rtab, int cell_log, unsigned mtu,
|
|||
}
|
||||
for (i=0; i<256; i++) {
|
||||
unsigned sz = (i<<cell_log);
|
||||
if (overhead)
|
||||
sz += overhead;
|
||||
if (sz < mpu)
|
||||
sz = mpu;
|
||||
rtab[i] = tc_core_usec2tick(1000000*((double)sz/bps));
|
||||
|
|
|
|||
Loading…
Reference in New Issue