Mercurial > hg > nginx
annotate auto/cc/icc @ 9086:f68fdb017141 quic
QUIC: optimized sending stream response.
When a stream is created by client, it's often the case that nginx will send
immediate response on that stream. An example is HTTP/3 request stream, which
in most cases quickly replies with at least HTTP headers.
QUIC stream init handlers are called from a posted event. Output QUIC
frames are also sent to client from a posted event, called the push event.
If the push event is posted before the stream init event, then output produced
by stream may trigger sending an extra UDP datagram. To address this, push
event is now re-posted when a new stream init event is posted.
An example is handling 0-RTT packets. Client typically sends an init packet
coalesced with a 0-RTT packet. Previously, nginx replied with a padded CRYPTO
datagram, followed by a 1-RTT stream reply datagram. Now CRYPTO and STREAM
packets are coalesced in one reply datagram, which saves bandwidth.
Other examples include coalescing 1-RTT first stream response, and
MAX_STREAMS/STREAM sent in response to ACK/STREAM.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 03 Apr 2023 16:17:12 +0400 |
parents | 9eefb38f0005 |
children |
rev | line source |
---|---|
455 | 1 |
2 # Copyright (C) Igor Sysoev | |
4412 | 3 # Copyright (C) Nginx, Inc. |
455 | 4 |
5 | |
4395
7ee8e11e17bb
Some questionable optomizations flags for icc were removed
Maxim Konovalov <maxim@nginx.com>
parents:
1171
diff
changeset
|
6 # Intel C++ compiler 7.1, 8.0, 8.1, 9.0, 11.1 |
455 | 7 |
521 | 8 NGX_ICC_VER=`$CC -V 2>&1 | grep 'Version' 2>&1 \ |
1170
5e878722ad57
remove trailing space in icc version
Igor Sysoev <igor@sysoev.ru>
parents:
681
diff
changeset
|
9 | sed -e 's/^.* Version \([^ ]*\) *Build.*$/\1/'` |
521 | 10 |
11 echo " + icc version: $NGX_ICC_VER" | |
12 | |
557 | 13 have=NGX_COMPILER value="\"Intel C Compiler $NGX_ICC_VER\"" . auto/define |
14 | |
521 | 15 |
455 | 16 # optimizations |
17 | |
18 CFLAGS="$CFLAGS -O" | |
19 | |
469 | 20 CORE_LINK="$CORE_LINK -opt_report_file=$NGX_OBJS/opt_report_file" |
455 | 21 |
573 | 22 |
455 | 23 case $CPU in |
24 pentium) | |
25 # optimize for Pentium and Athlon | |
26 CPU_OPT="-march=pentium" | |
27 ;; | |
28 | |
29 pentiumpro) | |
30 # optimize for Pentium Pro, Pentium II and Pentium III | |
31 CPU_OPT="-mcpu=pentiumpro -march=pentiumpro" | |
32 ;; | |
33 | |
34 pentium4) | |
35 # optimize for Pentium 4, default | |
36 CPU_OPT="-march=pentium4" | |
37 ;; | |
38 esac | |
39 | |
40 CFLAGS="$CFLAGS $CPU_OPT" | |
41 | |
42 if [ ".$PCRE_OPT" = "." ]; then | |
4395
7ee8e11e17bb
Some questionable optomizations flags for icc were removed
Maxim Konovalov <maxim@nginx.com>
parents:
1171
diff
changeset
|
43 PCRE_OPT="-O $CPU_OPT" |
455 | 44 fi |
45 | |
46 if [ ".$ZLIB_OPT" = "." ]; then | |
4395
7ee8e11e17bb
Some questionable optomizations flags for icc were removed
Maxim Konovalov <maxim@nginx.com>
parents:
1171
diff
changeset
|
47 ZLIB_OPT="-O $CPU_OPT" |
455 | 48 fi |
49 | |
50 | |
51 # warnings | |
52 | |
501 | 53 CFLAGS="$CFLAGS -w2" |
54 | |
55 # disable some warnings | |
455 | 56 |
501 | 57 # invalid type conversion: "int" to "char *" |
58 CFLAGS="$CFLAGS -wd171" | |
59 # argument is incompatible with corresponding format string conversion | |
60 CFLAGS="$CFLAGS -wd181" | |
61 # zero used for undefined preprocessing identifier | |
62 CFLAGS="$CFLAGS -wd193" | |
563 | 63 # the format string ends before this argument |
519 | 64 CFLAGS="$CFLAGS -wd268" |
501 | 65 # invalid format string conversion |
66 CFLAGS="$CFLAGS -wd269" | |
67 # conversion from "long long" to "size_t" may lose significant bits | |
68 CFLAGS="$CFLAGS -wd810" | |
69 # parameter was never referenced | |
70 CFLAGS="$CFLAGS -wd869" | |
681 | 71 # attribute "unused" is only allowed in a function definition, warning on pTHX_ |
72 CFLAGS="$CFLAGS -wd1301" | |
501 | 73 |
74 # STUB | |
75 # enumerated type mixed with another type | |
76 CFLAGS="$CFLAGS -wd188" | |
77 # controlling expression is constant | |
78 CFLAGS="$CFLAGS -wd279" | |
79 # operands are evaluated in unspecified order | |
80 CFLAGS="$CFLAGS -wd981" | |
81 # external definition with no prior declaration | |
82 CFLAGS="$CFLAGS -wd1418" | |
83 # external declaration in primary source file | |
84 CFLAGS="$CFLAGS -wd1419" | |
521 | 85 |
86 case "$NGX_ICC_VER" in | |
573 | 87 9.*) |
6504 | 88 # "cc" clobber ignored, warnings for Linux's htonl()/htons() |
521 | 89 CFLAGS="$CFLAGS -wd1469" |
563 | 90 # explicit conversion of a 64-bit integral type to a smaller |
91 # integral type | |
92 CFLAGS="$CFLAGS -wd1683" | |
93 # conversion from pointer to same-sized integral type, | |
94 # warning on offsetof() | |
95 CFLAGS="$CFLAGS -wd1684" | |
595 | 96 # floating-point equality and inequality comparisons are unreliable, |
97 # warning on SvTRUE() | |
98 CFLAGS="$CFLAGS -wd1572" | |
521 | 99 ;; |
100 | |
573 | 101 8.*) |
6504 | 102 # "cc" clobber ignored, warnings for Linux's htonl()/htons() |
573 | 103 CFLAGS="$CFLAGS -wd1469" |
595 | 104 # floating-point equality and inequality comparisons are unreliable, |
105 # warning on SvTRUE() | |
106 CFLAGS="$CFLAGS -wd1572" | |
573 | 107 ;; |
108 | |
521 | 109 *) |
110 ;; | |
111 esac | |
479 | 112 |
455 | 113 # stop on warning |
114 CFLAGS="$CFLAGS -Werror" | |
115 | |
116 # debug | |
117 CFLAGS="$CFLAGS -g" |