• Thomas Graf's avatar
    [PKT_SCHED]: GRED: Cleanup equalize flag and add new WRED mode detection · dea3f628
    Thomas Graf authored
    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: default avatarThomas Graf <tgraf@suug.ch>
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
    dea3f628
sch_gred.c 15.4 KB