« Previous | Next » 

Revision 2ffcb18d

ID2ffcb18de0bc02ad8a836ec955584c02b70e0e24

Added by Markus Armbruster almost 14 years ago

Make netdev_del delete the netdev even when it's in use

To hot-unplug guest and host part of a network device, you do:

device_del NIC-ID
netdev_del NETDEV-ID

For PCI devices, device_del merely tells ACPI to unplug the device.
The device goes away for real only after the guest processed the ACPI
unplug event.

You have to wait until then (e.g. by polling info pci) before you can
unplug the netdev. Not good.

Fix by removing the "in use" check from do_netdev_del(). Deleting a
netdev while it's in use is safe; packets simply get routed to the bit
bucket.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences