qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/2] net: introduce MAC_TABLE_CHANGED event


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH v2 1/2] net: introduce MAC_TABLE_CHANGED event
Date: Thu, 16 May 2013 18:01:12 +0300

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 <address@hidden>
> > ---
> >  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]