[PKT_SCHED]: GRED: Cleanup equalize flag and add new WRED mode detection
authorThomas Graf <tgraf@suug.ch>
Sat, 5 Nov 2005 20:14:09 +0000 (21:14 +0100)
committerThomas Graf <tgr@axs.localdomain>
Sat, 5 Nov 2005 21:02:25 +0000 (22:02 +0100)
commitdea3f62852f98670b72ad355c67bd55c9af58530
tree979515dfac29d831393bdc6c6226575122dcca79
parentdba051f36a47989b20b248248ffef7984a2f6013
[PKT_SCHED]: GRED: Cleanup equalize flag and add new WRED mode detection

Introduces a flags variable using bitops and transforms eqp to use
it. Converts the conditions of the form (wred && rio) to (wred)
since wred can only be enabled in rio mode anyway.

The patch also improves WRED mode detection. The current behaviour
does not allow WRED mode to be turned off again without removing
the whole qdisc first. The new algorithm checks each VQ against
each other looking for equal priorities every time a VQ is changed
or added. The performance is poor, O(n**2), but it's used only
during administrative tasks and the number of VQs is strictly
limited.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
net/sched/sch_gred.c