From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfWjZ-0001WH-IC for qemu-devel@nongnu.org; Thu, 23 May 2013 10:43:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfWjR-0001gL-DF for qemu-devel@nongnu.org; Thu, 23 May 2013 10:43:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfWjR-0001f6-4W for qemu-devel@nongnu.org; Thu, 23 May 2013 10:43:05 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4NEh4Kq023470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 23 May 2013 10:43:04 -0400 Date: Thu, 23 May 2013 17:43:25 +0300 From: "Michael S. Tsirkin" Message-ID: <20130523144325.GC24037@redhat.com> References: <1369300080-31377-1-git-send-email-akong@redhat.com> <1369300080-31377-2-git-send-email-akong@redhat.com> <20130523102459.GD16892@redhat.com> <20130523102842.61a02d2e@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130523102842.61a02d2e@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 1/2] net: introduce RX_FILTER_CHANGED event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: Amos Kong , qemu-devel@nongnu.org, stefanha@redhat.com On Thu, May 23, 2013 at 10:28:42AM -0400, Luiz Capitulino wrote: > On Thu, 23 May 2013 13:24:59 +0300 > "Michael S. Tsirkin" wrote: > > > On Thu, May 23, 2013 at 05:07:59PM +0800, Amos Kong wrote: > > > Introduce this new QMP event to notify management after guest changes > > > rx-filter configuration. > > > > > > Signed-off-by: Amos Kong > > > --- > > > QMP/qmp-events.txt | 14 ++++++++++++++ > > > include/monitor/monitor.h | 1 + > > > monitor.c | 1 + > > > 3 files changed, 16 insertions(+) > > > > > > diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt > > > index 92fe5fb..ad6612b 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 } } > > > > > > +RX_FILTER_CHANGED > > > +----------------- > > > + > > > +Emitted when rx-filter configuration is changed by the guest. > > > > Please stress this is only for the NIC. It does not apply > > to non-NIC netclients. > > Stress it in the event name too, please. I find RX_FILTER_CHANGED a bit > generic. What do you suggest? NIC_RX_FILTER_CHANGED ? > Also, although I haven't reviewed the next patch yet, I think you > should move the event trigger to this patch. That's hard because of the flag that's shared with the query command. > > > > > + > > > +Data: > > > + > > > +- "name": net client name (json-string) > > > > Maybe a device path here as well? > > > > > + > > > +{ "event": "RX_FILTER_CHANGED", > > > + "data": { "name": "vnet0" }, > > > + "timestamp": { "seconds": 1368697518, "microseconds": 326866 }} > > > +} > > > + > > > DEVICE_TRAY_MOVED > > > ----------------- > > > > > > diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h > > > index 1a6cfcf..c495a67 100644 > > > --- a/include/monitor/monitor.h > > > +++ b/include/monitor/monitor.h > > > @@ -40,6 +40,7 @@ typedef enum MonitorEvent { > > > QEVENT_BLOCK_JOB_ERROR, > > > QEVENT_BLOCK_JOB_READY, > > > QEVENT_DEVICE_DELETED, > > > + QEVENT_RX_FILTER_CHANGED, > > > QEVENT_DEVICE_TRAY_MOVED, > > > QEVENT_SUSPEND, > > > QEVENT_SUSPEND_DISK, > > > diff --git a/monitor.c b/monitor.c > > > index 6ce2a4e..4f7bd48 100644 > > > --- a/monitor.c > > > +++ b/monitor.c > > > @@ -489,6 +489,7 @@ static const char *monitor_event_names[] = { > > > [QEVENT_BLOCK_JOB_ERROR] = "BLOCK_JOB_ERROR", > > > [QEVENT_BLOCK_JOB_READY] = "BLOCK_JOB_READY", > > > [QEVENT_DEVICE_DELETED] = "DEVICE_DELETED", > > > + [QEVENT_RX_FILTER_CHANGED] = "RX_FILTER_CHANGED", > > > [QEVENT_DEVICE_TRAY_MOVED] = "DEVICE_TRAY_MOVED", > > > [QEVENT_SUSPEND] = "SUSPEND", > > > [QEVENT_SUSPEND_DISK] = "SUSPEND_DISK", > > > -- > > > 1.8.1.4 > >