netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jn@stusta.de
Cc: netdev@vger.kernel.org, hagen@jauu.net
Subject: Re: [PATCH] netem: fix delay calculation in rate extension
Date: Tue, 29 Jan 2013 16:03:08 -0500 (EST)	[thread overview]
Message-ID: <20130129.160308.2201480856831722159.davem@davemloft.net> (raw)
In-Reply-To: <510057F3.80707@stusta.de>

From: Johannes Naab <jn@stusta.de>
Date: Wed, 23 Jan 2013 22:36:51 +0100

> From: Johannes Naab <jn@stusta.de>
> 
> The delay calculation with the rate extension introduces in v3.3 does
> not properly work, if other packets are still queued for transmission.
> For the delay calculation to work, both delay types (latency and delay
> introduces by rate limitation) have to be handled differently. The
> latency delay for a packet can overlap with the delay of other packets.
> The delay introduced by the rate however is separate, and can only
> start, once all other rate-introduced delays finished.
> 
> Latency delay is from same distribution for each packet, rate delay
> depends on the packet size.
> 
> .: latency delay
> -: rate delay
> x: additional delay we have to wait since another packet is currently
>    transmitted
> 
>   .....----                    Packet 1
>     .....xx------              Packet 2
>                .....------     Packet 3
>     ^^^^^
>     latency stacks
>          ^^
>          rate delay doesn't stack
>                ^^
>                latency stacks
>  
>   -----> time
> 
> When a packet is enqueued, we first consider the latency delay. If other
> packets are already queued, we can reduce the latency delay until the
> last packet in the queue is send, however the latency delay cannot be
> <0, since this would mean that the rate is overcommitted.  The new
> reference point is the time at which the last packet will be send. To
> find the time, when the packet should be send, the rate introduces delay
> has to be added on top of that.
> 
> Signed-off-by: Johannes Naab <jn@stusta.de>
> Acked-by: Hagen Paul Pfeifer <hagen@jauu.net>

Applied, thanks.

      reply	other threads:[~2013-01-29 21:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23 21:36 [PATCH] netem: fix delay calculation in rate extension Johannes Naab
2013-01-29 21:03 ` David Miller [this message]

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=20130129.160308.2201480856831722159.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=hagen@jauu.net \
    --cc=jn@stusta.de \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).