From: Eric Dumazet <eric.dumazet@gmail.com>
To: Hagen Paul Pfeifer <hagen@jauu.net>
Cc: Mark Gordon <msg@google.com>, David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
Yuchung Cheng <ycheng@google.com>,
Andreas Terzis <aterzis@google.com>
Subject: Re: [PATCH] netem: fix rate extension and drop accounting
Date: Tue, 17 Jul 2012 07:12:27 +0200 [thread overview]
Message-ID: <1342501947.2626.9.camel@edumazet-glaptop> (raw)
In-Reply-To: <20120716232600.GI3415@nuttenaction>
On Tue, 2012-07-17 at 01:26 +0200, Hagen Paul Pfeifer wrote:
> As Eric said: there are problems in combination with a static delay. During
> rate extension development we tested the raw/vanilla "rate" functionality.
> The rate part works faultless[TM] - at least independet of any other
> "delay-latency generator".
Well, to get correct rate, I use the following unofficial patch :
(Or else, the rate is really wrong)
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index c412ad0..2740a75 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -433,16 +433,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
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
- * from delay.
- */
- delay -= now - netem_skb_cb(skb_peek(list))->time_to_send;
+ if (!skb_queue_empty(list))
now = netem_skb_cb(skb_peek_tail(list))->time_to_send;
- }
}
cb->time_to_send = now + delay;
next prev parent reply other threads:[~2012-07-17 5:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 9:25 [PATCH] netem: fix rate extension and drop accounting Eric Dumazet
2012-07-03 9:54 ` Eric Dumazet
2012-07-03 22:04 ` Hagen Paul Pfeifer
2012-07-04 5:58 ` Eric Dumazet
2012-07-04 16:51 ` Hagen Paul Pfeifer
2012-07-04 17:23 ` Eric Dumazet
2012-07-04 17:30 ` Hagen Paul Pfeifer
[not found] ` <CAPVr9VP7DniPZj4vZi_myJWfL5JLYKYTXXtrXcKHo9LjEQzjYw@mail.gmail.com>
2012-07-16 23:26 ` Hagen Paul Pfeifer
2012-07-17 5:12 ` Eric Dumazet [this message]
[not found] ` <CAPVr9VMCYFO-7uEzO6ft2vpPhVvRgHB3EWJJG62OqGqux1LsZQ@mail.gmail.com>
2012-07-17 17:39 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1342501947.2626.9.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=aterzis@google.com \
--cc=davem@davemloft.net \
--cc=hagen@jauu.net \
--cc=msg@google.com \
--cc=netdev@vger.kernel.org \
--cc=ycheng@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox