From: Amos Kong <akong@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: lcapitulino@redhat.com, qemu-devel@nongnu.org,
stefanha@redhat.com, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4] net: introduce command to query rx-filter information
Date: Mon, 27 May 2013 15:12:06 +0800 [thread overview]
Message-ID: <20130527071206.GA6120@t430s.nay.redhat.com> (raw)
In-Reply-To: <519F5C80.1020200@redhat.com>
On Fri, May 24, 2013 at 06:26:40AM -0600, Eric Blake wrote:
> 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?
The order is same as in 'struct VirtIONet'. I just keep this order match
the order in qapi-schema.json.
> 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).
Yes.
> Or are you asking how macaddr
> strings within multicast-table are sorted (JSON arrays DO convey
> ordering relations),
macaddr strings order in QMP output is decided by python dictionary.
macaddr strings order in HMP output is same as the order in guest
mac-table.
> rather than how the name-value pairs are (not)
> sorted in the overall array entry dictionary?
--
Amos.
next prev parent reply other threads:[~2013-05-27 7:12 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
2013-05-27 7:12 ` Amos Kong [this message]
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=20130527071206.GA6120@t430s.nay.redhat.com \
--to=akong@redhat.com \
--cc=eblake@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).