提交 a362e0a7 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

[NETEM]: report reorder percent correctly.

If you setup netem to just delay packets; "tc qdisc ls" will report
the reordering as 100%. Well it's a lie, reorder isn't used unless
gap is set, so just set value to 0 so the output of utility
is correct.
Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7e58886b
......@@ -429,7 +429,8 @@ static int netem_change(struct Qdisc *sch, struct rtattr *opt)
/* for compatiablity with earlier versions.
* if gap is set, need to assume 100% probablity
*/
q->reorder = ~0;
if (q->gap)
q->reorder = ~0;
/* Handle nested options after initial queue options.
* Should have put all options in nested format but too late now.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册