Struct s2n_quic_core::recovery::bbr::BbrCongestionController
source · pub struct BbrCongestionController { /* private fields */ }
Expand description
A congestion controller that implements “Bottleneck Bandwidth and Round-trip propagation time” version 2 (BBRv2) as specified in https://datatracker.ietf.org/doc/draft-cardwell-iccrg-bbr-congestion-control/.
Based in part on the Chromium BBRv2 implementation, see https://source.chromium.org/chromium/chromium/src/+/main:net/third_party/quiche/src/quic/core/congestion_control/bbr2_sender.cc and the Linux Kernel TCP BBRv2 implementation, see https://github.com/google/bbr/blob/v2alpha/net/ipv4/tcp_bbr2.c
Implementations§
Trait Implementations§
source§impl Clone for BbrCongestionController
impl Clone for BbrCongestionController
source§fn clone(&self) -> BbrCongestionController
fn clone(&self) -> BbrCongestionController
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl CongestionController for BbrCongestionController
impl CongestionController for BbrCongestionController
§type PacketInfo = PacketInfo
type PacketInfo = PacketInfo
Additional metadata about a packet to track until a sent packet
is either acknowledged or declared lost
source§fn congestion_window(&self) -> u32
fn congestion_window(&self) -> u32
Returns the size of the current congestion window in bytes
source§fn bytes_in_flight(&self) -> u32
fn bytes_in_flight(&self) -> u32
Returns the current bytes in flight
source§fn is_congestion_limited(&self) -> bool
fn is_congestion_limited(&self) -> bool
Returns
true
if the congestion window does not have sufficient
space for a packet of max_datagram_size
considering the current
bytes in flightsource§fn requires_fast_retransmission(&self) -> bool
fn requires_fast_retransmission(&self) -> bool
Returns
true
if the current state of the congestion controller
requires a packet to be transmitted without respecting the
available congestion windowsource§fn on_packet_sent<Pub: Publisher>(
&mut self,
time_sent: Timestamp,
sent_bytes: usize,
app_limited: Option<bool>,
rtt_estimator: &RttEstimator,
publisher: &mut Pub
) -> Self::PacketInfo
fn on_packet_sent<Pub: Publisher>( &mut self, time_sent: Timestamp, sent_bytes: usize, app_limited: Option<bool>, rtt_estimator: &RttEstimator, publisher: &mut Pub ) -> Self::PacketInfo
Invoked when a packet is sent Read more
source§fn on_rtt_update<Pub: Publisher>(
&mut self,
_time_sent: Timestamp,
_now: Timestamp,
rtt_estimator: &RttEstimator,
publisher: &mut Pub
)
fn on_rtt_update<Pub: Publisher>( &mut self, _time_sent: Timestamp, _now: Timestamp, rtt_estimator: &RttEstimator, publisher: &mut Pub )
Invoked each time the round trip time is updated, which is whenever the
newest acknowledged packet in an ACK frame is newly acknowledged
source§fn on_ack<Pub: Publisher>(
&mut self,
newest_acked_time_sent: Timestamp,
bytes_acknowledged: usize,
newest_acked_packet_info: Self::PacketInfo,
rtt_estimator: &RttEstimator,
random_generator: &mut dyn Generator,
ack_receive_time: Timestamp,
publisher: &mut Pub
)
fn on_ack<Pub: Publisher>( &mut self, newest_acked_time_sent: Timestamp, bytes_acknowledged: usize, newest_acked_packet_info: Self::PacketInfo, rtt_estimator: &RttEstimator, random_generator: &mut dyn Generator, ack_receive_time: Timestamp, publisher: &mut Pub )
Invoked when an acknowledgement of one or more previously unacknowledged packets is received Read more
source§fn on_packet_lost<Pub: Publisher>(
&mut self,
lost_bytes: u32,
packet_info: Self::PacketInfo,
_persistent_congestion: bool,
new_loss_burst: bool,
random_generator: &mut dyn Generator,
timestamp: Timestamp,
publisher: &mut Pub
)
fn on_packet_lost<Pub: Publisher>( &mut self, lost_bytes: u32, packet_info: Self::PacketInfo, _persistent_congestion: bool, new_loss_burst: bool, random_generator: &mut dyn Generator, timestamp: Timestamp, publisher: &mut Pub )
Invoked when a packet is declared lost Read more
source§fn on_explicit_congestion<Pub: Publisher>(
&mut self,
ce_count: u64,
event_time: Timestamp,
_publisher: &mut Pub
)
fn on_explicit_congestion<Pub: Publisher>( &mut self, ce_count: u64, event_time: Timestamp, _publisher: &mut Pub )
Invoked when the Explicit Congestion Notification counter increases. Read more
source§fn on_mtu_update<Pub: Publisher>(
&mut self,
max_datagram_size: u16,
_publisher: &mut Pub
)
fn on_mtu_update<Pub: Publisher>( &mut self, max_datagram_size: u16, _publisher: &mut Pub )
Invoked when the path maximum transmission unit is updated.
source§fn on_packet_discarded<Pub: Publisher>(
&mut self,
bytes_sent: usize,
_publisher: &mut Pub
)
fn on_packet_discarded<Pub: Publisher>( &mut self, bytes_sent: usize, _publisher: &mut Pub )
Invoked for each packet discarded when a packet number space is discarded.
Auto Trait Implementations§
impl Freeze for BbrCongestionController
impl RefUnwindSafe for BbrCongestionController
impl Send for BbrCongestionController
impl Sync for BbrCongestionController
impl Unpin for BbrCongestionController
impl UnwindSafe for BbrCongestionController
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more