Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a362e0a7890c735a3ef63aab12d71ecfc6e6f4a5
Commit:     a362e0a7890c735a3ef63aab12d71ecfc6e6f4a5
Parent:     7e58886b45bc4a309aeaa8178ef89ff767daaf7f
Author:     Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Thu Mar 22 12:15:45 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:27:20 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 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 4818da5..791c615 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)
        /* 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.
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to