Commit Graph

2722 Commits

Author SHA1 Message Date
Matthias Einwag 3de2727b94 Perf: Prefer more efficient cipher suites
Prefer AES128 in order to maximize throughput
2021-03-02 07:01:16 +01:00
Matthias Einwag 82a065ac3e Make perf up and download more efficient
Pass a bigger buffer to write calls to minimize the amount of write calls.
2021-03-02 07:01:16 +01:00
Matthias Einwag 7700046af6 Aggregate perf stats and print them 2021-03-02 07:01:16 +01:00
Matthias Einwag 3bbb15181f Capture per request timings in perf client 2021-03-02 07:01:16 +01:00
Matthias Einwag f811d3635c Allow to specify the perf client to run for a certain amount of time 2021-03-02 07:01:16 +01:00
Matthias Einwag e8af8fd507 Make handling of uni and bidi streams equal
Uni response streams are now accepted as part of the
request lifecycle, which makes it easier to gather stats.
2021-03-02 07:01:16 +01:00
Matthias Einwag 12039602ae perf: use tokio::try_join instead of select
We want all subtasks to complete, and not only a single one.
2021-03-02 07:01:16 +01:00
Matthias Einwag 270016a1da Use owned buffer API for sending data in the bulk test
This avoids the allocation inside the the connection Mutex.
2021-03-02 06:49:34 +01:00
Matthias Einwag 31109bd16f Make owned bytes write APIs available in quinn
This extends the public quinn API to offer support for writing owned buffers.
Besides the universal `write_chunks` API which supports a variable amount
of buffers the API also offers convenience methods for writing either a
single buffer completely or an arbitrary amount of buffers completely.
2021-03-02 06:49:34 +01:00
Matthias Einwag 5ce48e1897 Account for offset=0 requiring no space
When a frame contained data for an offset of 0, the transmit logic did not
fully fill a packet. The reason for this is that the logic reserved 1 byte for
writing an offset. However storing offset 0 doesn't require 1 byte,
because it will be encoded with a special flag in the message header.

Without GSO, this isn't a huge issue. It mostly means we are wasting
1 byte per datagram.

However with GSO, this actually leads to data corruption:

When using GSO, and  packet isn't fully filled, it later gets padded
to MTU size. Padding a packet ending with a STREAM frame that
doesn't contain a length information is however invalid, and will let
the receiver assume the padding is part of part of the data. This means
the receiver will receive an extra `0` at the end of a stream - and
depending on the duplicate detection at the receiver either the 0
or the correct byte in the next packet will win.
2021-03-01 22:14:43 +01:00
Dirkjan Ochtman 62924202fa quinn-proto: reorder code from bytes_source module 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 4abf5a64e0 quinn-proto: merge bytes_source module into connection::streams::send 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 971265d9ff quinn-proto: provide datagrams API access through special-purpose type 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 61129c811e quinn-proto: move datagram write logic into DatagramState 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 2637dfe575 quinn-proto: move incoming datagram frame handling into DatagramState 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman d25ce15239 quinn-proto: move datagram receive logic into DatagramState 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman c6843a7c84 quinn-proto: derive Default for DatagramState 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 71484b57aa quinn-proto: move datagram types into separate module 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman afe8a6cfee quinn-proto: inline single-use record_sent_max_data() method 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman a11abc648e quinn-proto: inline single-use flow_blocked() method 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman cc1218ed12 quinn-proto: inline single-use poll_unblocked() method 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 29e8a914d8 quinn-proto: standardize on ch suffix 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 5a7b888934 quinn-proto: extract separate RecvStream interface type 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 0b350e5d11 quinn-proto: extract separate SendStream interface type 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 8131bcc7b6 quinn-proto: split streams module into two parts 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman d4bfc25d6a quinn-proto: move API logic into Streams 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 8bbe908dbd quinn-proto: add public Streams interface 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 584b889494 quinn-proto: rename Streams to StreamsState 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman dde27bf919 quinn-proto: refactor handling of peer parameters 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 1b9293366f quinn-proto: inline single-use congestion_blocked() method 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 5a7a80ec1e quinn-proto: move probe queueing logic into PacketSpace 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman d22800ac79 quinn-proto: move more methods into PacketBuilder 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 7e0f3fa7ab quinn-proto: move finish_packet() into PacketBuilder 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman e1df56f40c quinn-proto: move PacketBuilder into a separate module 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 6bddfdea1a quinn-proto: handle handshake packets separately 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 816e570151 quinn-proto: inline single-use reject_0rtt() method 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 18ed973568 quinn-proto: refactor how ACKs are passed to the congestion controller 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman 4e6b8c6fe4 quinn-proto: add comment to clarify need for custom iteration 2021-03-01 13:06:10 -08:00
Dirkjan Ochtman c4af9ecb1c fuzz: change config syntax to allow merging 2021-03-01 13:06:10 -08:00
Matthias Einwag 0020e1ee39 Add a Bytes array based send interface to quinn-proto
This change modifies quinn-proto to allow callers to submit a list
of one or more owned `Bytes` chunks for transmission instead of
pure byte slices. This will provide a more efficient zero-copy
interface for applications which already make use of owned
`Bytes` buffers.

The internals of quinn-proto have been refactored in order to keep
the ability to pass `&[u8]` buffers and defer the conversion into
`Bytes` as long as possible, in order to avoid unnecessary allocations
if no data can be stored due to flow control.
2021-03-01 09:20:20 +01:00
Matthias Einwag eb1911d416 Write Bytes into SendBuffer
This changes the interface from SendBuffer to directly accept owned
`Bytes` buffers, instead of converting to them.
2021-03-01 09:20:20 +01:00
Benjamin Saunders a9aaf40943 Implement perf protocol for standardized benchmarking 2021-02-28 22:31:43 +01:00
Dirkjan Ochtman 14db88562d quinn: split streams module in send/recv parts 2021-02-25 12:06:38 -08:00
Dirkjan Ochtman 24cf82ef83 Expose iterator-like read API 2021-02-25 12:06:38 -08:00
Dirkjan Ochtman dd23094007 quinn-proto: remove unnecessary RecvState::Closed 2021-02-25 12:06:38 -08:00
Benjamin Saunders 241cc9cad1 Fix premature abandoment of STOP_SENDING transmission 2021-02-25 16:02:00 +01:00
Benjamin Saunders dd67e91425 Fix state leak for receive streams stopped after being finished 2021-02-25 16:02:00 +01:00
Benjamin Saunders 589534ff4e Tweak method name to avoid confusion with having received FIN 2021-02-25 16:02:00 +01:00
Joshua Koo b54e363cff Fixed typo allow_wpin -> allow_spin 2021-02-25 05:13:00 +01:00
Matthias Einwag be27d52134 Do not send any packets after a close frame
Since the loop was not exited after a close frame was transmitted,
other data in the same space could have been transmitted after
the frame. This adds a `break` to fix this.
2021-02-24 21:04:30 +01:00