Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=76d643cd3bd2b4a1e27e3eafee8e37be9c681792
Commit:     76d643cd3bd2b4a1e27e3eafee8e37be9c681792
Parent:     c7bf5f9dc2f78ae8ebbfffc5f17becd0d9e6ba9e
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Fri Mar 23 11:27:04 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:27:47 2007 -0700

    [NET_SCHED]: sch_netem: fix off-by-one in send time comparison
    
    netem checks PSCHED_TLESS(cb->time_to_send, now) to find out whether it is
    allowed to send a packet, which is equivalent to cb->time_to_send < now.
    Use !PSCHED_TLESS(now, cb->time_to_send) instead to properly handle
    cb->time_to_send == now.
    
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/sched/sch_netem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 3e1b633..bc42843 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -286,7 +286,7 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch)
                /* if more time remaining? */
                PSCHED_GET_TIME(now);
 
-               if (PSCHED_TLESS(cb->time_to_send, now)) {
+               if (!PSCHED_TLESS(now, cb->time_to_send)) {
                        pr_debug("netem_dequeue: return skb=%p\n", skb);
                        sch->q.qlen--;
                        return skb;
-
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