1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-08-05 11:21:09 +03:00

177 Commits

Author SHA1 Message Date
Yang Chi
5f51f4436f Exception-free Quic ConnIdAlgo
Summary: no more surprises in upper layer

Reviewed By: mjoras

Differential Revision: D19976510

fbshipit-source-id: 3487e9aa2cb28d7bc748f13bc2bbc393216b4a8a
2020-02-19 15:54:11 -08:00
Amaury Séchet
e6e6196c86 Move the delayed destruction from Handshake to QuicConnectionStateBase
Summary: Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/88

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

 ---
## Proxygen Canary
Traffic Canary: https://our.intern.facebook.com/intern/traffic/canary?fbid=224323975233396
* elb.prod.ham3c01 - binary_asan - 2020-02-05 02:00 - https://fburl.com/dyndash/u2q12hwq
* elb.prod.mia3c02 - binary - 2020-01-31 09:40 - https://fburl.com/dyndash/vmv34rpa
* elb.prod.otp1c01 - binary - 2020-02-05 02:26 - https://fburl.com/dyndash/0zttm61b
* flb.prod.fath4c02 - binary - 2020-02-05 02:26 - https://fburl.com/dyndash/6o1nqsti
* flb.prod.fgye3c01 - binary - 2020-01-31 09:40 - https://fburl.com/dyndash/nu3i5ahw
* olb.prod.rfrc0c01.p2 - binary - 2020-01-31 09:40 - https://fburl.com/dyndash/c1o6hpqw
* olb.prod.rftw0c01.p2 - binary - 2020-02-05 02:26 - https://fburl.com/dyndash/xg6qbyru
* slb.prod_regional.rcln0c00 - binary - 2020-02-05 02:26 - https://fburl.com/dyndash/e4qkbzcz
* slb.prod_regional.rfrc0c00 - binary - 2020-01-31 09:40 - https://fburl.com/dyndash/j0yxofty
* slb.prod_regional.rrva0c00 - binary_asan - 2020-02-05 02:00 - https://fburl.com/dyndash/4hsg02uj
* slb.regional.rfrc0c01.p2 - binary - 2020-01-31 09:40 - https://fburl.com/dyndash/1njxzbgf
* slb.regional.rvll0c01.p2 - binary - 2020-02-05 02:26 - https://fburl.com/dyndash/056xdmzn
 ---

Reviewed By: lnicco

Differential Revision: D19551142

Pulled By: mjoras

fbshipit-source-id: b0d14146d14384b8c37887b3e9d8fed7d6181d88
2020-02-05 06:13:33 -08:00
Mirko Andjic
3f419b2eb2 Add vantage point to qlog.
Summary: Landing an outstanding diff

Reviewed By: yangchi

Differential Revision: D19261395

fbshipit-source-id: 437461222ff04f5c3271567d3bb064bceaf80029
2020-01-07 11:19:13 -08:00
Raghu Nallamothu
0f7ef79620 Don't send conn close when network is unreachable
Summary: We send conn close packets when network is un-rechable, this task fixes the issue and we no longer send conn close frames when network is un-rechable.

Reviewed By: yangchi, lnicco

Differential Revision: D18469028

fbshipit-source-id: 3090b6b3d63e1fc9448b8d945c645f4da8747ffc
2019-12-12 16:00:23 -08:00
Yang Chi
d7d19c74b5 Stop tracking pure ack packets in Quic
Summary:
Previously we track them since we thought we can get some additional
RTT samples. But these are bad RTT samples since peer can delays the acking of
pure acks. Now we no longer trust such RTT samples, there is no reason to keep
tracking pure ack packets.

Reviewed By: mjoras

Differential Revision: D18946081

fbshipit-source-id: 0a92d88e709edf8475d67791ba064c3e8b7f627a
2019-12-12 13:20:09 -08:00
Subodh Iyengar
d2fa2cbcd6 process multiple packets on recvmsg
Summary:
In the current client code we read one packet, go back to epoll, and then read
another packet. This is not very efficient.

This changes it so that we can read multiple packets in one go from an epoll
callback.

This only performs changes on the client

Reviewed By: mjoras

Differential Revision: D18797962

fbshipit-source-id: 81be82111064ade4fe3a07b1d9d3d01e180f29f5
2019-12-04 12:04:10 -08:00
Aman Sharma
69ac8aeb62 De-templatize stream state machine logic
Summary: The state machine logic is quite abstruse, this modifies it to make it more readable.

Reviewed By: siyengar

Differential Revision: D18488301

fbshipit-source-id: c6fd52973880931e34904713e8b147f56d0c4629
2019-11-19 20:18:11 -08:00
Matt Joras
61004ba72c Move some maps/sets structures to F14 maps and sets.
Summary:
F14 should be faster and have lower memory urilization for near-empty sets and maps. For most H3 connections these are mosotly going to be near-empty, so CPU wins will likely be minimal.

For usecases that have extremely high numbers of streams, there are likely going to be CPU wins.

Reviewed By: yangchi

Differential Revision: D18484047

fbshipit-source-id: 7f5616d6d6c8651ca5b03468d7d8895d1f51cb53
2019-11-18 10:29:58 -08:00
Huzefa Zakir
42bfa9dc4a Limit Quic PacketNumber to 2^62 -1
Summary: inspect PN, and when it reaches 2^62 -2 trigger a transport close through a pending event.

Reviewed By: yangchi

Differential Revision: D18239661

fbshipit-source-id: 1a218678099016693149e12ff121e2a39b95aecc
2019-11-06 19:35:45 -08:00
Yang Chi
9247b8f49b Change Quic qlogger vantage point to enum
Summary: To prevent adhoc string passed in

Reviewed By: sharma95

Differential Revision: D18013615

fbshipit-source-id: 6f5512468755c2b1ecbba3ba42188fa22f4e94b9
2019-10-23 10:16:58 -07: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
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
851c374518 Small fixes
Summary: Small fixes to qlog.

Reviewed By: sharma95

Differential Revision: D16966786

fbshipit-source-id: 7b85a85c218e3a827794c53352acd33cdf96af92
2019-08-22 17:52:20 -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
Akshay Narayan
7d58058b8f QuicTransportBase: Allow notifyPendingWriteOnStream (#18)
Summary:
When a write callback x is already defined for a stream
and notifyPendingWriteOnStream is called with the same callback x,
it is safe to not return an error.

Building on master is currently broken due to 2040a13e40 (diff-ddd35d436da215e41b89fd5afe4acebbR11), but this commit builds when rebased before that.

udippant
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/18

Reviewed By: yangchi

Differential Revision: D15562893

Pulled By: afrind

fbshipit-source-id: 44e62bb9bb0002508257acdc419f20bcb973ca64
2019-06-05 16:55:25 -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
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
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
Luca Niccolini
03d1efac7d Revert D14757064: [quic] Fix peek callback
Differential Revision:
D14757064

Original commit changeset: bb1e43762f54

fbshipit-source-id: 9855ea175179b9652e0ec9e0a649769a60268600
2019-05-16 18:36:52 -07:00
Konstantin Tsoy
ea0fb07be1 Fix peek callback
Summary:
Peek callback wasn't raised on data arrival. The fix is to:
* always update peek looper before read looper
* always update `peekableList` together with `readableList`

Differential Revision: D14757064

fbshipit-source-id: bb1e43762f54d024050eced425351f03a0cffd9f
2019-05-16 12:22:14 -07:00
Subodh Iyengar
1d9e4034c9 Fix app limited to account for peer created streams
Summary:
Previously updateAppLimited was not accounting for peer created streams.
This moves app limited accounting into the stream manager

This also makes a subtle change to the applimited callback. We assume that
we start off as not app limited now, so if we create a stream we will not call
the congestion controller app limited callback.

Reviewed By: mjoras

Differential Revision: D15166114

fbshipit-source-id: 1a8d573533861f53bb1bd9fdc605dfefe68902dc
2019-05-06 15:58:49 -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
Konstantin Tsoy
6b49f4e42a Cancel delivery callbacks on skip
Summary:
For the sender, upon egress or ingress skip we must check registered
delivery callbacks and invoke `onCancel()` for each offset below the skipped
offset.

Reviewed By: mjoras

Differential Revision: D15113113

fbshipit-source-id: 221badce8e92abde48e8ab2c8f3c1da9e506f54e
2019-05-06 10:29:42 -07:00
udippant
79032c7b9b fbshipit-source-id: f498ac5e677b2931d937ba78edd4373ba04dca2a 2019-04-25 21:33:43 -07:00
udippant
163ce02a6f Sync changes to rename onNewStream and CongestionController factory 2019-04-24 17:44:31 -07:00
udippant
50d4939e9e Initial commit of mvfst 2019-04-22 23:42:46 -07:00