[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of dupli
From: |
Gonglei (Arei) |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties |
Date: |
Mon, 15 Sep 2014 14:11:04 +0000 |
> From: Michael S. Tsirkin [mailto:address@hidden
> Sent: Monday, September 15, 2014 5:59 PM
> > > >
> > > > > > > >
> > > > > > > > Sorry, I don't understand your meaning. :(
> > > > > > >
> > > > > > > I applied your patch, and looked at the property types.
> > > > > > >
> > > > > > Could you tell me your method looked at properties type?
> > > > >
> > > > > You can use an HMP command, or you can use
> > > > > -device virtio-net-pci,?
> > > >
> > > > OK. Good method.
> > > >
> > > > > changes must not modify output except for adding
> > > > > new commands, or fixing bugs (with care).
> > > > >
> > > > OK.
> > > >
> > > > > > > They should be netdev/vlan/macaddr.
> > > > > > > Your patch makes them str/int32/str
> > > > > > >
> > > > > > Does those changes have any side-effects? Thanks!
> > > > >
> > > > > Yes. If the types are just "int" and "str" then you
> > > > > have no way to know they should have a specific format,
> > > > > such as a name of a netdev, valid mac address, or a vlan.
> > > > > In fact, vlan=int is a bug since vlan names aren't numbers.
> > > > >
> > > > Got it.
> > > >
> > > > > > The similar changes for virtio-blk had applied in qemu master.
> > > > > >
> > > > > > Best regards,
> > > > > > -Gonglei
> > > > >
> > > > > Which commit? Did output change? If yes it's a bug.
> > > >
> > > > No, I checked it again, virtio-blk-pci's properties are 'int' type as
> > > > the same as virtio-blk device, so it will have no problem on this point.
> > > >
> > > Sorry. There are two properties are different
> > > (commit caffdac363801cd2cf2bf01ad013a8c1e1e43800)
> > >
> > > Before:
> > >
> > > virtio-blk-pci.physical_block_size=blocksize
> > > virtio-blk-pci.logical_block_size=blocksize
> > >
> > > After commit caffdac363801cd2cf2bf01ad013a8c1e1e43800 :
> > >
> > > virtio-blk-pci.physical_block_size=uint16
> > > virtio-blk-pci.logical_block_size=uint16
> > >
> > And
> >
> > Before:
> > virtio-blk-pci.drive=drive
> >
> > After:
> > virtio-blk-pci.drive=str
>
> That's a bug. Need to fix that.
>
Hi, Michael
I have debugged this. And I found this just a qmp's output problem on
make_device_property_info().
When set a device's alias properties,
the setter/getter properties functions will be used the same functions as
target_object. See please:
static void property_set_alias(Object *obj, struct Visitor *v, void *opaque,
const char *name, Error **errp)
{
AliasProperty *prop = opaque;
object_property_set(prop->target_obj, v, prop->target_name, errp);
}
static Object *property_resolve_alias(Object *obj, void *opaque,
const gchar *part)
{
AliasProperty *prop = opaque;
return object_resolve_path_component(prop->target_obj, prop->target_name);
}
I will post a simple patch series fix the output issue for alias properties. :)
Best regards,
-Gonglei
- Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties, (continued)
- Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties, Gonglei (Arei), 2014/09/14
- Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties, Michael S. Tsirkin, 2014/09/15
- Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties, Gonglei (Arei), 2014/09/15
- Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties, Michael S. Tsirkin, 2014/09/15
- Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties, Gonglei (Arei), 2014/09/15
- Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties, Michael S. Tsirkin, 2014/09/15
- Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties, Gonglei (Arei), 2014/09/15
- Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties, Gonglei (Arei), 2014/09/15
- Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties, Gonglei (Arei), 2014/09/15
- Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties, Michael S. Tsirkin, 2014/09/15
- Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties,
Gonglei (Arei) <=
- Re: [Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties, Michael S. Tsirkin, 2014/09/15
[Qemu-devel] [PATCH v2 5/9] virtio-serial: use aliases instead of duplicate qdev properties, arei.gonglei, 2014/09/09
[Qemu-devel] [PATCH v2 6/9] virtio-serial: fix virtio-serial child refcount in transports, arei.gonglei, 2014/09/09
[Qemu-devel] [PATCH v2 7/9] virtio-rng: use aliases instead of duplicate qdev properties, arei.gonglei, 2014/09/09
Re: [Qemu-devel] [PATCH v2 0/9] virtio: fix virtio child recount in transports, Gonglei (Arei), 2014/09/12
Re: [Qemu-devel] [PATCH v2 0/9] virtio: fix virtio child recount in transports, Gonglei (Arei), 2014/09/19