]> git.baikalelectronics.ru Git - kernel.git/commit
codel: fix maxpacket/mtu confusion
authorEric Dumazet <edumazet@google.com>
Thu, 30 Apr 2015 16:40:40 +0000 (09:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 May 2015 02:17:40 +0000 (22:17 -0400)
commit3189ac01bee5cb9006d53539ed9d29b19727d1ad
tree0ed77966629db018afd676eaec2e9dee99c79705
parent3c5472c0211774a5d81efab967fd077dd3774200
codel: fix maxpacket/mtu confusion

Under presence of TSO/GSO/GRO packets, codel at low rates can be quite
useless. In following example, not a single packet was ever dropped,
while average delay in codel queue is ~100 ms !

qdisc codel 0: parent 1:12 limit 16000p target 5.0ms interval 100.0ms
 Sent 134376498 bytes 88797 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 13626b 3p requeues 0
  count 0 lastcount 0 ldelay 96.9ms drop_next 0us
  maxpacket 9084 ecn_mark 0 drop_overlimit 0

This comes from a confusion of what should be the minimal backlog. It is
pretty clear it is not 64KB or whatever max GSO packet ever reached the
qdisc.

codel intent was to use MTU of the device.

After the fix, we finally drop some packets, and rtt/cwnd of my single
TCP flow are meeting our expectations.

qdisc codel 0: parent 1:12 limit 16000p target 5.0ms interval 100.0ms
 Sent 102798497 bytes 67912 pkt (dropped 1365, overlimits 0 requeues 0)
 backlog 6056b 3p requeues 0
  count 1 lastcount 1 ldelay 36.3ms drop_next 0us
  maxpacket 10598 ecn_mark 0 drop_overlimit 0

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Kathleen Nichols <nichols@pollere.com>
Cc: Dave Taht <dave.taht@gmail.com>
Cc: Van Jacobson <vanj@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/codel.h
net/sched/sch_codel.c
net/sched/sch_fq_codel.c