Summary:
Prior to this diff we would clone out an entire flow control's worth of data from the writebuffer and then clone out a smaller portion of that to write into the packet builder. This is extremely wasteful when we have a large flow control window.
Additionally we would always write the stream data length field even when we are going to fill the remainder of the packet with the current stream frame. By first calculating the amount of data that needs to can be written and writing the header, we can now omit the data length field when we can fill the whole packet.
Reviewed By: yangchi
Differential Revision: D15769514
fbshipit-source-id: 95ac74eebcde87dd06de54405d7f69c42362e29c
Summary:
This parameter duplicates the one in the QuicConnectionStateBase.
It is set everywhere the canonical one is, and it isn't used directly in any
manner that is separate from QuicConnectionStateBase::clientConnId.
This diff changes the following:
* removed clientConnId from ServerConnIdParams
* add setter to directly initialize clientConnId on the transport from the
connection
* update tests
Reviewed By: udippant
Differential Revision: D16711180
fbshipit-source-id: 63e667aa0df8a79757f18fb3ffc178c7c9613e1a
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
Summary:
Wrap the fizz::Aead as soon as fizz and it over to mvfst and use a quic::Aead everywhere else in ServerHandshake.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/35
Reviewed By: yangchi
Differential Revision: D16710820
Pulled By: mjoras
fbshipit-source-id: d6e3bee9f5baa0ebf6b3ef580de9e4614de8c4e5
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
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
Summary: Add transportStateUpdate event so it can be part of qlog.
Reviewed By: mjoras
Differential Revision: D16342467
fbshipit-source-id: 109189275d44996850b82646bab4a733a3a4c7a1
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
Summary: [quic] Add packetDrop to Quic, so it can be logged in qlog.
Reviewed By: yangchi
Differential Revision: D16257829
fbshipit-source-id: ca87116f2c708538d05f28098620a5dfc2456f3e
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
Summary:
This ensure a lot of code do not depend on fizz anymore.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/26
Reviewed By: mjoras, JunqiWang
Differential Revision: D16030663
Pulled By: yangchi
fbshipit-source-id: a3cc34905a6afb657da194e2166434425e7e163c
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
Summary:
Currently we handle crypto timer before loss timer. And currently loss
time is for AppData only since for the other two Packet Number spaces, crypto
timer will take care of it. This diff extends loss times to 3 loss times, and
handle them before handle crypto timer. The rational here is that loss time is
shorter than crypto timer, so this will make retransmission during crypto
handshake more aggressive. For app data, this diff doesn't change anything.
Reviewed By: sharma95
Differential Revision: D15552405
fbshipit-source-id: bd5c24b0622c72325ffdea36d0802d4939bae854
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
Summary:
This is based on top of #12 .
It logically split MockAead and fizz::MockAead in preparation for separation of the two.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/15
Reviewed By: yangchi
Differential Revision: D15474045
Pulled By: mjoras
fbshipit-source-id: b61a5cb08ddae0add66a6c37e156eddaef118e0c
Summary:
This introduce quic::Aead as a simple typedef to fizz::Aead and update the codebase to use quic::Aead . This should not impact the functionality of the code in any way.
This is a first step toward introducing an interface that is specific for mvfst so that mvfst can swap fizz for something else.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/12
Reviewed By: JunqiWang
Differential Revision: D15335324
Pulled By: mjoras
fbshipit-source-id: fef166a9a5c2cbae08ad9511d0abd749f330c221
Summary: This is no longer part of the spec. It's up to the application how to handle reset
Reviewed By: lnicco
Differential Revision: D15107164
fbshipit-source-id: 2a1fe0c552bd7f054e84ef86a01a78c379b0a483
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
Summary: This changed in to be in milliseconds d19 forward.
Reviewed By: yangchi
Differential Revision: D15183837
fbshipit-source-id: 561218321dcb51ec41093cafbdb967db2d4b3660