kernel-hacking-2024-linux-s.../net/sched
Johannes Naab a13d310471 netem: fix delay calculation in rate extension
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-29 15:43:02 -05:00
..
act_api.c net: Push capable(CAP_NET_ADMIN) into the rtnl methods 2012-11-18 20:32:44 -05:00
act_csum.c
act_gact.c
act_ipt.c
act_mirred.c
act_nat.c
act_pedit.c
act_police.c
act_simple.c
act_skbedit.c
cls_api.c net: Push capable(CAP_NET_ADMIN) into the rtnl methods 2012-11-18 20:32:44 -05:00
cls_basic.c
cls_cgroup.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-12-12 18:07:07 -08:00
cls_flow.c
cls_fw.c
cls_route.c
cls_rsvp.c
cls_rsvp.h
cls_rsvp6.c
cls_tcindex.c
cls_u32.c
em_canid.c
em_cmp.c
em_ipset.c
em_meta.c net: use a per task frag allocator 2012-09-24 16:31:37 -04:00
em_nbyte.c
em_text.c
em_u32.c
ematch.c
Kconfig net: sched: enable CAN Identifier to be build into kernel 2012-11-25 16:06:06 -05:00
Makefile
sch_api.c pkt_sched: avoid requeues if possible 2012-12-12 00:16:47 -05:00
sch_atm.c
sch_blackhole.c
sch_cbq.c pkt_sched: use ns_to_ktime() helper 2012-10-21 22:21:27 -04:00
sch_choke.c
sch_codel.c
sch_drr.c pkt_sched: Fix warning false positives. 2012-09-27 18:35:47 -04:00
sch_dsmark.c
sch_fifo.c
sch_fq_codel.c fq_codel: dont reinit flow state 2012-09-03 14:36:50 -04:00
sch_generic.c pkt_sched: avoid requeues if possible 2012-12-12 00:16:47 -05:00
sch_gred.c net_sched: gred: actually perform idling in WRED mode 2012-09-13 16:10:13 -04:00
sch_hfsc.c
sch_htb.c net: sched: integer overflow fix 2012-12-22 00:03:00 -08:00
sch_ingress.c
sch_mq.c pkt_sched: avoid requeues if possible 2012-12-12 00:16:47 -05:00
sch_mqprio.c pkt_sched: avoid requeues if possible 2012-12-12 00:16:47 -05:00
sch_multiq.c
sch_netem.c netem: fix delay calculation in rate extension 2013-01-29 15:43:02 -05:00
sch_plug.c
sch_prio.c
sch_qfq.c pkt_sched: QFQ Plus: fair-queueing service at DRR cost 2012-11-28 11:19:35 -05:00
sch_red.c
sch_sfb.c
sch_sfq.c
sch_tbf.c
sch_teql.c