* [Qemu-devel] Regression "Warning: more nics requested than this machine supports"
@ 2011-05-16 16:58 Markus Armbruster
2011-05-20 11:19 ` Peter Maydell
0 siblings, 1 reply; 3+ messages in thread
From: Markus Armbruster @ 2011-05-16 16:58 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell
Watch this:
$ qemu-system-x86_64 -nodefaults -enable-kvm -m 384 -vnc :0 -S -netdev user,id=net0 -device e1000,netdev=net0
Warning: more nics requested than this machine supports; some have been ignored
(qemu) info network
Devices not on any VLAN:
net0: net=10.0.2.0, restricted=n peer=e1000.0
e1000.0: model=e1000,macaddr=52:54:00:12:34:56 peer=net0
Culprit is
commit f68b9d672b90dedc79aeb9b44607f484dbe46a6b
Author: Peter Maydell <peter.maydell@linaro.org>
Date: Tue Mar 22 18:39:40 2011 +0000
net: Improve the warnings for dubious command line option combinations
Improve the warnings we give if the user specified a combination of -net
options which don't make much sense:
* Don't warn about anything if the config is the implicit default
"-net user -net nic" rather than one specified by the user (this will
only kick in for boards with no NIC or if CONFIG_SLIRP is not set)
* Diagnose the case where the user asked for NICs which the board
didn't instantiate (for example where the user asked for two NICs
but the board only supports one)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Its count of requested NICs is blissfully unaware of -device. In my
example, it comes up with nb_nics == 0 and seen_nics == 1.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Regression "Warning: more nics requested than this machine supports"
2011-05-16 16:58 [Qemu-devel] Regression "Warning: more nics requested than this machine supports" Markus Armbruster
@ 2011-05-20 11:19 ` Peter Maydell
2011-05-20 11:50 ` Jan Kiszka
0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2011-05-20 11:19 UTC (permalink / raw)
To: Markus Armbruster; +Cc: qemu-devel
On 16 May 2011 17:58, Markus Armbruster <armbru@redhat.com> wrote:
> $ qemu-system-x86_64 -nodefaults -enable-kvm -m 384 -vnc :0 -S -netdev user,id=net0 -device e1000,netdev=net0
> Warning: more nics requested than this machine supports; some have been ignored
> (qemu) info network
> Devices not on any VLAN:
> net0: net=10.0.2.0, restricted=n peer=e1000.0
> e1000.0: model=e1000,macaddr=52:54:00:12:34:56 peer=net0
>
> Culprit is
> net: Improve the warnings for dubious command line option combinations
> Its count of requested NICs is blissfully unaware of -device. In my
> example, it comes up with nb_nics == 0 and seen_nics == 1.
As far as I can determine, "-device e1000,netdev=0" doesn't go through
net_init_nic() and doesn't put an entry in the nd_table[] for the NIC.
This means it's broken, because a lot of board models look in nd_table[]
to determine whether the user requested a NIC and whether it's the right
type. So I think that in some ways this is just showing up an existing
problem with trying to instantiate a network card with -device.
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Regression "Warning: more nics requested than this machine supports"
2011-05-20 11:19 ` Peter Maydell
@ 2011-05-20 11:50 ` Jan Kiszka
0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2011-05-20 11:50 UTC (permalink / raw)
To: Peter Maydell; +Cc: Markus Armbruster, qemu-devel
On 2011-05-20 13:19, Peter Maydell wrote:
> On 16 May 2011 17:58, Markus Armbruster <armbru@redhat.com> wrote:
>> $ qemu-system-x86_64 -nodefaults -enable-kvm -m 384 -vnc :0 -S -netdev user,id=net0 -device e1000,netdev=net0
>> Warning: more nics requested than this machine supports; some have been ignored
>> (qemu) info network
>> Devices not on any VLAN:
>> net0: net=10.0.2.0, restricted=n peer=e1000.0
>> e1000.0: model=e1000,macaddr=52:54:00:12:34:56 peer=net0
>>
>> Culprit is
>> net: Improve the warnings for dubious command line option combinations
>
>> Its count of requested NICs is blissfully unaware of -device. In my
>> example, it comes up with nb_nics == 0 and seen_nics == 1.
>
> As far as I can determine, "-device e1000,netdev=0" doesn't go through
> net_init_nic() and doesn't put an entry in the nd_table[] for the NIC.
> This means it's broken, because a lot of board models look in nd_table[]
> to determine whether the user requested a NIC and whether it's the right
> type. So I think that in some ways this is just showing up an existing
> problem with trying to instantiate a network card with -device.
qemu_new_nic must call net_init_nic so that this works properly. Of
course we need to avoid calling it multiple times when the adapter is
still instantiated via the old -net or via board init code.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-20 11:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-16 16:58 [Qemu-devel] Regression "Warning: more nics requested than this machine supports" Markus Armbruster
2011-05-20 11:19 ` Peter Maydell
2011-05-20 11:50 ` Jan Kiszka
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.