diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-03-22 15:15:45 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:27:20 -0400 |
commit | a362e0a7890c735a3ef63aab12d71ecfc6e6f4a5 (patch) | |
tree | a92d9d1fc25bc03f0c3d465e40519ea63ce2878f /net/sched | |
parent | 7e58886b45bc4a309aeaa8178ef89ff767daaf7f (diff) |
[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: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_netem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 4818da5a7e6c..791c615e3aad 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -429,7 +429,8 @@ static int netem_change(struct Qdisc *sch, struct rtattr *opt) | |||
429 | /* for compatiablity with earlier versions. | 429 | /* for compatiablity with earlier versions. |
430 | * if gap is set, need to assume 100% probablity | 430 | * if gap is set, need to assume 100% probablity |
431 | */ | 431 | */ |
432 | q->reorder = ~0; | 432 | if (q->gap) |
433 | q->reorder = ~0; | ||
433 | 434 | ||
434 | /* Handle nested options after initial queue options. | 435 | /* Handle nested options after initial queue options. |
435 | * Should have put all options in nested format but too late now. | 436 | * Should have put all options in nested format but too late now. |