From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwNrT-0004vN-K8 for qemu-devel@nongnu.org; Fri, 18 Jan 2013 21:08:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwNrS-00020y-Mk for qemu-devel@nongnu.org; Fri, 18 Jan 2013 21:08:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:17244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwNrS-00020f-EI for qemu-devel@nongnu.org; Fri, 18 Jan 2013 21:08:46 -0500 Date: Sat, 19 Jan 2013 10:08:54 +0800 From: Amos Kong Message-ID: <20130119020854.GA11286@t430s.redhat.com> References: <1358560468-10865-1-git-send-email-akong@redhat.com> <1358560468-10865-2-git-send-email-akong@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1358560468-10865-2-git-send-email-akong@redhat.com> Subject: Re: [Qemu-devel] [QEMU PATCH v4 1/3] virtio-net: remove layout assumptions for ctrl vq List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mst@redhat.com Cc: rusty@rustcorp.com.au, stefanha@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org On Sat, Jan 19, 2013 at 09:54:26AM +0800, akong@redhat.com wrote: > From: "Michael S. Tsirkin" > > Virtio-net code makes assumption about virtqueue descriptor layout > (e.g. sg[0] is the header, sg[1] is the data buffer). > > This patch makes code not rely on the layout of descriptors. > > Signed-off-by: Michael S. Tsirkin > Signed-off-by: Amos Kong > --- > hw/virtio-net.c | 128 ++++++++++++++++++++++++++++++++------------------------ > 1 file changed, 74 insertions(+), 54 deletions(-) Had tested this patch with following scenarios: VIRTIO_NET_CTRL_RX_MODE 1) ip link eth0 promisc on/off 2) ip link set eth0 allmulticast on/off 3) ip link set eth0 multicast on/off VIRTIO_NET_CTRL_MAC 4) ifconfig eth0 hw ether 52:54:00:12:34:57 5) ping guest after joined guest into multicast group (225.0.0.1 ~ 225.0.0.10) VIRTIO_NET_CTRL_VLAN 6) vconfig add eth0 2; vconfig rem eth0.2