diff options
Diffstat (limited to 'net/sched/sch_netem.c')
-rw-r--r-- | net/sched/sch_netem.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 1e88301f505c..5d9d8bc9cc3a 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -217,7 +217,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
217 | delay = tabledist(q->latency, q->jitter, | 217 | delay = tabledist(q->latency, q->jitter, |
218 | &q->delay_cor, q->delay_dist); | 218 | &q->delay_cor, q->delay_dist); |
219 | 219 | ||
220 | PSCHED_GET_TIME(now); | 220 | now = psched_get_time(); |
221 | cb->time_to_send = now + delay; | 221 | cb->time_to_send = now + delay; |
222 | ++q->counter; | 222 | ++q->counter; |
223 | ret = q->qdisc->enqueue(skb, q->qdisc); | 223 | ret = q->qdisc->enqueue(skb, q->qdisc); |
@@ -226,7 +226,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
226 | * Do re-ordering by putting one out of N packets at the front | 226 | * Do re-ordering by putting one out of N packets at the front |
227 | * of the queue. | 227 | * of the queue. |
228 | */ | 228 | */ |
229 | PSCHED_GET_TIME(cb->time_to_send); | 229 | cb->time_to_send = psched_get_time(); |
230 | q->counter = 0; | 230 | q->counter = 0; |
231 | ret = q->qdisc->ops->requeue(skb, q->qdisc); | 231 | ret = q->qdisc->ops->requeue(skb, q->qdisc); |
232 | } | 232 | } |
@@ -281,11 +281,9 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch) | |||
281 | if (skb) { | 281 | if (skb) { |
282 | const struct netem_skb_cb *cb | 282 | const struct netem_skb_cb *cb |
283 | = (const struct netem_skb_cb *)skb->cb; | 283 | = (const struct netem_skb_cb *)skb->cb; |
284 | psched_time_t now; | 284 | psched_time_t now = psched_get_time(); |
285 | 285 | ||
286 | /* if more time remaining? */ | 286 | /* if more time remaining? */ |
287 | PSCHED_GET_TIME(now); | ||
288 | |||
289 | if (cb->time_to_send <= now) { | 287 | if (cb->time_to_send <= now) { |
290 | pr_debug("netem_dequeue: return skb=%p\n", skb); | 288 | pr_debug("netem_dequeue: return skb=%p\n", skb); |
291 | sch->q.qlen--; | 289 | sch->q.qlen--; |