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

Re: [libvirt] [PATCH] macvtap teardown rework



On Wed, Feb 17, 2010 at 12:05 PM, Stefan Berger <stefanb us ibm com> wrote:
> I have reworked and simplified the teardown of the macvtap device.
> Basically all devices with the same MAC address and link device are kept
> alive and not attempted to be torn down. If a macvtap device linked to a
> physical interface with a certain MAC address 'M' is to be created it
> will automatically fail if the interface is 'up'ed and another macvtap
> with the same properties (MAC addr 'M', link dev) happens to be 'up'.
> This will prevent the VM from starting or the device from being attached
> to a running VM. Stale interfaces are assumed to be there for some
> reason and not stem from libvirt.
>
> In the VM shutdown path I am assuming that an interface name is always
> available so that if the device type is DIRECT it can be torn down using
> its name.

This is a huge improvement. It makes the normal shutdown path nice and
simple, and returns a clear error message instead of making an
elaborate attempt to work around a prior unclean shutdown.

Just one cosmetic nit: the "name" argument in the delMacvtap()
declaration in macvtap.h should be "ifname" for consistency with the
definition in macvtap.c.

--Ed


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