Commit 934677a2 authored by osdl.net!shemminger's avatar osdl.net!shemminger

Adds mpu support to HTB (ATM) queueing discipline


(Logical change 1.58)
parent ad273962
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment