Skip to contentSkip to conversation

Changes for ipvsadm

PATCH In review Julian Anastasov 2 participants 7 messages Jul 13, 2012 – Sep 17, 2012 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Julian Anastasov

author maintainer
#0 lore raw

cover Changes for ipvsadm

Do we have ipvsadm on git? I downloaded something
from svn to base these two patches.

Julian Anastasov (2):
Fix the --pe option checks
Fallback to libpopt on shared object

 Makefile  |   15 +++++++++++++++
 ipvsadm.c |   32 ++++++++++++++++----------------
 2 files changed, 31 insertions(+), 16 deletions(-)
Signature · 1 line
1.7.3.4
author maintainer
#1 lore raw

PATCH 1/2 Fix the --pe option checks

Make sure the --pe option is at its place in
optnames. Now it messes the names of all next options.

Also, add the missing requirements for the --pe option in
commands_v_options.

---
 ipvsadm.c |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)
ipvsadm.c +16 -16
index 5a54653..0e0a417 100644
@@ -189,7 +189,6 @@ static const char* optnames[] = {
 	"connection",
 	"service-address",
 	"scheduler",
-	"pe",
 	"persistent",
 	"netmask",
 	"real-server",
@@ -208,6 +207,7 @@ static const char* optnames[] = {
 	"syncid",
 	"exact",
 	"ops",
+	"pe",
 };
 
 /*
@@ -220,21 +220,21 @@ static const char* optnames[] = {
  */
 static const char commands_v_options[NUMBER_OF_CMD][NUMBER_OF_OPT] =
 {
-	/*   -n   -c   svc  -s   -p   -M   -r   fwd  -w   -x   -y   -mc  tot  dmn  -st  -rt  thr  -pc  srt  sid  -ex  ops */
-/*ADD*/     {'x', 'x', '+', ' ', ' ', ' ', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', ' '},
-/*EDIT*/    {'x', 'x', '+', ' ', ' ', ' ', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', ' '},
-/*DEL*/     {'x', 'x', '+', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
-/*FLUSH*/   {'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
-/*LIST*/    {' ', '1', '1', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', '1', '1', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'x'},
-/*ADDSRV*/  {'x', 'x', '+', 'x', 'x', 'x', '+', ' ', ' ', ' ', ' ', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
-/*DELSRV*/  {'x', 'x', '+', 'x', 'x', 'x', '+', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
-/*EDITSRV*/ {'x', 'x', '+', 'x', 'x', 'x', '+', ' ', ' ', ' ', ' ', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
-/*TIMEOUT*/ {'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
-/*STARTD*/  {'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', ' ', 'x', 'x', 'x', 'x', 'x', 'x', 'x', ' ', 'x', 'x'},
-/*STOPD*/   {'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', ' ', 'x', 'x'},
-/*RESTORE*/ {'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
-/*SAVE*/    {' ', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
-/*ZERO*/    {'x', 'x', ' ', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
+	/*   -n   -c   svc  -s   -p   -M   -r   fwd  -w   -x   -y   -mc  tot  dmn  -st  -rt  thr  -pc  srt  sid  -ex  ops  -pe */
+/*ADD*/     {'x', 'x', '+', ' ', ' ', ' ', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', ' ', ' '},
+/*EDIT*/    {'x', 'x', '+', ' ', ' ', ' ', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', ' ', ' '},
+/*DEL*/     {'x', 'x', '+', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
+/*FLUSH*/   {'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
+/*LIST*/    {' ', '1', '1', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', '1', '1', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'x', 'x'},
+/*ADDSRV*/  {'x', 'x', '+', 'x', 'x', 'x', '+', ' ', ' ', ' ', ' ', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
+/*DELSRV*/  {'x', 'x', '+', 'x', 'x', 'x', '+', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
+/*EDITSRV*/ {'x', 'x', '+', 'x', 'x', 'x', '+', ' ', ' ', ' ', ' ', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
+/*TIMEOUT*/ {'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
+/*STARTD*/  {'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', ' ', 'x', 'x', 'x', 'x', 'x', 'x', 'x', ' ', 'x', 'x', 'x'},
+/*STOPD*/   {'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', ' ', 'x', 'x', 'x'},
+/*RESTORE*/ {'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
+/*SAVE*/    {' ', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
+/*ZERO*/    {'x', 'x', ' ', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'},
 };
 
 /* printing format flags */
Signature · 1 line
1.7.3.4
author maintainer
#2 lore raw

PATCH 2/2 Fallback to libpopt on shared object

In reply to Julian Anastasov

Use shared library if no static library is installed.

---
 Makefile |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
Makefile +15 -0
index e4e03cc..b411649 100644
@@ -72,6 +72,21 @@ POPT_LIB = $(shell for i in $(LIB_SEARCH); do \
     fi; \
   fi; \
 done)
+ifeq (,$(POPT_LIB))
+POPT_LIB = $(shell for i in $(LIB_SEARCH); do \
+  f1=""; \
+  for so in $$i/libpopt.so*; do \
+    if [ -f $$so ]; then \
+      if objdump -T $$so | fgrep -q poptGetContext; then \
+	  echo "-lpopt"; \
+	  f1=y; \
+	  break; \
+      fi; \
+    fi; \
+  done; \
+  [ "$$f1" != "" ] && break; \
+done)
+endif
 endif
 
 ifneq (,$(POPT_LIB))
Signature · 1 line
1.7.3.4
maintainer
#3 lore raw
In reply to Julian Anastasov
Quoted 2 lines · Julian Anastasov

Do we have ipvsadm on git? I downloaded something
from svn to base these two patches.

I believe that svn is the canonical source.

Wensong, I'd be happy to see about putting ipvs into git on kernel.org if you are interested.

A message that is not in the archive (sent off-list or not yet received): CAHWFoux81rOetCST7ZbC7dCps=QZh7XV2LZhNa8ES0gQyj5RbA@mail.gmail.com

maintainer
#5 lore raw
Quoted 1 line · Wensong Zhang

Hi Horms, I have no problem, please convert ipvsadm svn repository to git.

Thanks, will do.

maintainer
#6 lore raw

[ANNOUNCE] Ipvsadm GIT repository

I have created a git repository for ipvsadm on kernel.org, which includes a change history imported from SVN.

git://git.kernel.org/pub/scm/utils/kernel/ipvsadm/ipvsadm.git

If you have fixes or enhancements for ipvsadm please:

1. Base your changes on the above tree
2. Provide a Signed-off-by line, as per kernel patches
3. Send them to [email protected] and CC me.

maintainer
#7 lore raw
In reply to Julian Anastasov
Quoted 2 lines · Julian Anastasov

Do we have ipvsadm on git? I downloaded something
from svn to base these two patches.

Thanks, both patches applied to
git://git.kernel.org/pub/scm/utils/kernel/ipvsadm/ipvsadm.git

Sorry that this took a while.