All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] migration: Pass network packets received during switchover to dest VM
@ 2026-01-27 14:03 Juraj Marcin
  2026-01-27 14:03 ` [PATCH 1/4] migration/qemu-file: Add ability to clear error Juraj Marcin
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Juraj Marcin @ 2026-01-27 14:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: Juraj Marcin, Fabiano Rosas, Michael S. Tsirkin, Peter Xu,
	Jason Wang, Vladimir Sementsov-Ogievskiy

During switchover there is a period during which both source and
destination side VMs are paused. During this period, all network packets
are still routed to the source side, but it will never process them.
Once the destination resumes, it is not aware of these packets and they
are lost. This can cause packet loss in unreliable protocols and
extended delays due to retransmission in reliable protocols.

This series resolves this problem by caching packets received once the
source VM pauses and then passing and injecting them on the destination
side. This feature is implemented in the last patch. The caching and
injecting is implemented using network filter interface and should work
with any backend with vhost=off, but only TAP network backend was
explicitly tested.

This series also introduces an RP_VM_STARTED message on the return-path
channel, which is used to correctly calculate downtime for both precopy
and postcopy, and also as a trigger for netpass to forward packets to
the destination. With more data sent through the migration channel after
the destination VM starts, using RP_SHUT wouldn't be accurate anymore,
and in postcopy the downtime calculation was always incorrect.

As netpass requires return-path capability, its capability is also off
by default, but I am open for discussion about making it on by default,
as long as return-path is enabled (i.e. enabling return-path would also
enable netpass unless it is explicitly disabled).

Juraj Marcin (4):
  migration/qemu-file: Add ability to clear error
  migration: Introduce VM_STARTED return-path message
  migration: Convert VMSD early_setup into VMStateSavePhase enum
  migration: Pass network packets received during switchover to dest VM

 hw/core/machine.c           |   4 +-
 hw/virtio/virtio-mem.c      |   2 +-
 include/migration/vmstate.h |  33 +++--
 include/net/net.h           |   5 +
 migration/meson.build       |   1 +
 migration/migration.c       |  83 +++++++++++-
 migration/migration.h       |  11 ++
 migration/netpass.c         | 246 ++++++++++++++++++++++++++++++++++++
 migration/netpass.h         |  14 ++
 migration/options.c         |  29 +++++
 migration/options.h         |   2 +
 migration/qemu-file.c       |   6 +
 migration/qemu-file.h       |   1 +
 migration/savevm.c          |  44 ++++++-
 migration/savevm.h          |   2 +
 migration/trace-events      |   9 ++
 net/net.c                   |  11 ++
 net/tap.c                   |  11 +-
 qapi/migration.json         |   7 +-
 19 files changed, 501 insertions(+), 20 deletions(-)
 create mode 100644 migration/netpass.c
 create mode 100644 migration/netpass.h

-- 
2.52.0



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2026-02-04 11:23 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-27 14:03 [PATCH 0/4] migration: Pass network packets received during switchover to dest VM Juraj Marcin
2026-01-27 14:03 ` [PATCH 1/4] migration/qemu-file: Add ability to clear error Juraj Marcin
2026-01-27 14:03 ` [PATCH 2/4] migration: Introduce VM_STARTED return-path message Juraj Marcin
2026-01-27 22:29   ` Michael S. Tsirkin
2026-01-27 14:03 ` [PATCH 3/4] migration: Convert VMSD early_setup into VMStateSavePhase enum Juraj Marcin
2026-01-27 14:03 ` [PATCH 4/4] migration: Pass network packets received during switchover to dest VM Juraj Marcin
2026-01-27 14:25   ` Daniel P. Berrangé
2026-01-27 22:27     ` Michael S. Tsirkin
2026-01-28 12:23     ` Juraj Marcin
2026-01-28  2:55   ` Jason Wang
2026-01-28  2:56     ` Jason Wang
2026-01-28  9:07       ` Cindy Lu
2026-01-28 13:49     ` Juraj Marcin
2026-01-29  1:05       ` Jason Wang
2026-01-29 16:07         ` Zhang Chen
2026-01-27 18:21 ` [PATCH 0/4] " Stefano Brivio
2026-01-28 13:06   ` Juraj Marcin
2026-01-28 17:27     ` Stefano Brivio
2026-01-30 14:40       ` Juraj Marcin
2026-01-31  2:27         ` Stefano Brivio
2026-02-04 11:23           ` Juraj Marcin
2026-02-03 12:03   ` Laurent Vivier
2026-02-03 13:29     ` Stefano Brivio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.