[master] 9509373 Move the TCP parameters into the tbl #include

Poul-Henning Kamp phk at FreeBSD.org
Tue Nov 1 12:46:04 CET 2016


commit 95093730385d355825428ea46fb30ad30111749e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Nov 1 10:25:23 2016 +0000

    Move the TCP parameters into the tbl #include

diff --git a/bin/varnishd/common/params.h b/bin/varnishd/common/params.h
index 9eabc2c..aadb0ea 100644
--- a/bin/varnishd/common/params.h
+++ b/bin/varnishd/common/params.h
@@ -101,12 +101,6 @@ struct params {
 	ssize_t			wthread_stacksize;
 	unsigned		wthread_queue_limit;
 
-#ifdef HAVE_TCP_KEEP
-	double			tcp_keepalive_time;
-	unsigned		tcp_keepalive_probes;
-	double			tcp_keepalive_intvl;
-#endif
-
 	struct vre_limits	vre_limits;
 
 	struct poolparam	req_pool;
diff --git a/bin/varnishd/mgt/mgt_param_tcp.c b/bin/varnishd/mgt/mgt_param_tcp.c
index 6d40097..342a527 100644
--- a/bin/varnishd/mgt/mgt_param_tcp.c
+++ b/bin/varnishd/mgt/mgt_param_tcp.c
@@ -51,28 +51,6 @@
 
 #ifdef HAVE_TCP_KEEP
 
-static struct parspec mgt_parspec_tcp_keep[] = {
-	{ "tcp_keepalive_time", tweak_timeout, &mgt_param.tcp_keepalive_time,
-		"1", "7200",
-		"The number of seconds a connection needs to be idle before "
-		"TCP begins sending out keep-alive probes.",
-		EXPERIMENTAL,
-		"", "seconds" },
-	{ "tcp_keepalive_probes", tweak_uint, &mgt_param.tcp_keepalive_probes,
-		"1", "100",
-		"The maximum number of TCP keep-alive probes to send before "
-		"giving up and killing the connection if no response is "
-		"obtained from the other end.",
-		EXPERIMENTAL,
-		"", "probes" },
-	{ "tcp_keepalive_intvl", tweak_timeout, &mgt_param.tcp_keepalive_intvl,
-		"1", "100",
-		"The number of seconds between TCP keep-alive probes.",
-		EXPERIMENTAL,
-		"", "seconds" },
-	{ NULL, NULL, NULL }
-};
-
 static void
 tcp_probe(int sock, int nam, const char *param, unsigned def)
 {
@@ -108,7 +86,6 @@ void
 MCF_TcpParams(void)
 {
 #ifdef HAVE_TCP_KEEP
-	MCF_AddParams(mgt_parspec_tcp_keep);
 	tcp_keep_probes();
 #endif
 }
diff --git a/include/tbl/params.h b/include/tbl/params.h
index 0250dc2..7bbf54a 100644
--- a/include/tbl/params.h
+++ b/include/tbl/params.h
@@ -992,14 +992,13 @@ PARAM(
 	/* func */	NULL
 )
 
-#if 0
-/* actual location mgt_param_tcp.c */
+#if defined(HAVE_TCP_KEEP)
 PARAM(
 	/* name */	tcp_keepalive_intvl,
 	/* typ */	timeout,
-	/* min */	"1.000",
-	/* max */	"100.000",
-	/* default */	"5.000",
+	/* min */	"1",
+	/* max */	"100",
+	/* default */	"",
 	/* units */	"seconds",
 	/* flags */	EXPERIMENTAL,
 	/* s-text */
@@ -1008,13 +1007,12 @@ PARAM(
 	/* func */	NULL
 )
 
-/* actual location mgt_param_tcp.c */
 PARAM(
 	/* name */	tcp_keepalive_probes,
 	/* typ */	uint,
 	/* min */	"1",
 	/* max */	"100",
-	/* default */	"5",
+	/* default */	"",
 	/* units */	"probes",
 	/* flags */	EXPERIMENTAL,
 	/* s-text */
@@ -1025,13 +1023,12 @@ PARAM(
 	/* func */	NULL
 )
 
-/* actual location mgt_param_tcp.c */
 PARAM(
 	/* name */	tcp_keepalive_time,
 	/* typ */	timeout,
-	/* min */	"1.000",
-	/* max */	"7200.000",
-	/* default */	"600.000",
+	/* min */	"1",
+	/* max */	"7200",
+	/* default */	"",
 	/* units */	"seconds",
 	/* flags */	EXPERIMENTAL,
 	/* s-text */
@@ -1041,6 +1038,9 @@ PARAM(
 	/* func */	NULL
 )
 
+#endif /* HAVE_TCP_KEEP */
+
+#if 0
 /* actual location mgt_pool.c */
 PARAM(
 	/* name */	thread_pool_add_delay,



More information about the varnish-commit mailing list