]> bbs.cooldavid.org Git - net-next-2.6.git/commit
[PKT_SCHED]: GRED: Use a central table definition change procedure
authorThomas Graf <tgraf@suug.ch>
Sat, 5 Nov 2005 20:14:13 +0000 (21:14 +0100)
committerThomas Graf <tgr@axs.localdomain>
Sat, 5 Nov 2005 21:02:26 +0000 (22:02 +0100)
commit6639607ed9deaed9ab3a1cc588f0288891ece2ac
tree370e98cbb4143cf397d5b3cf2a3a8ddf66a13cf1
parente06368221c204d7b5f1ba37d047170f9a0dd359d
[PKT_SCHED]: GRED: Use a central table definition change procedure

Introduces a function gred_change_table_def() acting as a central
point to change the table definition.

Adds missing validations for table definition: MAX_DPs > DPs > 0
and def_DP < DPs thus fixing possible invalid memory reference
oopses. Only root could do it but having a typo crashing the
machine is a bit hard.

Adds missing locking while changing the table definition, the
operation of changing the number of DPs and removing shadowed VQs
may not be interrupted by a dequeue.

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