Commit Graph

67 Commits

Author SHA1 Message Date
Marten Seemann
e737d4a40e wire: speed up parsing of headers with arbitrary length connection IDs (#4618)
This is significantly faster:
name                                          old time/op    new time/op    delta
ArbitraryHeaderParsing/dest_8/_src_10-16        53.8ns ± 2%    27.4ns ± 2%  -49.01%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16      61.6ns ± 1%    33.3ns ± 3%  -46.00%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16    90.0ns ± 3%    54.8ns ± 5%  -39.09%  (p=0.008 n=5+5)

name                                          old alloc/op   new alloc/op   delta
ArbitraryHeaderParsing/dest_8/_src_10-16         72.0B ± 0%     24.0B ± 0%  -66.67%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16       96.0B ± 0%     48.0B ± 0%  -50.00%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16      320B ± 0%      272B ± 0%  -15.00%  (p=0.008 n=5+5)

name                                          old allocs/op  new allocs/op  delta
ArbitraryHeaderParsing/dest_8/_src_10-16          3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16        3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16      3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
2024-08-03 16:50:42 -07:00
Marten Seemann
e179048526 wire: simplify packet number parsing, remove utils.ByteOrder interface (#4590) 2024-07-21 14:50:21 -07:00
Marten Seemann
5f8d146836 wire: optimize parsing of long header packets (#4589) 2024-07-21 14:22:32 -07:00
Marten Seemann
347a4afc51 wire: refactor header parsing to use quicvarint.Parse (#4481)
* wire: add benchmark tests for initial and retry header parsing

* wire: refactor header parsing to use quicvarint.Parse

* wire: simplify tracking of parsed length for Long Header parsing
2024-05-05 05:48:06 -07:00
Marten Seemann
fbaa941ea1 protocol: rename VersionNumber to Version (#4295) 2024-01-31 21:57:33 -08:00
Marten Seemann
fe3c4f271d add a method to retrieve non-QUIC packets from the Transport (#3992) 2023-08-19 01:19:17 -07:00
Marten Seemann
21388c86bb drop support for draft-29 (#3903) 2023-06-21 04:06:44 -07:00
Sukun
cb3453db25 fix comment claiming ParseConnectionID reuses the data slice (#3848) 2023-05-21 07:54:50 -07:00
Marten Seemann
eb05964942 wire: speed up identification of 0-RTT packets (#3761) 2023-04-19 05:50:57 -07:00
Marten Seemann
58cedf7a4f rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
Marten Seemann
86edf7fd4b remove the LongHeader field from the wire.Header 2023-01-17 21:53:39 +13:00
Marten Seemann
31995601a9 return an error when parsing a too long connection ID from a header (#3533) 2022-08-30 04:08:41 -07:00
Marten Seemann
1aced95d41 use an array instead of a byte slice for Connection IDs 2022-08-29 11:30:31 +03:00
Marten Seemann
21b9ef03be add a type for arbitrary length Connection IDs, and parsing function
RFC 8999 allows Connection IDs of up to 255 bytes. Current QUIC versions
only use up to 20 bytes.
2022-08-29 10:58:33 +03:00
Marten Seemann
d7097d74f0 implement a function to parse the version number of a Long Header packet 2022-08-29 10:58:33 +03:00
Marten Seemann
80fd1b57c8 add a function to distinguish between long and short header packets (#3498) 2022-08-11 07:35:01 -07:00
Marten Seemann
f3744f6535 implement parsing and writing of QUIC v2 packet headers 2022-05-26 12:57:45 +02:00
Marten Seemann
7676e455c5 add a function to tell if a packet is a 0-RTT packet 2021-03-11 21:05:41 +08:00
Marten Seemann
f9226887b4 rename ReadVarint / WriteVarInt / VarIntLen to Read / Write / Len 2021-01-02 00:15:07 +08:00
Marten Seemann
11c5045065 move varint encoding / decoding to a separate package
... which is not internal.
2021-01-01 11:46:45 +08:00
Marten Seemann
993d71fd56 move the SupportedVersions slice out of the wire.Header 2020-07-09 12:05:33 +07:00
Marten Seemann
f58eb47383 qlog when packets are dropped due to unsupported QUIC version 2020-04-10 14:39:02 +07:00
Marten Seemann
7b10453af8 implement the Retry integrity tag 2020-01-17 13:42:57 +07:00
Marten Seemann
490d9ddab2 refactor parsing of headers with invalid reserved bits 2019-12-09 14:57:19 +08:00
Marten Seemann
78029adfb2 improve logging of undecryptable packets 2019-11-25 14:06:44 +07:00
Marten Seemann
6b22f36d82 add the stylecheck linter 2019-09-17 13:50:19 +07:00
Marten Seemann
807dd67927 improve memory alignment of frequently used structs 2019-09-13 13:37:41 +07:00
Marten Seemann
dc33db1c18 implement the new header format 2019-07-09 13:04:40 +07:00
Marten Seemann
4fe0f6752c fix typos in error messages when parsing Version Negotiation packets 2019-06-29 11:00:57 +07:00
Marten Seemann
9c09e84765 use IETF QUIC transport error codes 2019-03-06 13:43:18 +09:00
Marten Seemann
df34e4496e identify version negotiation packets without parsing the header 2019-02-23 10:24:42 +08:00
Marten Seemann
14426dfa12 implement a function to parse the destination connection ID of a packet 2019-02-23 10:24:42 +08:00
Marten Seemann
28ed85b9c6 move cutting of coalesced packets to the wire package 2019-02-23 10:24:42 +08:00
Marten Seemann
03489f56a7 handle the packet length before parsing the extended header 2018-12-14 16:46:40 +06:30
Marten Seemann
0d30e43c32 implement the new format of the Retry packet 2018-11-27 08:29:31 +07:00
Marten Seemann
bfb467e9b8 use the new packet number format 2018-11-26 23:05:55 +07:00
Marten Seemann
4145bcc8a7 reject a header if the 0x40 bit of the first bit is not set
This doesn't apply to the version negotiation packet.
2018-11-26 22:46:08 +07:00
Marten Seemann
9c07ac15b8 use the new code points for the packet types in the first byte 2018-11-26 22:46:06 +07:00
Marten Seemann
53aeb7d592 don't use the wire encoding for the PacketType constant 2018-11-26 22:45:28 +07:00
Marten Seemann
70ce6a5814 parse the whole Long Header, if the version is known 2018-11-26 15:57:54 +07:00
Marten Seemann
b740d57c61 embed the Header in the ExtendedHeader 2018-11-26 15:57:54 +07:00
Marten Seemann
af157408de move parsing of extended headers to the same file as the struct 2018-11-26 15:57:54 +07:00
Marten Seemann
bf96707f48 rename the wire.Header to ExtendedHeader
It's not encrypted yet.
2018-11-26 15:57:54 +07:00
Marten Seemann
6150c19dcb remove unused perspective from header writing 2018-11-26 13:43:27 +07:00
Marten Seemann
fd646ff877 include the packet number len in the length calculation for long headers 2018-11-25 14:16:28 +07:00
Marten Seemann
716e8f2d0a remove the error return value from wire.Header.GetLength
Using an invalid packet number length would error on Header.Write(), so
it's not necessary to check this on GetLength().
2018-11-01 13:49:36 +07:00
Marten Seemann
3266e36811 drop support for gQUIC 2018-10-30 10:20:39 +07:00
Marten Seemann
73a1a0e509 implement writing of the gQUIC 44 header 2018-08-28 08:49:29 +07:00
Marten Seemann
a98fd88a1b implement parsing of the gQUIC 44 header 2018-08-28 08:49:29 +07:00
Marten Seemann
d8aa49d0f9 implement writing and parsing of the new Retry packet 2018-08-13 08:47:29 +07:00