[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131129110426.5aa54569@nehalam.linuxnetplumber.net>
Date: Fri, 29 Nov 2013 11:04:26 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: David Miller <davem@...emloft.net>,
Martin Burri <martin.burri@...abb.com>,
Hagen Paul Pfeifer <hagen@...u.net>, netdev@...r.kernel.org
Subject: [PATCH net 3/3] netem: fix gemodel loss generator
Patch from developers of the alternative loss models, downloaded from:
http://netgroup.uniroma2.it/twiki/bin/view.cgi/Main/NetemCLG
"in case 2, of the switch we change the direction of the inequality to
net_random()>clg->a3, because clg->a3 is h in the GE model and when h
is 0 all packets will be lost."
Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
--- a/net/sched/sch_netem.c 2013-11-29 10:58:49.441419081 -0800
+++ b/net/sched/sch_netem.c 2013-11-29 10:58:55.313369015 -0800
@@ -272,7 +272,7 @@ static bool loss_gilb_ell(struct netem_s
case 2:
if (net_random() < clg->a2)
clg->state = 1;
- if (clg->a3 > net_random())
+ if (net_random() > clg->a3)
return true;
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists