qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCHv3] net: delay freeing peer host device


From: Michael S. Tsirkin
Subject: [Qemu-devel] Re: [PATCHv3] net: delay freeing peer host device
Date: Wed, 6 Oct 2010 18:01:22 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Oct 06, 2010 at 09:48:06AM -0600, Alex Williamson wrote:
> > +void qemu_del_vlan_client(VLANClientState *vc)
> > +{
> > +    /* If there is a peer NIC, delete and cleanup client, but do not free. 
> > */
> > +    if (!vc->vlan && vc->peer && vc->peer->info->type == 
> > NET_CLIENT_TYPE_NIC) {
> > +        NICState *nic = DO_UPCAST(NICState, nc, vc->peer);
> > +        if (nic->peer_deleted) {
> > +            return;
> > +        }
> > +        nic->peer_deleted = true;
> > +        /* Let NIC know peer is gone. */
> > +        vc->peer->link_down = true;
> > +        if (vc->peer->info->link_status_changed) {
> > +            vc->peer->info->link_status_changed(vc->peer);
> > +        }
> > +        if (vc->info->cleanup) {
> > +            vc->info->cleanup(vc);
> > +        }
> 
> This is now the only case that calls cleanup, is that intentional?
> Seems like we won't end up calling nic cleanup routines.
> 
> Alex


Good catch.
I'll fix it up, thanks!




reply via email to

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