Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jan 2011 14:03:52 -0600
From:      Lin Xue <lxue2@tigers.lsu.edu>
To:        freebsd-ipfw@freebsd.org
Subject:   RED SCALE problem?
Message-ID:  <AANLkTi=m6WwR48xLndCnfRoHh5tEUq7X9%2BsTQXgepDr7@mail.gmail.com>

next in thread | raw e-mail | index | archive | help

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!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=m6WwR48xLndCnfRoHh5tEUq7X9%2BsTQXgepDr7>