# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/12/02 00:02:48+08:00 wensong@xxxxxxxxxxxx # [IPVS] add a sysctl variable to expire quiescent template # # The patch is from Horms # # net/ipv4/ipvs/ip_vs_ctl.c # 2004/12/02 00:02:38+08:00 wensong@xxxxxxxxxxxx +4 -0 # set sysctl_ip_vs_expire_quiescent_template # # net/ipv4/ipvs/ip_vs_conn.c # 2004/12/02 00:02:37+08:00 wensong@xxxxxxxxxxxx +3 -1 # don't use quiescent template if the expire_quiescent_template is enabled # # include/net/ip_vs.h # 2004/12/02 00:02:37+08:00 wensong@xxxxxxxxxxxx +2 -0 # add the sysctl_ip_vs_expire_quiescent_template # diff -Nru a/include/net/ip_vs.h b/include/net/ip_vs.h --- a/include/net/ip_vs.h 2004-12-02 00:16:36 +08:00 +++ b/include/net/ip_vs.h 2004-12-02 00:16:36 +08:00 @@ -317,6 +317,7 @@ NET_IPV4_VS_EXPIRE_NODEST_CONN=23, NET_IPV4_VS_SYNC_THRESHOLD=24, NET_IPV4_VS_NAT_ICMP_SEND=25, + NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE=26, NET_IPV4_VS_LAST }; @@ -700,6 +701,7 @@ */ extern int sysctl_ip_vs_cache_bypass; extern int sysctl_ip_vs_expire_nodest_conn; +extern int sysctl_ip_vs_expire_quiescent_template; extern int sysctl_ip_vs_sync_threshold; extern int sysctl_ip_vs_nat_icmp_send; extern struct ip_vs_stats ip_vs_stats; diff -Nru a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c --- a/net/ipv4/ipvs/ip_vs_conn.c 2004-12-02 00:16:36 +08:00 +++ b/net/ipv4/ipvs/ip_vs_conn.c 2004-12-02 00:16:36 +08:00 @@ -1131,7 +1131,9 @@ * Checking the dest server status. */ if ((dest == NULL) || - !(dest->flags & IP_VS_DEST_F_AVAILABLE)) { + !(dest->flags & IP_VS_DEST_F_AVAILABLE) || + (sysctl_ip_vs_expire_quiescent_template && + (atomic_read(&dest->weight) == 0))) { IP_VS_DBG(9, "check_template: dest not available for " "protocol %s s:%u.%u.%u.%u:%d v:%u.%u.%u.%u:%d " "-> d:%u.%u.%u.%u:%d\n", diff -Nru a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c --- a/net/ipv4/ipvs/ip_vs_ctl.c 2004-12-02 00:16:36 +08:00 +++ b/net/ipv4/ipvs/ip_vs_ctl.c 2004-12-02 00:16:36 +08:00 @@ -74,6 +74,7 @@ static int sysctl_ip_vs_am_droprate = 10; int sysctl_ip_vs_cache_bypass = 0; int sysctl_ip_vs_expire_nodest_conn = 0; +int sysctl_ip_vs_expire_quiescent_template = 0; int sysctl_ip_vs_sync_threshold = 3; int sysctl_ip_vs_nat_icmp_send = 0; @@ -1439,6 +1440,9 @@ &proc_dointvec}, {NET_IPV4_VS_NAT_ICMP_SEND, "nat_icmp_send", &sysctl_ip_vs_nat_icmp_send, sizeof(int), 0644, NULL, + &proc_dointvec}, + {NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE, "expire_quiescent_template", + &sysctl_ip_vs_expire_quiescent_template, sizeof(int), 0644, NULL, &proc_dointvec}, {0}}, {{NET_IPV4_VS, "vs", NULL, 0, 0555, ipv4_vs_table.vs_vars},