qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] net: Silence 'has no peer' messages in testing


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH] net: Silence 'has no peer' messages in testing mode
Date: Tue, 8 May 2018 15:19:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 07.05.2018 09:14, Markus Armbruster wrote:
[...]
> Two (possibly confused) questions:
> 
> 1. The user can add nics without convenience options:
> 
>     $ upstream-qemu -display none -nodefaults -device e1000
>     upstream-qemu: warning: nic e1000.0 has no peer
> 
>    Shouldn't we silence the warning then, too?

No, since that is certainly a mis-configuration in that case. Why would
a user want to add a NIC without host backend?

> 2. We already have code to silence the warning:
> 
>     /* Don't warn about the default network setup that you get if
>      * no command line -net or -netdev 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
>      * (2) CONFIG_SLIRP not set, in which case the implicit "-net nic"
>      * sets up a nic that isn't connected to anything.
>      */
>     if (!default_net) {
>         net_check_clients();
>     }
> 
>    Is it a good idea to split the logic between net_check_clients() and
>    its caller?

Hmm, it's likely nicer to keep everything in one place. Since
"default_net" is only available in vl.c, I think the checks should go
there... so I'll rework my patch accordingly.

 Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]