From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ufr53-0007dh-KS for qemu-devel@nongnu.org; Fri, 24 May 2013 08:26:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ufr51-0000J4-L1 for qemu-devel@nongnu.org; Fri, 24 May 2013 08:26:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ufr51-0000Iw-BX for qemu-devel@nongnu.org; Fri, 24 May 2013 08:26:43 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4OCQgpH026490 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 24 May 2013 08:26:42 -0400 Message-ID: <519F5C80.1020200@redhat.com> Date: Fri, 24 May 2013 06:26:40 -0600 From: Eric Blake MIME-Version: 1.0 References: <1369377846-18439-1-git-send-email-akong@redhat.com> <20130524120345.GB8669@redhat.com> In-Reply-To: <20130524120345.GB8669@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2EIIFJCHKNKURVMRPMBKB" Subject: Re: [Qemu-devel] [PATCH v4] net: introduce command to query rx-filter information List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Amos Kong , qemu-devel@nongnu.org, stefanha@redhat.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2EIIFJCHKNKURVMRPMBKB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 >=20 > 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? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2EIIFJCHKNKURVMRPMBKB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRn1yAAAoJEKeha0olJ0Nq0EwIAIq/YtwG8wZBS1gwk6kCmvkk EMy1q+AnlbQunFGEIIr9806djqTKk7k9NKo7lfOWu1xAQhzzrCXHq1fNPbbJ8JlF aytiF0MdX/Wv3nxTjbPOnMW5p6FdEMNATM8INC2uhku/KuWHxS/HZZ5sGLzFVT9c Wu5VYodTvAV+Rt+YbyAJ581A5mkV5qS84cmozr+GIzWPCPzCF0GPdSdkZjax0wWX vkX45D8ux2xQvnBRbY8plKWR+6ak33lxIUZ7gMzWD5B5mIgEMpF36OFK2d0hgx6i 4LrOhTYETaBSu+kf3Gng0gI6oJ9f0sQvb1JgQwpz8Wl4QDo6/CkhgMrWmrTOuO4= =MRwb -----END PGP SIGNATURE----- ------enig2EIIFJCHKNKURVMRPMBKB--