1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-09 10:00:57 +03:00
Commit Graph

17 Commits

Author SHA1 Message Date
Matt Joras
e81c40b2f7 Add option to do an inline write after a read event.
Summary: Presently updateWriteLooper will always schedule a loop callback to do the write loop. Add an option to inline trigger the writes after the read event.

Reviewed By: kvtsoy, sharmafb

Differential Revision: D62192192

fbshipit-source-id: 30991608f57fbfa097a7522c0731d25b8e528345
2024-09-04 15:15:22 -07:00
Matt Joras
e903f277da Introduce OptionalIntegral and OptionalMicros
Summary: We have a lot of optionals that are either integral values or std::chrono::microseconds. These end up wasting memory, where we can instead store sentinel values to encode whether the value is there or not. This reduces the effective range of the type by one value, but that is an acceptable tradeoff.

Reviewed By: kvtsoy

Differential Revision: D57684368

fbshipit-source-id: b406b86011f9b8169b6e5e925265f4829928cc63
2024-06-11 11:02:02 -07:00
Matt Joras
aefc9e369b Introduce quic::Optional
Summary:
The idea here is to make it so we can swap out the type we are using for optionality. In the near term we are going to try swapping towards one that more aggressively tries to save size.

For now there is no functional change and this is just a big aliasing diff.

Reviewed By: sharmafb

Differential Revision: D57633896

fbshipit-source-id: 6eae5953d47395b390016e59cf9d639f3b6c8cfe
2024-06-11 11:02:02 -07:00
Hani Damlaj
94767af231 refactor FunctionLooper
Summary:
- pack some bytes
- elide `folly::Optional<folly::Function>` wrapper and instead use folly::Function bool operator
- size decrease from 256 -> 224 bytes

Reviewed By: mjoras

Differential Revision: D53139822

fbshipit-source-id: e62665db82f6602661ff22164a341ef2cf8a84ce
2024-01-31 15:13:07 -08:00
Joseph Beshay
96b65104dc Move QuicEventBase and QuicTimer callback operations back to the Callbacks themselves.
Summary:
This moves all the loop and timer callback operations back to the callbacks instead of relying the QuicEventBase to perform them. I.e. it's now Callback::cancelCallback() instead of QuicEventBase::cancelCallback(&callback).

To simplify the design, the lifetime of LoopCallbackWrapper and TimerCallbackWrapper has been changed. Previously these wrappers lasted for one iteration of the loop or the timer callback. In the new design the wrapper is created the first time the callback is scheduled and is only destroyed when the callback is destroyed. This significantly simplifies the lifetime management of the wrapper and the code overall.

While transitioning LibevQuicEventBase to this new design, this change also consolidates the QuicTimer functionality in the LibevQuicEventBase itself.

Reviewed By: hanidamlaj, mjoras

Differential Revision: D52217879

fbshipit-source-id: da7b95d592650ddc112813fdc3b9f5010d32e7fb
2024-01-03 12:38:20 -08:00
Joseph Beshay
ead139adef Move all mvfst use-cases to the new Eventbase, Timer, and Socket interfaces
Summary:
This is the major transition that updates mvfst code to use the new interfaces. The new Folly implementations of the interfaces maintain all the existing behavior of folly types so this should not introduce any functional change. The core changes are:
- Update the BatchWriters to use the new interfaces.
- Update the FunctionLooper to use the new interfaces.
- Change QuicServerTransport to take the folly types and wrap them in the new types for use in the QuicTransportBase.

The rest of the diff is for updating all the existing uses of the QuicTrasnport to initialize the necessary types and pass them to the QUIC transport instead of directly passing folly types.

Reviewed By: mjoras

Differential Revision: D51413481

fbshipit-source-id: 5ed607e12b9a52b96148ad9b4f8f43899655d936
2023-12-14 00:24:12 -08:00
Konstantin Tsoy
49533e4780 Clean up timers interface
Summary: This allows both mvfst mobile/non-mobile to build

Reviewed By: jbeshay

Differential Revision: D47475985

fbshipit-source-id: c341c7e673fe911c29bba3127904b52ff2ba7080
2023-07-19 17:24:38 -07:00
Konstantin Tsoy
fdedffa855 QuicEventBase
Summary:
A wrapper for `folly::EventBase` to be used throughout mvfst library.
Right now it's simply a `using QuicEventBase = folly::EventBase` in the new `quic/common/Events.h`, so no functional changes.

The change to the wrapper usage is constrained to QuicTransportBase and the code around for now - basically excluding top level client and server code that is still using `folly::EventBase` directly.

Subsequent changes will introduce a proper wrapper implementation getting rid of `using QuicEventBase = folly::EventBase` in the new class.

Reviewed By: mjoras

Differential Revision: D44757549

fbshipit-source-id: 5a0dd120ec319a474452eaec64a27f660144acdf
2023-05-23 14:16:15 -07:00
Matt Joras
b5b3ad47b7 Add optional "ACK clocking" mode to the write looper.
Summary:
We've long seen issues where paced congestion controllers can't keep up with the sending rate at low RTTs. While we have one mitigation for this, it only works after the pacing timer has fired. This introduces a new behavior that effectively makes the write looper ACK clock some of the time.

The way it works is that when we call updateWriteLooper, if we've already missed the next pacing wakeup or it is going to fire soon (within 1ms), we cancel it and do a write in this loop. This effectively gives us multiple opportunities to write each burst, e.g. after receiving an ACK.

Reviewed By: kvtsoy

Differential Revision: D45052984

fbshipit-source-id: 591b6f5f374f4886dffa1e9be78df02d17fcc27c
2023-04-18 15:48:23 -07:00
Konstantin Tsoy
424ab5c8c1 Remove useless func argument
Summary: Remove useless func argument

Reviewed By: jbeshay

Differential Revision: D42647239

fbshipit-source-id: d27b26391971ca31f8bf727e3648d1a0dbf124be
2023-01-24 14:53:27 -08:00
Hani Damlaj
00e67c1bf9 mvfst License Header Update
Reviewed By: lnicco

Differential Revision: D33587012

fbshipit-source-id: 972eb440f0156c9c04aa6e8787561b18295c1a97
2022-01-18 13:56:12 -08:00
Hani Damlaj
2660a288b3 Update Company Name
Summary: - as title

Reviewed By: lnicco

Differential Revision: D33513410

fbshipit-source-id: 282b6f512cf83b9abb7990402661135b658f7bd1
2022-01-13 12:07:48 -08:00
Andres Suarez
05d07cbfd0 Apply clang-format update fixes
Reviewed By: igorsugak

Differential Revision: D25849213

fbshipit-source-id: a2a538230e769b2c328ae3dd0a19dfbfd693fe3b
2021-01-09 15:39:52 -08:00
Yang Chi
06083595e3 Do not enable pacing if transport doesn't have pacing timer
Summary:
LOG an error and fallback to no pacing. This diff also stops
supporting automaticaly set pacingEnabled to true when BBR is enabled.

Reviewed By: mjoras

Differential Revision: D22875904

fbshipit-source-id: f8c8c9ea252f6e5e86f83174309b159ce93b3919
2020-08-03 10:38:39 -07:00
Omer Shapira
3099d621af fix to peek API
Reviewed By: lnicco

Differential Revision: D15415966

fbshipit-source-id: 50363c4d6289d27e772cab5000bb387926c96db0
2019-05-22 20:02:09 -07:00
Bonnie Xu
f4ae0a1efd Updated files to change syntax.
Summary: Changed existing chrono syntax to chrono_literals syntax.

Reviewed By: mjoras, sharma95

Differential Revision: D15374649

fbshipit-source-id: 40033e90cca226266ef85e4fec629f290bc5dae6
2019-05-20 12:10:46 -07:00
udippant
50d4939e9e Initial commit of mvfst 2019-04-22 23:42:46 -07:00