Summary: This is needed for the new socket abstraction implementation later.
Reviewed By: jbeshay, lnicco
Differential Revision: D46669712
fbshipit-source-id: 5adde6679386689e7f63992ed769ff4a777f59e3
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
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
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
Summary: There's no point in starting the timer until there's connections.
Reviewed By: kvtsoy
Differential Revision: D46753434
fbshipit-source-id: ff7c2fc76ddbbea0d672f59e6571c96dbc850254
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
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
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
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
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
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
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
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
Summary: This prevents the EventBase from being destroyed before the QuicServerWorker
Reviewed By: mjoras
Differential Revision: D36713788
fbshipit-source-id: b91f85de3b0bc5e16c5903c162a2f9640401a0fb
Summary: This is a pretty obvious thing to do. There's not really any reason to have the data and metadata separately since we don't need to reallocate.
Reviewed By: jbeshay
Differential Revision: D36237370
fbshipit-source-id: 093ad7fb2c54b596ea5cc327ffcc24de1748d362
Summary:
The previous implementation defined a `struct SourceIdentityKey` which was
used as input to a hashing function. Consequently, we needed to be careful about
the internal layout of the struct to ensure that it had a unique object
representation. We included some `static_assert`s to ensure this.
Platform-specific differences on `struct sockaddr_storage` made this difficult
to enforce.
This diff changes the implementation of the source identity hash to manually
build a serialized representation of the previous SourceIdentityKey. We manually
pack the structure into a byte array.
Reviewed By: mjoras
Differential Revision: D35366081
fbshipit-source-id: ee07493d115094007bed6f6519d158f4587a272d
Summary: Having it triggers clang's -Wimplicit-fallthrough warning for anyone compiling with quic and importing QuicServer.h, encapsulate it within the implementation
Reviewed By: mingtaoy
Differential Revision: D35347282
fbshipit-source-id: df9be870fb908c96e9e7d5bcc53515d95ad066dd
Summary:
In fmt 8.x the format string must be known at compile time by default.
Fixes:
```
quic/server/QuicServerWorker.cpp:1355:7: error: call to consteval function 'fmt::basic_format_string<char, std::basic_string<char>, unsigned int, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int, unsigned int, unsigned int, unsigned int>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression
quic/server/QuicServerWorker.cpp:1344:9: error: call to consteval function 'fmt::basic_format_string<char, std::basic_string<char>, unsigned int, unsigned int, unsigned int, unsigned int, unsigned long>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression
quic/server/QuicServerWorker.cpp:1333:9: error: call to consteval function 'fmt::basic_format_string<char, std::basic_string<char>, unsigned int, unsigned int, unsigned int, unsigned int, unsigned long>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression
```
Reviewed By: meyering
Differential Revision: D33985541
fbshipit-source-id: 0dd579de292f58343c95a2b439536b79deae4efc
Summary:
- Issuing NewTokenFrames to clients, allowing them to verify their address in subsequent connections by including the token.
- add NewTokenFrame struct in the union type QuicSimpleFrame.
- Issued only once when the crypto handshake is complete.
- Testing includes validating token serialization & deserialization and asserting that the NewTokenFrame is only issued once on handshake completeness.
Reviewed By: mjoras
Differential Revision: D31673160
fbshipit-source-id: 9401ab1a4b878d8b4380d55afa531ec768f5f4cd
Summary:
This implements a global (per process) limit on unfinished handshakes from unverified source addresses.
This limits the ability of an attacker to create connection state without also allocating connection state themselves. By default the limit is 1024.
Reviewed By: kvtsoy
Differential Revision: D32772165
fbshipit-source-id: 6c195169377a9f687c54bc9782cc58fe085e1275
Summary:
- Replacing VLOG with ODS counter for token decryption.
- Preparing for rollout of New Tokens
Reviewed By: lnicco
Differential Revision: D32780127
fbshipit-source-id: 6a947875e7f2d6ed88ce1e103a089fee5a295210
Summary: Revert the experimental change for the server to use an initial cwnd 30 MSS.
Reviewed By: hanidamlaj
Differential Revision: D32173456
fbshipit-source-id: 13ed4f4c1b11ab9c1dc0da1904be3eb5c564e2d8
Summary: Add global counters for QUIC stream reset and connection close
Reviewed By: lnicco
Differential Revision: D30877776
fbshipit-source-id: 4ee7c3f7c3c1cf190f464e74d616e0b5f1539d3a
Summary: Set the experimental version of Mvfst to use an initial cwnd of 30 MSS instead of 10.
Reviewed By: mjoras, lnicco
Differential Revision: D31553957
fbshipit-source-id: 8aa4f0596dbedbea0922afa13de0631c1b898f53
Summary:
Update QUIC to V1 and HTTP/3 to h3. In order to support interop, hq-interop ALPN has been added too.
This change maintains support for draft-27 and draft-29 implementations.
Reviewed By: mjoras
Differential Revision: D29714556
fbshipit-source-id: 0685928ef4bede0b5511e59572e9c86ccc867320