[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v4] net: introduce command to query rx-filter in

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v4] net: introduce command to query rx-filter information
Date: Fri, 24 May 2013 06:26:40 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

On 05/24/2013 06:03 AM, Michael S. Tsirkin wrote:
> On Fri, May 24, 2013 at 02:44:06PM +0800, Amos Kong wrote:
>> We want to implement mac programming over macvtap through Libvirt. The
>> related rx-filter information of the nic contains main mac, rx-mode
>> items.

>> +Each array entry contains the following:
>> +
>> +- "name": net client name (json-string)
>> +- "promiscuous": promiscuous mode is enabled (json-bool)
>> +- "multicast": multicast receive state (one of 'normal', 'none', 'all')
>> +- "unicast": unicast receive state  (one of 'normal', 'none', 'all')
>> +- "broadcast-allowed": allow to receive broadcast (json-bool)
>> +- "multicast-overflow": multicast table is overflowed (json-bool)
>> +- "unicast-overflow": unicast table is overflowed (json-bool)
>> +- "main-mac": main macaddr string (json-string)
>> +- "unicast-table": a json-array of unicast macaddr string
>> +- "multicast-table": a json-array of multicast macaddr string
> How are these sorted by the way?

They don't have to be - JSON uses name-value pairs in dictionaries
precisely because they aren't sorted.  However, it looks like you
matched the order that you listed in the qapi-schema.json file, which is
as good as any (even if it differs from the random hash ordering
demonstrated in your example below).  Or are you asking how macaddr
strings within multicast-table are sorted (JSON arrays DO convey
ordering relations), rather than how the name-value pairs are (not)
sorted in the overall array entry dictionary?

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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