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:
All according to plan: https://fburl.com/gdoc/pebccgi1
Changing function definitions to return errors while still throwing.
Reviewed By: sharmafb
Differential Revision: D69567329
fbshipit-source-id: 5d40ee32fe185d5674785632a9a13e4cef996988
Summary: I'm making a `checkpoint` function in the QUIC API. This is to be used in conjunction with reliable resets. When we send data on a stream and want to mark which offset will constitute the reliable size in a future call to resetStreamReliably, we call this function. This function can potentially be called multiple times on a stream to advance the offset, but it is an error to call it after sending a reset.
Reviewed By: jbeshay
Differential Revision: D68592906
fbshipit-source-id: e301385a04dffdb9f23daa805ee74c574e4393c2
Summary:
With reliable resets, we'll want to cancel byte events where the offset is beyond what needs to be reliably delivered. Right now, we only have the functionality to cancel all byte events, or only those up to a certain point.
I'm adding a more generic `cancelByteEventCallbacksForStreamInternal` that takes in a function that can be used to determine which byte events need to be removed.
Reviewed By: afrind
Differential Revision: D67353621
fbshipit-source-id: fa7e758ee6cd40d247392108c28118b604ad6dbc
Summary: I'm moving the implementation of `resetStream` to `resetStreamInternal` so that we can reuse a large chunk of the functionality when we implement reliable resets.
Reviewed By: kvtsoy
Differential Revision: D67303220
fbshipit-source-id: 16efce46570a0742e570d9b0b34a9477f9efbbdc
Summary: There's no need to loop through all the streams if we're just resetting one.
Reviewed By: hanidamlaj
Differential Revision: D67304631
fbshipit-source-id: 4817459ca7d1c1fd906b7640a0089c1c52e6e485
Summary: This is just some additional plumbing that we need in order to send reliable resets. It's still not hooked up end-to-end, so we can't yet send reliable resets.
Reviewed By: mjoras
Differential Revision: D66772108
fbshipit-source-id: ee189959751ed03e294c6ef418d75d8ad4959690
Summary:
setReadCallback didn't function properly during shutdown
1) it was completely ignored when state_ == CLOSING
2) cancelAllAppCallbacks made a copy of readCallbacks_
This is problematic for application constructs that use groups of streams -- eg: HTTP WebTransport. When one stream (the WebTransport session) is reset during shutdown, it needs to clean up any dependent streams as well, including preventing them from getting error callbacks.
The fix is to use only the streamId's from readCallbacksCopy for iteration, but look up the actual callback value from readCallbacks_.
Note: there's an as yet unhandled corner case which is that a readError callback installs a new stream read callback, but it seems far fetched enough I'm not including a fix here.
Reviewed By: sharmafb
Differential Revision: D48159644
fbshipit-source-id: c9d522a6b200538193969d60d242a505831e4cd0
Summary:
This re-enables the experimental pacer for bbr2 and bbr_testing, and removes fireLoopEarly by default.
FireLoopEarly can still be enabled via a knob.
Reviewed By: ritengupta, kvtsoy
Differential Revision: D65919713
fbshipit-source-id: e5d08a807be091c11326e9705601bd9e6bf79991
Summary:
When using msvc and compiling quic with C++20 there's a weird issue that the Looper is initialized with the wrong callbacks.
I suspect that this is because the constructor was creating the lambda as part of the header file.
Moving the constructor code to the cpp file fixed the issue
Reviewed By: hanidamlaj, kvtsoy
Differential Revision: D65994029
fbshipit-source-id: 9c5f47b62d0e0c74b5bce05f926e437e6aa2a3ab
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: This is pretty much the same as D65605100, which was reverted due to a cycle detection ([link](https://fb.workplace.com/groups/mobile.sheriffs/posts/27342968238658432/?comment_id=27343054638649792)). It turns out that the issue was that I didn't run `xplat/cross_plat_devx/somerge_maps/compute_merge_maps.py`.
Reviewed By: jbeshay
Differential Revision: D65761171
fbshipit-source-id: fc852ec13e54ea6ea45b4fda6b4556a78f38fc7f
Summary:
Our main use case for this right now is on the client side. So don't waste time doing all the callbacks per packet.
Also make it so the read callbacks don't update the loopers and check for closed streams every packet, defer that to the upper layer. In practice this means that when both options are on, these callbacks (besides the read callbacks) / checks / looper updates only happen once per read event.
Reviewed By: kvtsoy
Differential Revision: D65037206
fbshipit-source-id: 71119c9d2d857fcde747ea68676375d44b52c82f
Summary:
Required for LLVM-19 upgrade.
This diff removes a variable that was set, but which was not used.
LLVM-19 has a warning `-Wunused-but-set-variable` which we treat as an error because it's so often diagnostic of a code issue. Unused but set variables often indicate a programming mistake, but can also just be unnecessary cruft that harms readability and performance.
Removing this variable will not change how your code works, but the unused variable may indicate your code isn't working the way you thought it was. If you feel the diff needs changes before landing, **please commandeer** and make appropriate changes: there are hundreds of these and responding to them individually is challenging.
For questions/comments, contact r-barnes.
- If you approve of this diff, please use the "Accept & Ship" button :-)
Reviewed By: hanidamlaj
Differential Revision: D64996230
fbshipit-source-id: 027b82a7fbf82b550157f9e75fe42557463250ee
Summary: If the peer sends higher stream limits in the settings, these callbacks may be invoked before the app has a chance to set the connection callback.
Reviewed By: sharmafb
Differential Revision: D64214648
fbshipit-source-id: 6a8a9b8d4d9e02a2baad672d69a43ba61daba918
Summary:
I have need of these in the proxygen WebTransport implementation, and don't want the full dependency on QuicSocket.
Also refactored WriteCallback into StreamWriteCallback and ConnWriteCallback, leaving the original WriteCallback as both for now.
Reviewed By: hanidamlaj
Differential Revision: D63486821
fbshipit-source-id: 4b16ad871c4deac4e262c12835ad5c457e9240da