From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>, patches@linaro.org
Subject: [Qemu-devel] [PATCH 1/3] Revert "net: Improve the warnings for dubious command line option combinations"
Date: Fri, 20 May 2011 16:49:59 +0100 [thread overview]
Message-ID: <1305906601-25324-2-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1305906601-25324-1-git-send-email-peter.maydell@linaro.org>
This reverts commit f68b9d672b90dedc79aeb9b44607f484dbe46a6b.
That attempt at diagnosing unused -net nic options failed to account
for NICs created via -device; back it out cleanly in preparation
for implementing in a different manner.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
net.c | 31 -------------------------------
1 files changed, 0 insertions(+), 31 deletions(-)
diff --git a/net.c b/net.c
index 4f777c3..1b521a9 100644
--- a/net.c
+++ b/net.c
@@ -1304,22 +1304,6 @@ void net_check_clients(void)
{
VLANState *vlan;
VLANClientState *vc;
- int seen_nics = 0;
-
- /* Don't warn about the default network setup that you get if
- * no command line -net options are specified. There are two
- * cases that we would otherwise complain about:
- * (1) board doesn't support a NIC but the implicit "-net nic"
- * requested one; we'd otherwise complain about more NICs being
- * specified than we support, and also that the vlan set up by
- * the implicit "-net user" didn't have any NICs connected to it
- * (2) CONFIG_SLIRP not set: we'd otherwise complain about the
- * implicit "-net nic" setting up a nic that wasn't connected to
- * anything.
- */
- if (default_net) {
- return;
- }
QTAILQ_FOREACH(vlan, &vlans, next) {
int has_nic = 0, has_host_dev = 0;
@@ -1327,7 +1311,6 @@ void net_check_clients(void)
QTAILQ_FOREACH(vc, &vlan->clients, next) {
switch (vc->info->type) {
case NET_CLIENT_TYPE_NIC:
- seen_nics++;
has_nic = 1;
break;
case NET_CLIENT_TYPE_SLIRP:
@@ -1347,26 +1330,12 @@ void net_check_clients(void)
vlan->id);
}
QTAILQ_FOREACH(vc, &non_vlan_clients, next) {
- if (vc->info->type == NET_CLIENT_TYPE_NIC) {
- seen_nics++;
- }
if (!vc->peer) {
fprintf(stderr, "Warning: %s %s has no peer\n",
vc->info->type == NET_CLIENT_TYPE_NIC ? "nic" : "netdev",
vc->name);
}
}
- if (seen_nics != nb_nics) {
- /* Number of NICs requested by user on command line doesn't match
- * the number the model actually registered with us.
- * This will generally only happen for models of embedded boards
- * with no PCI bus or similar. PCI based machines can instantiate
- * all requested NICs as PCI devices but usually embedded boards
- * only have a single NIC.
- */
- fprintf(stderr, "Warning: more nics requested than this machine "
- "supports; some have been ignored\n");
- }
}
static int net_init_client(QemuOpts *opts, void *dummy)
--
1.7.1
next prev parent reply other threads:[~2011-05-20 15:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-20 15:49 [Qemu-devel] [PATCH 0/3] net: reimplement -net nic diagnostic fix Peter Maydell
2011-05-20 15:49 ` Peter Maydell [this message]
2011-05-20 15:50 ` [Qemu-devel] [PATCH 2/3] net: Don't warn about the default network setup Peter Maydell
2011-05-23 8:30 ` Markus Armbruster
2011-05-23 8:55 ` Peter Maydell
2011-05-20 15:50 ` [Qemu-devel] [PATCH 3/3] net: Warn about "-net nic" options which were ignored Peter Maydell
2011-05-23 8:34 ` Markus Armbruster
2011-05-20 15:55 ` [Qemu-devel] [PATCH 0/3] net: reimplement -net nic diagnostic fix Jan Kiszka
2011-05-20 16:04 ` Peter Maydell
2011-05-20 16:07 ` Jan Kiszka
2011-05-20 16:12 ` Peter Maydell
2011-05-20 16:15 ` Jan Kiszka
2011-05-23 8:35 ` Markus Armbruster
2011-06-05 13:12 ` Peter Maydell
2011-06-22 11:39 ` Peter Maydell
2011-06-22 12:58 ` Anthony Liguori
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=1305906601-25324-2-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=armbru@redhat.com \
--cc=patches@linaro.org \
--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).