From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] configure: add an option to disable vlans
Date: Mon, 7 Jun 2010 18:03:10 +0300 [thread overview]
Message-ID: <20100607150309.GA13369@redhat.com> (raw)
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
next reply other threads:[~2010-06-07 15:07 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-07 15:03 Michael S. Tsirkin [this message]
2010-06-07 16:16 ` [Qemu-devel] [PATCH] configure: add an option to disable vlans 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100607150309.GA13369@redhat.com \
--to=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).