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

29 Commits

Author SHA1 Message Date
Subodh Iyengar
322eb2ebc4 remove codecresult variant
Summary: remove the variant for codec result and replace it with a custom variant type

Reviewed By: yangchi

Differential Revision: D17247099

fbshipit-source-id: 19e24c14732eb6e8496aee7064f20c48bdf254e0
2019-09-30 17:02:24 -07:00
Viktor Chynarov
d7748a8382 active_connection_id_limit transport parameter
Summary:
^

This parameter was added in d-21. Default value is 0 meaning no provided
connection id apart from the initial ones. This limits the amount of connection
ids the peer provides via `NEW_CONNECTION_ID` frame.

Diff to set this value will be added in later, along with `NEW_CONNECTION_ID`.

Reviewed By: JunqiWang

Differential Revision: D17532007

fbshipit-source-id: 5b86f69a8d3372fbcb7e0882508ea2661a9d4864
2019-09-25 08:07:28 -07:00
Subodh Iyengar
6f6ed4d56e remove variant type for QuicPacket
Summary:
Remove the variant type for RegularQuicPacket and VersionNegotiationPacket.

This allows us to move version negotiation parsing to be only used on the client and only done explicitly
before a version is negotiated.

Reviewed By: yangchi

Differential Revision: D17242788

fbshipit-source-id: 502caf6849f0b7e6778f1470dc160d01f17a33af
2019-09-19 17:31:47 -07:00
Subodh Iyengar
04baa15a04 Custom variant type for packetheader
Summary:
Make a custom variant type for PacketHeader. By not relying on boost::variant
this reduces the code size of the implementation.

This uses a combination of a union type as well as a enum type to emulate a variant

Reviewed By: yangchi

Differential Revision: D17187589

fbshipit-source-id: 00c2b9b8dd3f3e73af766d84888b13b9d867165a
2019-09-19 17:31:47 -07:00
Matt Joras
72e677df33 Send windowed stream limit updates
Summary:
Implement sending stream limit updates in a windowed fashion, so that as a peer exhausts its streams we will grant it additional credit. This is implemented by having the stream manager check if an update is needed on removing streams, and the api layer potentially sending an update after it initiates the check for closed streams.

This also makes some driveby changes to use `std::lower_bound` instead of `std::find` for the sorted collections in the stream manager.

Reviewed By: yangchi

Differential Revision: D16808229

fbshipit-source-id: f6e3460d43e4d165e362164be00c0cec27cf1e79
2019-09-18 11:33:03 -07:00
Viktor Chynarov
594a98be7a Stop setting clientConnId in ServerStateMachine [2/x]
Summary:
Removes clientConnId completely from ServerConnectionIdParams.

This diff first fixes an incorrect assumption; it calls
`shortHeader.getConnectionId()` which is actually the destination id (server)
not the client connection id.

Next, this entire block is unnecessary, because this will be called after
the transport is created, so the clientConnectionId will always be set.

This also setsconn.serverConnectionId earlier (shouldn't depend on
connClientId).

Reviewed By: yangchi

Differential Revision: D16792866

fbshipit-source-id: 537ba12baa9939c9d5512e46eb914c1d3a7a9aa2
2019-08-23 15:06:02 -07:00
Bonnie Xu
61bf94680a add QUIC_STATS for Stateless Reset
Summary: Added QUIC_STATS for stateless reset.

Reviewed By: afrind

Differential Revision: D16679632

fbshipit-source-id: a80179fd4f2f9b2cb1297af47687b4b8a190de84
2019-08-16 16:24:56 -07:00
Amaury Séchet
cbd77a3603 Extend CryptoFactory with makePacketNumberCipher (#40)
Summary:
The CryptoFactory is extended with makePacketNumberCipher . In order to support that feature, FizzCryptoFactory now explicitly takes a QuicFizzFactory as argument instead of a generic fizz::Factory, which is the only type that is used in practice anyways.

The cypher argument was removed because:
1/ Only one cypher is used at all. Fizz also supports ChaCha20, but using it in mvfst will throw an exception.
2/ it seems like the factory should know what cypher it is dealing with.

If a choice of cypher needs to be supported going forward, it can be done by adding state to FizzCryptoFactory.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/40

Reviewed By: mjoras

Differential Revision: D16785274

Pulled By: yangchi

fbshipit-source-id: a1c490e34c5ddd107e8e068d8b127c1ed00a59ec
2019-08-16 08:52:43 -07:00
Bonnie Xu
db349541f2 Update qlog format to be more complete
Summary: Update qlog format to be more complete. Adding the summary section (with extra fields like title, description, etc). This diff is just to make the format more on par with Robin's schema.

Reviewed By: mjoras

Differential Revision: D16499808

fbshipit-source-id: 56cfbb95404f7e3c6638bffda18b53f7d83048a1
2019-07-30 12:48:57 -07:00
Amaury Séchet
4f6fb57557 Add CryptoFactory to abtract Fizz specific crypto operations (#30)
Summary:
This introduce the CryptoFactory abstraction that compute keys and AEAD to be used by most of mvfst.

The fizz specific parts are abstracted into a subclass, FizzCryptoFactory, and accessed using virtual methods.

Next step is to introduce QuicFizzFactory 's features into this abstraction.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/30

Reviewed By: JunqiWang

Differential Revision: D16459633

Pulled By: yangchi

fbshipit-source-id: 7fe2d3037ac604bfd5b002e6d25c1763e91e9472
2019-07-29 15:02:05 -07:00
Bonnie Xu
90b83d7370 Add packetBuffered event
Summary: Add packetBuffered event to qlog.

Reviewed By: yangchi

Differential Revision: D16415646

fbshipit-source-id: dda053e55b5b029278993ccc89330e2bc2d9ebb9
2019-07-25 11:52:21 -07:00
Bonnie Xu
0929100b18 Add transportStateUpdate event
Summary: Add transportStateUpdate event so it can be part of qlog.

Reviewed By: mjoras

Differential Revision: D16342467

fbshipit-source-id: 109189275d44996850b82646bab4a733a3a4c7a1
2019-07-25 11:52:19 -07:00
Matt Joras
ece3cbe387 Draft-22 varint error codes
Summary: These were changed to varints. To support this we need to do some extra horrible version plumbing. I don't want to keep this long term but it works for now.

Reviewed By: yangchi

Differential Revision: D16293568

fbshipit-source-id: a9ea9083be160aa3e6b338a7d70d7f00e44ec5ab
2019-07-18 12:07:57 -07:00
Bonnie Xu
9cbe902f81 Add packetDrop to Quic
Summary: [quic] Add packetDrop to Quic, so it can be logged in qlog.

Reviewed By: yangchi

Differential Revision: D16257829

fbshipit-source-id: ca87116f2c708538d05f28098620a5dfc2456f3e
2019-07-17 17:11:25 -07:00
Matt Joras
2f528e68c0 Draft-22 invariants change
Summary:
Draft-22 onwards uses two one byte length fields to encode connection ID length instead of one one byte length field.

To support this without disrupting existing clients we need to make our parsing version dependent. This diff accomplishes it by special casing the existing Facebook client QUIC version (0xfaceb000), and changing the default Facebook client version going forward to 0xfaceb001.

Note that this diff also changes the behavior of the ticket transport parameters. When we changed from draft-18 to draft-19 transport parameters I apparently forgot to update the ticket transport parameters to the new format.

Reviewed By: yangchi

Differential Revision: D16205090

fbshipit-source-id: e74a92fa959d308f4bb43bad76e58d4b58d07322
2019-07-16 17:59:58 -07:00
Bonnie Xu
c8fc46a7ff Rename add to addPacket
Summary: Rename `add` to `addPacket`, since `add` is an ambiguous function name, especially as we include more events.

Reviewed By: sharma95

Differential Revision: D16102141

fbshipit-source-id: 73196a5f1bcc681e3bb0a26fd9edaf34f59bf710
2019-07-08 03:34:33 -07:00
Bonnie Xu
f20f8d15a1 Added fields dcid and scid to QLogger
Summary:
Added fields dcid and scid to QLogger

This will be used in the following diff, which needs the ids to uniquely identify the output file.

Reviewed By: sharma95

Differential Revision: D15909180

fbshipit-source-id: d8db794d74cbbc85ead6afb7d5cd5179c70b646d
2019-06-25 23:37:43 -07:00
Bonnie Xu
a6606f2a52 Setup logging in Quic based on QLogger
Summary: Setup logging in Quic based on QLogger.

Reviewed By: mjoras

Differential Revision: D15818340

fbshipit-source-id: 553aaedc6043a7f079c597ef0647c5b91f3033df
2019-06-24 09:45:45 -07:00
Bonnie Xu
2762cc1597 Setup stateless reset token
Summary: Replace hard coded stateless reset token with a token from the stateless reset token generator.

Reviewed By: yangchi

Differential Revision: D15481858

fbshipit-source-id: 30c96843c38c616600466b2fabb6defd5fcc5799
2019-06-13 08:44:53 -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
Bonnie Xu
8168bcf624 Update QUIC Transport Error Code Entries
Summary: Update Transport Error Codes to be in line with IETF standard found here: https://quicwg.org/base-drafts/draft-ietf-quic-transport.html, Initial QUIC Transport Error Codes Entries)

Reviewed By: yangchi

Differential Revision: D15402555

fbshipit-source-id: 3c4ba851e23eb92f81eb61a6f7046f1cc6bf7602
2019-05-20 08:14:08 -07:00
Junqi Wang
7e655863d7 Perform path validation for NAT rebinding
Summary: per spec

Reviewed By: sharma95

Differential Revision: D15162568

fbshipit-source-id: 63fa9266da29687043f598b5939a808c3ba0f75c
2019-05-20 00:48:13 -07:00
Junqi Wang
92b8876ebf Update 0-rtt ticket transport params to d-20
Reviewed By: mjoras

Differential Revision: D15293208

fbshipit-source-id: 4ea5bf6c2c335a5c034341086f9348451bed827e
2019-05-10 16:19:43 -07:00
Yang Chi
c6d2fcc47d Fix typos in Quic code comments
Summary: as title

Reviewed By: sharma95

Differential Revision: D15262509

fbshipit-source-id: 519f17cb51752e8b8f8e7342f322533d551d6591
2019-05-08 13:24:01 -07:00
Alan Frindell
90e5e1b3f1 Split stream state machine into send and receive state machines
Summary: This is step 1 for removing reset on reset, since the send side may need to transition to waiting for a reset ack while the read side is an any state.

Reviewed By: lnicco

Differential Revision: D15075849

fbshipit-source-id: 1e094942a8a1ca9a01d4161cd6309b4136a9cfbf
2019-05-06 14:05:31 -07:00
Matt Joras
eb81e8e7ec Interpret the idle timeout from the ticket as ms.
Summary: Additionally this fails 0-rtt if the idle timeout changes. This avoids the problem where an old client sends an invalid idle timeout transport param.

Reviewed By: JunqiWang

Differential Revision: D15206336

fbshipit-source-id: ac4617c1f48fd9a22c08a88ed8c1d3f46cad0cdd
2019-05-03 16:29:59 -07:00
Matt Joras
41fbfa84c5 Change idle_timeout transport parameter to milliseconds
Summary: This changed in to be in milliseconds d19 forward.

Reviewed By: yangchi

Differential Revision: D15183837

fbshipit-source-id: 561218321dcb51ec41093cafbdb967db2d4b3660
2019-05-02 15:50:27 -07:00
Udip Pant
f6e5cb9e14 T43271780 - Remove state machine from ServerStateMachine-inl.h
Summary:
1. removed ServerStateMachine-inl.h
2. Changed ServerState to enum
3. Removed QuicServerStateMachine
4. Introduced onServerReadData and on onServerClose which replace the state machine handlers

Reviewed By: siyengar

Differential Revision: D15042529

fbshipit-source-id: a34f841a8e6b17e625506fd9b4ccad81d9c04891
2019-04-30 18:34:38 -07:00
udippant
50d4939e9e Initial commit of mvfst 2019-04-22 23:42:46 -07:00