1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-25 15:43:13 +03:00
Commit Graph

158 Commits

Author SHA1 Message Date
Luca Niccolini
0aa19f6897 Use MVFST_EXPERIMENTAL for cwnd tuning
Reviewed By: mjoras

Differential Revision: D55938590

fbshipit-source-id: d8dd289aa18796343580db074b17c6d9d5ef8b68
2024-04-10 15:29:35 -07:00
Kyle Nekritz
a8c4687eac Ensure stateless reset packets are smaller than triggering packets.
Summary:
Previously, we would continue to respond with the minimum size
stateless reset packet.

Reviewed By: jbeshay

Differential Revision: D55346064

fbshipit-source-id: 71d71cfa279b0a96e63c4cea8927387e18c0d1c3
2024-03-28 12:26:42 -07:00
Luca Niccolini
70e6ffdd7d Release MVFST_EXPERIMENTAL version
Reviewed By: jbeshay

Differential Revision: D55318823

fbshipit-source-id: 08310dc49821f5604f062d42d6f3eb60e09d8a89
2024-03-25 12:57:16 -07:00
Richard Barnes
4b03b63802 Remove extra semi colon from privacy/enforcer/utils/PolicyEnforcerGlobalConfig.h
Summary:
`-Wextra-semi` or `-Wextra-semi-stmt`

If the code compiles, this is safe to land.

Reviewed By: palmje

Differential Revision: D54362219

fbshipit-source-id: 70c9403e5faf25788e5057d4abec1bbe87de73ec
2024-03-18 17:46:28 -07:00
Hani Damlaj
825d6bf31e RetryPacket use std::array for integrity tag
Summary: - as title, integrity is fixed length (16 bytes) and does not need to be an IOBuf

Reviewed By: knekritz, mjoras

Differential Revision: D54392008

fbshipit-source-id: dde1ac87d1355c389b805060e2080eae1d77ab87
2024-03-05 14:13:58 -08:00
Luca Niccolini
0cbb514435 Fix build
Reviewed By: kvtsoy

Differential Revision: D53485414

fbshipit-source-id: 43282fd1968f8514525b3c56d6edcdc0bad9f59a
2024-02-06 11:27:38 -08:00
Joseph Beshay
cf6f6b98ec Fix active connection counter in QuicStats, and make it work for the client too
Summary:
The current open connection counting is broken. To fix it this change:
- moves the counter to be for both the server and client transport
- calls onNewConnection() when the transport is ready.
- calls onConnectionClose() when the transport is closed after it was ready.

Reviewed By: lnicco, frankfeir

Differential Revision: D52638628

fbshipit-source-id: bcff7a8c671f8eede53c22e698e1b95332c56959
2024-01-12 08:59:15 -08:00
Hani Damlaj
0bd5725010 mark private QuicServerWorker::WorkerCallback overrides and additional evb parameter
Summary:
- there's no need to publicly expose QuicServerWorker::WorkerCallback overrides in QuicServer

- modified `::routeDataToWorker` function signature to take an additional EventBase argument, set to the EventBase of the QuicServerWorker that is invoking the cb function

- additional argument used in the next diff to fetch the associated worker with the eventbase

Reviewed By: sharmafb

Differential Revision: D52435341

fbshipit-source-id: 779cf3aba86f408dbb746aa0a573d0618d7e4cb4
2024-01-11 09:35:31 -08:00
Joseph Beshay
dd24931ee2 Combine HighResQuicTimer and TimerFDQuicTimer into one type
Summary: Breaking these two types apart in D51413481 and using them separately for the client and server resulted in the TimerFD not being used anymore for non-mobile clients even when it's available. The combines them back into one type and restore the compile-time selection to use the TimerFD when not on mobile.

Reviewed By: sharmafb

Differential Revision: D52570625

fbshipit-source-id: 3f6117d67558f4506f9fe9efd9d0ce0ad2efbbbc
2024-01-09 11:06:19 -08:00
Joseph Beshay
1fb818d902 Templatize applySocketOptions to work on both QuicAsyncUDPSocket and folly::AsyncUDPSocket
Summary:
Rather than having a separate copy of applySocketOptions inside QuicServerWorker to work on FollyAsyncUDPSocketAlias (folly::AsyncUDPSocket), this templatizes the SocketUtil function so it can be used with both types and avoid duplication of the socket option filtering logic.

Since the header file only had one other one-line function, I moved that function into the header file as well and removed the SocketUtil.cpp file.

Reviewed By: mjoras, frankfeir

Differential Revision: D52182467

fbshipit-source-id: 7c8aff164edafb12b26746f766ac6e5fc20c88d5
2023-12-15 16:25:45 -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
Vadim Meleshuk
99fe355348 Add a metric for unfinished QUIC handshake count
Summary: Add visibility into the number of handshakes. We are already getting some partial visibility unintentionally through SLB_downstream_idle_conn.sum, but that metric includes actual idle connections and I need an explicit metric to set up rate limiting thresholds correctly.

Reviewed By: dddmello

Differential Revision: D50760028

fbshipit-source-id: 5c9063f80f7863b0b1a3e4d4c94c7b2207596c1f
2023-11-13 17:45:58 -08:00
Brandon Schlinker
05b98a99db Cleanup and modularize receive path, improve timestamp support [11/x]
Summary:
This diff:
1. Introduces a new `ReceivedPacket::Timings` structure, which will be expanded upon in subsequent diffs.
2. Adds a `ReceivedPacket::Timings` field to each `ReceivedPacket`
3. Uses the accessors added in the previous diff (D48724715) to populate the `ReceivedPacket::Timings` structure in each `ReceivedPacket` held by a `NetworkData` object. This is done by propagating the `NetworkData::receiveTimePoint` field to all `ReceivedPacket` held in a `NetworkData.` This propagation occurs each time a `ReceivedPacket` is added. The value is propagated again if the `NetworkData::receiveTimePoint` field is updated by looping over all previously added `ReceivedPacket`.

--

This diff is part of a larger stack focused on the following:

- **Cleaning up client and server UDP packet receive paths while improving testability.** We currently have multiple receive paths for client and server. Capabilities vary significantly and there are few tests. For instance:
  - The server receive path supports socket RX timestamps, abet incorrectly in that it does not store timestamp per packet. In comparison, the client receive path does not currently support socket RX timestamps, although the code in `QuicClientTransport::recvmsg` and `QuicClientTransport::recvmmsg` makes reference to socket RX timestamps, making it confusing to understand the capabilities available when tracing through the code. This complicates the tests in `QuicTypedTransportTests`, as we have to disable test logic that depends on socket RX timestamps for client tests.
  - The client currently has three receive paths, and none of them are well tested.

- **Modularize and abstract components in the receive path.** This will make it easier to mock/fake the UDP socket and network layers.
  - `QuicClientTransport` and `QuicServerTransport` currently contain UDP socket handling logic that operates over lower layer primitives such `cmsg` and `io_vec` (see `QuicClientTransport::recvmmsg` and `...::recvmsg` as examples).
  - Because this UDP socket handling logic is inside of the mvfst transport implementations, it is difficult to test this logic in isolation and mock/fake the underlying socket and network layers. For instance, injecting a user space network emulator that operates at the socket layer would require faking `folly::AsyncUDPSocket`, which is non-trivial given that `AsyncUDPSocket` does not abstract away intricacies arising from the aforementioned lower layer primitives.
  - By shifting this logic into an intermediate layer between the transport and the underlying UDP socket, it will be easier to mock out the UDP socket layer when testing functionality at higher layers, and inject fake components when we want to emulate the network between a mvfst client and server. It will also be easier for us to have unit tests focused on testing interactions between the UDP socket implementation and this intermediate layer.

- **Improving receive path timestamping.** We only record a single timestamp per `NetworkData` at the moment, but (1) it is possible for a `NetworkData` to have multiple packets, each with their own timestamps, and (2) we should be able to record both userspace and socket timestamps.

Reviewed By: jbeshay

Differential Revision: D48725209

fbshipit-source-id: 580e7d7d1f3587f9947774b5ed19e9985df404c9
2023-11-05 19:58:46 -08:00
Brandon Schlinker
cb10ddf0ce Cleanup and modularize receive path, improve timestamp support [10/x]
Summary:
This diff makes the fields in `NetworkData` private so that they can only be manipulated via accessors.
- This will be used in a subsequent diff to make it possible to populate a new `ReceivedPacket::Timings` structure in each `ReceivedPacket` held by a `NetworkData` object with the timing information currently held in `NetworkData.`
- These accessors are temporary and being used to split up the stack, so relying on existing tests to provide coverage instead of adding new tests here.

--

This diff is part of a larger stack focused on the following:

- **Cleaning up client and server UDP packet receive paths while improving testability.** We currently have multiple receive paths for client and server. Capabilities vary significantly and there are few tests. For instance:
  - The server receive path supports socket RX timestamps, abet incorrectly in that it does not store timestamp per packet. In comparison, the client receive path does not currently support socket RX timestamps, although the code in `QuicClientTransport::recvmsg` and `QuicClientTransport::recvmmsg` makes reference to socket RX timestamps, making it confusing to understand the capabilities available when tracing through the code. This complicates the tests in `QuicTypedTransportTests`, as we have to disable test logic that depends on socket RX timestamps for client tests.
  - The client currently has three receive paths, and none of them are well tested.

- **Modularize and abstract components in the receive path.** This will make it easier to mock/fake the UDP socket and network layers.
  - `QuicClientTransport` and `QuicServerTransport` currently contain UDP socket handling logic that operates over lower layer primitives such `cmsg` and `io_vec` (see `QuicClientTransport::recvmmsg` and `...::recvmsg` as examples).
  - Because this UDP socket handling logic is inside of the mvfst transport implementations, it is difficult to test this logic in isolation and mock/fake the underlying socket and network layers. For instance, injecting a user space network emulator that operates at the socket layer would require faking `folly::AsyncUDPSocket`, which is non-trivial given that `AsyncUDPSocket` does not abstract away intricacies arising from the aforementioned lower layer primitives.
  - By shifting this logic into an intermediate layer between the transport and the underlying UDP socket, it will be easier to mock out the UDP socket layer when testing functionality at higher layers, and inject fake components when we want to emulate the network between a mvfst client and server. It will also be easier for us to have unit tests focused on testing interactions between the UDP socket implementation and this intermediate layer.

- **Improving receive path timestamping.** We only record a single timestamp per `NetworkData` at the moment, but (1) it is possible for a `NetworkData` to have multiple packets, each with their own timestamps, and (2) we should be able to record both userspace and socket timestamps.

Reviewed By: jbeshay

Differential Revision: D48724715

fbshipit-source-id: 0230ea3feea525fa15b908161f444f4f6d9d4b39
2023-11-05 19:58:46 -08:00
Paul Farcasanu
bbf48f1be6 use MVFST_EXPERIMENTAL2 to enable cwnd hints
Summary:
**Overall Context**
Want to safely experiment with resuming client initial CWND at a value that is right for the user. To start, we want them to send us their last known CWND on connection start.

**In this diff**
Add a flag for `useCwndHintsInSessionTicket` (to be used later) and map both params to `MVFST_EXPERIMENTAL2`.

Reviewed By: jbeshay

Differential Revision: D50711975

fbshipit-source-id: 27790e4453ddc73a728596d10438a70de60f87c3
2023-11-03 16:15:42 -07:00
Brandon Schlinker
a1445434b0 Cleanup and modularize receive path, improve timestamp support [5/x]
Summary:
This diff changes `QuicAsyncUDPSocketWrapper` so that it is an abstraction layer that inherits from `QuicAsyncUDPSocketType`, instead of simply being a container with aliases.
- Key changes in `QuicAsyncUDPSocketWrapper.h`, the rest of the updates switch us from using `QuicAsyncUDPSocketType` to `QuicAsyncUDPSocketWrapper`.
- It's difficult to mock the UDP socket today given that we expose the entire `folly::AsyncUDPSocket` type to the higher layers of the QUIC stack. This complicates testing and emulation because any mock / fake has to implement low level primitives like `recvmmsg`, and because the `folly::AsyncUDPSocket` interface can change over time.
- Pure virtual functions will be defined in `QuicAsyncUDPSocketWrapper` in a follow up diff to start creating an interface between the higher layers of the mvfst QUIC stack and the UDP socket, and this interface will abstract away lower layer details such as `cmsgs` and `io_vec`, and instead focus on populating higher layer structures such as `NetworkData` and `ReceivedPacket` (D48714615). This will make it easier for us to mock or fake the UDP socket.

This diff relies on changes to `folly::MockAsyncUDPSocket` introduced in D48717389.

--

This diff is part of a larger stack focused on the following:

- **Cleaning up client and server UDP packet receive paths while improving testability.** We currently have multiple receive paths for client and server. Capabilities vary significantly and there are few tests. For instance:
  - The server receive path supports socket RX timestamps, abet incorrectly in that it does not store timestamp per packet. In comparison, the client receive path does not currently support socket RX timestamps, although the code in `QuicClientTransport::recvmsg` and `QuicClientTransport::recvmmsg` makes reference to socket RX timestamps, making it confusing to understand the capabilities available when tracing through the code. This complicates the tests in `QuicTypedTransportTests`, as we have to disable test logic that depends on socket RX timestamps for client tests.
  - The client currently has three receive paths, and none of them are well tested.

- **Modularize and abstract components in the receive path.** This will make it easier to mock/fake the UDP socket and network layers.
  - `QuicClientTransport` and `QuicServerTransport` currently contain UDP socket handling logic that operates over lower layer primitives such `cmsg` and `io_vec` (see `QuicClientTransport::recvmmsg` and `...::recvmsg` as examples).
  - Because this UDP socket handling logic is inside of the mvfst transport implementations, it is difficult to test this logic in isolation and mock/fake the underlying socket and network layers. For instance, injecting a user space network emulator that operates at the socket layer would require faking `folly::AsyncUDPSocket`, which is non-trivial given that `AsyncUDPSocket` does not abstract away intricacies arising from the aforementioned lower layer primitives.
  - By shifting this logic into an intermediate layer between the transport and the underlying UDP socket, it will be easier to mock out the UDP socket layer when testing functionality at higher layers, and inject fake components when we want to emulate the network between a mvfst client and server. It will also be easier for us to have unit tests focused on testing interactions between the UDP socket implementation and this intermediate layer.

- **Improving receive path timestamping.** We only record a single timestamp per `NetworkData` at the moment, but (1) it is possible for a `NetworkData` to have multiple packets, each with their own timestamps, and (2) we should be able to record both userspace and socket timestamps.

Reviewed By: jbeshay, hanidamlaj

Differential Revision: D48717388

fbshipit-source-id: 4f34182a69ab1e619e454da19e357a6a2ee2b9ab
2023-09-21 07:57:58 -07:00
Brandon Schlinker
a2c43bcf4c Cleanup and modularize receive path, improve timestamp support [1/x]
Summary:
This diff:
- Changes `NetworkData` to have `vector<ReceivedPacket>` instead of `vector<IOBuf>` to make it easier to associate metadata with individual UDP packets.

--

This diff is part of a larger stack focused on the following:

- **Cleaning up client and server UDP packet receive paths while improving testability.** We currently have multiple receive paths for client and server. Capabilities vary significantly and there are few tests. For instance:
  - The server receive path supports socket RX timestamps, abet incorrectly in that it does not store timestamp per packet. In comparison, the client receive path does not currently support socket RX timestamps, although the code in `QuicClientTransport::recvmsg` and `QuicClientTransport::recvmmsg` makes reference to socket RX timestamps, making it confusing to understand the capabilities available when tracing through the code. This complicates the tests in `QuicTypedTransportTests`, as we have to disable test logic that depends on socket RX timestamps for client tests.
  - The client currently has three receive paths, and none of them are well tested.

- **Modularize and abstract components in the receive path.** This will make it easier to mock/fake the UDP socket and network layers.
  - `QuicClientTransport` and `QuicServerTransport` currently contain UDP socket handling logic that operates over lower layer primitives such `cmsg` and `io_vec` (see `QuicClientTransport::recvmmsg` and `...::recvmsg` as examples).
  - Because this UDP socket handling logic is inside of the mvfst transport implementations, it is difficult to test this logic in isolation and mock/fake the underlying socket and network layers. For instance, injecting a user space network emulator that operates at the socket layer would require faking `folly::AsyncUDPSocket`, which is non-trivial given that `AsyncUDPSocket` does not abstract away intricacies arising from the aforementioned lower layer primitives.
  - By shifting this logic into an intermediate layer between the transport and the underlying UDP socket, it will be easier to mock out the UDP socket layer when testing functionality at higher layers, and inject fake components when we want to emulate the network between a mvfst client and server. It will also be easier for us to have unit tests focused on testing interactions between the UDP socket implementation and this intermediate layer.

- **Improving receive path timestamping.** We only record a single timestamp per `NetworkData` at the moment, but (1) it is possible for a `NetworkData` to have multiple packets, each with their own timestamps, and (2) we should be able to record both userspace and socket timestamps.

Reviewed By: mjoras

Differential Revision: D48714615

fbshipit-source-id: b21a88f14156ed6398308223f50b2334328586ee
2023-09-21 07:57:58 -07:00
Matt Joras
b9e13c4c25 Always call setTxTime on the server sockets.
Summary: We intend to use this feature. The socket stores whether it is successful and can be queried later via getTXTime

Reviewed By: kvtsoy

Differential Revision: D48531750

fbshipit-source-id: 15da7eb5f3c499a82a77f13610c8f1d95736d066
2023-08-21 16:13:38 -07:00
Luca Niccolini
d7296ed588 More tuning for MVFST_EXPERIMENTAL version
Reviewed By: hanidamlaj, kvtsoy

Differential Revision: D48238636

fbshipit-source-id: 935dd7a5629c222950da70d54681c75491f7ce27
2023-08-10 11:47:58 -07:00
Christian Clauss
b8396fc119 Fix typos discovered by codespell
Summary:
`codespell --ignore-words-list=arithmetics,atleast,crate,crated,deriver,ect,hel,onl,startin,whats --skip="*.lock"`
* https://pypi.org/project/codespell

X-link: https://github.com/facebookincubator/mvfst/pull/307

Reviewed By: hanidamlaj, lnicco

Differential Revision: D47809078

Pulled By: kvtsoy

fbshipit-source-id: 566557f2389746db541ff265a5dec8d6404b3701
2023-07-26 17:10:41 -07:00
Konstantin Tsoy
73edee8252 Back out "Fix typos discovered by codespell"
Summary:
Original commit changeset: 337824bc37bc

Original Phabricator Diff: D47722462

Reviewed By: jbeshay, terrelln, lnicco

Differential Revision: D47801753

fbshipit-source-id: 795ffcccbc2223608e2a707ec2e5bcc7dd974eb3
2023-07-26 12:49:13 -07:00
Luca Niccolini
3d091f18bc Tune transport for MVFST_EXPERIMENTAL version
Reviewed By: jbeshay

Differential Revision: D47611543

fbshipit-source-id: acc07ffba064f95d6ce6ad4f212642ae49412ffc
2023-07-26 02:41:56 -07:00
Facebook Community Bot
9d89b66485 Re-sync with internal repository 2023-07-25 09:45:22 -07:00
Joseph Beshay
c96bd533d4 Fix mvfst and proxygen OSS build with fmt 9+
Summary: Resolves https://github.com/facebookincubator/mvfst/issues/305

Reviewed By: chadaustin, hanidamlaj

Differential Revision: D47555406

fbshipit-source-id: bd42128d8b35b337e81268f58643da056acfecf9
2023-07-18 15:25:10 -07:00
Konstantin Tsoy
c8daa9bf01 Abstract away socket fd getter/setter
Summary: This is needed for the new socket abstraction implementation later.

Reviewed By: jbeshay, lnicco

Differential Revision: D46669712

fbshipit-source-id: 5adde6679386689e7f63992ed769ff4a777f59e3
2023-07-12 17:26:15 -07:00
Konstantin Tsoy
4a0dd1e2a4 QuicAsyncUDPSocketWrapper
Reviewed By: jbeshay

Differential Revision: D46379200

fbshipit-source-id: f6a7c1cf68108872e05e6fd8adb7f00aae22b2ed
2023-07-11 15:21:15 -07:00
Hani Damlaj
1e3fc002fc elide RoutingData::clientChosenDcid in RoutingData constructor
Summary: we can elide explicitly setting `isUsingClientConnId` member variable in RoutingData since it can be derived from logically OR'ing two other fields: isUsing0Rtt and isInitial

Reviewed By: mjoras

Differential Revision: D46189397

fbshipit-source-id: 69a3fdbc90712cc928b5202975782d88370e043d
2023-06-20 19:20:27 -07:00
Joseph Beshay
931abc64af Separate transport settings for pacing tick and the pacing timer resolution
Summary:
The pacingTimerTickInterval transport setting conflates two options: the minimum interval a pacer can use, and the resolution of the underlying timer. This means that a higher value leads to lower timer resolution and less pacing accuracy.

This change adds a separate parameter for the timer resolution to ensure that a larger pacing tick does not degrade the pacer accuracy.

Reviewed By: mjoras

Differential Revision: D46564066

fbshipit-source-id: 0d0e54077b80da03e6e6c9baaab49a4c969966b6
2023-06-20 15:18:38 -07:00
Konstantin Tsoy
adf16f9a07 Remove libccp from mvfst
Summary: We don't use it, and the OSS lib hasn't been updated in a while.

Reviewed By: mjoras

Differential Revision: D46707559

fbshipit-source-id: ec102a52183a736cfb1c0241600816a837062108
2023-06-15 18:17:53 -07:00
Matt Joras
8c02e631b3 Don't scheduleTimeout on QuicServerWorker start.
Summary: There's no point in starting the timer until there's connections.

Reviewed By: kvtsoy

Differential Revision: D46753434

fbshipit-source-id: ff7c2fc76ddbbea0d672f59e6571c96dbc850254
2023-06-14 22:40:36 -07:00
Matt Joras
8a7fedfe1d Add time-based QUIC_STATS
Summary:
The idea here is to add a notion of time-based sampling of certain QUIC_STATS. This allows accounting to be done via consistent distributions for comparisons.

For now limit to the server, and only implement for inflight bytes, SRTT, and CCA bandwidth.

Reviewed By: jbeshay

Differential Revision: D46410903

fbshipit-source-id: a5db1ec720a0f8bf54e04d66c0d68686660e8eaa
2023-06-12 09:48:10 -07:00
Andrii Vasylevskyi
a804f26ff9 Extra logging for dropped packets
Summary: We have VLOG(3) for various dropped packet reasons, adding VLOG(3) for CANNOT_FORWARD_DATA and CONNECTION_NOT_FOUND cases.

Reviewed By: mjoras

Differential Revision: D43632936

fbshipit-source-id: 81c3eb69c6d84a9224646ded7042963af3f9b130
2023-02-28 09:32:54 -08:00
Luca Niccolini
24bf5288a3 restore ROUTING_ERROR_WRONG_HOST check
Reviewed By: avasylev

Differential Revision: D43520222

fbshipit-source-id: f4ba43ab014f44dc00879df1d90a553bb8d5ad70
2023-02-27 14:54:43 -08:00
Paul Farcasanu
2556adfc7f cleanup initCwnd experimentation
Summary:
**Context**
Perf wins:
 - https://fb.workplace.com/groups/750841812056515/permalink/1581186975688657/
 - https://fb.workplace.com/groups/750841812056515/permalink/1580000729140615/

now clean it up, since we are shipping via config

Reviewed By: hanidamlaj

Differential Revision: D43237402

fbshipit-source-id: abfa5df982668ee87afe24b3a2b88a3762bed12c
2023-02-16 00:59:16 -08:00
Fred Qiu
210f51981e Add socket create hook to QuicServerWorker::bind
Summary: Add the socket create hook to QuicServerWorker::bind in order for more applications to call this hook function.

Reviewed By: jbeshay

Differential Revision: D43130289

fbshipit-source-id: 76bdb2673eb51d11d216ca80c83aafeda86a21c4
2023-02-13 06:07:52 -08:00
Hani Damlaj
cc5bcd5609 QuicServerWorker
Summary: refactoring the slightly messy  `QuicServerWorker::dispatchPacketData(...)`

Reviewed By: jbeshay

Differential Revision: D42514330

fbshipit-source-id: 1745ea10f9dc510d4ad9fbea178b5ad25880aed8
2023-02-03 15:18:55 -08:00
Hani Damlaj
0e9f480daa QuicServerWorker
Summary: - readability improvements

Reviewed By: sharmafb

Differential Revision: D42792105

fbshipit-source-id: a52c1bfffd651442e228df7966a5979ca307ea4f
2023-02-03 15:18:55 -08:00
Hani Damlaj
4bae786443 QuicServerWorker
Summary: - refactor some code in `void QuicServerWorker::handleNetworkData()`

Reviewed By: sharmafb

Differential Revision: D42523140

fbshipit-source-id: e865857f2be028513bb4cd65d864dc72ea7850fd
2023-02-03 15:18:55 -08:00
Hani Damlaj
152b0c004f QuicServerWorker
Summary: - reduce some verbosity in `QuicServerWorker::logRoutingInfo(...)`

Reviewed By: jbeshay, mjoras

Differential Revision: D42514331

fbshipit-source-id: ab38b601edac7b24b97333e30c3aa5d13878d365
2023-02-03 15:18:55 -08:00
Paul Farcasanu
a68b59078f fix initial cwnd experiment
Summary: Perf testing.

Reviewed By: hanidamlaj

Differential Revision: D42352789

fbshipit-source-id: 4ca51153ce939f62e97d56b434cac6a5f06f0a87
2023-01-05 11:47:59 -08:00
Paul Farcasanu
da474a06b1 experiment with initialCwnd=20
Summary: Perf testing.

Reviewed By: mjoras

Differential Revision: D41654491

fbshipit-source-id: b356671c085da31ed6f0a7956e7ed1b3edfc0cf1
2022-12-02 13:17:08 -08:00
Joseph Beshay
772b47adaa Do not use LOG_EVERY_N
Summary:
Fixes build error from Github actions
```
D:\a\mvfst\mvfst\quic\server\QuicServerTransport.cpp(1072): error C3861:
'__sync_add_and_fetch': identifier not found

```

Reviewed By: hanidamlaj

Differential Revision: D40327603

fbshipit-source-id: afae1b661322e80156c7d69b577f35f41b67ee73
2022-11-10 16:17:32 -08:00
Duc Nguyen
e3d2b6b3ee Fix -Wmissing-prototypes error
Reviewed By: bschlinker

Differential Revision: D40363029

fbshipit-source-id: 27b41f99b5d279f4e204561b3e93b179345ec784
2022-10-18 09:30:47 -07:00
Joseph Beshay
227236ef85 Differentiate PacketDropReasons
Summary: The existing PacketDropReason values cover many branches in the code making it impossible to isolate the reason for a PARSE_ERROR, INVALID_PACKET, CONNECTION_NOT_FOUND. This change breaks them down into more values that are each used in a single branch.

Reviewed By: mjoras

Differential Revision: D39149490

fbshipit-source-id: 28cbe1ea6c4a06cf55960058edaa48c28ed4d2ef
2022-09-01 15:11:52 -07:00
Hani Damlaj
0ae79027df Issue Conn IDs As Needed
Summary:
- continually issuing new connection ids to peer as old connections ids are retired through RETIRE_CONN_ID frames
- add logic to parse and act on receiving RETIRE_CONN_ID frame

Reviewed By: mjoras

Differential Revision: D38443561

fbshipit-source-id: 82fb679f482fd69c7b3a3385693d2e5575e92703
2022-08-25 17:47:45 -07:00
Matt Joras
b94142135f Send VN packet when the transport factory returns nullptr
Summary: Returning nullptr indicates that it cannot support making a transport at the moment, so respond with a VN as a terminal signal.

Reviewed By: kvtsoy

Differential Revision: D37014231

fbshipit-source-id: e9905a97709cfcdb75d757b11258711c110077e9
2022-08-11 09:37:47 -07:00
Matt Joras
64f4331469 Add early check for CID size.
Summary: Correctly test initial CID sizes.

Reviewed By: kvtsoy

Differential Revision: D38172511

fbshipit-source-id: 1fce18181aeafadbb03eb0761a174fda93195649
2022-08-11 09:37:47 -07:00
Joseph Beshay
7271907eb5 Skip LOG_EVERY_N to fix build
Summary: Upgrading glog from 0.4.0 to 0.5.0 broke the windows build for some time. This change skips calling LOG_EVERY_N for Windows to restore the build. It is a stop-gap measure until logging is migrated to folly XLOG.

Reviewed By: kvtsoy

Differential Revision: D38371427

fbshipit-source-id: 9711607a348f0473e3e922d7f627217b3948c45d
2022-08-04 11:47:04 -07:00
Dylan Yudaken
df56654b0e quic: multishot recvmsg
Summary: support multishot recvmsg in quic worker

Differential Revision: D37921703

fbshipit-source-id: c8b749b40895fe961adc6b9929bbcc0345fff029
2022-08-02 04:55:59 -07:00
Adel Abouchaev
2325259aad Resolve static analysis complain about use-after-move.
Summary: Although there is no flaw in this code, the static analysis does not see that the remaining variable controls the flow path and considers the use of the data after move a failure.

Reviewed By: mjoras

Differential Revision: D37321326

fbshipit-source-id: 54c147f4e9840bd7e5c7a6122495be66044c7708
2022-06-22 14:03:15 -07:00