Re: [Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-21 Thread Anthony Liguori
On 09/21/2010 04:20 AM, Michael S. Tsirkin wrote: OK, that's clear enough. One note though: you won't be able to create another backend with the same name until the frontend is gone. If you remove it from the linked list, you'll be able to create another backend just fine. Regards, Ant

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-21 Thread Anthony Liguori
On 09/21/2010 04:18 AM, Michael S. Tsirkin wrote: No, netdev_del should remove the VLANClientState from the non_vlan_clients list. It's no longer enumerable and it's no longer lookup-able. The only reason it stays around it so that the device doesn't have a reference to a free pointer. The onl

Re: [Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-21 Thread Michael S. Tsirkin
On Tue, Sep 21, 2010 at 09:58:14AM +0100, Daniel P. Berrange wrote: > On Mon, Sep 20, 2010 at 09:37:16PM +0200, Michael S. Tsirkin wrote: > > On Mon, Sep 20, 2010 at 02:22:18PM -0500, Anthony Liguori wrote: > > > On 09/20/2010 01:59 PM, Michael S. Tsirkin wrote: > > > >>You can also initiate the un

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-21 Thread Michael S. Tsirkin
On Mon, Sep 20, 2010 at 03:50:51PM -0500, Anthony Liguori wrote: > On 09/20/2010 03:37 PM, Michael S. Tsirkin wrote: > >On Mon, Sep 20, 2010 at 03:38:36PM -0500, Anthony Liguori wrote: > >>On 09/20/2010 03:27 PM, Michael S. Tsirkin wrote: > >>>On Mon, Sep 20, 2010 at 03:20:59PM -0500, Anthony Liguo

Re: [Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-21 Thread Daniel P. Berrange
On Mon, Sep 20, 2010 at 09:37:16PM +0200, Michael S. Tsirkin wrote: > On Mon, Sep 20, 2010 at 02:22:18PM -0500, Anthony Liguori wrote: > > On 09/20/2010 01:59 PM, Michael S. Tsirkin wrote: > > >>You can also initiate the unplug from the OS without the ACPI event > > >>ever happening. I suspect tha

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Michael S. Tsirkin
On Mon, Sep 20, 2010 at 03:38:36PM -0500, Anthony Liguori wrote: > On 09/20/2010 03:27 PM, Michael S. Tsirkin wrote: > >On Mon, Sep 20, 2010 at 03:20:59PM -0500, Anthony Liguori wrote: > >>On 09/20/2010 02:44 PM, Michael S. Tsirkin wrote: > I think the only workable approach that doesn't involv

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Michael S. Tsirkin
On Mon, Sep 20, 2010 at 02:22:18PM -0500, Anthony Liguori wrote: > On 09/20/2010 01:59 PM, Michael S. Tsirkin wrote: > >>You can also initiate the unplug from the OS without the ACPI event > >>ever happening. I suspect that in our current implementation, that > >>means that we'll automatically del

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Anthony Liguori
On 09/20/2010 03:37 PM, Michael S. Tsirkin wrote: On Mon, Sep 20, 2010 at 03:38:36PM -0500, Anthony Liguori wrote: On 09/20/2010 03:27 PM, Michael S. Tsirkin wrote: On Mon, Sep 20, 2010 at 03:20:59PM -0500, Anthony Liguori wrote: On 09/20/2010 02:44 PM, Michael S. Tsirkin wro

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Michael S. Tsirkin
On Mon, Sep 20, 2010 at 02:28:42PM -0500, Anthony Liguori wrote: > On 09/20/2010 02:15 PM, Michael S. Tsirkin wrote: > >On Mon, Sep 20, 2010 at 01:39:00PM -0500, Anthony Liguori wrote: > >>On 09/20/2010 01:24 PM, Michael S. Tsirkin wrote: > >>>On Mon, Sep 20, 2010 at 01:14:12PM -0500, Anthony Liguo

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Anthony Liguori
On 09/20/2010 02:37 PM, Michael S. Tsirkin wrote: On Mon, Sep 20, 2010 at 02:22:18PM -0500, Anthony Liguori wrote: On 09/20/2010 01:59 PM, Michael S. Tsirkin wrote: You can also initiate the unplug from the OS without the ACPI event ever happening. I suspect that in our current imple

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Anthony Liguori
On 09/20/2010 03:27 PM, Michael S. Tsirkin wrote: On Mon, Sep 20, 2010 at 03:20:59PM -0500, Anthony Liguori wrote: On 09/20/2010 02:44 PM, Michael S. Tsirkin wrote: I think the only workable approach that doesn't involve new commands is to change the semantics of the existing

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Anthony Liguori
On 09/20/2010 02:44 PM, Michael S. Tsirkin wrote: I think the only workable approach that doesn't involve new commands is to change the semantics of the existing ones. Make netdev_del work regardless of whether the device is still present. You would need to reference count the actual netdev s

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Michael S. Tsirkin
On Mon, Sep 20, 2010 at 03:20:59PM -0500, Anthony Liguori wrote: > On 09/20/2010 02:44 PM, Michael S. Tsirkin wrote: > > > >>I think the only workable approach that doesn't involve new commands > >>is to change the semantics of the existing ones. > >> > >>Make netdev_del work regardless of whether

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Michael S. Tsirkin
On Mon, Sep 20, 2010 at 03:15:45PM -0500, Anthony Liguori wrote: > On 09/20/2010 02:37 PM, Michael S. Tsirkin wrote: > >On Mon, Sep 20, 2010 at 02:22:18PM -0500, Anthony Liguori wrote: > >>On 09/20/2010 01:59 PM, Michael S. Tsirkin wrote: > You can also initiate the unplug from the OS without t

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Anthony Liguori
On 09/20/2010 02:15 PM, Michael S. Tsirkin wrote: On Mon, Sep 20, 2010 at 01:39:00PM -0500, Anthony Liguori wrote: On 09/20/2010 01:24 PM, Michael S. Tsirkin wrote: On Mon, Sep 20, 2010 at 01:14:12PM -0500, Anthony Liguori wrote: On 09/20/2010 12:14 PM, Michael S. Tsirkin wro

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Michael S. Tsirkin
On Mon, Sep 20, 2010 at 01:39:00PM -0500, Anthony Liguori wrote: > On 09/20/2010 01:24 PM, Michael S. Tsirkin wrote: > >On Mon, Sep 20, 2010 at 01:14:12PM -0500, Anthony Liguori wrote: > >>On 09/20/2010 12:14 PM, Michael S. Tsirkin wrote: > >>>On Mon, Sep 20, 2010 at 11:56:56AM -0500, Anthony Liguo

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Anthony Liguori
On 09/20/2010 01:59 PM, Michael S. Tsirkin wrote: You can also initiate the unplug from the OS without the ACPI event ever happening. I suspect that in our current implementation, that means that we'll automatically delete the device which may have strange effects on management tools. So it pro

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Michael S. Tsirkin
On Mon, Sep 20, 2010 at 01:19:48PM -0500, Anthony Liguori wrote: > On 09/20/2010 01:14 PM, Anthony Liguori wrote: > >Here's what makes sense to me: > > > >1) async device remove + poll device status/removal notification + > >remove backend > > > >The management tool needs to determine when the devi

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Anthony Liguori
On 09/20/2010 01:24 PM, Michael S. Tsirkin wrote: On Mon, Sep 20, 2010 at 01:14:12PM -0500, Anthony Liguori wrote: On 09/20/2010 12:14 PM, Michael S. Tsirkin wrote: On Mon, Sep 20, 2010 at 11:56:56AM -0500, Anthony Liguori wrote: On 09/20/2010 11:47 AM, Michael S. Tsirkin wro

[Qemu-devel] Re: [PATCH] net: delay peer host device delete

2010-09-20 Thread Michael S. Tsirkin
On Mon, Sep 20, 2010 at 01:14:12PM -0500, Anthony Liguori wrote: > On 09/20/2010 12:14 PM, Michael S. Tsirkin wrote: > >On Mon, Sep 20, 2010 at 11:56:56AM -0500, Anthony Liguori wrote: > >>On 09/20/2010 11:47 AM, Michael S. Tsirkin wrote: > >>>On Mon, Sep 20, 2010 at 11:41:45AM -0500, Anthony Liguo