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§

source§

impl BbrCongestionController

source

pub fn new(max_datagram_size: u16) -> Self

Constructs a new BbrCongestionController max_datagram_size is the current max_datagram_size, and is expected to be 1200 when the congestion controller is created.

Trait Implementations§

source§

impl Clone for BbrCongestionController

source§

fn clone(&self) -> BbrCongestionController

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl CongestionController for BbrCongestionController

§

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

Returns the size of the current congestion window in bytes
source§

fn bytes_in_flight(&self) -> u32

Returns the current bytes in flight
source§

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 flight
source§

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 window
source§

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 )

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 )

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 )

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 )

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 )

Invoked when the path maximum transmission unit is updated.
source§

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.
source§

fn earliest_departure_time(&self) -> Option<Timestamp>

Returns the earliest time that a packet may be transmitted. Read more
source§

fn send_quantum(&self) -> Option<usize>

The maximum number of bytes for an aggregation of packets scheduled and transmitted together. Read more
source§

impl Debug for BbrCongestionController

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T, U> Upcast<T> for U
where T: UpcastFrom<U>,

source§

fn upcast(self) -> T

source§

impl<T, B> UpcastFrom<Counter<T, B>> for T

source§

fn upcast_from(value: Counter<T, B>) -> T