BUG/MINOR: improve BBR throughput on very fast links
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 27 Nov 2024 18:39:34 +0000 (19:39 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 5 Dec 2024 14:35:44 +0000 (15:35 +0100)
commit2ca07d9539b6d4bec9867ff251e1e39cd525671b
tree06760d974920a4538e5802dcef27b34764ed2336
parentef8324f124f1ba0a98648edd49723ee2b8819bbe
BUG/MINOR: improve BBR throughput on very fast links

This patch fixes the loss of information when computing the delivery rate
(quic_cc_drs.c) on links with very low latency due to usage of 32bits
variables with the millisecond as precision.

Initialize the quic_conn task with TASK_F_WANTS_TIME flag ask it to ask
the scheduler to update the call date of this task. This allows this task to get
a nanosecond resolution on the call date calling task_mono_time(). This is enabled
only for congestion control algorithms with delivery rate estimation support
(BBR only at this time).

Store the send date with nanosecond precision of each TX packet into
->time_sent_ns new quic_tx_packet struct member to store the date a packet was
sent in nanoseconds thanks to task_mono_time().

Make use of this new timestamp by the delivery rate estimation algorithm (quic_cc_drs.c).

Rename current ->time_sent member from quic_tx_packet struct to ->time_sent_ms to
distinguish the unit used by this variable (millisecond) and update the code which
uses this variable. The logic found in quic_loss.c is not modified at all.

Must be backported to 3.1.

(cherry picked from commit f8b697c19b3d8dfe9e12e0c03b0069357c013f20)
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/haproxy/quic_cc-t.h
include/haproxy/quic_cc_drs.h
include/haproxy/quic_tx-t.h
src/quic_cc_drs.c
src/quic_conn.c
src/quic_loss.c
src/quic_rx.c
src/quic_tx.c