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

20 Commits

Author SHA1 Message Date
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
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
Yang Chi
2a97d4533c Quic busy write loop detector
Summary:
This diff adds a DebugState in the QuicConnectionState to track the
reason we schedule transport WriteLooper to run, the reason we end up not
writing and the number of times such write happens consecutively. And when it
reaches a predefined limit, we trigger a callback on a loop detector interface.

Reviewed By: kvtsoy

Differential Revision: D15433881

fbshipit-source-id: d903342c00bc4dccf8d7320726368d23295bec66
2019-07-17 15:18:57 -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
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
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
Yang Chi
a1b86e660d Rename Quic batching num to batch size
Summary: batchingNum -> batchSize

Reviewed By: mjoras

Differential Revision: D15740004

fbshipit-source-id: 2e3ba33792248ad67e3b06da0a95dc9ff8e76892
2019-06-11 07:28:34 -07:00
Amaury Séchet
f26cd1f62d Add a bridge to fizz::Aead (#12)
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
2019-05-29 11:54:08 -07:00
Yang Chi
1dbe39fd76 Separate app-limited and app-idle
Summary:
Current app-limited is defined as the connection doesn't have a no
non-control stream. I'm changing this to be app-idle. And app-limited will be
changed to a state in connection where app isn't sending bytes fast enough to
keep congestion controller probing higher bandwidth.

Reviewed By: mjoras

Differential Revision: D15456199

fbshipit-source-id: e084bc133284ae37ee6da8ebb3c12f505011521e
2019-05-24 12:16:09 -07:00
Yang Chi
0195295a5c Change the retransmission data handling precondition from DCHECK to CHECK
Summary: to get prod signals

Reviewed By: kvtsoy

Differential Revision: D15461186

fbshipit-source-id: 7e37fc2d1bc799851c438a6ae5cb417f215ce2f5
2019-05-23 12:22:02 -07:00
Yang Chi
482366c63a Fix ack writes scheduling
Summary:
There is a bug in how we decide if we should schedule a write loop due
to sending Acks. Currently if one PN space has needsToWriteAckImmediately to
true and another PN space has hasAcksToSchedule to true, but no PN space
actually has both to true, we will still schdeule a write loop. But that's
wrong. We won't be able to send anything in that case. This diff fixes that.

Reviewed By: JunqiWang

Differential Revision: D15446413

fbshipit-source-id: b7e49332dd7ac7f78fc3ea28f83dc49ccc758bb0
2019-05-22 19:06:33 -07:00
Yang Chi
ca31b43564 rename timeoutBasedRetxCount to timeoutBasedRtxCount
Summary: Just to make it consistent with other var names in quic

Reviewed By: siyengar

Differential Revision: D15415528

fbshipit-source-id: 917159d6ccf86cf34612386d128d6b6d5bf62de6
2019-05-20 11:22:24 -07:00
Subodh Iyengar
408a2b8a09 Gate QuicLogger to server only
Summary:
Using FOLLY_MOBILE macro to be able to exclude
quic trace generation on mobile

Reviewed By: mjoras

Differential Revision: D14609755

fbshipit-source-id: 2d5d624703a5b58c28cb533e3c2cc20d3a5c3d45
2019-05-10 15:59:11 -07:00
Yang Chi
c35e3d6e84 Rename RTO to PTO
Summary: To conform to the current specs.

Reviewed By: mjoras

Differential Revision: D15215018

fbshipit-source-id: 4dcc495aea1cd7cebf2bc84f7367cb2e4a55df19
2019-05-06 18:50:35 -07:00
Yang Chi
374c4e5b82 move cwnd blocked trace from Cubic to QuicTransportFunction
Summary:
So this trace is shared by all CongestionControllers. This also
changes what we log into the trace.

Reviewed By: siyengar

Differential Revision: D15184916

fbshipit-source-id: 6cbeb02ee2d24a6bf8d705ff883f5a57603988e7
2019-05-02 14:02:49 -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
Aman Sharma
c04e0e08a2 Implementing stateless retry on the client
Summary:
This diff implements the handling of retry packets. As per the spec:
1. A client MUST accept and process at most one Retry packet for each connection attempt.  After the client has received and processed an Initial or Retry packet from the server, it MUST discard any subsequent Retry packets that it receives.
2. Clients MUST discard Retry packets that contain an Original Destination Connection ID field that does not match the Destination Connection ID from its Initial packet. This prevents an off-path attacker from injecting a Retry packet.
3. The client responds to a Retry packet with an Initial packet that includes the provided Retry Token to continue connection establishment.
4. A client sets the Destination Connection ID field of this Initial packet to the value from the Source Connection ID in the Retry packet.  Changing Destination Connection ID also results in a change to the keys used to protect the Initial packet.  It also sets the Token field to the token provided in the Retry.

Reviewed By: mjoras

Differential Revision: D14464508

fbshipit-source-id: 212539a588378fb0d795caaec150959680172781
2019-05-01 16:49:05 -07:00
Junqi Wang
2c701de030 Continue on network unreachable with timeout
Summary:
Previously we tried continue on network down and it showed good
improvement. But there was a problem: it hurts UX for airplane mode users, it
didn't return error back to user immediately but after 30/60 seconds timeout.
This adds a timer for this feature and it only allows the transport to ignore
network unreachable error for 200ms. After 200ms, it throws and reports to user
if the error persists.

Reviewed By: siyengar

Differential Revision: D15089442

fbshipit-source-id: dd87f4f579187c4b45244a7ee0477d2a0cf1b5d7
2019-04-26 10:08:35 -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