IPVS: Backup, Change sending to Version 1 format
Subsystems (4)
PATCH 2/3 IPVS: Backup, Change sending to Version 1 format
Enable sending and removal of version 0 sending
Affected functions,
ip_vs_sync_buff_create()ip_vs_sync_conn()
ip_vs_core.c removal of IPv4 check.
*v4
moved sanity check and pe_name_len after sloop. use cp->pe instead of cp->dest->svc->pe real length in each sync_conn, not paded length however total size of a sync_msg includes pading.
*v3
Sending ip_vs_sync_conn_options in network order. Sending Templates for ONE_PACKET conn. Renaming of ip_vs_sync_mesg to ip_vs_sync_mesg_v0
Signed-off-by Hans Schillstrom <[email protected]>
--- include/net/ip_vs.h | 2 +- net/netfilter/ipvs/ip_vs_core.c | 13 ++- net/netfilter/ipvs/ip_vs_sync.c | 182 +++++++++++++++++++++++++++++--------- 3 files changed, 149 insertions(+), 48 deletions(-)
include/net/ip_vs.h +1 -1
@@ -919,7 +919,7 @@ extern char ip_vs_master_mcast_ifn[IP_VS_IFNAME_MAXLEN];extern char ip_vs_backup_mcast_ifn[IP_VS_IFNAME_MAXLEN ];extern int start_sync_thread (int state,char *mcast_ifn,__u8 syncid);extern int stop_sync_thread (int state); -extern void ip_vs_sync_conn (const struct ip_vs_conn *cp); +extern void ip_vs_sync_conn (struct ip_vs_conn *cp);/*
net/netfilter/ipvs/ip_vs_core.c +9 -4
@@ -1536,9 +1536,15 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af)* * Sync connection if it is about to close to * encorage the standby servers to update the connections timeout +* +* For ONE_PKT let ip_vs_sync_conn() do the filter work. */ - pkts =atomic_add_return (1 , &cp->in_pkts); -if (af ==AF_INET && (ip_vs_sync_state &IP_VS_STATE_MASTER ) && +if (cp->flags &IP_VS_CONN_F_ONE_PACKET ) + pkts = sysctl_ip_vs_sync_threshold[0 ]; +else + pkts =atomic_add_return (1 , &cp->in_pkts); + +if ((ip_vs_sync_state &IP_VS_STATE_MASTER ) && cp->protocol ==IPPROTO_SCTP ) { if ((cp->state == IP_VS_SCTP_S_ESTABLISHED && (pkts % sysctl_ip_vs_sync_threshold[1]
@@ -1553,8 +1559,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af) }/* Keep this block last: TCP and others with pp->num_states <= 1 */ - else if (af == AF_INET && - (ip_vs_sync_state & IP_VS_STATE_MASTER) && + else if ((ip_vs_sync_state & IP_VS_STATE_MASTER) && (((cp->protocol != IPPROTO_TCP || cp->state == IP_VS_TCP_S_ESTABLISHED) && (pkts % sysctl_ip_vs_sync_threshold[1]
net/netfilter/ipvs/ip_vs_sync.c +139 -43
267 lines not on this page · raw message
Signature · 1 line
1.7.2.3