ipvsadm: SIP Persistence Engine
Subsystems (5)
Simon Horman
maintainercover ipvsadm: SIP Persistence Engine
This series is the ipvsadm companion to the kernel patch series "IPVS: SIP Persistence Engine".
Simon Horman
maintainerRFC PATCH 1/2 Slightly simplify options conflicts logic
--- ipvsadm.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)
ipvsadm.c +3 -5
@@ -763,11 +763,9 @@ static int process_options(int argc, char **argv, int reading_stdin)switch (ce.cmd) {case CMD_LIST : -if ((options &OPT_CONNECTION || - options &OPT_TIMEOUT || options &OPT_DAEMON ) && - (options &OPT_STATS || - options &OPT_PERSISTENTCONN || - options &OPT_RATE || options &OPT_THRESHOLDS )) +if (options & (OPT_CONNECTION |OPT_TIMEOUT |OPT_DAEMON ) && + options & (OPT_STATS |OPT_PERSISTENTCONN | +OPT_RATE |OPT_THRESHOLDS ))fail (2 ,"options conflicts in the list command" );if (options &OPT_CONNECTION )
Signature · 1 line
1.7.1
Simon Horman
maintainerRFC PATCH 2/2 Add support for persistence engines.
In reply to Simon HormanThis adds the --pe [engine] option to the -A and -E commands which allows a persistence engine to be associated with a virtual service. The absence of --pe sets no persistence engine.
The --pe option only works when ipvsadm is compiled to use netlink for user-space/kernel communication.
This patch also allows the --persistent-conn option to be given to the -L command, which will list persistence engine data, if any is present, when listing connections (and persistence templates).
At this time the only (proposed) persistence engine is sip.
v0.4
* Fix indentation of --pe help text
--- Makefile | 3 ++- PERSISTENCE_ENGINES | 1 + ipvsadm.8 | 4 ++++ ipvsadm.c | 51 ++++++++++++++++++++++++++++++++++++++++----------- libipvs/ip_vs.h | 8 ++++++++ libipvs/libipvs.c | 44 +++++++++++++++++++++++++++++++------------- 6 files changed, 86 insertions(+), 25 deletions(-) create mode 100644 PERSISTENCE_ENGINES
Makefile +2 -1
@@ -29,6 +29,7 @@ NAME = ipvsadm VERSION = $(shell cat VERSION) RELEASE = 1 SCHEDULERS = "$(shell cat SCHEDULERS)" +PE_LIST = "$(shell cat PERSISTENCE_ENGINES)" PROGROOT = $(shell basename `pwd`) ARCH = $(shell uname -m) RPMSOURCEDIR = $(shell rpm --eval '%_sourcedir')
@@ -83,7 +84,7 @@ ifneq (0,$(HAVE_NL)) LIBS += -lnl endif DEFINES = -DVERSION=\"$(VERSION)\" -DSCHEDULERS=\"$(SCHEDULERS)\" \ - $(POPT_DEFINE) + -DPE_LIST=\"$(PE_LIST)\" $(POPT_DEFINE) DEFINES += $(shell if [ ! -f ../ip_vs.h ]; then \ echo "-DHAVE_NET_IP_VS_H"; fi;)
PERSISTENCE_ENGINES new file +1 -0
@@ -0,0 +1 @@ +sip
ipvsadm.8 +4 -0
@@ -391,6 +391,10 @@ with this option will display the persistent connection counter information of each server in service listing. The persistent connection is used to forward the actual connections from the same client/network to the same server. +.sp +The \fIlist\fP command with the -c, --connection option and this option +will include persistence engine data, if any is present, when listing +connections. .TP .B --sort Sort the list of virtual services and real servers. The virtual
ipvsadm.c +40 -11
136 lines not on this page · raw message
libipvs/ip_vs.h +8 -0
@@ -92,8 +92,11 @@#define IP_VS_CONN_F_ONE_PACKET 0x2000/* forward only one packet */ #define IP_VS_SCHEDNAME_MAXLEN 16 +#define IP_VS_PENAME_MAXLEN 16#define IP_VS_IFNAME_MAXLEN 16 +#define IP_VS_PEDATA_MAXLEN 255 +union nf_inet_addr {__u32 all[4 ];__be32 ip;
@@ -134,6 +137,7 @@ struct ip_vs_service_user {__be32 netmask;/* persistent netmask */ u_int16_t af;union nf_inet_addr addr; +char pe_name[IP_VS_PENAME_MAXLEN ]; };struct ip_vs_dest_kern {
@@ -240,6 +244,7 @@ struct ip_vs_service_entry {u_int16_t af;union nf_inet_addr addr; +char pe_name[IP_VS_PENAME_MAXLEN ]; };
@@ -429,6 +434,9 @@ enum {IPVS_SVC_ATTR_NETMASK ,/* persistent netmask */ IPVS_SVC_ATTR_STATS ,/* nested attribute for service stats */ + +IPVS_SVC_ATTR_PE_NAME ,/* name of scheduler */ + __IPVS_SVC_ATTR_MAX, };
libipvs/libipvs.c +31 -13
123 lines not on this page · raw message
Signature · 1 line
1.7.1