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

11 Commits

Author SHA1 Message Date
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
Subodh Iyengar
e524c0c069 iobufqueue diediedie
Summary:
Don't use IOBufQueue for most operations in mvfst and use BufQueue instead. Since BufQueue did not support a splitAtMost, added it in instead.

The only place that we still use IOBufQueue is in crypto because fizz still requires it

Reviewed By: mjoras

Differential Revision: D18846960

fbshipit-source-id: 4320b7f8614f8d2c75f6de0e6b786d33650e9656
2019-12-06 12:06:44 -08:00
Matt Joras
b6e134fdee Use F14FastMap as the retranmission buffer.
Summary:
The retransmission buffer tracks stream frame data we have sent that is currently unacked. We keep this as a sorted `deque`. This isn't so bad for performance, but we can do better if we break ourselves of the requirement that it be sorted (removing a binary search on ACK).

To do this we make the buffer a map of offset -> `StreamBuffer`.

There were two places that were dependent on the sorted nature of the list.

1. For partial reliablity we call `shrinkBuffers` to remove all unacked buffers less than an offset. For this we now have to do it with a full traversal of the retransmission buffer instead of only having to do an O(offset) search. In the future we could make this better by only lazily deleting from the retransmission buffer on ACK or packet loss.

2. We used the start of the retransmission buffer to determine if a delivery callback could be fired for a given offset. We need some new state to track this. Instead of tracking unacked buffers, we now track acked ranges using the existing `IntervalSet`. This set should be small for the typical case, as we think most ACKs will come in order and just cause existing ranges to merge.

Reviewed By: yangchi

Differential Revision: D18609467

fbshipit-source-id: 13cd2164352f1183362be9f675c1bdc686426698
2019-11-27 00:25:25 -08:00
Matt Joras
88aec617ba Drop loss buffer when canceling retransmission and handshake retx.
Summary: This is just an oversight. By the time we do this things could be moved to the loss buffer if the packets were marked as lost before we got our first 1-rtt ACKs. Without this we will retransmit a lost initial indefinitely.

Reviewed By: siyengar

Differential Revision: D17989236

fbshipit-source-id: 5215bf71517f019162b307f72221877e2145e2cb
2019-10-23 12:44:53 -07:00
Subodh Iyengar
0f7db99f74 speed up read buffer
Summary: Speed up read buffer search by starting using binary search vs the beginning

Reviewed By: mjoras

Differential Revision: D17784954

fbshipit-source-id: 412bfbd53747bf9de8e603d7c810839ad1984cbf
2019-10-18 16:51:50 -07:00
Yang Chi
dc27ebf05d Rename ackFrameMatchesRetransmitBuffer to streamFrameMatchesRetransmitBuffer
Summary:
The function indeed compares a Stream frame to a buffer, not an Ack
frame to a buffer.

Reviewed By: sharma95

Differential Revision: D18000632

fbshipit-source-id: fbbc36378404f8f52a199114af48b9020d0569e8
2019-10-18 15:54:26 -07:00
Amaury Séchet
f4e90017a3 Add mvfst specific encryption level (#26)
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
2019-06-27 14:09:04 -07:00
Omer Shapira
3099d621af fix to peek API
Reviewed By: lnicco

Differential Revision: D15415966

fbshipit-source-id: 50363c4d6289d27e772cab5000bb387926c96db0
2019-05-22 20:02:09 -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
Konstantin Tsoy
8e2b621f63 Match ack frames to retransmission buffers properly
Summary:
With partial reliability we adjust retransmission queue on skips; we need to account for that when we match buffers in retransmission queue.

In fully reliable mode an ack frame must always match a single buffer from re-tranmission queue (offset, length and eom).
In partially reliable mode we can run into two more scenarios in addition to the above:
* re-transmisison buffer for which the ack frame arrived has been removed fully
* re-transmisison buffer for which the ack frame arrived has been removed partially

If full buffer is missing - ignore the ack.
If part of the buffer is missing, make sure that the adjusted offset and length match to that found in the ack frame.

Reviewed By: yangchi

Differential Revision: D15301304

fbshipit-source-id: f281fa30957c1c13c42c05684984f9a1acaa4e34
2019-05-15 13:00:23 -07:00
udippant
50d4939e9e Initial commit of mvfst 2019-04-22 23:42:46 -07:00