On Fri, 18 Nov 2005 14:03:10 +0000
Andrea Bittau <[EMAIL PROTECTED]> wrote:

> If packets are sent to the netem queue at the same time, they will be
> reversed, even if re-ordering has not been enabled.
> 
> The problem is in sch_netem.c line 467:
> if (PSCHED_TLESS(cb->time_to_send, ncb->time_to_send))
> 
> The queue is being traversed from back to front.  If A and B are sent at the
> same time, the queue will result in B, A.  Logically the operation to find the
> queue position should be: <= instead of <.   
> 
> Replacing that line with:
> if (!PSCHED_TLESS(ncb->time_to_send, cb->time_to_send))
> solves the problem.
> 
> 
> here is a diff:
> diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
> index cdc8d28..82fb07a 100644
> --- a/net/sched/sch_netem.c
> +++ b/net/sched/sch_netem.c
> @@ -464,7 +464,7 @@ static int tfifo_enqueue(struct sk_buff 
>                         const struct netem_skb_cb *cb
>                                 = (const struct netem_skb_cb *)skb->cb;
> 
> -                       if (PSCHED_TLESS(cb->time_to_send, ncb->time_to_send))
> +                       if (!PSCHED_TLESS(ncb->time_to_send, 
> cb->time_to_send))
>                                 break;
>                 }

Your mailer converts tabs to spaces so patch does not apply
cleanly.  Also please add a Signed-off-by to signify agreement
with the terms and conditions described in Documentation/SubmittingPatches

-- 
Stephen Hemminger <[EMAIL PROTECTED]>
OSDL http://developer.osdl.org/~shemminger
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to