Mercurial > hg > nginx
annotate auto/cc/msvc @ 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 | 3c4d81ea1338 |
children | 314be1eba450 |
rev | line source |
---|---|
455 | 1 |
2 # Copyright (C) Igor Sysoev | |
4412 | 3 # Copyright (C) Nginx, Inc. |
455 | 4 |
5 | |
6397
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
6 # MSVC 6.0 SP2 cl 12.00 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
7 # MSVC Toolkit 2003 (7.1) cl 13.10 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
8 # MSVC 2005 Express Edition SP1 (8.0) cl 14.00 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
9 # MSVC 2008 Express Edition (9.0) cl 15.00 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
10 # MSVC 2010 (10.0) cl 16.00 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
11 # MSVC 2015 (14.0) cl 19.00 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
12 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
13 |
8127
17b3efb45b17
Win32: handling of localized MSVC cl output.
Maxim Dounin <mdounin@mdounin.ru>
parents:
7488
diff
changeset
|
14 NGX_MSVC_VER=`$NGX_WINE $CC 2>&1 | grep 'C/C++.* [0-9][0-9]*\.[0-9]' 2>&1 \ |
17b3efb45b17
Win32: handling of localized MSVC cl output.
Maxim Dounin <mdounin@mdounin.ru>
parents:
7488
diff
changeset
|
15 | sed -e 's/^.* \([0-9][0-9]*\.[0-9].*\)/\1/'` |
6397
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
16 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
17 echo " + cl version: $NGX_MSVC_VER" |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
18 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
19 have=NGX_COMPILER value="\"cl $NGX_MSVC_VER\"" . auto/define |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
20 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
21 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
22 ngx_msvc_ver=`echo $NGX_MSVC_VER | sed -e 's/^\([0-9]*\).*/\1/'` |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
23 |
455 | 24 |
8129
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
25 # detect x64 builds |
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
26 |
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
27 case "$NGX_MSVC_VER" in |
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
28 |
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
29 *x64) |
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
30 NGX_MACHINE=amd64 |
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
31 ;; |
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
32 |
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
33 *) |
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
34 NGX_MACHINE=i386 |
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
35 ;; |
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
36 |
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
37 esac |
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
38 |
3c4d81ea1338
Win32: OpenSSL compilation for x64 targets with MSVC.
Maxim Dounin <mdounin@mdounin.ru>
parents:
8127
diff
changeset
|
39 |
455 | 40 # optimizations |
41 | |
509 | 42 # maximize speed, equivalent to -Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy |
455 | 43 CFLAGS="$CFLAGS -O2" |
509 | 44 |
455 | 45 # enable global optimization |
509 | 46 #CFLAGS="$CFLAGS -Og" |
455 | 47 # enable intrinsic functions |
509 | 48 #CFLAGS="$CFLAGS -Oi" |
49 | |
50 # disable inline expansion | |
51 #CFLAGS="$CFLAGS -Ob0" | |
52 # explicit inline expansion | |
53 #CFLAGS="$CFLAGS -Ob1" | |
54 # explicit and implicit inline expansion | |
55 #CFLAGS="$CFLAGS -Ob2" | |
56 | |
455 | 57 # enable frame pointer omission |
509 | 58 #CFLAGS="$CFLAGS -Oy" |
455 | 59 # disable stack checking calls |
509 | 60 #CFLAGS="$CFLAGS -Gs" |
61 | |
62 # pools strings as read/write | |
63 #CFLAGS="$CFLAGS -Gf" | |
64 # pools strings as read-only | |
65 #CFLAGS="$CFLAGS -GF" | |
66 | |
455 | 67 |
68 case $CPU in | |
69 pentium) | |
70 # optimize for Pentium and Athlon | |
71 CPU_OPT="-G5" | |
72 ;; | |
73 | |
74 pentiumpro) | |
75 # optimize for Pentium Pro, Pentium II and Pentium III | |
76 CPU_OPT="-G6" | |
77 ;; | |
78 | |
79 pentium4) | |
461 | 80 # optimize for Pentium 4, MSVC 7 |
81 CPU_OPT="-G7" | |
455 | 82 ;; |
83 esac | |
84 | |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
2630
diff
changeset
|
85 # __cdecl, default, must be used with OpenSSL, md5 asm, and sha1 asm |
583 | 86 #CPU_OPT="$CPU_OPT -Gd" |
503 | 87 # __stdcall |
88 #CPU_OPT="$CPU_OPT -Gz" | |
89 # __fastcall | |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
2630
diff
changeset
|
90 #CPU_OPT="$CPU_OPT -Gr" |
503 | 91 |
92 | |
455 | 93 CFLAGS="$CFLAGS $CPU_OPT" |
94 | |
95 | |
96 # warnings | |
97 | |
98 CFLAGS="$CFLAGS -W4" | |
99 | |
100 # stop on warning | |
101 CFLAGS="$CFLAGS -WX" | |
102 | |
461 | 103 # disable logo |
104 CFLAGS="$CFLAGS -nologo" | |
105 | |
106 # the link flags | |
107 CORE_LINK="$CORE_LINK -link -verbose:lib" | |
108 | |
2630 | 109 # link with libcmt.lib, multithreaded |
110 LIBC="-MT" | |
111 # link with msvcrt.dll | |
112 # however, MSVC Toolkit 2003 has no MSVCRT.LIB | |
113 #LIBC="-MD" | |
455 | 114 |
115 CFLAGS="$CFLAGS $LIBC" | |
116 | |
2725 | 117 CORE_LIBS="$CORE_LIBS kernel32.lib user32.lib" |
118 | |
461 | 119 # Win32 GUI mode application |
2725 | 120 #CORE_LINK="$CORE_LINK -subsystem:windows -entry:mainCRTStartup" |
455 | 121 |
122 # debug | |
6397
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
123 # msvc under Wine issues |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
124 # C1902: Program database manager mismatch; please check your installation |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
125 if [ -z "$NGX_WINE" ]; then |
7488
955c4b186354
Win32: defined pdb path.
Maxim Dounin <mdounin@mdounin.ru>
parents:
7031
diff
changeset
|
126 CFLAGS="$CFLAGS -Zi -Fd$NGX_OBJS/nginx.pdb" |
1639
7d125a707158
msvc8 compatibility: it can not build with debug under Wine
Igor Sysoev <igor@sysoev.ru>
parents:
1638
diff
changeset
|
127 CORE_LINK="$CORE_LINK -debug" |
7d125a707158
msvc8 compatibility: it can not build with debug under Wine
Igor Sysoev <igor@sysoev.ru>
parents:
1638
diff
changeset
|
128 fi |
455 | 129 |
461 | 130 |
2723
53be1d485af9
add variadic macros support for msvc8
Igor Sysoev <igor@sysoev.ru>
parents:
2712
diff
changeset
|
131 # MSVC 2005 supports C99 variadic macros |
6397
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
132 if [ "$ngx_msvc_ver" -ge 14 ]; then |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
133 have=NGX_HAVE_C99_VARIADIC_MACROS . auto/have |
2723
53be1d485af9
add variadic macros support for msvc8
Igor Sysoev <igor@sysoev.ru>
parents:
2712
diff
changeset
|
134 fi |
53be1d485af9
add variadic macros support for msvc8
Igor Sysoev <igor@sysoev.ru>
parents:
2712
diff
changeset
|
135 |
53be1d485af9
add variadic macros support for msvc8
Igor Sysoev <igor@sysoev.ru>
parents:
2712
diff
changeset
|
136 |
455 | 137 # precompiled headers |
1636
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
138 CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.pch" |
5639
ce98b460606e
Win32: fixed link flags with MSVC, broken by bfe536716dbf.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5577
diff
changeset
|
139 CORE_LINK="$CORE_LINK $NGX_OBJS/ngx_pch.obj" |
1636
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
140 NGX_PCH="$NGX_OBJS/ngx_config.pch" |
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
141 NGX_BUILD_PCH="-Ycngx_config.h -Fp$NGX_OBJS/ngx_config.pch" |
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
142 NGX_USE_PCH="-Yungx_config.h -Fp$NGX_OBJS/ngx_config.pch" |
461 | 143 |
144 | |
145 # the resource file | |
469 | 146 NGX_RES="$NGX_OBJS/nginx.res" |
461 | 147 NGX_RCC="rc -fo$NGX_RES \$(CORE_INCS) $NGX_WIN32_RC" |
148 CORE_LINK="$NGX_RES $CORE_LINK" | |
149 | |
455 | 150 |
6383 | 151 # dynamic modules |
152 #MAIN_LINK="-link -def:$NGX_OBJS/nginx.def" | |
153 #MODULE_LINK="-LD $NGX_OBJS/nginx.lib" | |
154 | |
155 | |
156 ngx_pic_opt= | |
455 | 157 ngx_objout="-Fo" |
158 ngx_binout="-Fe" | |
159 ngx_objext="obj" | |
160 | |
2825
bb05c0834c8c
remove BMAKE (build make): a cc compiler should use own make
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
161 ngx_long_start='@<< |
2896 | 162 ' |
2825
bb05c0834c8c
remove BMAKE (build make): a cc compiler should use own make
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
163 ngx_long_end='<<' |
bb05c0834c8c
remove BMAKE (build make): a cc compiler should use own make
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
164 ngx_long_regex_cont=' \ |
633 | 165 ' |
2825
bb05c0834c8c
remove BMAKE (build make): a cc compiler should use own make
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
166 ngx_long_cont=' |
573 | 167 ' |
633 | 168 |
631 | 169 # MSVC understand / in path |
455 | 170 #ngx_regex_dirsep='\\' |
171 #ngx_dirsep="\\" |