Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349621
b: refs/heads/master
c: a13d310
h: refs/heads/master
i:
  349619: d44333f
v: v3
  • Loading branch information
Johannes Naab authored and David S. Miller committed Jan 29, 2013
1 parent b2b880e commit 9795a4a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 80d84ef3ff1ddc7a829c58980a9dd566a8af5203
refs/heads/master: a13d3104710184ecc43edc35a25ae8092058463f
12 changes: 6 additions & 6 deletions trunk/net/sched/sch_netem.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,18 +438,18 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
if (q->rate) {
struct sk_buff_head *list = &sch->q;

delay += packet_len_2_sched_time(skb->len, q);

if (!skb_queue_empty(list)) {
/*
* Last packet in queue is reference point (now).
* First packet in queue is already in flight,
* calculate this time bonus and substract
* Last packet in queue is reference point (now),
* calculate this time bonus and subtract
* from delay.
*/
delay -= now - netem_skb_cb(skb_peek(list))->time_to_send;
delay -= netem_skb_cb(skb_peek_tail(list))->time_to_send - now;
delay = max_t(psched_tdiff_t, 0, delay);
now = netem_skb_cb(skb_peek_tail(list))->time_to_send;
}

delay += packet_len_2_sched_time(skb->len, q);
}

cb->time_to_send = now + delay;
Expand Down

0 comments on commit 9795a4a

Please sign in to comment.