]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] added the "tcpsplice" option
authorWilly Tarreau <w@1wt.eu>
Sat, 6 Jan 2007 20:11:49 +0000 (21:11 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 6 Jan 2007 22:45:24 +0000 (23:45 +0100)
it does nothing yet except set the minimal options.

include/types/backend.h
include/types/global.h
src/cfgparse.c

index f70a3707cf8d40953fed8f88cf74192e9c116ebf..d6079ad66d441830457f119791541332399611fb 100644 (file)
@@ -57,6 +57,7 @@
 #define        PR_O_TPXY_CIP   0x04000000      /* bind to the client's IP address when connect()ing */
 #define        PR_O_TPXY_CLI   0x06000000      /* bind to the client's IP+port when connect()ing */
 #define        PR_O_TPXY_MASK  0x06000000      /* bind to a non-local address when connect()ing */
+#define        PR_O_TCPSPLICE  0x08000000      /* delegate data transfer to linux kernel's tcp_splice */
 
 
 #endif /* _TYPES_BACKEND_H */
index 40c6c997ab6b59e05f80ee9a29b1f2bbea7c12b6..222d4feacd548e7011b6686a73f1104b99dfc536 100644 (file)
@@ -42,6 +42,7 @@
 #define LSTCHK_CAP_BIND        0x00000001      /* check that we can bind to any port */
 #define LSTCHK_CTTPROXY        0x00000002      /* check that tproxy is enabled */
 #define LSTCHK_NETADM  0x00000004      /* check that we have CAP_NET_ADMIN */
+#define LSTCHK_TCPSPLICE       0x00000008      /* check that linux tcp_splice is enabled */
 
 /* FIXME : this will have to be redefined correctly */
 struct global {
index 5017d50d01ada488a9cf1695cfcd1429008f3ada..8b6e94d36514b432ba357147d66593d4af87c38d 100644 (file)
@@ -94,6 +94,10 @@ static const struct {
        { "allbackups",   PR_O_USE_ALL_BK, PR_CAP_BE, 0 },
        { "persist",      PR_O_PERSIST,    PR_CAP_BE, 0 },
        { "forceclose",   PR_O_FORCE_CLO | PR_O_HTTP_CLOSE, PR_CAP_BE, 0 },
+#ifdef CONFIG_HAP_TCPSPLICE
+       { "tcpsplice",    PR_O_TCPSPLICE , PR_CAP_BE|PR_CAP_FE, LSTCHK_TCPSPLICE|LSTCHK_NETADM },
+#endif
+
        { NULL, 0, 0 }
 };