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 <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
/* 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;