From: Eric Blake <eblake@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Amos Kong <akong@redhat.com>,
qemu-devel@nongnu.org, stefanha@redhat.com,
lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4] net: introduce command to query rx-filter information
Date: Fri, 24 May 2013 06:26:40 -0600 [thread overview]
Message-ID: <519F5C80.1020200@redhat.com> (raw)
In-Reply-To: <20130524120345.GB8669@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1654 bytes --]
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
next prev parent reply other threads:[~2013-05-24 12:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-24 6:44 [Qemu-devel] [PATCH v4] net: introduce command to query rx-filter information Amos Kong
2013-05-24 12:03 ` Michael S. Tsirkin
2013-05-24 12:26 ` Eric Blake [this message]
2013-05-27 7:12 ` Amos Kong
2013-05-24 12:42 ` Eric Blake
2013-05-27 8:58 ` Amos Kong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=519F5C80.1020200@redhat.com \
--to=eblake@redhat.com \
--cc=akong@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).