Message ID | 20131129110335.0ecaeed8@nehalam.linuxnetplumber.net |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Stephen Hemminger <stephen@networkplumber.org> Date: Fri, 29 Nov 2013 11:03:35 -0800 > Patch from developers of the alternative loss models, downloaded from: > http://netgroup.uniroma2.it/twiki/bin/view.cgi/Main/NetemCLG > > "In the case 1 of the switch statement in the if conditions we > need to add clg->a4 to clg->a1, according to the model." > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- a/net/sched/sch_netem.c 2013-11-29 10:55:30.591077393 -0800 +++ b/net/sched/sch_netem.c 2013-11-29 10:58:49.441419081 -0800 @@ -215,10 +215,10 @@ static bool loss_4state(struct netem_sch if (rnd < clg->a4) { clg->state = 4; return true; - } else if (clg->a4 < rnd && rnd < clg->a1) { + } else if (clg->a4 < rnd && rnd < clg->a1 + clg->a4) { clg->state = 3; return true; - } else if (clg->a1 < rnd) + } else if (clg->a1 + clg->a4 < rnd) clg->state = 1; break;
Patch from developers of the alternative loss models, downloaded from: http://netgroup.uniroma2.it/twiki/bin/view.cgi/Main/NetemCLG "In the case 1 of the switch statement in the if conditions we need to add clg->a4 to clg->a1, according to the model." Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html