All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] configure: add an option to disable vlans
@ 2010-06-07 15:03 Michael S. Tsirkin
  2010-06-07 16:16 ` Paul Brook
  0 siblings, 1 reply; 24+ messages in thread
From: Michael S. Tsirkin @ 2010-06-07 15:03 UTC (permalink / raw)
  To: qemu-devel

With -netdev, there now seems to be little need to support vlans,
enabling them leads to user confusion and bad performance.
Disable support for vlans by default, add config option to enable.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 configure |   12 ++++++++++++
 net.c     |    7 +++++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 3cd2c5f..728d9a1 100755
--- a/configure
+++ b/configure
@@ -299,6 +299,7 @@ pkgversion=""
 check_utests="no"
 user_pie="no"
 zero_malloc=""
+vlans="no"
 
 # OS specific
 if check_define __linux__ ; then
@@ -660,6 +661,10 @@ for opt do
   ;;
   --enable-vhost-net) vhost_net="yes"
   ;;
+  --disable-vlans) vlans="no"
+  ;;
+  --enable-vlans) vlans="yes"
+  ;;
   *) echo "ERROR: unknown option $opt"; show_help="yes"
   ;;
   esac
@@ -826,6 +831,8 @@ echo "  --enable-docs            enable documentation build"
 echo "  --disable-docs           disable documentation build"
 echo "  --disable-vhost-net      disable vhost-net acceleration support"
 echo "  --enable-vhost-net       enable vhost-net acceleration support"
+echo "  --disable-vlans          disable legacy qemu vlan support"
+echo "  --enable-vlans           enable legacy qemu vlan support"
 echo ""
 echo "NOTE: The object files are built at the place where configure is launched"
 exit 1
@@ -2041,6 +2048,7 @@ echo "preadv support    $preadv"
 echo "fdatasync         $fdatasync"
 echo "uuid support      $uuid"
 echo "vhost-net support $vhost_net"
+echo "vlans support     $vlans"
 
 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -2284,6 +2292,10 @@ bsd)
 ;;
 esac
 
+if test $vlans = "yes" ; then
+  echo "CONFIG_VLANS=y" >> $config_target_mak
+fi
+
 tools=
 if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then
   tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
diff --git a/net.c b/net.c
index 378edfc..a6af5f7 100644
--- a/net.c
+++ b/net.c
@@ -1070,6 +1070,13 @@ int net_client_init(Monitor *mon, QemuOpts *opts, int is_netdev)
         return -1;
     }
 
+#ifndef CONFIG_VLANS
+    if (!is_netdev) {
+        qerror_report(QERR_INVALID_PARAMETER_VALUE, "netdev", "netdev id");
+        return -1;
+    }
+#endif
+
     if (is_netdev) {
         if (strcmp(type, "tap") != 0 &&
 #ifdef CONFIG_SLIRP
-- 
1.7.1.12.g42b7f

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-06-10  8:48 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-07 15:03 [Qemu-devel] [PATCH] configure: add an option to disable vlans Michael S. Tsirkin
2010-06-07 16:16 ` Paul Brook
2010-06-07 16:17   ` Michael S. Tsirkin
2010-06-07 16:42     ` Paul Brook
2010-06-07 16:52       ` Anthony Liguori
2010-06-07 19:21         ` Michael S. Tsirkin
2010-06-07 20:40           ` Anthony Liguori
2010-06-07 20:58             ` Michael S. Tsirkin
2010-06-07 21:37               ` Anthony Liguori
2010-06-07 21:57                 ` Anthony Liguori
2010-06-08 12:13                   ` Michael S. Tsirkin
2010-06-08 13:03                     ` Anthony Liguori
2010-06-08 13:07                       ` Michael S. Tsirkin
2010-06-08 11:09             ` Michael S. Tsirkin
2010-06-08 13:02               ` Anthony Liguori
2010-06-08 13:14                 ` Michael S. Tsirkin
2010-06-08 14:25                 ` Gerd Hoffmann
2010-06-08 14:37                   ` Paul Brook
2010-06-08 18:01                     ` Anthony Liguori
2010-06-07 17:41       ` Michael S. Tsirkin
2010-06-09  7:44         ` Markus Armbruster
2010-06-10  7:20           ` Chris Webb
2010-06-10  8:43             ` Michael S. Tsirkin
2010-06-08 12:17   ` Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.