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

51 Commits

Author SHA1 Message Date
Matt Joras
40cc0ca93e Add DSR packet count to state and qlog.
Summary: It's useful at the end of a connection to know if we tried DSR.

Reviewed By: jbeshay

Differential Revision: D30545282

fbshipit-source-id: bbb2f3408f7a2d5666676c9e2583bf8fd9f18911
2021-08-26 14:06:57 -07:00
Hani Damlaj
da36437098 Remove packetNum From CipherUnavailable
Summary:
- Removed packetNum field from CipherUnavailable struct.

- Removed all instances referring to the field and fixed tests accordingly.

Reviewed By: mjoras

Differential Revision: D29968168

fbshipit-source-id: 9802b8cd66f43f2a8d54340f2d00639ee4679aaf
2021-08-04 12:13:21 -07:00
Matt Joras
19339ef38f Add quic version to transport summary.
Summary: The kitchen sink must grow. Nice to know when the conn ends what the version was.

Reviewed By: lnicco

Differential Revision: D27868680

fbshipit-source-id: 2770ed2c647d76affbb52597a5a2a6720eabfe66
2021-04-19 17:58:35 -07:00
Matt Joras
98298496a2 Add some more info to transport summary qlog
Summary: Same as before!

Reviewed By: lnicco

Differential Revision: D27785992

fbshipit-source-id: 0160fb1572c8afc3dbbcf1dac50fc73ddbfbad83
2021-04-14 20:05:53 -07:00
Chetan Ambekar
cd754c2499 Revert D27768829: Add some more info to transport summary qlog
Differential Revision:
D27768829 (3ed777d04f)

Original commit changeset: 43cbf88f38ce

fbshipit-source-id: 4c678ebccbb7c9c33b1c7ab9ed98f6bdbc9c7e49
2021-04-14 18:45:06 -07:00
Matt Joras
3ed777d04f Add some more info to transport summary qlog
Summary: Specifically interested in seeing whether 0RTT was used, writable bytes, and conn flow control.

Reviewed By: yangchi

Differential Revision: D27768829

fbshipit-source-id: 43cbf88f38ce56065cad785344dedc279a0af7d1
2021-04-14 18:08:13 -07:00
Matt Joras
015ff4a808 Lowercase qlog strings.
Summary: In the spec these are now lowercase.

Reviewed By: avasylev

Differential Revision: D22104880

fbshipit-source-id: adc9bbcd7bd9e7babb1946648d2867ec7dc9336b
2020-07-14 16:12:25 -07:00
Matt Joras
a21f1c2f68 Remove trigger event field.
Summary: This is now an optional field on individual events.

Reviewed By: lnicco

Differential Revision: D22102853

fbshipit-source-id: ecfb4b4d9c2e594f10e93c8dfbff96b1dad4422d
2020-06-17 19:21:26 -07:00
Matt Joras
448b707798 Remove max_outgoing_loss_rate.
Summary: We aren't using it anyway.

Reviewed By: lnicco

Differential Revision: D22102854

fbshipit-source-id: 66cbd86de3e6101bde6e425b8945692793ab9421
2020-06-17 19:21:26 -07:00
Zachary Weinberger
061d4973fb Fix FileQLogger Tests
Summary: The test was running 10 tests simultaniously. Everything was getting written to the same file which caused bad output. Solution is to randomise the dcid so every test run gets a unique output file.

Reviewed By: mjoras

Differential Revision: D20441808

fbshipit-source-id: c2d15f88b34d88bc27602f29b8590e6b9a0468f8
2020-03-13 13:47:44 -07:00
Zachary Weinberger
88e3fdadc0 Add streaming option for FileQLogger
Summary: In the constructor of FileQlogger adds a bool that sets streaming mode. If it's set it creates a thread that reads events from the log and immediatly outputs them to an output file.

Reviewed By: mjoras

Differential Revision: D20250881

fbshipit-source-id: 2af3ff0aeaa5b62f90b0c01570c96c92fdab4412
2020-03-12 13:47:35 -07: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
b1d9cd65fa Fix qlog vantage point constant
Summary: As in title.

Reviewed By: yangchi

Differential Revision: D19394711

fbshipit-source-id: 6d86bc8c1e1b3b6ef3d063b4c6aa1370e69d8f8f
2020-01-14 13:13:51 -08:00
Matt Joras
60c1f4a6f3 Fix qlog stream id
Summary: This is now "stream_id". The qvis tools rely on this.

Reviewed By: JunqiWang

Differential Revision: D19393624

fbshipit-source-id: 20d03aee6d6651507424b8749b30c57081c753ef
2020-01-14 11:43:14 -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
fa942df8b3 Remove packet ack event from QLogs
Summary:
this isn't part of the QLog draft. The ack frame information in
already included in the packet_received event. Qvis also doesn't need this.

The only additional information this gives us is that the ack frame in the
packet_received has more packets than current outstanding packets. packet_ack
only includes those still outstanding.

For example, it's possible that only packets [5, 10] are outstanding since peer
already acked [0, 4] before. But peer hasn't received the ack of ack. Then peer
sends another packet which will ack [0, 10]. In that packet_received event, the
ack frame will have [0, 10]. But we will only generate packet_ack for [5, 10].
If such information is important, then we should keep this, but make it concise
at least.

Right now i'm not even sure if such information is important. We can get to the
same conclusion by backtracking to the previously received [0, 4] ack frame.

This is a lot of data.

Thoughts?

Reviewed By: mjoras

Differential Revision: D19237301

fbshipit-source-id: 95dfe2f9f6942cc30434b1fc05dd4929607d9c95
2020-01-03 11:03:38 -08:00
Ammar Malik
98224facb6 Changing toString functions in QuicExceptions to return folly::StringPiece to avoid extra copy
Summary:
In QuicExceptions, in the case where the toString method was able to statically determine the response strings, we simply return the string literals in a folly::StringPiece instead of unnecessarily copying them into std::string.

Some toString methods had some dynamically generated responses and thus could not be updated. Added a TODO explaining the fact.

Reviewed By: mjoras

Differential Revision: D19192117

fbshipit-source-id: d9e5f202f9bf240009e8b8fd16f337b0506fbeb0
2020-01-02 14:30:48 -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
Viktor Chynarov
45e71f737a Add QLog events for ConnMigration, PathValidation
Summary:
QLogConnectionMigrationEvent:
Allow observing client-side ConnectionMigration attempts (replacing the
socket), and observing the server-side changing the peer address it
is writing to.

QLogPathValidationEvent:
Allow observing successful/failed path validation attempts.
Success is considered as a correct PathResponse being returned.
A Failure is only published on the timeout expiring, not an invalid
PathChallenge frame being returned (we do not cancel this).

There are already QlogEvents for PathChallenge/PathResponse that
can be observed.

Reviewed By: JunqiWang

Differential Revision: D18340999

fbshipit-source-id: 512108f82a6e082021c0bd3254f108c128b17ba3
2019-11-08 08:39:36 -08:00
Yang Chi
b0088bb4e2 Add time since stream creation into Stream level qlog events
Summary:
to make the log easier to parse. Otherwise i will need a script to
scan the whole log and calculate refTime differences.

Reviewed By: sharma95

Differential Revision: D18042798

fbshipit-source-id: 1573f60eacaedb361fc8cdc2332333ff8bee6a13
2019-10-24 09:53:21 -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
Subodh Iyengar
04baa15a04 Custom variant type for packetheader
Summary:
Make a custom variant type for PacketHeader. By not relying on boost::variant
this reduces the code size of the implementation.

This uses a combination of a union type as well as a enum type to emulate a variant

Reviewed By: yangchi

Differential Revision: D17187589

fbshipit-source-id: 00c2b9b8dd3f3e73af766d84888b13b9d867165a
2019-09-19 17:31:47 -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
Bonnie Xu
db349541f2 Update qlog format to be more complete
Summary: Update qlog format to be more complete. Adding the summary section (with extra fields like title, description, etc). This diff is just to make the format more on par with Robin's schema.

Reviewed By: mjoras

Differential Revision: D16499808

fbshipit-source-id: 56cfbb95404f7e3c6638bffda18b53f7d83048a1
2019-07-30 12:48:57 -07:00
Bonnie Xu
3203074c41 Reduce number of padding frames
Summary: Reduce the number of padding frames that are generated, to decrease overall qlog size.

Reviewed By: sharma95

Differential Revision: D16533449

fbshipit-source-id: 68f9c48e265576bff098dfeee87e576e86a32330
2019-07-29 10:16:30 -07:00
Bonnie Xu
f72ab2cfd6 Implement HTTP3 event interface
Summary: Implement HTTP3 event interface for qlog.

Reviewed By: yangchi

Differential Revision: D16424215

fbshipit-source-id: 041cd0a999eea49fdf98218348bd2a62e467a0b0
2019-07-27 14:07:58 -07:00
Bonnie Xu
63a79f278b Implement metricUpdate interface
Summary: Implement metricUpdate interface as part of spec.

Reviewed By: mjoras

Differential Revision: D16447278

fbshipit-source-id: 662361f257a336066a9f7ffb4e31eea6012add3f
2019-07-25 22:49:24 -07:00
Bonnie Xu
ce7ff9c215 Implement packetAck interface
Summary: Implement packetAck interface as part of spec.

Reviewed By: sharma95

Differential Revision: D16422768

fbshipit-source-id: f053a3b89ec080603d6568e37ad9281cf4834186
2019-07-25 11:52:21 -07:00
Bonnie Xu
5d871f45e0 Implement packetBuffered interface
Summary: Implement packetBuffered interface, as part of spec.

Reviewed By: yangchi

Differential Revision: D16415617

fbshipit-source-id: ece8e9fcd05c3cb7b7c63f7d652ed8df4c1a355b
2019-07-25 11:52:19 -07:00
Bonnie Xu
ed6d61690f Implement transportStateUpdate interface
Summary: Implement transportStateUpdate interface as part of [spec](fburl.com/proxygen-qlog).

Reviewed By: yangchi

Differential Revision: D16294320

fbshipit-source-id: 74f024782fc17b4706791c468866567238fac278
2019-07-20 10:09:22 -07:00
Bonnie Xu
14203ac53f Implement packetsLost interface
Summary: Implement packetsLost interface, as part of [spec](fburl.com/proxygen-qlog).

Reviewed By: yangchi

Differential Revision: D16292615

fbshipit-source-id: 7d313df209ac18f1deec92e32f557b0a1e97415c
2019-07-18 12:45:03 -07:00
Bonnie Xu
c550969a81 Implement lossAlarm interface
Summary: Implement lossAlarm interface according to [spec](fburl.com/proxygen-qlog).

Reviewed By: yangchi

Differential Revision: D16285188

fbshipit-source-id: f588f92230a0f0d9bf5d5fa7ad5673583b49fc1b
2019-07-18 09:47:51 -07:00
Bonnie Xu
ded2044f39 Implement datagramReceived interface
Summary: Implement datagramReceived interface, as part of [spec](fburl.com/proxygen-qlog).

Reviewed By: sharma95

Differential Revision: D16270834

fbshipit-source-id: fc112600b7d72a3ffdbb3b88584b2e17ed9c1ce1
2019-07-17 22:49:59 -07:00
Bonnie Xu
65dea29c7c Implement packetDrop interface for Quic
Summary: Implement packetDrop interface for Quic, as part of [spec](fburl.com/qlog-schema).

Reviewed By: yangchi

Differential Revision: D16233099

fbshipit-source-id: cf1fb67cea6f2599a6960593eace8122475c3557
2019-07-17 10:24:47 -07:00
Bonnie Xu
fb54bd8f06 Implement AppIdleUpdate interface for Quic
Summary: Implement AppIdleUpdate interface for Quic, as part of [spec](fburl.com/qlog-schema).

Reviewed By: yangchi

Differential Revision: D16231072

fbshipit-source-id: 09a759ad06388b7e8322179fbb9368b0015ae5a0
2019-07-16 16:37:38 -07:00
Lin Huang
28e7b0d837 Resolve land conflict between dirsync and quic pacing
Reviewed By: yangchi, xubonnie

Differential Revision: D16281430

fbshipit-source-id: 4d10b9cf5880cfcc4bb1c946e4234cf80ab68a12
2019-07-16 09:49:49 -07:00
Lin Huang
b4baf99a14 Move xplat/quic from autosyncer to dirsync
Summary:
* remove quic from autosyncer
* set up dirsync for quic
* mirror source file for xplat/quic fbcode/quic

Reviewed By: JunqiWang

Differential Revision: D16254573

fbshipit-source-id: 24414d275de310b5d0cf6bb2702a203e5aed260c
2019-07-16 01:09:48 -07:00
Bonnie Xu
9e4052c375 Implement pacingMetricUpdate interface for Quic
Summary: Implement pacingMetricUpdate interface for Quic. See [spec](fburl.com/qlog-schema) for details.

Reviewed By: yangchi

Differential Revision: D16205933

fbshipit-source-id: 858e7227ff2e3fae55d9de410818b7afe99fb0a5
2019-07-15 21:58:20 -07:00
Bonnie Xu
486fb616f6 Add metricUpdate event to Quic
Summary: Add metricUpdate event to Quic, so it can be logged as part of qlog.

Reviewed By: yangchi

Differential Revision: D16190166

fbshipit-source-id: 193b343f568fece4ca6bb43fa44e374a1df76c84
2019-07-15 21:41:26 -07:00
Bonnie Xu
4b2b63248e Implement metricUpdate interface for Quic
Summary: Implement metricUpdate interface for Quic. See [spec](fburl.com/qlog-schema) for details.

Reviewed By: yangchi

Differential Revision: D16170779

fbshipit-source-id: 3c4121a953aa93b7de7485f99a78765da1302d6f
2019-07-12 10:09:24 -07:00
Bonnie Xu
a5e59690bd Implemented TransportSummaryEvent interface for QLogger
Summary: Implemented TransportSummaryEvent interface for QLogger. See [spec](fburl.com/qlog-schema) for details.

Reviewed By: mjoras

Differential Revision: D16115821

fbshipit-source-id: 92da0a75b3c53a9287c456bb34a066a105a0ded4
2019-07-12 09:28:45 -07:00
Bonnie Xu
fc6aa8b248 Implemented ConnectionCloseEvent interface for QLogger
Summary:
Implemented ConnectionCloseEvent interface for QLogger. As part of spec, [see here.](fburl.com/qlog-schema)

I intend to add this to ProxygenQLogger after [D15945914](https://our.intern.facebook.com/intern/diff/D15945914/) lands, and connect it to Quic in the next diff (ex. `qLogger->add...`).

Reviewed By: yangchi

Differential Revision: D16093813

fbshipit-source-id: 040be49f9c762eeb0439ae6cf22e2596987d8791
2019-07-09 00:10:12 -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
Bonnie Xu
e32ca912d7 Implement ProxygenQLogger interface
Summary:
Implement ProxygenQLogger interface
- This includes creating the derived class for Proxygen based on QLogge

Reviewed By: yangchi

Differential Revision: D15945914

fbshipit-source-id: dc590b1453d72c8252323c5edd2605324bc06c82
2019-07-02 19:07:56 -07:00
Bonnie Xu
55a5e9b43b Added dcid, scid, reference time to toDynamic output
Summary: Added dcid, scid, reference time to toDynamic output, for FileQLogger, [in accordance to QLog output](https://raw.githubusercontent.com/quiclog/internet-drafts/master/examples/draft-00/draft-00-basic_example.qlog).

Reviewed By: sharma95

Differential Revision: D16036483

fbshipit-source-id: 6f2cec9c8705c808ccca36926568635627898a5d
2019-07-02 12:37:32 -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
7548623843 Rename generate.*Packet.* functions in Quic test utils to create.*Packet.*
Summary:
There is already a createPacket util function in this file. Rename the
newly added generate* functions to make this consistent

Reviewed By: sharma95

Differential Revision: D15948954

fbshipit-source-id: 67e7addefc839226b98d81a3808d37519ce001af
2019-06-21 17:34:51 -07:00
Bonnie Xu
91963d1af4 Refactor QLogger to include derived QLogger classes depending on use case
Summary:
Refactor QLogger to include derived QLogger classes depending on use case.

The QLog output will differ depending on what is requesting a QLog.

`File QLogger`: This is connected to HQ, stores all of the events per connection, and then outputs them to a file.

Reviewed By: sharma95

Differential Revision: D15928447

fbshipit-source-id: b2cdcd4d6305585b0f4f0aa21a95d1398aa761a5
2019-06-20 19:00:55 -07:00
Bonnie Xu
141dffce6a Fix QLogger test
Summary:
Fixed failing QLogger test.

Addresses reports https://our.intern.facebook.com/intern/test/281474989481205?ref_report_id=1876540 and https://our.intern.facebook.com/intern/test/844424942913490?ref_report_id=1876793.

Reviewed By: mjoras

Differential Revision: D15877059

fbshipit-source-id: e071d4ce7f70ffbd0d021f4f0e3edca7bcc51228
2019-06-18 13:44:43 -07:00
Bonnie Xu
805029b648 Added functionality to construct toDynamic objects
Summary: Converting stored QLog events into a toDynamic object that aligns with QLog format.

Reviewed By: sharma95

Differential Revision: D15725495

fbshipit-source-id: 0721a2d6858cfd99e191e3dfdc5f25f544106c86
2019-06-17 19:29:43 -07:00