From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uczfx-0000TE-Fb for qemu-devel@nongnu.org; Thu, 16 May 2013 11:01:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uczfu-0000OK-9X for qemu-devel@nongnu.org; Thu, 16 May 2013 11:01:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uczft-0000O7-Lt for qemu-devel@nongnu.org; Thu, 16 May 2013 11:00:58 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4GF0uhf005905 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 16 May 2013 11:00:56 -0400 Date: Thu, 16 May 2013 18:01:12 +0300 From: "Michael S. Tsirkin" Message-ID: <20130516150112.GA2485@redhat.com> References: <1368702445-30733-1-git-send-email-akong@redhat.com> <1368702445-30733-2-git-send-email-akong@redhat.com> <5194F3AA.8050203@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5194F3AA.8050203@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 1/2] net: introduce MAC_TABLE_CHANGED event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Amos Kong , qemu-devel@nongnu.org, stefanha@redhat.com, lcapitulino@redhat.com On Thu, May 16, 2013 at 08:56:42AM -0600, Eric Blake wrote: > On 05/16/2013 05:07 AM, Amos Kong wrote: > > Introduce this new QMP event to notify management after guest changes > > mac-table configuration. > > > > Signed-off-by: Amos Kong > > --- > > QMP/qmp-events.txt | 14 ++++++++++++++ > > hw/net/virtio-net.c | 12 ++++++++++++ > > include/monitor/monitor.h | 1 + > > monitor.c | 1 + > > 4 files changed, 28 insertions(+) > > > > diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt > > index 92fe5fb..24d62df 100644 > > --- a/QMP/qmp-events.txt > > +++ b/QMP/qmp-events.txt > > @@ -154,6 +154,20 @@ Data: > > "path": "/machine/peripheral/virtio-net-pci-0" }, > > "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } > > > > +MAC_TABLE_CHANGED > > +----------------- > > + > > +Emitted mac-table configuration is changed by the guest. > > + > > +Data: > > + > > +- "name": net client name (json-string) > > + > > +{ "event": "MAC_TABLE_CHANGED", > > + "data": { "name": "vnet0" }, > > + "timestamp": { "seconds": 1368697518, "microseconds": 326866 }} > > +} > > Is it worth trying to also provide details about the change as part of > the event, to avoid having to do a round-trip query- command just to > learn what the new values are? > > -- > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org > That really depends on the device though. Some give you incremental add/delete mac commands, others might let you replace the whole rx filter in one go. So if yes I'd say we should dump the whole table not what changed. -- MST