Received: from eggs.gnu.org ([2001:4830:134:3::10]:48106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vim5p-0001a5-VA for qemu-devel@nongnu.org; Tue, 19 Nov 2013 09:15:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vim5j-000419-Ir for qemu-devel@nongnu.org; Tue, 19 Nov 2013 09:15:53 -0500 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:55921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vim5j-000412-Bq for qemu-devel@nongnu.org; Tue, 19 Nov 2013 09:15:47 -0500 Received: by mail-wi0-f173.google.com with SMTP id c19so696512wiw.0 for ; Tue, 19 Nov 2013 06:15:46 -0800 (PST) Date: Tue, 19 Nov 2013 15:15:40 +0100 From: Stefan Hajnoczi Message-ID: <20131119141540.GA3202@stefanha-thinkpad.redhat.com> References: <1384141716-31034-1-git-send-email-akong@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1384141716-31034-1-git-send-email-akong@redhat.com> Subject: Re: [Qemu-devel] [PATCH] virtio-net: don't update mac_table in error state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: vyasevic@redhat.com, jasowang@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com On Mon, Nov 11, 2013 at 11:48:36AM +0800, Amos Kong wrote: > mac_table was always cleaned up first in handling > VIRTIO_NET_CTRL_MAC_TABLE_SET command, and we din't recover > mac_table content in error state, it's not correct. > > This patch makes all the changes in temporal variables, > only update the real mac_table if everything is ok. > We won't change mac_table in error state, so rxfilter > notification isn't needed. > > This patch also fixed same problame in > http://lists.nongnu.org/archive/html/qemu-devel/2013-11/msg01188.html > (not merge) > > I will send patch for virtio spec to clarifying this change. > > Signed-off-by: Amos Kong > --- > hw/net/virtio-net.c | 34 ++++++++++++++++++++-------------- > 1 file changed, 20 insertions(+), 14 deletions(-) Thanks, applied to my net-next tree: https://github.com/stefanha/qemu/commits/net-next Stefan