Skip to contentSkip to conversation

Add --disable-bridge-helper configure flag

PATCH Superseded Fabien Chouteau 4 participants 11 messages Jul 10, 2012 – Jul 11, 2012 Kbuild

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add --disable-bridge-helper configure flag

Bridge helper uses ioctl's not available on old Linux versions, we add this flag to disable the build.

---
 Makefile  |    2 +-
 configure |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
Makefile +1 -1
index 34d6a9e..b46c6b0 100644
@@ -37,7 +37,7 @@ $(call set-vpath, $(SRC_PATH))
 
 LIBS+=-lz $(LIBS_TOOLS)
 
-HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
+HELPERS-$(CONFIG_HELPERS) = qemu-bridge-helper$(EXESUF)
 
 ifdef BUILD_DOCS
 DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt
configure +8 -0
index 500fe24..5566752 100755
@@ -195,6 +195,7 @@ zlib="yes"
 guest_agent="yes"
 libiscsi=""
 coroutine=""
+bridge_helper="yes"
 
 # parse CC options first
 for opt do
@@ -824,6 +825,8 @@ for opt do
   ;;
   --disable-guest-agent) guest_agent="no"
   ;;
+  --disable-bridge-helper) bridge_helper="no"
+  ;;
   *) echo "ERROR: unknown option $opt"; show_help="yes"
   ;;
   esac
@@ -1110,6 +1113,7 @@ echo "  --disable-guest-agent    disable building of the QEMU Guest Agent"
 echo "  --enable-guest-agent     enable building of the QEMU Guest Agent"
 echo "  --with-coroutine=BACKEND coroutine backend. Supported options:"
 echo "                           gthread, ucontext, sigaltstack, windows"
+echo "  --disable-bridge-helper  disable building of the qemu-bridge-helper"
 echo ""
 echo "NOTE: The object files are built at the place where configure is launched"
 exit 1
@@ -3896,6 +3900,10 @@ if test "$tcg_interpreter" = "yes" ; then
   echo "CONFIG_TCI_DIS=y"  >> $libdis_config_mak
 fi
 
+if test "$bridge_helper" = "yes" && test "$linux" = "yes" ; then
+    echo "CONFIG_HELPERS=y" >> $config_host_mak
+fi
+
 case "$ARCH" in
 alpha)
   # Ensure there's only a single GP
Signature · 1 line
1.7.9.5
#1 lore raw

Il 10/07/2012 12:43, Fabien Chouteau ha scritto:

Quoted 2 lines

Bridge helper uses ioctl's not available on old Linux versions, we add this flag to disable the build.

Which ioctls? Please detect them, so that we can also work around them perhaps.

Paolo

#2 lore raw
Quoted 7 lines · Paolo Bonzini

Il 10/07/2012 12:43, Fabien Chouteau ha scritto:

Quoted 2 lines

Bridge helper uses ioctl's not available on old Linux versions, we add this flag to disable the build.

Which ioctls? Please detect them, so that we can also work around them perhaps.

There SIOCBRADDIF at least, maybe it's the only one.

Signature · 1 line
Fabien Chouteau
#3 lore raw

Il 10/07/2012 13:02, Fabien Chouteau ha scritto:

Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

Bridge helper uses ioctl's not available on old Linux versions, we add this flag to disable the build.

Which ioctls? Please detect them, so that we can also work around them perhaps.

There SIOCBRADDIF at least, maybe it's the only one.

So indeed you could also use SIOCDEVPRIVATE / BRCTL_ADD_IF if you were inclined to do so...

Paolo

#4 lore raw
Quoted 4 lines · Paolo Bonzini

Il 10/07/2012 13:02, Fabien Chouteau ha scritto:

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines

Bridge helper uses ioctl's not available on old Linux versions, we add this flag to disable the build.

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines

Which ioctls? Please detect them, so that we can also work around them perhaps.

There SIOCBRADDIF at least, maybe it's the only one.

So indeed you could also use SIOCDEVPRIVATE / BRCTL_ADD_IF if you were inclined to do so...

Unfortunately I don't have time to go deep into the code. It's not a feature I plan to use, so the quickest solution for me is to disable it.

Corey, I can see that you developed the bridge helper, can you please take a look at this issue?

Signature · 1 line
Fabien Chouteau
#5 lore raw
Quoted 14 lines · Fabien Chouteau
Quoted 4 lines · Paolo Bonzini

Il 10/07/2012 13:02, Fabien Chouteau ha scritto:

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines

Bridge helper uses ioctl's not available on old Linux versions, we add this flag to disable the build.

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines

Which ioctls? Please detect them, so that we can also work around them perhaps.

There SIOCBRADDIF at least, maybe it's the only one.

So indeed you could also use SIOCDEVPRIVATE / BRCTL_ADD_IF if you were inclined to do so...

Quoted 6 lines

Unfortunately I don't have time to go deep into the code. It's not a feature I plan to use, so the quickest solution for me is to disable it.

Corey, I can see that you developed the bridge helper, can you please take a look at this issue?

Apologies, I was out yesterday. I see your new patch series is progressing. I'll take over if/when you want.

Signature · 2 lines
Regards,
Corey
#6 lore raw
Quoted 17 lines · Corey Bryant
Quoted 14 lines · Fabien Chouteau
Quoted 12 lines · Paolo Bonzini

Il 10/07/2012 13:02, Fabien Chouteau ha scritto:

Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

Bridge helper uses ioctl's not available on old Linux versions, we add this flag to disable the build.

Which ioctls? Please detect them, so that we can also work around them perhaps.

There SIOCBRADDIF at least, maybe it's the only one.

So indeed you could also use SIOCDEVPRIVATE / BRCTL_ADD_IF if you were inclined to do so...

Quoted 9 lines
Quoted 6 lines

Unfortunately I don't have time to go deep into the code. It's not a feature I plan to use, so the quickest solution for me is to disable it.

Corey, I can see that you developed the bridge helper, can you please take a look at this issue?

Apologies, I was out yesterday. I see your new patch series is progressing. I'll take over if/when you want.

Beside the --enable/--disable patch, there's another question for you. Is it possible to implement qemu-bridge-adapter without SIOCBRADDIF?

Thanks,

Signature · 1 line
Fabien Chouteau
#7 lore raw

Il 11/07/2012 16:56, Fabien Chouteau ha scritto:

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines

So indeed you could also use SIOCDEVPRIVATE / BRCTL_ADD_IF if you were inclined to do so...

Unfortunately I don't have time to go deep into the code. It's not a feature I plan to use, so the quickest solution for me is to disable it.

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines

Corey, I can see that you developed the bridge helper, can you please take a look at this issue?

Apologies, I was out yesterday. I see your new patch series is progressing. I'll take over if/when you want.

Beside the --enable/--disable patch, there's another question for you. Is it possible to implement qemu-bridge-adapter without SIOCBRADDIF?

Yes, with the (obsolete) SIOCDEVPRIVATE ioctl. It has multiple subcommands, one of which is BRCTL_ADD_IF.

Paolo

#8 lore raw
Quoted 14 lines · Paolo Bonzini

Il 11/07/2012 16:56, Fabien Chouteau ha scritto:

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 10 lines
Quoted 10 lines
Quoted 3 lines
Quoted 3 lines

So indeed you could also use SIOCDEVPRIVATE / BRCTL_ADD_IF if you were inclined to do so...

Unfortunately I don't have time to go deep into the code. It's not a feature I plan to use, so the quickest solution for me is to disable it.

Corey, I can see that you developed the bridge helper, can you please take a look at this issue?

Apologies, I was out yesterday. I see your new patch series is progressing. I'll take over if/when you want.

Quoted 8 lines
Quoted 2 lines

Beside the --enable/--disable patch, there's another question for you. Is it possible to implement qemu-bridge-adapter without SIOCBRADDIF?

Yes, with the (obsolete) SIOCDEVPRIVATE ioctl. It has multiple subcommands, one of which is BRCTL_ADD_IF.

Paolo

I'll test this out and provide a patch that uses BRCTL_ADD_IF if SIOCBRADDIF is undefined.

Signature · 2 lines
Regards,
Corey
#9 lore raw
In reply to Fabien Chouteau

Am 10.07.2012 12:43, schrieb Fabien Chouteau:

Quoted 14 lines

Bridge helper uses ioctl's not available on old Linux versions, we add this flag to disable the build.

---
 Makefile  |    2 +-
 configure |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
Makefile +0 -0
index 34d6a9e..b46c6b0 100644

Makefile $(call set-vpath, $(SRC_PATH)) · line 43

Quoted 8 lines
Makefile +1 -1
@@ -37,7 +37,7 @@ $(call set-vpath, $(SRC_PATH))
 
 LIBS+=-lz $(LIBS_TOOLS)
 
-HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
+HELPERS-$(CONFIG_HELPERS) = qemu-bridge-helper$(EXESUF)
 
 ifdef BUILD_DOCS
 DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt

Three quick comments:

We should also disable build of all helpers when compiling with --static.

I don't like the bridge helper being disabled based on CONFIG_HELPERS, suggest specific CONFIG_BRIDGE_HELPER or so.

All --disable-* options should probably have an --enable-* counterpart.

Andreas

Quoted 41 lines
configure +8 -0
index 500fe24..5566752 100755
@@ -195,6 +195,7 @@ zlib="yes"
 guest_agent="yes"
 libiscsi=""
 coroutine=""
+bridge_helper="yes"
 
 # parse CC options first
 for opt do
@@ -824,6 +825,8 @@ for opt do
   ;;
   --disable-guest-agent) guest_agent="no"
   ;;
+  --disable-bridge-helper) bridge_helper="no"
+  ;;
   *) echo "ERROR: unknown option $opt"; show_help="yes"
   ;;
   esac
@@ -1110,6 +1113,7 @@ echo "  --disable-guest-agent    disable building of the QEMU Guest Agent"
 echo "  --enable-guest-agent     enable building of the QEMU Guest Agent"
 echo "  --with-coroutine=BACKEND coroutine backend. Supported options:"
 echo "                           gthread, ucontext, sigaltstack, windows"
+echo "  --disable-bridge-helper  disable building of the qemu-bridge-helper"
 echo ""
 echo "NOTE: The object files are built at the place where configure is launched"
 exit 1
@@ -3896,6 +3900,10 @@ if test "$tcg_interpreter" = "yes" ; then
   echo "CONFIG_TCI_DIS=y"  >> $libdis_config_mak
 fi
 
+if test "$bridge_helper" = "yes" && test "$linux" = "yes" ; then
+    echo "CONFIG_HELPERS=y" >> $config_host_mak
+fi
+
 case "$ARCH" in
 alpha)
   # Ensure there's only a single GP
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#10 lore raw
Quoted 26 lines · Andreas Färber

Am 10.07.2012 12:43, schrieb Fabien Chouteau:

Quoted 14 lines

Bridge helper uses ioctl's not available on old Linux versions, we add this flag to disable the build.

---
 Makefile  |    2 +-
 configure |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
Makefile +0 -0
index 34d6a9e..b46c6b0 100644

Makefile $(call set-vpath, $(SRC_PATH)) · line 43

Quoted 8 lines
Makefile +1 -1
@@ -37,7 +37,7 @@ $(call set-vpath, $(SRC_PATH))
 
 LIBS+=-lz $(LIBS_TOOLS)
 
-HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
+HELPERS-$(CONFIG_HELPERS) = qemu-bridge-helper$(EXESUF)
 
 ifdef BUILD_DOCS
 DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt

Three quick comments:

Quoted 6 lines

We should also disable build of all helpers when compiling with --static.

I don't like the bridge helper being disabled based on CONFIG_HELPERS, suggest specific CONFIG_BRIDGE_HELPER or so.

All --disable-* options should probably have an --enable-* counterpart.

3 easy fixes, I'll send a new version.

Quoted 43 lines
Quoted 41 lines
configure +8 -0
index 500fe24..5566752 100755
@@ -195,6 +195,7 @@ zlib="yes"
 guest_agent="yes"
 libiscsi=""
 coroutine=""
+bridge_helper="yes"
 
 # parse CC options first
 for opt do
@@ -824,6 +825,8 @@ for opt do
   ;;
   --disable-guest-agent) guest_agent="no"
   ;;
+  --disable-bridge-helper) bridge_helper="no"
+  ;;
   *) echo "ERROR: unknown option $opt"; show_help="yes"
   ;;
   esac
@@ -1110,6 +1113,7 @@ echo "  --disable-guest-agent    disable building of the QEMU Guest Agent"
 echo "  --enable-guest-agent     enable building of the QEMU Guest Agent"
 echo "  --with-coroutine=BACKEND coroutine backend. Supported options:"
 echo "                           gthread, ucontext, sigaltstack, windows"
+echo "  --disable-bridge-helper  disable building of the qemu-bridge-helper"
 echo ""
 echo "NOTE: The object files are built at the place where configure is launched"
 exit 1
@@ -3896,6 +3900,10 @@ if test "$tcg_interpreter" = "yes" ; then
   echo "CONFIG_TCI_DIS=y"  >> $libdis_config_mak
 fi
 
+if test "$bridge_helper" = "yes" && test "$linux" = "yes" ; then
+    echo "CONFIG_HELPERS=y" >> $config_host_mak
+fi
+
 case "$ARCH" in
 alpha)
   # Ensure there's only a single GP
Signature · 1 line
Fabien Chouteau