Features/NetDeviceFailover: Difference between revisions

From QEMU
(Created page with '== Summary == Provide infrastructure to allow a management tool to present both an rtl8139 and virtio-net network adapter, detect when a driver is loaded for virtio-net, and ena…')
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:


== Owner ==
== Owner ==
* '''Name:''' [[AnthonyLiguori/Anthony Liguori]]
* '''Name:''' [[User:AnthonyLiguori|Anthony Liguori]]
* '''Email:''' anthony@codemonkey.ws
* '''Email:''' anthony@codemonkey.ws


Line 27: Line 27:


To make this work directly in qemu, we would need to introduce a higher level API to enable this configuration.  It is unclear whether this is a reasonable thing to do.
To make this work directly in qemu, we would need to introduce a higher level API to enable this configuration.  It is unclear whether this is a reasonable thing to do.
[[Category:Obsolete feature pages]]

Latest revision as of 14:45, 11 October 2016

Summary

Provide infrastructure to allow a management tool to present both an rtl8139 and virtio-net network adapter, detect when a driver is loaded for virtio-net, and enable the virtio-net adapter disabling the rtl8139 adapter.

Owner

Detailed Summary

The rtl8139 is the default network adapter in qemu-kvm. The e1000 is the default network adapter in qemu. In both projects, the virtio-net network adapter has the best performance. The default network adapter choice is typically a trade off between performance and compatibility with the virtio, e1000, and rtl8139 filling out the spectrum in terms.

Other hypervisors deal with this problem by taking an older adapter and adding a paravirtualized mode to it so that a single adapter gets both good performance and good compatibility. Unfortunately, because we require our changes to be accepted by mainline Linux, this is not a viable strategy for us.

We could achieve a similar result by doing the following (using tap networking):

  • Start a guest with two network cards (such as rtl8139 and virtio-net)
  • Start with both cards having their link down
  • Detect when each card is initialized by the guest OS
  • When the performant card's driver is loaded, disable the link for the legacy card and enable the link for the performant card
  • When the legacy card's driver is loaded, wait a short timeout (500ms) and check if the performant card's driver is loaded, if it isn't, enable the legacy card's link

This will address both the case where drivers are present at start up and when the performant card's driver is loaded post start up. To implement this functionality in a management layer, the following functionality would be needed in qemu:

  • Introduce an API for devices to expose generic guest driver status. This API could cover events like initializing, ready, and failed.
  • Expose a QMP interface to query device driver's status and to expose async QMP events

To make this work directly in qemu, we would need to introduce a higher level API to enable this configuration. It is unclear whether this is a reasonable thing to do.