qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 1/4] qapi: net: Add query-netdevs command


From: Eric Blake
Subject: Re: [PATCH v3 1/4] qapi: net: Add query-netdevs command
Date: Tue, 8 Sep 2020 07:36:47 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 9/7/20 7:39 AM, Markus Armbruster wrote:


This is union Netdev plus a common member @peer-id, less the variant
members for NetClientDriver values 'nic' and 'hubport'.

Can 'type: 'nic' and 'type': 'hubport' occur?

No, it can't. We don't support NIC/hubport in query-netdevs, so we neither 
create this
structure for them, nor store config.

Same for 'none', I guess.

As defined, NetdevInfo allows types 'none', 'nic', and 'hubport', it
just has no variant members for them.  The fact that they can't occur is
not coded into the type, and therefore not visible in introspection.

To make introspection more precise, we'd have to define a new enum type.
How much that would complicate the C code is unclear.

Do we need it to be more precise?  Eric, got an opinion?

Is the problem that a new enum would be duplicating things? Is it worth allowing one enum to have a 'base':'OtherEnum' in the schema to reduce some of the duplication?

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

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