From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sw8B6-0005Dx-PX for qemu-devel@nongnu.org; Tue, 31 Jul 2012 04:51:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sw8B3-0000YF-JR for qemu-devel@nongnu.org; Tue, 31 Jul 2012 04:51:44 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:40506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sw8B3-0000Xx-8f for qemu-devel@nongnu.org; Tue, 31 Jul 2012 04:51:41 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 31 Jul 2012 09:51:39 +0100 Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6V8paqi2625704 for ; Tue, 31 Jul 2012 09:51:36 +0100 Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6V8pZmF025754 for ; Tue, 31 Jul 2012 02:51:35 -0600 Date: Tue, 31 Jul 2012 09:51:33 +0100 From: Stefan Hajnoczi Message-ID: <20120731085133.GA4999@stefanha-thinkpad.localdomain> References: <1343144119-18757-1-git-send-email-stefanha@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v2 00/16] net: Move legacy QEMU VLAN code into net/hub.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhi Yong Wu Cc: Stefan Hajnoczi , Zhi Yong Wu , Laszlo Ersek , qemu-devel@nongnu.org, Paolo Bonzini On Tue, Jul 31, 2012 at 10:22:37AM +0800, Zhi Yong Wu wrote: > On Mon, Jul 30, 2012 at 11:49 PM, Stefan Hajnoczi wrote: > > On Tue, Jul 24, 2012 at 4:35 PM, Stefan Hajnoczi > > wrote: > >> [These patches are based on the net tree at git://github.com/stefanha/net] > >> > >> The QEMU net subsystem has the concept of separate network segments, called > >> "VLANs". Each VLAN is a broadcast domain so all net clients connected to the > >> same VLAN can communicate with each other. > >> > >> Today this feature is mostly used with the "dump" backend, which saves packet > >> captures to .pcap files. It can still come in useful in other rare cases. > >> > >> This patch series moves the VLAN code out of net.c and into net/hub.c. The > >> idea is to introduce a software network hub along with hub port net clients. > >> This way we can implement the same semantics of QEMU VLANs using just -netdev > >> peer. Then -netdev peer becomes the single method of connecting net clients. > >> > >> The end result of this series is that the net subsystem core is simplified. > >> Now is a good time to do this because it saves us from modeling QEMU VLANs when > >> we convert the net subsystem to QOM. > >> > >> Please note that this series preserves command-line compatibility with the QEMU > >> VLAN feature. No existing QEMU command-lines should break. > >> > >> I have tested the following configurations: > >> * -net user -net nic,model=virtio > >> * -net user,vlan=1 -net nic,model=virtio,vlan=1 > >> * -net user,vlan=1 -net nic,model=virtio,vlan=1 -net user,vlan=2 -net nic,model=virtio,vlan=2 > >> * -netdev user,id=netdev0 -device virtio-net-pci,netdev=netdev0 > >> * -netdev user,id=netdev0 -device virtio-net-pci,netdev=netdev0 -net user,vlan=2 -net nic,model=virtio,vlan=2 > >> > >> v2: > >> * Change int64_t and unsigned int mess to int which is what VLAN IDs are today [Laszlo] > >> * Remove bogus error_set() -> qerror_report() merge artifact [Laszlo] > >> * Use net_hub_id_for_client(nc, NULL) == 0 instead of adding net_hub_port_peer_nc() [Laszlo] > >> * Fix stray print_net_client(..., NetClientState *vc) argument name [Laszlo] > >> * Consistently update vlan -> peer argument name [Laszlo] > >> * Drop spurious closesocket(fd), probably merge conflict [Stefan] > >> > >> Stefan Hajnoczi (11): > >> net: Add a hub net client > >> net: Use hubs for the vlan feature > >> net: Look up 'vlan' net clients using hubs > >> hub: Check that hubs are configured correctly > >> net: Drop vlan argument to qemu_new_net_client() > >> net: Remove vlan code from net.c > >> net: Remove VLANState > >> net: Rename non_vlan_clients to net_clients > >> net: Rename VLANClientState to NetClientState > >> net: Rename vc local variables to nc > >> net: Rename qemu_del_vlan_client() to qemu_del_net_client() > >> > >> Zhi Yong Wu (5): > >> net: Convert qdev_prop_vlan to peer with hub > >> net: Make "info network" output more readable info > >> net: cleanup deliver/deliver_iov func pointers > >> net: determine if packets can be sent before net queue deliver > >> packets > >> hub: add the support for hub own flow control > >> > >> hw/cadence_gem.c | 8 +- > >> hw/dp8393x.c | 7 +- > >> hw/e1000.c | 10 +- > >> hw/eepro100.c | 8 +- > >> hw/etraxfs_eth.c | 8 +- > >> hw/exynos4_boards.c | 2 +- > >> hw/highbank.c | 2 +- > >> hw/integratorcp.c | 2 +- > >> hw/kzm.c | 2 +- > >> hw/lan9118.c | 8 +- > >> hw/lance.c | 2 +- > >> hw/mcf5208.c | 2 +- > >> hw/mcf_fec.c | 7 +- > >> hw/milkymist-minimac2.c | 6 +- > >> hw/mips_mipssim.c | 2 +- > >> hw/mips_r4k.c | 2 +- > >> hw/mipsnet.c | 6 +- > >> hw/musicpal.c | 6 +- > >> hw/ne2000-isa.c | 2 +- > >> hw/ne2000.c | 8 +- > >> hw/ne2000.h | 4 +- > >> hw/opencores_eth.c | 8 +- > >> hw/pcnet-pci.c | 4 +- > >> hw/pcnet.c | 6 +- > >> hw/pcnet.h | 6 +- > >> hw/qdev-properties.c | 54 +++-- > >> hw/qdev.c | 2 - > >> hw/qdev.h | 7 +- > >> hw/rtl8139.c | 10 +- > >> hw/smc91c111.c | 6 +- > >> hw/spapr_llan.c | 4 +- > >> hw/stellaris_enet.c | 6 +- > >> hw/usb/dev-network.c | 8 +- > >> hw/vexpress.c | 2 +- > >> hw/vhost_net.c | 24 +- > >> hw/vhost_net.h | 2 +- > >> hw/virtio-net.c | 12 +- > >> hw/xen_nic.c | 7 +- > >> hw/xgmac.c | 6 +- > >> hw/xilinx_axienet.c | 6 +- > >> hw/xilinx_ethlite.c | 6 +- > >> hw/xtensa_lx60.c | 2 +- > >> net.c | 616 ++++++++++++++--------------------------------- > >> net.h | 86 +++---- > >> net/Makefile.objs | 2 +- > >> net/dump.c | 27 ++- > >> net/dump.h | 2 +- > >> net/hub.c | 339 ++++++++++++++++++++++++++ > >> net/hub.h | 29 +++ > >> net/queue.c | 38 ++- > >> net/queue.h | 25 +- > >> net/slirp.c | 34 ++- > >> net/slirp.h | 2 +- > >> net/socket.c | 60 ++--- > >> net/socket.h | 2 +- > >> net/tap-win32.c | 26 +- > >> net/tap.c | 44 ++-- > >> net/tap.h | 20 +- > >> net/vde.c | 16 +- > >> net/vde.h | 2 +- > >> qapi-schema.json | 30 ++- > >> qemu-common.h | 3 +- > >> slirp/if.c | 5 - > >> slirp/libslirp.h | 1 - > >> 64 files changed, 905 insertions(+), 796 deletions(-) > >> create mode 100644 net/hub.c > >> create mode 100644 net/hub.h > >> > >> -- > >> 1.7.10.4 > > > > Merged into the net tree: > > https://github.com/stefanha/qemu/tree/net > Just checked, and didn't see related commits in your net tree. Pushed. Stefan