From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MFmCC-0007XG-Qs for qemu-devel@nongnu.org; Sun, 14 Jun 2009 05:40:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MFmC8-0007Vx-C6 for qemu-devel@nongnu.org; Sun, 14 Jun 2009 05:40:12 -0400 Received: from [199.232.76.173] (port=36234 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MFmC7-0007Vq-Ub for qemu-devel@nongnu.org; Sun, 14 Jun 2009 05:40:08 -0400 Received: from mx2.redhat.com ([66.187.237.31]:49180) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MFmC6-0000ii-VG for qemu-devel@nongnu.org; Sun, 14 Jun 2009 05:40:07 -0400 Date: Sun, 14 Jun 2009 12:39:54 +0300 From: "Michael S. Tsirkin" Subject: Re: [Qemu-devel] [PATCH] virtio-net: Remove RX_EXTRA feature Message-ID: <20090614093954.GB6959@redhat.com> References: <20090612191626.4227.7273.stgit@kvm.aw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090612191626.4227.7273.stgit@kvm.aw> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: markmc@redhat.com, rusty@rustcorp.com.au, qemu-devel@nongnu.org On Fri, Jun 12, 2009 at 01:17:04PM -0600, Alex Williamson wrote: > No need to use a feature bit to identify the RX modes. The guest > will get an error back if the backend doesn't support these controls. > > Signed-off-by: Alex Williamson What's the motivation here - are we running out of feature bits already? Using feature bits for everything makes the interface more consistent and IMO easier to use. > --- > > hw/virtio-net.c | 3 +-- > hw/virtio-net.h | 8 ++++---- > 2 files changed, 5 insertions(+), 6 deletions(-) > > diff --git a/hw/virtio-net.c b/hw/virtio-net.c > index d584287..fd5753a 100644 > --- a/hw/virtio-net.c > +++ b/hw/virtio-net.c > @@ -122,8 +122,7 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) > (1 << VIRTIO_NET_F_STATUS) | > (1 << VIRTIO_NET_F_CTRL_VQ) | > (1 << VIRTIO_NET_F_CTRL_RX) | > - (1 << VIRTIO_NET_F_CTRL_VLAN) | > - (1 << VIRTIO_NET_F_CTRL_RX_EXTRA); > + (1 << VIRTIO_NET_F_CTRL_VLAN); > > return features; > } > diff --git a/hw/virtio-net.h b/hw/virtio-net.h > index 2085181..9bc4210 100644 > --- a/hw/virtio-net.h > +++ b/hw/virtio-net.h > @@ -43,7 +43,6 @@ > #define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel available */ > #define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support */ > #define VIRTIO_NET_F_CTRL_VLAN 19 /* Control channel VLAN filtering */ > -#define VIRTIO_NET_F_CTRL_RX_EXTRA 20 /* Extra RX mode control support */ > > #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ > > @@ -106,9 +105,10 @@ typedef uint8_t virtio_net_ctrl_ack; > /* > * Control the RX mode, ie. promisucous, allmulti, etc... > * All commands require an "out" sg entry containing a 1 byte > - * state value, zero = disable, non-zero = enable. Commands > - * 0 and 1 are supported with the VIRTIO_NET_F_CTRL_RX feature. > - * Commands 2-5 are added with VIRTIO_NET_F_CTRL_RX_EXTRA. > + * state value, zero = disable, non-zero = enable. This group > + * of commands are available with the VIRTIO_NET_F_CTRL_RX > + * feature. Individual commands may return VIRTIO_NET_ERR if > + * unsupported by the host. > */ > #define VIRTIO_NET_CTRL_RX_MODE 0 > #define VIRTIO_NET_CTRL_RX_MODE_PROMISC 0 > >