[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for mst/pci] output nc->name in NIC_RX_FILTER_CH
From: |
Amos Kong |
Subject: |
Re: [Qemu-devel] [PATCH for mst/pci] output nc->name in NIC_RX_FILTER_CHANGED event |
Date: |
Thu, 1 Aug 2013 22:16:07 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Aug 01, 2013 at 03:30:53PM +0200, Andreas Färber wrote:
> Am 01.07.2013 04:55, schrieb Amos Kong:
> > On Wed, Jun 26, 2013 at 12:07:53PM +0200, Markus Armbruster wrote:
> >> Amos Kong <address@hidden> writes:
> >>
> >>> On Mon, Jun 24, 2013 at 02:34:59PM +0800, Amos Kong wrote:
> >>>> netclient 'name' entry in event is useful for management to know
> >>>> which device is changed. n->netclient_name is not always set.
> >>>> This patch changes to use nc->name. If we don't assign 'id',
> >>>> qemu will set a generated name to nc->name.
> >>>
> >>>
> >>> IRC: <mst> akong, what do other events include? name or id?
> >>>
> >>> I just checked QMP/qmp-event.txt, they all use 'device name'.
> >>> (eg: BLOCK_IO_ERROR, DEVICE_DELETED, DEVICE_TRAY_MOVED, BLOCK_JOB_*)
> >>>
> >>> If we assign 'id' for -device, device name will be set to id.
> >>> Otherwise, a generated device name will set to some device.
> >>
> >> DEVICE_DELETED uses "device" (the qdev ID) and "path" (the QOM path).
> >>
> >> For reasons I don't understand, it sets "path" only when the device has
> >> no qdev ID. That should be cleaned up.
> >
> > The path are alwasy set.
> >
> > example:
> > (have id)
> > "path": "/machine/peripheral-anon/vnet0/virtio-backend"
>
> You hopefully meant "/machine/peripheral/vnet0/virtio-backend"?
> Otherwise we have a bug somewhere.
Just my typo in mail.
// -device virtio-net-pci,netdev=h1,id=vnet0 -netdev tap,id=h1
{
"timestamp": {
"seconds": 1375366321,
"microseconds": 595727
},
"event": "NIC_RX_FILTER_CHANGED",
"data": {
"name": "vnet0",
"path": "/machine/peripheral/vnet0/virtio-backend"
}
}
> Andreas
>
> >
> > (no id)
> > "path": "/machine/peripheral-anon/device[0]/virtio-backend"
> >
> > It's enough to just use path to distinguish the changed device.
> > So we ignore this patch.
> >
>
>
> --
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
--
Amos.