diff options
author | Andrea Bittau <a.bittau@cs.ucl.ac.uk> | 2005-11-20 16:41:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-20 16:41:05 -0500 |
commit | aa8751667dcd757dd9a711b51140adf181501c44 (patch) | |
tree | 6f5e96806b59d6a1601168eab5e0843a00380253 /net/sched/sch_netem.c | |
parent | 252ec9e28f0cf350e246c065ffe70a2e32b84ad4 (diff) |
[PKT_SCHED]: sch_netem: correctly order packets to be sent simultaneously
If two packets were queued to be sent at the same time in the future,
their order would be reversed. This would occur because the queue is
traversed back to front, and a position is found by checking whether
the new packet needs to be sent before the packet being examined. If
the new packet is to be sent at the same time of a previous packet, it
would end up before the old packet in the queue. This patch places
packets in the correct order when they are queued to be sent at a same
time in the future.
Signed-off-by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_netem.c')
-rw-r--r-- | 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 cdc8d283791c..82fb07aa06a5 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -464,7 +464,7 @@ static int tfifo_enqueue(struct sk_buff *nskb, struct Qdisc *sch) | |||
464 | const struct netem_skb_cb *cb | 464 | const struct netem_skb_cb *cb |
465 | = (const struct netem_skb_cb *)skb->cb; | 465 | = (const struct netem_skb_cb *)skb->cb; |
466 | 466 | ||
467 | if (PSCHED_TLESS(cb->time_to_send, ncb->time_to_send)) | 467 | if (!PSCHED_TLESS(ncb->time_to_send, cb->time_to_send)) |
468 | break; | 468 | break; |
469 | } | 469 | } |
470 | 470 | ||