qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: aliguori@us.ibm.com, Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel@nongnu.org, Zhi Yong Wu <zwu.kernel@gmail.com>,
	Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>,
	luowenj@cn.ibm.com, jan.kiszka@siemens.com
Subject: Re: [Qemu-devel] [PATCH v4 06/16] net: Remove vlan qdev property
Date: Mon, 11 Jun 2012 09:57:47 +0100	[thread overview]
Message-ID: <20120611085747.GA998@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <4FD59029.5040204@redhat.com>

On Mon, Jun 11, 2012 at 08:28:57AM +0200, 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=<id> 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.

Either we keep backwards compatibility or we don't.  Taking a middle
path where we preserve only some of the "VLAN" syntax is confusing and
inconsistent.

Like Paolo said, the point here is not to drop "VLAN" support.  We're
simply moving this feature into a regular net client (the hub) so that
the special case "VLAN" code in net.c can be removed.

Stefan

  reply	other threads:[~2012-06-11  8:58 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04  5:29 [Qemu-devel] [PATCH v4 00/16] hub-based networking patches zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 01/16] net: Add a hub net client zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 02/16] net: Use hubs for the vlan feature zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 03/16] net: Look up 'vlan' net clients using hubs zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 04/16] hub: Check that hubs are configured correctly zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 05/16] net: Drop vlan argument to qemu_new_net_client() zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 06/16] net: Remove vlan qdev property zwu.kernel
2012-06-08 13:23   ` Stefan Hajnoczi
2012-06-08 14:48     ` Zhi Yong Wu
2012-06-08 16:09       ` Stefan Hajnoczi
2012-06-09  3:04         ` Zhi Yong Wu
2012-06-11  6:28           ` Paolo Bonzini
2012-06-11  8:57             ` Stefan Hajnoczi [this message]
2012-06-11 14:24               ` Zhi Yong Wu
2012-06-11 14:42                 ` Stefan Hajnoczi
2012-06-12  0:54                   ` Zhi Yong Wu
2012-06-11 14:15             ` Zhi Yong Wu
2012-06-11 20:05               ` Luiz Capitulino
2012-06-12  0:55                 ` Zhi Yong Wu
2012-06-11 20:49             ` Anthony Liguori
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 07/16] net: Remove vlan code from net.c zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 08/16] net: Remove VLANState zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 09/16] net: Rename non_vlan_clients to net_clients zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 10/16] net: Rename VLANClientState to NetClientState zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 11/16] net: Rename vc local variables to nc zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 12/16] net: Rename qemu_del_vlan_client() to qemu_del_net_client() zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 13/16] net: Make "info network" output more readable info zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 14/16] net: cleanup deliver/deliver_iov func pointers zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 15/16] net: determine if packets can be sent before net queue deliver packets zwu.kernel
2012-06-04  5:29 ` [Qemu-devel] [PATCH v4 16/16] hub: add the support for hub own flow control zwu.kernel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120611085747.GA998@stefanha-thinkpad.localdomain \
    --to=stefanha@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=jan.kiszka@siemens.com \
    --cc=luowenj@cn.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=wuzhy@linux.vnet.ibm.com \
    --cc=zwu.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).