mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-10 07:42:44 +02:00
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.
This commit is contained in:
@@ -91,7 +91,7 @@ struct quic_cc {
|
||||
/* <conn> is there only for debugging purpose. */
|
||||
struct quic_conn *qc;
|
||||
struct quic_cc_algo *algo;
|
||||
uint32_t priv[158];
|
||||
uint32_t priv[160];
|
||||
};
|
||||
|
||||
struct quic_cc_path {
|
||||
|
||||
@@ -10,10 +10,10 @@ struct quic_cc_rs {
|
||||
uint64_t lost;
|
||||
uint64_t prior_lost;
|
||||
int64_t last_end_seq;
|
||||
uint32_t interval;
|
||||
uint32_t prior_time;
|
||||
uint32_t send_elapsed;
|
||||
uint32_t ack_elapsed;
|
||||
uint64_t prior_time_ns;
|
||||
uint32_t interval_us;
|
||||
uint32_t send_elapsed_us;
|
||||
uint32_t ack_elapsed_us;
|
||||
uint32_t is_app_limited;
|
||||
};
|
||||
|
||||
@@ -26,8 +26,8 @@ struct quic_cc_drs {
|
||||
uint64_t delivered;
|
||||
uint64_t lost;
|
||||
int64_t last_seq;
|
||||
uint32_t delivered_time;
|
||||
uint32_t first_sent_time;
|
||||
uint64_t delivered_time_ns;
|
||||
uint64_t first_sent_time_ns;
|
||||
int is_cwnd_limited; /* boolean */
|
||||
int app_limited; /* boolean */
|
||||
};
|
||||
@@ -36,6 +36,6 @@ void quic_cc_drs_init(struct quic_cc_drs *drs);
|
||||
void quic_cc_drs_on_pkt_sent(struct quic_cc_path *path,
|
||||
struct quic_tx_packet *pkt, struct quic_cc_drs *drs);
|
||||
void quic_cc_drs_update_rate_sample(struct quic_cc_drs *drs,
|
||||
struct quic_tx_packet *pkt);
|
||||
struct quic_tx_packet *pkt, uint64_t time_ns);
|
||||
void quic_cc_drs_on_ack_recv(struct quic_cc_drs *drs, struct quic_cc_path *path,
|
||||
uint64_t pkt_delivered);
|
||||
|
||||
@@ -51,7 +51,8 @@ struct quic_tx_packet {
|
||||
/* The list of frames of this packet. */
|
||||
struct list frms;
|
||||
/* The time this packet was sent (ms). */
|
||||
unsigned int time_sent;
|
||||
unsigned int time_sent_ms;
|
||||
uint64_t time_sent_ns;
|
||||
/* Packet number spakce. */
|
||||
struct quic_pktns *pktns;
|
||||
/* Flags. */
|
||||
@@ -70,8 +71,8 @@ struct quic_tx_packet {
|
||||
uint64_t tx_in_flight;
|
||||
uint64_t lost;
|
||||
int64_t end_seq;
|
||||
uint32_t delivered_time;
|
||||
uint32_t first_sent_time;
|
||||
uint64_t delivered_time_ns;
|
||||
uint64_t first_sent_time_ns;
|
||||
int is_app_limited;
|
||||
} rs;
|
||||
unsigned char type;
|
||||
|
||||
Reference in New Issue
Block a user