All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Juraj Marcin <jmarcin@redhat.com>,
	qemu-devel@nongnu.org, Fabiano Rosas <farosas@suse.de>,
	Peter Xu <peterx@redhat.com>, Jason Wang <jasowang@redhat.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Subject: Re: [PATCH 4/4] migration: Pass network packets received during switchover to dest VM
Date: Tue, 27 Jan 2026 17:27:52 -0500	[thread overview]
Message-ID: <20260127172333-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <aXjK01KuENw23xtV@redhat.com>

On Tue, Jan 27, 2026 at 02:25:23PM +0000, Daniel P. Berrangé wrote:
> On Tue, Jan 27, 2026 at 03:03:10PM +0100, Juraj Marcin wrote:
> > From: Juraj Marcin <jmarcin@redhat.com>
> > 
> > During migration switchover both the source and the destination machines
> > are paused (compute downtime). During this period network still routes
> > network packets to the source machine, as this is the last place where
> > the recipient MAC address has been seen. Once the destination side
> > starts and sends network announcement, all subsequent frames are routed
> > correctly. However, frames delivered to the source machine are never
> > processed and lost. This causes also a network downtime with roughly the
> > same duration as compute downtime.
> > 
> > This can cause problems not only for protocols that cannot handle packet
> > loss, but can also introduce delays in protocols that can handle them.
> > 
> > To resolve this, this feature instantiates a network filter for each
> > network backend present during migration setup on both migration sides.
> > On the source side, this filter caches all packets received from the
> > backend during switchover. Once the destination machine starts, all
> > cached packets are sent through the migration channel and the respective
> > filter object on the destination side injects them to the NIC attached
> > to the backend.
> 
> If the dest QEMU has started, I presume this means that the ARP
> announcement has been sent ?

For example, with virtio guest announcements, it's sent by the dest VM.

Besides, arp "announcements" are not necessary to reprogram the network.

But if you want to abolutely avoid reordering, you can wait
until there's an attempt to transfer something, buffer that
something, process everything from the source (pass it to the VM),
then send whatever VM wants to send.

Thinkably, qemu initiated packets can be handled the same way.



>   IOW, the packets being forwarded
> over the migration stream are guaranteed to be delivered "out
> of order" wrt the sender.  Should be safe for TCP, but may have
> an impact on other protocols. Though apps should be aware of
> that risk in general, they may not frequently encounter it, and
> it could still cause service disruption
> 
> > diff --git a/qapi/migration.json b/qapi/migration.json
> > index f925e5541b..d637b22c80 100644
> > --- a/qapi/migration.json
> > +++ b/qapi/migration.json
> > @@ -520,6 +520,11 @@
> >  #     each RAM page.  Requires a migration URI that supports seeking,
> >  #     such as a file.  (since 9.0)
> >  #
> > +# @netpass: Collect packets received by network backedns after source
> > +#     VM is paused and send them to the destination once it resumes.
> > +#     This (almost) completely eliminates packet loss caused by
> > +#     switchover.  (since 11.0)
> 
> Should mention they will be deliver "out of order" 
> 
> > +#
> >  # Features:
> >  #
> >  # @unstable: Members @x-colo and @x-ignore-shared are experimental.
> > @@ -536,7 +541,7 @@
> >             { 'name': 'x-ignore-shared', 'features': [ 'unstable' ] },
> >             'validate-uuid', 'background-snapshot',
> >             'zero-copy-send', 'postcopy-preempt', 'switchover-ack',
> > -           'dirty-limit', 'mapped-ram'] }
> > +           'dirty-limit', 'mapped-ram', 'netpass'] }
> >  
> >  ##
> >  # @MigrationCapabilityStatus:
> > -- 
> > 2.52.0
> > 
> > 
> 
> With regards,
> Daniel
> -- 
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2026-01-27 22:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260127172333-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=berrange@redhat.com \
    --cc=farosas@suse.de \
    --cc=jasowang@redhat.com \
    --cc=jmarcin@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.