]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUILD] add USE_LINUX_SPLICE to enable LINUX_SPLICE on linux 2.6
authorWilly Tarreau <w@1wt.eu>
Sun, 25 Jan 2009 15:13:42 +0000 (16:13 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 25 Jan 2009 15:13:42 +0000 (16:13 +0100)
This will provide high performance data forwarding between sockets,
but it is broken on many kernels and will sometimes forward corrupted
data without some kernel patches. Consider this experimental for now.

Makefile

index 2619a653d6c04a1a7d05c9681dc069932d5678c5..855c902982845a4e00b4d266f40128899487aaa9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,7 @@
 #   USE_TCPSPLICE        : enable tcp_splice() on Linux (needs kernel patch).
 #   USE_TPROXY           : enable transparent proxy. Automatic.
 #   USE_LINUX_TPROXY     : enable full transparent proxy (need kernel patch).
+#   USE_LINUX_SPLICE     : enable kernel 2.6 splicing (broken on old kernels)
 #
 # Options can be forced by specifying "USE_xxx=1" or can be disabled by using
 # "USE_xxx=" (empty string).
@@ -298,6 +299,11 @@ OPTIONS_LDFLAGS += -L$(TCPSPLICEDIR) -ltcpsplice
 BUILD_OPTIONS   += $(call ignore_implicit,USE_TCPSPLICE)
 endif
 
+ifneq ($(USE_LINUX_SPLICE),)
+OPTIONS_CFLAGS += -DCONFIG_HAP_LINUX_SPLICE
+BUILD_OPTIONS  += $(call ignore_implicit,USE_LINUX_SPLICE)
+endif
+
 ifneq ($(USE_CTTPROXY),)
 OPTIONS_CFLAGS += -DCONFIG_HAP_CTTPROXY
 OPTIONS_OBJS   += src/cttproxy.o