Re: [Qemu-devel] [PATCH 01/16] net: Add a hub net client

2012-07-23 Thread Laszlo Ersek
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

Re: [Qemu-devel] [PATCH 01/16] net: Add a hub net client

2012-07-23 Thread Stefan Hajnoczi
On Mon, Jul 23, 2012 at 1:45 PM, Laszlo Ersek ler...@redhat.com wrote: 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 =

Re: [Qemu-devel] [PATCH 01/16] net: Add a hub net client

2012-07-23 Thread Laszlo Ersek
On 07/23/12 15:49, Stefan Hajnoczi wrote: On Mon, Jul 23, 2012 at 1:45 PM, Laszlo Ersek ler...@redhat.com wrote: 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

Re: [Qemu-devel] [PATCH 01/16] net: Add a hub net client

2012-07-23 Thread Stefan Hajnoczi
On Mon, Jul 23, 2012 at 3:05 PM, Laszlo Ersek ler...@redhat.com wrote: On 07/23/12 15:49, Stefan Hajnoczi wrote: On Mon, Jul 23, 2012 at 1:45 PM, Laszlo Ersek ler...@redhat.com wrote: Two hairs to split: On 07/20/12 14:01, Stefan Hajnoczi wrote: +static NetHubPort *net_hub_port_new(NetHub

Re: [Qemu-devel] [PATCH 01/16] net: Add a hub net client

2012-07-23 Thread Laszlo Ersek
On 07/23/12 16:52, Stefan Hajnoczi wrote: On Mon, Jul 23, 2012 at 3:05 PM, Laszlo Ersek ler...@redhat.com wrote: The idea is, rather than unsigned int id = hub-num_ports++; it should say unsigned int id; /* ... */ id = hub-num_ports++; ... Hm, yes, I remember it from

Re: [Qemu-devel] [PATCH 01/16] net: Add a hub net client

2012-07-23 Thread Stefan Hajnoczi
On Mon, Jul 23, 2012 at 4:16 PM, Laszlo Ersek ler...@redhat.com wrote: On 07/23/12 16:52, Stefan Hajnoczi wrote: On Mon, Jul 23, 2012 at 3:05 PM, Laszlo Ersek ler...@redhat.com wrote: The idea is, rather than unsigned int id = hub-num_ports++; it should say unsigned int id;

Re: [Qemu-devel] [PATCH 01/16] net: Add a hub net client

2012-07-23 Thread Andreas Färber
Am 23.07.2012 17:23, schrieb Stefan Hajnoczi: On Mon, Jul 23, 2012 at 4:16 PM, Laszlo Ersek ler...@redhat.com wrote: On 07/23/12 16:52, Stefan Hajnoczi wrote: On Mon, Jul 23, 2012 at 3:05 PM, Laszlo Ersek ler...@redhat.com wrote: The idea is, rather than unsigned int id =

Re: [Qemu-devel] [PATCH 01/16] net: Add a hub net client

2012-07-23 Thread Markus Armbruster
Andreas Färber afaer...@suse.de writes: Hm, I'm not so much into those documents [cc'ing Blue], but we used to be stricter about ANSI C some years back (which iirc forbids non-constant expressions in initializers?). FWIW we have since switched It doesn't, except when the variable has static

Re: [Qemu-devel] [PATCH 01/16] net: Add a hub net client

2012-07-23 Thread Blue Swirl
On Mon, Jul 23, 2012 at 4:33 PM, Andreas Färber afaer...@suse.de wrote: Am 23.07.2012 17:23, schrieb Stefan Hajnoczi: On Mon, Jul 23, 2012 at 4:16 PM, Laszlo Ersek ler...@redhat.com wrote: On 07/23/12 16:52, Stefan Hajnoczi wrote: On Mon, Jul 23, 2012 at 3:05 PM, Laszlo Ersek ler...@redhat.com

[Qemu-devel] [PATCH 01/16] net: Add a hub net client

2012-07-20 Thread Stefan Hajnoczi
The vlan feature can be implemented in terms of hubs. By introducing a hub net client it becomes possible to remove the special case vlan code from net.c and push the vlan feature out of generic networking code. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Zhi Yong