RED SCALE problem?

Lin Xue lxue2 at tigers.lsu.edu
Tue Jan 4 20:28:36 UTC 2011


Hi all,

I am trying to do some test on RED for different parameters(like
min/max threshold, probability..), but find there might be some
problem with SCALE of RED.

In ip_dummynet.h

RED SCALE is defined as:
#define SCALE_RED               16
#define SCALE(x)                ( (x) << SCALE_RED )


And in ip_dummynet.c, the min and max threshold is scaled below:
/* Now doing stuff that was in kerneland */
fs->min_th = SCALE(fs->fs.min_th);
fs->max_th = SCALE(fs->fs.max_th);

In that case, the min and max threshold will only support up to 16 bit
(0-65K+) ? otherwise the higher bits will be dropped, because min_th
and min_th all are int.

Thank you!


More information about the freebsd-ipfw mailing list