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
Luca Niccolini
c47c3cf5c6 Revert PMTU and size-enforced packet builder
Differential Revision: D23283619

fbshipit-source-id: b7fe31871dad5711016234a2d10ae84edc4fd24c
2020-08-22 16:55:54 -07:00
Xiaoting Tang
4762cfb927 Introduce PMTU as a variable
Summary:
First step towards d6d. Semantically we need to separate the old `udpSendPacketLen` into `peerMaxPacketSize` as well as `currPMTU`. The former is directly tied to the peer's max_packet_size transport parameter whereas the second is controlled by d6d. To get the actual udp mss, call `conn_->getUdpSendPacketLen()`, which will use the minimum of the two if d6d is enabled, otherwise it will fallback to use `peerMaxPacketSize` only.

During processClientInitialParams and processServerInitialParams, we no longer need to check whether `canIgnorePathMTU` is set because that logic is moved to `setUdpSendPacketLen`. If d6d is enabled, we set both `peerMaxPacketSize` and `currPMTU` to `packetSize` because receiving an initial packet of size x indicates both that the peer accepts x-sized packet and that the PMTU is at least x.

Many call sites and tests are changed.

Faebook:
For now, d6d is considered enabled if `canIgnorePathMTU==false` and `turnoffPMTUD==true`. Down the road, from semantic & practical POV at least one of them should be renamed to something like `enableD6D`, since enabling d6d implies turning off PMTUD and that we should not ignore PMTU. We can keep one for the sake of testing.

Reviewed By: mjoras

Differential Revision: D22049806

fbshipit-source-id: 7a9b30b7e2519c132101509be56a9e63b803dc93
2020-08-17 16:15:24 -07:00
Matt Joras
81756e3d13 Allow specifying error code in setReadCallback
Summary: We have an API behavior where setReadCalback will issue a StopSending on behalf of the app. This is useful but has confusing semantics as it always defaults to GenericApplicationError::NO_ERROR. Instead let the error be specified as part of the API.

Reviewed By: yangchi, lnicco

Differential Revision: D23055196

fbshipit-source-id: 755f4122bf445016c9b5adb23c3090fc23173eb9
2020-08-13 18:28:38 -07:00
Yang Chi
06083595e3 Do not enable pacing if transport doesn't have pacing timer
Summary:
LOG an error and fallback to no pacing. This diff also stops
supporting automaticaly set pacingEnabled to true when BBR is enabled.

Reviewed By: mjoras

Differential Revision: D22875904

fbshipit-source-id: f8c8c9ea252f6e5e86f83174309b159ce93b3919
2020-08-03 10:38:39 -07:00
Yang Chi
8b007886df Experiment with longer timer compensation in Quic Pacer
Summary:
Our current timer compenstation works as following:

Pacer schedule write -> Pacer marks scheduled time T0-> timer fires -> Pacer uses (now - T0 + writeInterval) to calculate burst size -> transport writes burst size amount of data at time T1 -> pacer schedules again.

This diff changes to:

Pacer scheduleWrite -> timer fires -> Pacer uses (now - previous T1' + writeInteral) to calculate burst size -> transport writes burst size amount of data at T1 -> pacer schedules again

because T1' < T0 < T1, this compensates the timer more.

With higher compensation from timer interval calculation, the `tokens_ += batchSize_;` code inside refreshPacingRate is removed in this diff.

Reviewed By: yangchi

Differential Revision: D22532672

fbshipit-source-id: 6547298e933965ab412d944cfd65d5c60f4dced7
2020-07-29 16:54:44 -07:00
Matt Joras
90f2421611 Re-lookup stream after callback.
Summary: We don't know if this pointer remains valid after the callback.

Reviewed By: yangchi

Differential Revision: D22709445

fbshipit-source-id: 7802ab08052b06af0268652a44a080d9d9673122
2020-07-24 17:45:47 -07:00
Brandon Schlinker
b4df09831b Support for TX timestamping
Summary:
Adds support for timestamping on TX (TX byte events). This allows the application to determine when a byte that it previously wrote to the transport was put onto the wire.

Callbacks are processed within a new function `QuicTransportBase::processCallbacksAfterWriteData`, which is invoked by `writeSocketDataAndCatch`.

Reviewed By: mjoras

Differential Revision: D22008855

fbshipit-source-id: 99c1697cb74bb2387dbad231611be58f9392c99f
2020-07-16 22:45:34 -07:00
Brandon Schlinker
ad8ca14760 Instrumentation callback foundation w/ app rate limited
Summary:
Adds `QuicSocket::InstrumentationObserver`, an observer that can be registered to receive various transport events.

The ultimate goal of this class is to provide an interface similar to what we have through TCP tracepoints. This means we need to be able to register multiple callbacks.

- Initially, the first event exposed through the callback is app rate limited. In the future, we will expose retransmissions (which are loss + TLP), loss events (confirmed), spurious retransmits, RTT measurements, and raw ACK / send operations to enable throughput and goodput measurements.
- Multiple callbacks can be registered, but a `folly::small_vector` is used to minimize memory overhead in the common case of between 0 and 2 callbacks registered.
- We currently have a few different callback classes to support instrumentation, including `QuicTransportStatsCallback` and `QLogger`. However, neither of these meet our needs:
  - We only support installing a single transport stats callback and QLogger callback, and they're both specialized to specific use cases. TransportStats is about understanding in aggregation how often an event (like CWND limited) is occurring, and QLogger is about logging a specific event, instead of notifying a callback about an event and allowing it to decide how to proceed.
  - Ideally, we can find a way to create a callback class that handles all three cases; we can start strategizing around that as we extend `InstrumentationObserver` and identify overlap.

Differential Revision: D21923745

fbshipit-source-id: 9fb4337d55ba3e96a89dccf035f2f6978761583e
2020-07-16 10:25:45 -07:00
Brandon Schlinker
e43eb2e8b4 Notify connection callback when app rate limited
Summary:
Notify connection callback implementation when the transport becomes app rate limited
- The callback implementation is not required to define a handler for this callback (not pure virtual).
- D21923745 will add an instrumentation callback class that can be used to allow other components to receive this signal. I'm extending to the connection callback because the overhead seems low, and we already have the connection callback registered for `HQSession`.

Reviewed By: mjoras, lnicco

Differential Revision: D21923744

fbshipit-source-id: 153696aefeab82b7fd8a6bc299c011dcce479995
2020-07-16 10:25:45 -07:00
Brandon Schlinker
8805ec2792 Split TestQuicTransport into separate header
Summary: Splitting `TestQuicTransport` from `QuicTransportTest` into a separate header file so that it can be reused in other tests, including to support tests that are outside of mvfst.

Reviewed By: lnicco

Differential Revision: D22013646

fbshipit-source-id: 8b6198dca822a95133f517e055a9421b98fe5221
2020-06-22 17:18:16 -07:00
Yang Chi
b8fef40c6d Clone Quic handshake packets
Summary:
On loss timer, currently we knock all handshake packets out of the OP
list and resend everything. This means miss RTT sampling opportunities during
handshake if loss timer fires, and given our initial loss timer is likely not a
good fit for many networks, it probably fires a lot.

This diff keeps handshake packets in the OP list, and add packet cloning
support to handshake packets so we can clone them and send as probes.

With this, the handshake alarm is finally removed. PTO will take care of all
packet number space.

The diff also fixes a bug in the CloningScheduler where we missed cipher
overhead setting. That broke a few unit tests once we started to clone
handshake packets.

The writeProbingDataToSocket API is also changed to support passing a token to
it so when we clone Initial, token is added correctly. This is because during
packet cloning, we only clone frames. Headers are fresh built.

The diff also changed the cloning behavior when there is only one outstanding
packet. Currently we clone it twice and send two packets. There is no point of
doing that. Now when loss timer fires and when there is only one outstanding
packet, we only clone once.

The PacketEvent, which was an alias of PacketNumber, is now a real type that
has both PacketNumber and PacketNumberSpace to support cloning of handshake
packets. I think in the long term we should refactor PacketNumber itself into a
real type.

Reviewed By: mjoras

Differential Revision: D19863693

fbshipit-source-id: e427bb392021445a9388c15e7ea807852ddcbd08
2020-06-18 15:30:44 -07:00
Yang Chi
25a646f96a No more Pending mode in Quic ack writing
Summary:
The AckScheduler right now has two modes: Immediate mode which always
write acks into the current packet, pending mode which only write if
needsToSendAckImmediately is true. The FrameScheduler choose the Immdiate mode
if there are other data to write as well. Otherwise, it chooses the Pending
mode. But if there is no other data to write and needsToSendAckImmediately is
false, the FrameScheduler will end up writing nothing.

This isn't a problem today because to be on the write path, the shouldWriteData
function would make sure we either have non-ack data to write, or
needsToSendAckImmediately is true for a packet number space. But once we allow
packets in Initial and Handshake space to be cloned, we would be on the write
path when there are probe quota. The FrameScheduler's hasData function doesn't
check needsToSendAckImmediately. It will think it has data to write as long as
AckState has changed, but can ends up writing nothing with the Pending ack
mode.

I think given the write looper won't be schedule to loop when there is no
non-ack data to write and needsToSendAckImmediately is true, it's safe to
remove Pending ack mode from AckScheduler.

Reviewed By: mjoras

Differential Revision: D22044741

fbshipit-source-id: 26fcaabdd5c45c1cae12d459ee5924a30936e209
2020-06-18 15:30:43 -07:00
Xiaoting Tang
2d00d56fbd Put outstanding packets, events and associated counters in one class
Summary: ^

Reviewed By: yangchi

Differential Revision: D21956286

fbshipit-source-id: 305b879ad11df23aae8e0c3aac4645c0136b3012
2020-06-10 12:45:28 -07:00
Konstantin Tsoy
b1cb1d32af Don't use currentWriteOffset as highest ack offset
Summary: Don't use currentWriteOffset as highest ack offset

Reviewed By: yangchi

Differential Revision: D21679541

fbshipit-source-id: de8814aef4959abc2e10402c5d5e294ef03f8b19
2020-05-28 12:48:28 -07:00
Matt Joras
817dd790b7 Min of idle timeouts.
Summary: The spec suggests doing this, and it is a better semantic than only considering the local one.

Reviewed By: yangchi

Differential Revision: D21433433

fbshipit-source-id: c38abc04810eb8807597991ce8801d81f9edc462
2020-05-06 16:24:55 -07:00
Matt Joras
524bf84c44 Implement an explicit inplace encrypt in Aead.
Summary: This is useful when you want to ensure that the IOBuf you pass in is encrypted inplace, as opposed to potentially creating a new one.

Reviewed By: yangchi

Differential Revision: D21135253

fbshipit-source-id: 89b6e718fc8da1324685c390c721a564bb77d01d
2020-04-21 21:43:59 -07:00
Yang Chi
8db6fc263f Do not accept very small cwnd in Quic
Summary: it's a crime

Reviewed By: mjoras

Differential Revision: D21104571

fbshipit-source-id: 122460f4f29c6abe30dd279fb050d1a263eb67a0
2020-04-18 10:45:50 -07:00
Matt Joras
49d552c3f4 Store unique_ptr<StreamBuffer> in retransmissionBuffer.
Summary:
As it turns out, the extra indirection from storing a unique_ptr is not worse than the gain from using an `F14ValueMap` versus an `F14VectorMap`.

This reduces the `find` cost measurably in profiles, and doesn't appear to have any real negative effects otherwise.

Reviewed By: yangchi

Differential Revision: D20923854

fbshipit-source-id: a75c4649ea3dbf0e6c89ebfe0d31d082bbdc31fd
2020-04-08 14:35:16 -07:00
Yang Chi
df865c4e34 Round up Quic congestion control writable bytes to nearest multiple of packet
Summary:
Currently we return the exact writable bytes number from a real
congestion controller or Path Challenger. This diff round the number up to the
nearest multiple of packet length. Doing so can greatly reduce weird bytes
counting/checking bugs we have around packet writing.

Reviewed By: mjoras

Differential Revision: D20265678

fbshipit-source-id: 2973dde3acc4b2008337127482185f34e16efb43
2020-03-05 12:42:52 -08:00
Yang Chi
5bbbd964c8 DebugState -> WriteDebugState
Summary: prepare for read support

Reviewed By: lnicco

Differential Revision: D20120444

fbshipit-source-id: 2a78448750ea1ba13ddb285fa55df98713a90d41
2020-03-03 18:52:17 -08:00
Yang Chi
0fe2030305 Rename onSuspiciousLoops -> onSuspiciousWriteLoops
Summary: will add read side support

Reviewed By: lnicco

Differential Revision: D20120320

fbshipit-source-id: 83a515eff0cdd01142a78f21fbca4adbf96b4e62
2020-03-03 18:52:17 -08:00
TJ Yin
a396f62335 Replace folly::Optional::hasValue() by has_value()
Differential Revision: D19882830

fbshipit-source-id: 031217f9890351022bc8d171f0ccd7e045dd6972
2020-02-26 08:40:44 -08:00
Matt Joras
6827637d45 Use NiceMock in more tests
Summary: When we don't use NiceMock we end up with a ton of spam in failing tests for every callback that we didn't EXPECT. This makes failed test output extremely noisy.

Reviewed By: sharmafb

Differential Revision: D19977113

fbshipit-source-id: 1a083fba13308cd3f2859da364c8106e349775bb
2020-02-19 21:46:46 -08:00
TJ Yin
73a6de2488 Replace folly::Optional::clear() by reset()
Reviewed By: yfeldblum

Differential Revision: D19953637

fbshipit-source-id: c2135fc24084b7bba0c9d6fc978c8b6c8f9943d4
2020-02-19 12:11:47 -08:00
Andrejs Krasilnikovs
8114c3e3d0 Changed last packet sent times to bet per-packet-number-space andthe PTO timer calculation from them
Summary:
This diff:
1) introduces `EnumArray` - effectively an `std::array` indexed by an enum
2) changes loss times and `lastRetransmittablePacketSentTime` inside `LossState`  to be an `EnumArray` indexed by `PacketNumberSpace`
3) makes the method `isHandshakeDone()` available for both client and server handshakes.
4) uses all those inputs to determine PTO timers in `earliestTimeAndSpace()`

Reviewed By: yangchi

Differential Revision: D19650864

fbshipit-source-id: d72e4a0cf61d2dcb76f0a7f4037c36a7c8156942
2020-02-10 12:28:43 -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
Yang Chi
d5b454a9c0 Back out "Quic pacing refactor"
Summary: Original commit changeset: b83e4a01fc81

Reviewed By: mjoras

Differential Revision: D19644828

fbshipit-source-id: 83d5a3454c6f9a8364e970d236cba008aef85fbd
2020-01-30 18:32:03 -08:00
Yang Chi
edb5104858 Quic pacing refactor
Summary:
(1) The first change is the pacing rate calculation is simplified. It
removes the interval calculation and just uses the timer tick as the interval.
Then it calculates the burst size from there.  For most cases these two
calculation should land at the same result, except when the
`cwnd < minBurstSize * tick / RTT`. In that case, the current calculation would
spread writes evenly across one RTT, assuming no new Ack arrives during the RTT;
while the new calculation uses the first a few ticks to finish the cwnd amount
of data.

(2) Then this diff changes how we compensate late timer. Now the pacer will
maintain a nextWriteTime_ and lastWriteTime_, which makes it easier to
calculate time elapsed since last write. Then each time writer tries to write,
it will be allowed to write timeElapsed * pacingRate. This is much more
intuitive than the current logic.

(3) The diff also adds pacing limited tracking into the pacer. An expected
pacing rate is cached when pacing rate is refreshed by congestion controller.
Then with packets sent out, Pacer keeps calculating the current send rate. When
the send rate is lower, Pacer sets pacingLimited_ to true. Otherwise false.

Only when the connection is not pacing limited, the lastWriteTime_ will be
packet sent time, otherwise it will be set to the last nextWriteTime_. In other
words: if the send rate is lower than expected, we use the expected send time
instead of real send time to calculate time elapsed, to allow higher late
timer compenstation, to give pacer a chance to catch up.

(4) Finally this diff removes the token collecting behavior in the pacer. I
think having tokens increaed, instead of reset, when an ack refreshes the pacing
rate or when we compensate late time, is quite confusing to some people. After
all the above changes, I found tperf can still sustain good throughput without
always increase tokens, and rally actualy gives even better results. So i think
we can remove this part of the pacer that's potentially very confusing to
people who don't know how we got there.

Reviewed By: mjoras

Differential Revision: D19252744

fbshipit-source-id: b83e4a01fc812fc52117f3ec0f5c3be1badf211f
2020-01-17 10:11:35 -08:00
Sergii Druzkin
5edf9ea815 Use MockQLogger instead of FileQLogger in unit tests
Summary: Some test cases used FileQLogger to verify that correct events have been logged. MockQLogger allows to check what events are logged without using an in-memory store like in FileQLogger. Migrated QuicLossFunctionsTest and QuicTransportTest from FileQLogger to MockQLOgger to simplify logic and cut dependencies.

Reviewed By: yangchi

Differential Revision: D19426423

fbshipit-source-id: eb1ae16a81656efd7c491eae790484c73dede8f3
2020-01-16 12:17:40 -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
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
54c5920397 dont append padding frames to write frames
Summary:
If the packet is too small we might automatically add padding frames
to make it large enough. However we used to add padding frames to the
frame list as well.

We dont need this, lets just add the regular frame types.

Reviewed By: mjoras

Differential Revision: D18903074

fbshipit-source-id: f73f82f96f833347c84a38eb1035c46e35ba3b2f
2019-12-09 21:02:23 -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
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
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
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
Viktor Chynarov
7504453972 Use Path Rate Limiter for conn migration
Summary:
Use the Path rate limiter introduced in the previous diff.

When we initialize path validation of an unvalidated peer address,
enable pathValidationRateLimit.

When we receive a proper PATH_RESPONSE frame, disable this limit.

If this limit is enabled, we will check the pathValidationLimiter for
the amount of bytes we are allowed to write.

Change the migration tests in QuicServerTransportTest to use this new limiter
instead of writableByteLimits.

Update shouldWriteData to directly use the new congestionControlWritableBytes
function.

Reviewed By: yangchi

Differential Revision: D18145774

fbshipit-source-id: 1fe4fd5be7486077c58b0d1285dfb03f6c62831c
2019-11-14 13:48:17 -08:00
Matt Joras
027fedad5b Search loss buffer before retransmission buffer when determining if a write is a clone.
Summary:
We maintain the invariant that a buffer cannot be in the loss buffer and retransmission buffers at the same time. As the retransmission buffer holds all unacknowledged data that isn't marked lost, it is very likely to be larger than the loss buffer. This makes the existing case to check for cloning very expensive.

Instead search the loss buffer first, change the search of the loss buffer to a binary search, and elide the double search.

Reviewed By: yangchi

Differential Revision: D18203444

fbshipit-source-id: 66a4e424d61c4b0e3cad12c7eca009ad3d6c5a0d
2019-10-29 12:33:34 -07: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
Matt Joras
c0a0919113 Fix stream scheduling round robin.
Summary:
The intention here was always to write to streams in a round robin fashion. However, this functionality has been effectively broken since introduction as `lastScheduledStream` was never set. We can fix this by having the `StreamFrameScheduler` set `nextScheduledStream` after it has written to the streams. Additionally we need to remove a check that kept us from moving past a stream if it still had data left to write.

In extreme cases this would cause streams to be completely starved, and ruin concurrency.

Reviewed By: siyengar

Differential Revision: D17748652

fbshipit-source-id: a3d05c54ee7eaed4d858df9d89035fe8f252c727
2019-10-08 12:30:55 -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
56c18e96ef Back out "Revert D17636918: [quic] Create findFrameInPacketFunc helper function for unit tests"
Summary: Original commit changeset: dcc2b618c2a7

Reviewed By: lnicco

Differential Revision: D17688819

fbshipit-source-id: 9dd3dbcfd78549f5858a41b67db7fc4bc0647469
2019-10-01 11:11:06 -07:00
Viktor Chynarov
7ca3482f1d Back out "Revert D15268028: [quic] Process lost RetireConnectionIdFrame"
Summary: Original commit changeset: 0447c8666a58

Reviewed By: lnicco

Differential Revision: D17688744

fbshipit-source-id: 8fc2180f65b9a9c03f40f3d242ee020ee319765c
2019-10-01 11:11:06 -07:00
Viktor Chynarov
8af79b3436 Back out "Revert D15267963: [quic] Clone RetireConnectionIdFrame"
Summary: Original commit changeset: c9fb0a514788

Reviewed By: lnicco

Differential Revision: D17688756

fbshipit-source-id: fc098fa9804bf0076cb8f2ff0c6d6b8550021a34
2019-10-01 11:11:05 -07:00
Viktor Chynarov
7682c12bf5 Back out "Revert D15267820: [quic] Add unit test for sending RetireConnectionIdFrame"
Summary: Original commit changeset: 899b6773521a

Reviewed By: lnicco

Differential Revision: D17688590

fbshipit-source-id: fd96f34c97e0c9253cd576447cb8efb6564c3ed5
2019-10-01 11:11:05 -07:00
Shawn Shihang Wei
2bdb9b0dcc Revert D15267820: [quic] Add unit test for sending RetireConnectionIdFrame
Differential Revision:
D15267820

Original commit changeset: b885ca6b5dfa

fbshipit-source-id: 899b6773521a347f06972d69e6be8456dc4e9e7d
2019-09-30 18:49:59 -07:00
Shawn Shihang Wei
52a79997d8 Revert D15267963: [quic] Clone RetireConnectionIdFrame
Differential Revision:
D15267963

Original commit changeset: a2e9059900c0

fbshipit-source-id: c9fb0a514788dd32d5f1956dbea4dcefe34468c8
2019-09-30 18:49:59 -07:00
Shawn Shihang Wei
59f20c91c7 Revert D15268028: [quic] Process lost RetireConnectionIdFrame
Differential Revision:
D15268028

Original commit changeset: 238dcf524251

fbshipit-source-id: 0447c8666a5814e9f88e9f6decd61db54d5c0a34
2019-09-30 18:49:58 -07:00
Shawn Shihang Wei
3ca024e3b8 Revert D17636918: [quic] Create findFrameInPacketFunc helper function for unit tests
Differential Revision:
D17636918

Original commit changeset: 927b3a880ee0

fbshipit-source-id: dcc2b618c2a7accde254d01b5d549a08041dd589
2019-09-30 18:49:58 -07:00