mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
[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>
This commit is contained in:
parent
7e58886b45
commit
a362e0a789
1 changed files with 2 additions and 1 deletions
|
@ -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.
|
||||||
|
|
Loading…
Reference in a new issue