netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [rfc][patch] ipvs: use proper timeout instead of fixed value
@ 2006-05-04 20:11 Andy Gospodarek
  2006-05-05  0:47 ` Horms
  2006-05-07 15:32 ` Wensong Zhang
  0 siblings, 2 replies; 11+ messages in thread
From: Andy Gospodarek @ 2006-05-04 20:11 UTC (permalink / raw)
  To: netdev; +Cc: wensong, horms, ja


Instead of using the default timeout of 3 minutes, this uses the timeout
specific to the protocol used for the connection. The 3 minute timeout
seems somewhat arbitrary (though I know it is used other places in the
ipvs code) and when failing over it would be much nicer to use one of
the configured timeout values.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
---

 ip_vs_sync.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c
--- a/net/ipv4/ipvs/ip_vs_sync.c
+++ b/net/ipv4/ipvs/ip_vs_sync.c
@@ -67,7 +67,6 @@ struct ip_vs_sync_conn_options {
 	struct ip_vs_seq        out_seq;        /* outgoing seq. struct */
 };
 
-#define IP_VS_SYNC_CONN_TIMEOUT (3*60*HZ)
 #define SIMPLE_CONN_SIZE  (sizeof(struct ip_vs_sync_conn))
 #define FULL_CONN_SIZE  \
 (sizeof(struct ip_vs_sync_conn) + sizeof(struct ip_vs_sync_conn_options))
@@ -279,6 +278,7 @@ static void ip_vs_process_message(const 
 	struct ip_vs_sync_conn *s;
 	struct ip_vs_sync_conn_options *opt;
 	struct ip_vs_conn *cp;
+	struct ip_vs_protocol *pp;
 	char *p;
 	int i;
 
@@ -337,7 +337,8 @@ static void ip_vs_process_message(const 
 			p += SIMPLE_CONN_SIZE;
 
 		atomic_set(&cp->in_pkts, sysctl_ip_vs_sync_threshold[0]);
-		cp->timeout = IP_VS_SYNC_CONN_TIMEOUT;
+		pp = ip_vs_proto_get(s->protocol);
+		cp->timeout = pp->timeout_table[cp->state];
 		ip_vs_conn_put(cp);
 
 		if (p > buffer+buflen) {

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-05-08 16:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-04 20:11 [rfc][patch] ipvs: use proper timeout instead of fixed value Andy Gospodarek
2006-05-05  0:47 ` Horms
2006-05-05  2:51   ` Andy Gospodarek
2006-05-05  3:20     ` Horms
2006-05-05 18:57       ` Andy Gospodarek
2006-05-07  4:38         ` Horms
2006-05-08  3:13           ` Andy Gospodarek
2006-05-08  8:56             ` Horms
2006-05-07 15:32 ` Wensong Zhang
2006-05-08  3:27   ` Andy Gospodarek
2006-05-08 16:39     ` Wensong Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).