mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: net: add guest-announce plumbing
Advertise `VIRTIO_NET_F_GUEST_ANNOUNCE` on virtio-net devices, surface `VIRTIO_NET_S_ANNOUNCE` through config status, and handle `VIRTIO_NET_CTRL_ANNOUNCE_ACK` on the control queue. This adds the guest-visible state needed for post-migration or post-restore announce requests; the VMM side triggering is added in follow-up commits. The motivation is to reduce post-migration and post-restore connectivity gap. After a live migration or after restoring, it can take the guest several seconds to be reachable again over the network. With these announcements, the network path should be refreshed within a few milliseconds. On-behalf-of: SAP sebastian.eydam@sap.com Signed-off-by: Sebastian Eydam <sebastian.eydam@cyberus-technology.de>
This commit is contained in:
committed by
Rob Bradford
parent
e17c0be127
commit
53a00c0514
@@ -135,6 +135,18 @@ src $ ch-remote --api-socket=/tmp/api send-migration destination_url=unix:/tmp/s
|
||||
When the above commands completed, the VM should be successfully
|
||||
migrated to the destination machine without interrupting the workload.
|
||||
|
||||
### Network Announcements After Resume
|
||||
|
||||
After a VM resumes from migration, snapshot restore, or any other path
|
||||
that restores a previously paused VM, Cloud Hypervisor asks supported
|
||||
network devices to announce the VM from its new host. For `virtio-net`,
|
||||
the current implementation sets `VIRTIO_NET_S_ANNOUNCE`, raises a config
|
||||
interrupt, retries that request a few times in the background, and also
|
||||
sends host-side RARP announcements on the TAP interfaces. A guest
|
||||
re-announcement therefore only happens when the guest negotiated
|
||||
`VIRTIO_NET_F_GUEST_ANNOUNCE`. For `vhost-user-net`, the current implementation
|
||||
only uses the guest announcement path.
|
||||
|
||||
### TCP Socket Migration
|
||||
|
||||
If TCP socket is selected for migration, we need to consider migrating
|
||||
@@ -190,6 +202,8 @@ After completing the above commands, the source VM will be migrated to
|
||||
the destination host and continue running there. The source VM instance
|
||||
will terminate normally. All ongoing processes and connections within
|
||||
the VM should remain intact after the migration.
|
||||
See [Network Announcements After Resume](#network-announcements-after-resume)
|
||||
for the announcement behavior after a VM resumes.
|
||||
|
||||
#### Encryption
|
||||
|
||||
|
||||
Reference in New Issue
Block a user