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

28 Commits

Author SHA1 Message Date
Yang Chi
db58ba1ca4 Move Quic Stream data writing from WriteCodec to PacketBuilder
Summary:
Different Builders now want to have its own way of writing or
appending write buffer. So let builders handle them.

This also add new APIs in BufWriter to copy data from IOBuf/BufQueue directly
into a destination IOBuf without cloning inbetween.

Reviewed By: mjoras

Differential Revision: D20821789

fbshipit-source-id: c0a24eb12378f64cf26c27d4232f610ed80fba84
2020-04-07 08:46:14 -07:00
Matt Joras
3b2ba3fe8b Implement handshake done
Summary: This is without cipher dropping, but the frame is parseable and the server will send it at the correct time.

Reviewed By: yangchi, lnicco

Differential Revision: D20235013

fbshipit-source-id: 696c11ec573a530b3ed9f4185a2f6847ee08819f
2020-03-04 22:08:33 -08:00
Matt Joras
61cd1a7289 Back out "Implement handshake done and cipher dropping."
Summary: This caused an increase in client errors.

Reviewed By: yangchi, lnicco

Differential Revision: D20186386

fbshipit-source-id: 737122a94c97498efba61292a6c292cfe482925c
2020-03-01 18:31:40 -08:00
Matt Joras
2b3b76cc4d Remove support for MVFST_OLD.
Summary:
This eliminatees some tech debt by completely removing the notion of version from the core transport parameters structure and the app token for zero rtt.

Note that for the draft-27 changes we will need to temporarily re-introduce it, but to a different layer (the extension encoding itself).

Reviewed By: JunqiWang

Differential Revision: D20073578

fbshipit-source-id: 2b55af621566bf1c20e21dd17251116de1788fa0
2020-02-28 09:52:34 -08:00
Matt Joras
472e40a902 Implement handshake done and cipher dropping.
Summary: This implements the handshake done signal and also cipher dropping.

Reviewed By: yangchi

Differential Revision: D19584922

fbshipit-source-id: a98bec8f1076393b051ff65a2d8aae7d572b42f5
2020-02-27 12:25:52 -08:00
Matt Joras
431acc838f Optimize ACK frame writing
Summary:
Previously we stored an `IntervalSet` in each `WriteAckFrame`. We don't need to do this, as by the time we are writing an `ACK` the `IntervalSet` is complete. Instead of bothering with the `IntervalSet` operations, we can simply serialize it to a reverse-sorted `vector.`

Additionally this has some micro-optimizations for filling the ACK frame, with a new function for getting varint size.

Reviewed By: yangchi

Differential Revision: D19397728

fbshipit-source-id: ba6958fb36a4681edaa8394b1bcbbec3472e177d
2020-01-16 10:40:40 -08:00
Matt Joras
9dae0abe05 Fix appliication close writing/parsing
Summary: There's no triggering frame type for application closes.

Reviewed By: yangchi, raghunallamothu

Differential Revision: D19191873

fbshipit-source-id: 66cc2098e1f7671fabab0a2309deaabe7922a18e
2019-12-20 18:58:54 -08:00
Matt Joras
f041ec17ef Use folly::small_vector for ack blocks
Summary: By modifying `IntervalSet` a bit we can make it so it takes a `folly::small_vector` as the container. We expect that for real traffic there will not generally be a lot of ACK blocks per frame, so optimize for that.

Reviewed By: siyengar

Differential Revision: D18919975

fbshipit-source-id: 199a2ea9ba5003382e2d7d99fc7a6de7e8aafdca
2019-12-12 12:06:31 -08:00
Raghu Nallamothu
e06de27550 Merge Application Close Frame and Connection Close Frame
Summary: As a part of Draft 17, application close frame has been removed, we use connection close frame to represent both application close and connection close.

Reviewed By: mjoras

Differential Revision: D18580856

fbshipit-source-id: d274fa2d3dbc59b926bca5a2b8a20328ae582703
2019-12-03 15:02:06 -08:00
Matt Joras
4dc04682a9 Replace IOBufQueue in writeBuffer
Summary: This isn't a huge source of cycles, but the flushing of the cache does show up in tperf. Turns out this is very easy to do, and exposed another minor problem which is that we were misusing `clear()` on the `IOBufQueue`. Instead we should have been using `move()` to reset it to being empty.

Reviewed By: siyengar

Differential Revision: D18758922

fbshipit-source-id: 6dcbc29e8bebd93b5787939176799e3df90ed94d
2019-12-02 18:16:24 -08:00
Matt Joras
cf783ae678 Replace IOBufQueue in retransmission buffer.
Summary:
`IOBufQueue` has some facilities for fast appending to the tail. This is not useful for us in the retransmission buffer usecase, and probably not at all. Flushing the tail cache from the `IOBufQueue` is expensive when we have to shuffle around the retransmission buffer queue on removal.

This diff replaces `IOBufQueue` with a bespoke version that only has some of the functionality.

This also changes the dependent peek APIs to use `IOBuf`s directly.

Reviewed By: siyengar, yangchi

Differential Revision: D18126437

fbshipit-source-id: a2fec0f45a72459855700c605bfd0d863a9067b7
2019-11-20 12:04:03 -08:00
Raghu Nallamothu
e06c0848e0 T24905463 - [quic][ping] Implement ping in Quic
Summary: Implement ping functionality in ping

Reviewed By: yangchi

Differential Revision: D17885286

fbshipit-source-id: 4c328d14a023057d6889818250c0129c06e60874
2019-10-21 17:07:12 -07:00
Subodh Iyengar
cbbc6b0c77 Custom variant for simple frames
Summary: Use a custom variant for simple frames

Reviewed By: mjoras

Differential Revision: D17781068

fbshipit-source-id: e059d33df4651c7e0a1c989cc8651c9cd661b14b
2019-10-07 22:43:32 -07:00
Subodh Iyengar
68c332acb1 Use custom variant type for write frames
Summary:
Use the custom variant type for write frames as well, now that
we use them for read frames.

Reviewed By: mjoras

Differential Revision: D17776862

fbshipit-source-id: 47093146d0f1565c22e5393ed012c70e2e23d279
2019-10-07 22:43:31 -07:00
Viktor Chynarov
fa98978d6d Back out "Revert D15264935: [quic] Make RetireConnectionIdFrame a QuicSimpleFrame (for now)"
Summary: Original commit changeset: aa2ccf4bb39e

Reviewed By: lnicco

Differential Revision: D17688496

fbshipit-source-id: e627784cdfe208994cbae3f71062d74d312d3600
2019-10-01 11:11:05 -07:00
Shawn Shihang Wei
5cf3c6ce67 Revert D15264935: [quic] Make RetireConnectionIdFrame a QuicSimpleFrame (for now)
Differential Revision:
D15264935

Original commit changeset: 8c66c4604e24

fbshipit-source-id: aa2ccf4bb39ec3b0286baaed5cc42bf9065f4fcd
2019-09-30 18:49:59 -07:00
Viktor Chynarov
0ab06b6fc9 Make RetireConnectionIdFrame a QuicSimpleFrame (for now)
Reviewed By: sharma95

Differential Revision: D15264935

fbshipit-source-id: 8c66c4604e24442f4c77e8eb2d10901d1702adc7
2019-09-30 17:40:13 -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
Luca Niccolini
cf842aab47 cleanup some unused includes and using
Reviewed By: yangchi

Differential Revision: D16976466

fbshipit-source-id: c1fc2ee0795997f498ac7431542bbfbf1f0d2fb2
2019-08-24 02:03:39 -07:00
Matt Joras
049b512646 Write stream frame header and data separately.
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
2019-08-22 15:59:41 -07:00
Junqi Wang
346a51f63f Update NewConnectionIdFrame to D-22
Summary: ^

Reviewed By: sharma95

Differential Revision: D16466184

fbshipit-source-id: f5a9b8e65e92048393b78305b0d176ab2f4fe338
2019-07-25 11:52:20 -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
f2e6ba6de9 Changed to a more accurate variable name
Summary: Changed to a more accurate variable name.

Reviewed By: yangchi

Differential Revision: D15769818

fbshipit-source-id: 1d36c7011c45c723c35daba4ca2a5fc80a0bd7b4
2019-06-11 19:00:20 -07:00
Udip Pant
b64e4f99ef Interpret varint in MAX_STREAMS_FRAME as count and not as stream-id
Summary: post draft-17 it is interpreted as count not the max stream id

Reviewed By: mjoras

Differential Revision: D15523021

fbshipit-source-id: 779a1c5269eb8dbcdcd169303caa7a65e467339c
2019-05-28 14:48:56 -07:00
Junqi Wang
87672083c3 Make NewConnectionIdFrame a QuicSimpleFrame (for now)
Summary:
The plan is to not treat probing frame as simple frame, but that is not
going to happen soon.

Reviewed By: sharma95

Differential Revision: D15176635

fbshipit-source-id: 62ac13cdb82a09161e9148dfc437cf7377a01c96
2019-05-10 19:07:42 -07:00
Udip Pant
4a9537798e Add correct license headers on some missing files
Summary: ^

Reviewed By: sharma95

Differential Revision: D15172546

fbshipit-source-id: bacc832752a433b86962e77bb19aff4504640e60
2019-05-01 22:42:04 -07:00
udippant
79032c7b9b fbshipit-source-id: f498ac5e677b2931d937ba78edd4373ba04dca2a 2019-04-25 21:33:43 -07:00
udippant
50d4939e9e Initial commit of mvfst 2019-04-22 23:42:46 -07:00