Mercurial > hg > nginx
comparison src/event/ngx_event_quic.h @ 8345:6481427ca3fc quic
Respecting maximum packet size.
The header size macros for long and short packets were fixed to provide
correct values in bytes.
Currently the sending code limits frames so they don't exceed max_packet_size.
But it does not account the case when a single frame can exceed the limit.
As a result of this patch, big payload (CRYPTO and STREAM) will be split
into a number of smaller frames that fit into advertised max_packet_size
(which specifies final packet size, after encryption).
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Mon, 20 Apr 2020 22:25:22 +0300 |
parents | 72d20158c814 |
children | a5141e6b3214 |
comparison
equal
deleted
inserted
replaced
8344:e0abe17a2878 | 8345:6481427ca3fc |
---|---|
12 | 12 |
13 | 13 |
14 #define NGX_QUIC_DRAFT_VERSION 27 | 14 #define NGX_QUIC_DRAFT_VERSION 27 |
15 #define NGX_QUIC_VERSION (0xff000000 + NGX_QUIC_DRAFT_VERSION) | 15 #define NGX_QUIC_VERSION (0xff000000 + NGX_QUIC_DRAFT_VERSION) |
16 | 16 |
17 #define NGX_QUIC_MAX_SHORT_HEADER 25 | 17 #define NGX_QUIC_MAX_SHORT_HEADER 25 /* 1 flags + 20 dcid + 4 pn */ |
18 #define NGX_QUIC_MAX_LONG_HEADER 346 | 18 #define NGX_QUIC_MAX_LONG_HEADER 56 |
19 /* 1 flags + 4 version + 2 x (1 + 20) s/dcid + 4 pn + 4 len + token len */ | |
19 | 20 |
20 #define NGX_QUIC_DEFAULT_MAX_PACKET_SIZE 65527 | 21 #define NGX_QUIC_DEFAULT_MAX_PACKET_SIZE 65527 |
21 #define NGX_QUIC_DEFAULT_ACK_DELAY_EXPONENT 3 | 22 #define NGX_QUIC_DEFAULT_ACK_DELAY_EXPONENT 3 |
22 #define NGX_QUIC_DEFAULT_MAX_ACK_DELAY 25 | 23 #define NGX_QUIC_DEFAULT_MAX_ACK_DELAY 25 |
24 | |
25 #define NGX_QUIC_MIN_INITIAL_SIZE 1200 | |
23 | 26 |
24 #define NGX_QUIC_STREAM_SERVER_INITIATED 0x01 | 27 #define NGX_QUIC_STREAM_SERVER_INITIATED 0x01 |
25 #define NGX_QUIC_STREAM_UNIDIRECTIONAL 0x02 | 28 #define NGX_QUIC_STREAM_UNIDIRECTIONAL 0x02 |
26 | 29 |
27 #define NGX_QUIC_STREAM_BUFSIZE 16384 | 30 #define NGX_QUIC_STREAM_BUFSIZE 16384 |