qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2] arm/aspeed: Rework NIC attachment


From: Markus Armbruster
Subject: Re: [PATCH v2] arm/aspeed: Rework NIC attachment
Date: Wed, 27 May 2020 13:47:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Cédric Le Goater <address@hidden> writes:

> The number of MACs supported by an Aspeed SoC is defined by "macs_num"
> under the SoC model, that is two for the AST2400 and AST2500 and four
> the AST2600. The model initializes the maximum number of supported
> MACs but the number of realized devices is caped by the number of

s/caped/capped/

> network device back-ends defined on the command line. This can leave
> unrealized devices hanging around in the QOM composition tree.
>
> Modify the machine initialization to define which MACs are attached to
> a network device back-end using a bit-field property "macs-mask" and
> let the SoC realize all network devices.
>
> The default setting of "macs-mask" is "use MAC0" only, which works for
> all our AST2400 and AST2500 machines. The AST2600 machines have
> different configurations. The AST2600 EVB machine activates MAC1, MAC2
> and MAC3 and the Tacoma BMC machine activates MAC2.
>
> Inactive MACs will have no peer and QEMU will warn the user with :
>
>     qemu-system-arm: warning: nic ftgmac100.0 has no peer
>     qemu-system-arm: warning: nic ftgmac100.1 has no peer
>     qemu-system-arm: warning: nic ftgmac100.3 has no peer

This confused me, until I realized that QEMU sometimes supresses the
warning.

In vl.c:

    if (!default_net && (!qtest_enabled() || has_defaults)) {
        net_check_clients();
    }

Suppressed when none of -netdev, -nic, -net, -nodefaults is specified,
and also for -accel=qtest -nodefaults.

Say "QEMU may warn" instead?

I looked for other boards with onboard NICs.  As far as I can tell, they
all behave the same.

>
> Signed-off-by: Cédric Le Goater <address@hidden>

Patch looks good, so
Reviewed-by: Markus Armbruster <address@hidden>




reply via email to

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