From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXrRI-0000g7-55 for qemu-devel@nongnu.org; Fri, 25 May 2012 06:08:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXrRD-0005sF-3z for qemu-devel@nongnu.org; Fri, 25 May 2012 06:08:07 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:38553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXrRC-0005rt-RQ for qemu-devel@nongnu.org; Fri, 25 May 2012 06:08:03 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 25 May 2012 11:07:58 +0100 Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q4PA7tH92306098 for ; Fri, 25 May 2012 11:07:55 +0100 Received: from d06av03.portsmouth.uk.ibm.com (localhost.localdomain [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q4PA7sx0012272 for ; Fri, 25 May 2012 04:07:55 -0600 Date: Fri, 25 May 2012 11:07:53 +0100 From: Stefan Hajnoczi Message-ID: <20120525100753.GD30110@stefanha-thinkpad.localdomain> References: <1337882362-20100-1-git-send-email-zwu.kernel@gmail.com> <20120524175321.31254444@doriath.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120524175321.31254444@doriath.home> Subject: Re: [Qemu-devel] [PATCH v3 00/16] net: hub-based networking List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: kvm@vger.kernel.org, jan.kiszka@siemens.com, qemu-devel@nongnu.org, zwu.kernel@gmail.com, wuzhy@linux.vnet.ibm.com, pbonzini@redhat.com On Thu, May 24, 2012 at 05:53:21PM -0300, Luiz Capitulino wrote: > On Fri, 25 May 2012 01:59:06 +0800 > zwu.kernel@gmail.com wrote: > > > From: Zhi Yong Wu > > > > The patchset implements network hub stead of vlan. The main work was done by stefan, and i rebased it to latest QEMU upstream, did some testings and am responsible for pushing it to QEMU upstream. > > Honest question: does it really pay off to have this in qemu vs. using one of > the externaly available solutions? For typical KVM setups this feature will be unused. However, the legacy QEMU "vlan" feature does have a few uses: 1. It's how the "dump" netdev can be connected up with a guest NIC and host netdev. Create a hub, attach the guest NIC, attach the host netdev, and attach the dump netdev. This allows the dump netdev to see all traffic. 2. It lets you build virtual network segments. Several point-to-point connections can be brought together. Start 3 VMs connected by the "socket" netdev and have one of them use a hub. This may be inefficient but I wouldn't be surprised if there are people out there doing this. The point of this patch series is to remove the special-case net.c code for the legacy "vlan" feature. Today's code makes it harder to implement a clean QOM model and is a burden for the net subsystem in general. This series takes the vlan functionality and puts it into a normal netdev - it extracts the feature from net.c. (If we didn't care about backwards compatibility we could just drop vlans completely and rewrite the "dump" netdev to hook into the net.h API somehow.) Stefan