From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeBZ5-0007q4-96 for qemu-devel@nongnu.org; Mon, 11 Jun 2012 16:50:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SeBZ3-0001Xt-Gf for qemu-devel@nongnu.org; Mon, 11 Jun 2012 16:50:18 -0400 Received: from e8.ny.us.ibm.com ([32.97.182.138]:45389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeBZ3-0001Wz-CH for qemu-devel@nongnu.org; Mon, 11 Jun 2012 16:50:17 -0400 Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 11 Jun 2012 16:50:13 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 2862738C8026 for ; Mon, 11 Jun 2012 16:49:15 -0400 (EDT) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5BKnEFX164160 for ; Mon, 11 Jun 2012 16:49:14 -0400 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q5BKnDdL027578 for ; Mon, 11 Jun 2012 14:49:14 -0600 Message-ID: <4FD659C8.1040703@us.ibm.com> Date: Mon, 11 Jun 2012 15:49:12 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1338787767-3443-1-git-send-email-zwu.kernel@gmail.com> <1338787767-3443-7-git-send-email-zwu.kernel@gmail.com> <4FD59029.5040204@redhat.com> In-Reply-To: <4FD59029.5040204@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 06/16] net: Remove vlan qdev property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: stefanha@linux.vnet.ibm.com, Stefan Hajnoczi , qemu-devel@nongnu.org, Zhi Yong Wu , Zhi Yong Wu , luowenj@cn.ibm.com, jan.kiszka@siemens.com On 06/11/2012 01:28 AM, Paolo Bonzini wrote: > Il 09/06/2012 05:04, Zhi Yong Wu ha scritto: >>>>> This commit looks suspicious because it removes a user-visible qdev >>>>> property but we're trying to preserve backward compatibility. This >>>>> command-line will break: >>>>> >>>>> x86_64-softmmu/qemu-system-x86_64 -net user,vlan=1 -device virtio-net-pci,vlan=1 >>>>> >>>>> Instead of dropping the qdev_prop_vlan completely the >>>>> hw/qdev-properties.c code needs to call net/hub.h external functions >>>>> to implement equivalent functionality: >>>>> >>>>> 1. Setting the vlan= property looks up the hub port and assigns >>>>> the NICConf->peer field. >>>>> 2. Getting the vlan property looks up the hub id (i.e. vlan id) given >>>>> the peer. If the peer is not a hub port the result is -1. >>>>> >>>>> When I wrote this patch I missed the big picture and forgot about >>>>> backwards compatibility :(. >>>>> >> To be honest, i am concerned if anyone uses this syntax. Since the >> feature will finally be discarded, i suggest that we don't support >> this now. If someone complains this later, we can fix it. If nobody >> complains, that is what we hope. > > I think you're missing the big picture of this series, which is exactly > _not_ to discard the VLAN feature, but just to rewrite it in a better way. > > That said, I agree that this is a somewhat fringe usage; most people > will use -net nic,model=virtio,vlan=1 rather than "-device". We may get > by with dropping it. I have no strong opinion either way. I have a strong opinion :-) We shipped a version with it, so now we have to support it. Regards, Anthony Liguori