From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StHzm-0002Ll-MG for qemu-devel@nongnu.org; Mon, 23 Jul 2012 08:44:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StHzi-00088Z-PG for qemu-devel@nongnu.org; Mon, 23 Jul 2012 08:44:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StHzi-00088T-H1 for qemu-devel@nongnu.org; Mon, 23 Jul 2012 08:44:14 -0400 Message-ID: <500D4754.2020301@redhat.com> Date: Mon, 23 Jul 2012 14:45:08 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: <1342785709-3152-1-git-send-email-stefanha@linux.vnet.ibm.com> <1342785709-3152-2-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1342785709-3152-2-git-send-email-stefanha@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/16] net: Add a hub net client List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Paolo Bonzini , Zhi Yong Wu , qemu-devel@nongnu.org, Zhi Yong Wu Two hairs to split: On 07/20/12 14:01, Stefan Hajnoczi wrote: > +static NetHubPort *net_hub_port_new(NetHub *hub, const char *name) > +{ > + VLANClientState *nc; > + NetHubPort *port; > + unsigned int id = hub->num_ports++; There are projects that don't like to put logic or externally visible side-effects into initializers. I don't know about qemu. > diff --git a/qapi-schema.json b/qapi-schema.json > index bc55ed2..6618eb5 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -2094,6 +2094,19 @@ > '*helper': 'str' } } > > ## > +# @NetdevHubPortOptions > +# > +# Connect two or more net clients through a software hub. > +# > +# @hubid: hub identifier number > +# > +# Since 1.2 > +## > +{ 'type': 'NetdevHubPortOptions', > + 'data': { > + 'hubid': 'int' } } I think this should say 'uint32'. Thanks, Laszlo