mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-18 11:47:03 +00:00
BUILD: add explicit support for TFO with USE_TFO
TCP Fast Open is supported in server mode since Linux 3.7, but current libc's don't define TCP_FASTOPEN=23. Introduce the new USE flag USE_TFO to define it manually in compat.h. Also note this in the TFO related documentation.
This commit is contained in:
parent
ad1731d553
commit
0999f7662c
7
Makefile
7
Makefile
@ -32,6 +32,7 @@
|
|||||||
# USE_MY_ACCEPT4 : use own implemention of accept4() if glibc < 2.10.
|
# USE_MY_ACCEPT4 : use own implemention of accept4() if glibc < 2.10.
|
||||||
# USE_ZLIB : enable zlib library support.
|
# USE_ZLIB : enable zlib library support.
|
||||||
# USE_CPU_AFFINITY : enable pinning processes to CPU on Linux. Automatic.
|
# USE_CPU_AFFINITY : enable pinning processes to CPU on Linux. Automatic.
|
||||||
|
# USE_TFO : enable TCP fast open. Supported on Linux >= 3.7.
|
||||||
#
|
#
|
||||||
# Options can be forced by specifying "USE_xxx=1" or can be disabled by using
|
# Options can be forced by specifying "USE_xxx=1" or can be disabled by using
|
||||||
# "USE_xxx=" (empty string).
|
# "USE_xxx=" (empty string).
|
||||||
@ -564,6 +565,12 @@ OPTIONS_CFLAGS += -DUSE_PCRE_JIT
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# TCP Fast Open
|
||||||
|
ifneq ($(USE_TFO),)
|
||||||
|
OPTIONS_CFLAGS += -DUSE_TFO
|
||||||
|
BUILD_OPTIONS += $(call ignore_implicit,USE_TFO)
|
||||||
|
endif
|
||||||
|
|
||||||
# This one can be changed to look for ebtree files in an external directory
|
# This one can be changed to look for ebtree files in an external directory
|
||||||
EBTREE_DIR := ebtree
|
EBTREE_DIR := ebtree
|
||||||
|
|
||||||
|
@ -7408,7 +7408,9 @@ tfo
|
|||||||
that use high connection rates and where each round trip matters. This can
|
that use high connection rates and where each round trip matters. This can
|
||||||
possibly cause issues with many firewalls which do not accept data on SYN
|
possibly cause issues with many firewalls which do not accept data on SYN
|
||||||
packets, so this option should only be enabled once well tested. This option
|
packets, so this option should only be enabled once well tested. This option
|
||||||
is only supported on TCPv4/TCPv6 sockets and ignored by other ones.
|
is only supported on TCPv4/TCPv6 sockets and ignored by other ones. You may
|
||||||
|
need to build HAProxy with USE_TFO=1 if your libc doesn't define
|
||||||
|
TCP_FASTOPEN.
|
||||||
|
|
||||||
transparent
|
transparent
|
||||||
Is an optional keyword which is supported only on certain Linux kernels. It
|
Is an optional keyword which is supported only on certain Linux kernels. It
|
||||||
|
@ -106,6 +106,13 @@
|
|||||||
#endif /* SO_REUSEADDR */
|
#endif /* SO_REUSEADDR */
|
||||||
#endif /* SO_REUSEPORT */
|
#endif /* SO_REUSEPORT */
|
||||||
|
|
||||||
|
/* only Linux defines TCP_FASTOPEN */
|
||||||
|
#ifdef USE_TFO
|
||||||
|
#ifndef TCP_FASTOPEN
|
||||||
|
#define TCP_FASTOPEN 23
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__dietlibc__)
|
#if defined(__dietlibc__)
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user