Mercurial > hg > nginx-quic
annotate auto/cc/bcc @ 5058:f25d0bbc4392 stable-1.2
Merge of r5004, r5019-r5025: ssl fixes.
*) SSL: speedup loading of configs with many ssl servers. The patch
saves one EC_KEY_generate_key() call per server{} block by informing
OpenSSL about SSL_OP_SINGLE_ECDH_USE we are going to use before
the SSL_CTX_set_tmp_ecdh() call.
For a configuration file with 10k simple server{} blocks with SSL
enabled this change reduces startup time from 18s to 5s on a slow
test box here.
*) SSL: removed conditions that always hold true.
*) SSL: resetting of flush flag after the data was written. There is
no need to flush next chunk of data if it does not contain a buffer
with the flush or last_buf flags set.
*) SSL: preservation of flush flag for buffered data. Previously,
if SSL buffer was not sent we lost information that the data
must be flushed.
*) SSL: calculation of buffer size moved closer to its usage.
No functional changes.
*) SSL: avoid calling SSL_write() with zero data size. According to
documentation, calling SSL_write() with num=0 bytes to be sent
results in undefined behavior.
We don't currently call ngx_ssl_send_chain() with empty chain and
buffer. This check handles the case of a chain with total data size
that is a multiple of NGX_SSL_BUFSIZE, and with the special buffer
at the end.
In practice such cases resulted in premature connection close and
critical error "SSL_write() failed (SSL:)" in the error log.
*) SSL: take into account data in the buffer while limiting output.
In some rare cases this can result in a more smooth sending rate.
*) SSL: fixed ngx_ssl_handshake() with level-triggered event methods.
Missing calls to ngx_handle_write_event() and ngx_handle_read_event()
resulted in a CPU hog during SSL handshake if an level-triggered event
method (e.g. select) was used.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 11 Feb 2013 15:12:06 +0000 |
parents | d620f497c50f |
children | b7b7f3a0cc28 |
rev | line source |
---|---|
455 | 1 |
2 # Copyright (C) Igor Sysoev | |
4412 | 3 # Copyright (C) Nginx, Inc. |
455 | 4 |
5 | |
6 # Borland C++ 5.5 | |
7 | |
8 # optimizations | |
9 | |
10 # maximize speed | |
11 CFLAGS="$CFLAGS -O2" | |
12 | |
13 case $CPU in | |
14 pentium) | |
15 # optimize for Pentium and Athlon | |
16 CPU_OPT="-5" | |
17 ;; | |
18 | |
19 pentiumpro) | |
20 # optimize for Pentium Pro, Pentium II and Pentium III | |
21 CPU_OPT="-6" | |
22 ;; | |
23 esac | |
24 | |
503 | 25 # __stdcall |
26 #CPU_OPT="$CPU_OPT -ps" | |
27 # __fastcall | |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
795
diff
changeset
|
28 #CPU_OPT="$CPU_OPT -pr" |
503 | 29 |
455 | 30 CFLAGS="$CFLAGS $CPU_OPT" |
31 | |
32 # multithreaded | |
33 CFLAGS="$CFLAGS -tWM" | |
34 | |
35 # stop on warning | |
36 CFLAGS="$CFLAGS -w!" | |
37 | |
38 # disable logo | |
39 CFLAGS="$CFLAGS -q" | |
40 | |
461 | 41 |
455 | 42 # precompiled headers |
795 | 43 CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.csm" |
44 NGX_PCH="$NGX_OBJS/ngx_config.csm" | |
45 NGX_BUILD_PCH="-H=$NGX_OBJS/ngx_config.csm" | |
46 NGX_USE_PCH="-Hu -H=$NGX_OBJS/ngx_config.csm" | |
455 | 47 |
461 | 48 |
49 # Win32 GUI mode application | |
2725 | 50 #LINK="\$(CC) -laa" |
461 | 51 |
52 | |
53 # the resource file | |
469 | 54 NGX_RES="$NGX_OBJS/nginx.res" |
55 NGX_RCC="brcc32 -fo$NGX_OBJS/nginx.res \$(CORE_INCS) $NGX_WIN32_RC" | |
461 | 56 # the pragma allows to link the resource file using bcc32 and |
57 # to avoid the direct ilink32 calling and the c0w32.obj's WinMain/main problem | |
469 | 58 NGX_PRAGMA="#pragma resource \"$NGX_OBJS/nginx.res\"" |
461 | 59 |
455 | 60 |
61 ngx_include_opt="-I" | |
62 ngx_objout="-o" | |
63 ngx_binout="-e" | |
64 ngx_objext="obj" | |
65 ngx_binext=".exe" | |
461 | 66 |
573 | 67 ngx_long_start='@&&| |
68 ' | |
69 ngx_long_end='|' | |
70 | |
461 | 71 ngx_regex_dirsep='\\' |
72 ngx_dirsep="\\" |