Commit a362e0a7 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by 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: default avatarStephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7e58886b
...@@ -429,6 +429,7 @@ static int netem_change(struct Qdisc *sch, struct rtattr *opt) ...@@ -429,6 +429,7 @@ static int netem_change(struct Qdisc *sch, struct rtattr *opt)
/* for compatiablity with earlier versions. /* for compatiablity with earlier versions.
* if gap is set, need to assume 100% probablity * if gap is set, need to assume 100% probablity
*/ */
if (q->gap)
q->reorder = ~0; q->reorder = ~0;
/* Handle nested options after initial queue options. /* Handle nested options after initial queue options.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment