3131
3232#include <haproxy/buf-t.h>
3333#include <haproxy/quic_loss-t.h>
34+ #include <haproxy/quic_tx-t.h>
3435
3536#define QUIC_CC_INFINITE_SSTHESH ((uint32_t)-1)
3637
@@ -56,6 +57,8 @@ enum quic_cc_algo_state_type {
5657};
5758
5859enum quic_cc_event_type {
60+ /* TX done */
61+ QUIC_CC_EVT_TX ,
5962 /* ACK receipt. */
6063 QUIC_CC_EVT_ACK ,
6164 /* Packet loss. */
@@ -70,7 +73,9 @@ struct quic_cc_event {
7073 struct ack {
7174 uint64_t acked ;
7275 uint64_t pn ;
76+ unsigned int bytes_lost ;
7377 unsigned int time_sent ;
78+ unsigned int rtt ;
7479 } ack ;
7580 struct loss {
7681 unsigned int time_sent ;
@@ -90,7 +95,7 @@ struct quic_cc {
9095 /* <conn> is there only for debugging purpose. */
9196 struct quic_conn * qc ;
9297 struct quic_cc_algo * algo ;
93- uint32_t priv [116 ];
98+ uint32_t priv [120 ];
9499};
95100
96101struct quic_cc_path {
@@ -129,6 +134,16 @@ struct quic_cc_algo {
129134 void (* state_trace )(struct buffer * buf , const struct quic_cc * cc );
130135 void (* state_cli )(struct buffer * buf , const struct quic_cc_path * path );
131136 void (* hystart_start_round )(struct quic_cc * cc , uint64_t pn );
137+ struct quic_cc_drs * (* get_drs )(struct quic_cc * cc );
138+ void (* on_transmit )(struct quic_cc * cc );
139+ void (* drs_on_transmit )(struct quic_cc * cc , struct quic_tx_packet * pkt );
140+ void (* on_ack_rcvd )(struct quic_cc * cc , uint32_t acked , uint32_t delivered ,
141+ uint32_t ack_rtt , uint32_t bytes_lost ,
142+ unsigned int largest_pkt_sent_ts );
143+ void (* on_pkt_lost )(struct quic_cc * cc ,
144+ struct quic_tx_packet * pkt , uint32_t lost_bytes );
145+ void (* congestion_event )(struct quic_cc * cc , uint32_t ts );
146+ unsigned long long (* pacing_delay_ns )(const struct quic_cc * cc );
132147};
133148
134149#endif /* USE_QUIC */
0 commit comments