net_sched: sch_fq: do not assume EDT packets are ordered
authorEric Dumazet <edumazet@google.com>
Sat, 4 May 2019 23:48:53 +0000 (16:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 May 2019 19:09:25 +0000 (12:09 -0700)
commiteeb84aa0d0aff3177c93397cdc62be87e54af486
treeed22c52332a43bf00163d64687221b01379dfefb
parenta55a385d8c846953994d9c140bead67820811b74
net_sched: sch_fq: do not assume EDT packets are ordered

TCP stack makes sure packets for a given flow are monotically
increasing, but we want to allow UDP packets to use EDT as
well, so that QUIC servers can use in-kernel pacing.

This patch adds a per-flow rb-tree on which packets might
be stored. We still try to use the linear list for the
typical cases where packets are queued with monotically
increasing skb->tstamp, since queue/dequeue packets on
a standard list is O(1).

Note that the ability to store packets in arbitrary EDT
order will allow us to implement later a per TCP socket
mechanism adding delays (with jitter eventually) and reorders,
to implement convenient network emulators.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_fq.c