Summary:
* Added an explicit destructor to `QuicTransportBaseLite` that is the same as its derived QuicTransportBase.
* Simplified `QuicTransportBase` destructor to `= default` since the parent class now handles all cleanup.
Reviewed By: mjoras, jbeshay
Differential Revision: D84391365
fbshipit-source-id: 61034b46283c8e13eec26c473a597337e4868a17
Summary: As title. Some of these CHECKs are failing on errors that were ignored before D76488955.
Reviewed By: dddmello
Differential Revision: D78177866
fbshipit-source-id: f828a4e9fe668038e90bd10533b9c10840adf1ca
Summary:
This is an API break, but it should mostly be a manageable one. We want to be able to compile mvfst internally without exceptions, and folly::Optional is one dependency that makes this challenging. Additionally, we already have an imported secondary optional type for performance/struct size reasons, tiny-optional.
This second optional interface is mostly compatible in an API sense (including the use of std::nullopt) with std::optional. Thus our approach is to remove the dependency on folly::Optional, and offer a quic::Optional instead.
The next diff will properly vendor tiny-optional so that quic::Optional is an independent version of it.
Reviewed By: sharmafb, kvtsoy
Differential Revision: D74133131
fbshipit-source-id: 715f8bb5043ba3bb876cacfe54236887e0686b30
Summary: use std::function in base transport
Reviewed By: mjoras
Differential Revision: D73380174
fbshipit-source-id: 2e51c8bd28c3b7387908cfb04008836f0e6daccf
Summary:
Previously,
* `RawBuf` was a typealias for `std::unique_ptr<folly::IOBuf>`
* `Buf` was a typealias for `folly::IOBuf`
In this diff,
* `Buf` is a typealias for `folly::IOBuf`
* `BufPtr` is a typealias for `std::unique_ptr<folly::IOBuf>`
Reviewed By: hanidamlaj
Differential Revision: D73206576
fbshipit-source-id: 454bf6ccfce3d6571e5e931889263ed98cc24af3
Summary: More in the theme of returning Expected instead of throwing. For the folly case, we keep the try/catches in there and translate to Expected. For Libev, we convert directly to Expected.
Reviewed By: kvtsoy
Differential Revision: D73217128
fbshipit-source-id: d00a978f24e3b29a77a8ac99a19765ae49f64df8
Summary:
Migrating mvfst priority API to be abstract, based on new classes is quic/priority. For now, it requires applications use `HTTPPriorityQueue::Priority`, to be compatible with the hardcoded `deprecated::PriorityQueue` implementation and apps cannot yet change the queue impl. Eventually the application will have full control of the queue.
There are minor functional changes in this diff:
1. Priority QLog types changed from int/bool to string
2. Any PAUSED stream has priority `u=7,i` if paused streams are disabled (previously explicitly settable to any priority)
Reviewed By: jbeshay
Differential Revision: D68696110
fbshipit-source-id: 5a4721b08248ac75d725f51b5cb3e5d5de206d86
Summary: I started with the QuicStreamManager, but it turns out that the path from the manager up to the close path touches a LOT, and so this is a big diff. The strategy is basically the same everywhere, add a folly::Expected and check it on every function and enforce that with [[nodiscard]]
Reviewed By: kvtsoy
Differential Revision: D72347215
fbshipit-source-id: 452868b541754d2ecab646d6c3cbd6aacf317d7f
Summary:
Context: T210787480
I want to add a client-side qlog that will allow us to inspect client behavior during the 0rtt bug.
Reviewed By: jbeshay
Differential Revision: D71145234
fbshipit-source-id: 7816f0a759ba4f60107aaf40c4376ced7c5d03f8
Summary: These aren't used anywhere and we're going to start refactoring the priority implementation.
Reviewed By: jbeshay, hanidamlaj
Differential Revision: D68657305
fbshipit-source-id: e4a3a5a991bac99afef1362adb2663a50766d2c7
Summary:
There are many files in this diff, but the relevant ones are:
* quic/api/QuicSocket.h
* quic/api/QuicSocketLite.h
* quic/api/QuicTransportBase.h
* quic/api/QuicTransportBaseLite.cpp
* quic/observer/SocketObserverContainer.h
The purpose of this is to include the observer functionality within the Lite class. Ideally, we'd remove it from the Lite class, but that's going to require some more detailed changes to the interfaces we're using, because observers are used quite a lot within common code (for example, AckHandlers.cpp).
I'll make those changes some time after the QuicTransportBase split, as they're going to take a while.
Reviewed By: jbeshay, mjoras, kvtsoy
Differential Revision: D65685667
fbshipit-source-id: feb07bcf35d6af2e5c2b538ff463b01b67c6aff9
Summary:
We originally added it for onNetworkDdata only e.g.
https://fburl.com/code/lub7h950, but we should do it on sending pings as well
Reviewed By: mjoras
Differential Revision: D63670960
fbshipit-source-id: ad6096ddc92f00669239bcbb37e65d48238020b9
Summary: This case was missing. If we don't do this then if we buffer a packet on EAGAIN while we don't have initia/handshake data to write, we will loop on the write callback and do empty write loops.
Reviewed By: kvtsoy
Differential Revision: D63492172
fbshipit-source-id: 94ac1c37b2015d38694b9aa3be2744c9bbbe6bee
Summary:
fixes the arg passed to the ::onBidirectionalStreamsAvailable callback
#facebook:
i accidentally introduced a bad operator precedence bug in a refactor; this fixes that and the unit test
luckily HQSession doesn't consume the argument passed to the callback
Reviewed By: knekritz
Differential Revision: D62765762
fbshipit-source-id: 7ae206d5036fc744485736f92fd366ce99103d58
Summary: Delay writes when networkDataPerSocketRead=true until the read loop is done
Reviewed By: mjoras
Differential Revision: D62302229
fbshipit-source-id: 858bed523b5a46bd52fe71f6f0e8b23f5dd4e46d
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
Summary: Missed this call because processCallbacksAfterNetworkData() used to call it before
Reviewed By: mjoras
Differential Revision: D61891333
fbshipit-source-id: 078e9dce5e5f91f389bdb38b0a589a3256dd873b
Summary: The prior `while (maxOffsetToDeliver.has_value()) {` was misleading because `maxOffsetToDeliver` doesn't change in the body of the while loop. I'm changing the structure so as to make it more intuitive as to what's happening here.
Reviewed By: hanidamlaj
Differential Revision: D61801508
fbshipit-source-id: fb91b183316b281cf74cbb33a67f7080e7d8a6f8
Summary: I'm adding the software rx timestamp to `PacketsReceivedEvent` so that it's available in `SocketObserverInterface::packetsReceived`.
Reviewed By: mjoras
Differential Revision: D61485649
fbshipit-source-id: 05170acbcfd1fc8e6a2fce4d2cc8f3f2f7441134
Summary: This gives an option to process application callbacks per received and processed packet, rather than after a whole batch has been received.
Reviewed By: kvtsoy
Differential Revision: D61626616
fbshipit-source-id: cac434adff79eda738c2c4924a0080ecdaac1a25