From: Markus Armbruster <armbru@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: jasowang@redhat.com, mst@redhat.com, peterx@redhat.com,
farosas@suse.de, raphael.s.norwitz@gmail.com, bchaney@akamai.com,
qemu-devel@nongnu.org, berrange@redhat.com, pbonzini@redhat.com,
yc-core@yandex-team.ru, mark.caveayland@nutanix.com,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Eric Blake" <eblake@redhat.com>, "John Snow" <jsnow@redhat.com>
Subject: Re: [PATCH v17 08/10] net/tap: support local migration with virtio-net
Date: Tue, 02 Jun 2026 10:02:40 +0200 [thread overview]
Message-ID: <877boh74kf.fsf@pond.sub.org> (raw)
In-Reply-To: <20260527191150.250333-9-vsementsov@yandex-team.ru> (Vladimir Sementsov-Ogievskiy's message of "Wed, 27 May 2026 22:11:47 +0300")
[Cc: John Snow for advice on cross-references (search for "John?")]
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> writes:
> Support transferring of TAP state (including open fd).
>
> Add new property "local-migration-supported", which defines,
> is local-migration is actually supported for this TAP device.
which defines whether
> Starting from 11.1 MT it's enabled by default.
What does "MT" mean?
>
> Note, that local-migration (including migrating opened FDs
> through migration channel, which must be UNIX socket), is
> enabled by global "local" migration parameters. But individual
> devices may have additional options to enable/disable it
> personally.
per device
>
> Add new option "incoming-fds", which should be set to true on
> target for incoming migration work. It says "do not open any
> files, but instead wait for FDs coming from migration stream".
> "local-migration-supported" option is not enough, as it work in pair
> with migration parameter "local", and intialization process
> of TAP device should not depend on migration parameters.
>
> For new option require explicitly unset script and downscript,
> to keep possibility of implementing support for them in the
> future.
Why explicitly unset? Do we have to override a default script?
> Note disabling read polling on source stop for TAP migration:
I don't understand this sentence.
> otherwise, source process may steal packages from TAP fd even
> after source vm STOP.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
[...]
> diff --git a/qapi/net.json b/qapi/net.json
> index 1a6382825c5..c5d87ba308b 100644
> --- a/qapi/net.json
> +++ b/qapi/net.json
> @@ -425,6 +425,22 @@
##
# @NetdevTapOptions:
#
# Used to configure a host TAP network interface backend.
#
# @ifname: interface name
#
# @fd: file descriptor of an already opened tap
#
# @fds: multiple file descriptors of already opened multiqueue capable
# tap
#
# @script: script to initialize the interface
#
# @downscript: script to shut down the interface
#
# @br: bridge name (since 2.8)
#
# @helper: command to execute to configure bridge
#
# @sndbuf: send buffer limit. Understands [TGMKkb] suffixes.
#
# @vnet_hdr: enable the IFF_VNET_HDR flag on the tap interface
#
# @vhost: enable vhost-net network accelerator
#
# @vhostfd: file descriptor of an already opened vhost net device
#
# @vhostfds: file descriptors of multiple already opened vhost net
# devices
#
# @vhostforce: vhost on for non-MSIX virtio guests
#
# @queues: number of queues to be created for multiqueue capable tap
#
> # @poll-us: maximum number of microseconds that could be spent on busy
> # polling for tap (since 2.7)
> #
> +# @incoming-fds: do not open or create any TAP devices. Prepare for
> +# getting TAP file descriptors from incoming migration stream.
> +# The option is incompatible with any of @fd, @fds, @helper, @br,
> +# @ifname, @sndbuf and @vnet_hdr options, and requires @script and
> +# @downscript be explicitly set to nothing (empty string or "no"),
WAT?!?
Special value "no" is not documented in the QAPI schema, see the
descriptions of @script and @downscript above.
It is documented for -netdev tap in qemu-options.hx:
``-netdev tap,id=id[,fd=h][,ifname=name][,script=file][,downscript=dfile][,br=bridge][,helper=helper]``
Configure a host TAP network backend with ID id.
Use the network script file to configure it and the network script
dfile to deconfigure it. If name is not provided, the OS
automatically provides one. The default network configure script is
``/etc/qemu-ifup`` and the default network deconfigure script is
``/etc/qemu-ifdown``. Use ``script=no`` or ``downscript=no`` to
disable script execution.
Special value "" is okay: you can't name have a script named "".
Special value "no" isn't: you can have a script named "no", but if you
try to use it, it's silently ignored. Yes, it's a silly name, but it's
also a silly interface.
I think we should document "no" properly, and also deprecate it.
> +# and requires also @local-migration-supported to be true, "local"
> +# migration parameter be set as well, and QEMU being in incoming
> +# migration state. (Since 11.1)
This sentence is rather long and hard to parse. Here's my attempt:
# The option is incompatible with any of @fd, @fds, @helper, @br,
# @ifname, @sndbuf and @vnet_hdr options. @script and @downscript
# must be explicitly disabled (empty string or "no"), and
# @local-migration-supported must be true. Additionally,
# migration parameter @local must be set, and QEMU mist be in
# incoming migration state. (Since 11.1)
Ideally, "migration parameter @local" would link to its description, but
I can't tell you offhand whether we can do that and how. John?
> +#
> +# @local-migration-supported: enable local migration for this TAP
> +# backend. When set, local migration is enabled/disabled by
> +# "local" migration parameter for this TAP backend. When unset,
migration parameter @local
> +# "local" migration parameter is ignored for this TAP backend.
> +# (Since 11.1. Defaults to true for MT >= 11.1, and to false for
> +# MT < 11.1)
What's "MT"?
> +#
> # Since: 1.2
> ##
> { 'struct': 'NetdevTapOptions',
> @@ -443,7 +459,9 @@
> '*vhostfds': 'str',
> '*vhostforce': 'bool',
> '*queues': 'uint32',
> - '*poll-us': 'uint32'} }
> + '*poll-us': 'uint32',
> + '*incoming-fds': 'bool',
> + '*local-migration-supported': 'bool' } }
>
> ##
> # @NetdevSocketOptions:
Two bools mean four cases. @incoming-fd's description excludes the case
"incoming-fd": true, "local-migration-supported": false. Awkward. Does
case ""incoming-fd": false, "local-migration-supported": true make sense
and why?
next prev parent reply other threads:[~2026-06-02 8:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 19:11 [PATCH v17 00/10] virtio-net: live-TAP local migration Vladimir Sementsov-Ogievskiy
2026-05-27 19:11 ` [PATCH v17 01/10] net/tap: move vhost-net open() calls to tap_parse_vhost_fds() Vladimir Sementsov-Ogievskiy
2026-05-27 19:11 ` [PATCH v17 02/10] net/tap: move vhost initialization to tap_setup_vhost() Vladimir Sementsov-Ogievskiy
2026-05-27 19:11 ` [PATCH v17 03/10] net/tap: use container_of instead of DO_UPCAST Vladimir Sementsov-Ogievskiy
2026-05-27 19:11 ` [PATCH v17 04/10] net/tap: QOMify tap backend Vladimir Sementsov-Ogievskiy
2026-05-27 19:11 ` [PATCH v17 05/10] net/tap: add TYPE_VMSTATE_IF interface Vladimir Sementsov-Ogievskiy
2026-05-27 19:11 ` [PATCH v17 06/10] qapi: add local migration parameter Vladimir Sementsov-Ogievskiy
2026-05-27 19:11 ` [PATCH v17 07/10] virtio-net: support local migration of backend Vladimir Sementsov-Ogievskiy
2026-05-27 19:11 ` [PATCH v17 08/10] net/tap: support local migration with virtio-net Vladimir Sementsov-Ogievskiy
2026-05-28 16:03 ` Vladimir Sementsov-Ogievskiy
2026-06-02 8:02 ` Markus Armbruster [this message]
2026-06-02 12:47 ` Vladimir Sementsov-Ogievskiy
2026-06-03 9:33 ` Markus Armbruster
2026-06-03 16:50 ` Vladimir Sementsov-Ogievskiy
2026-06-08 8:05 ` Markus Armbruster
2026-05-27 19:11 ` [PATCH v17 09/10] tests/functional: add skipWithoutSudo() decorator Vladimir Sementsov-Ogievskiy
2026-05-27 19:11 ` [PATCH v17 10/10] tests/functional: add test_tap_migration Vladimir Sementsov-Ogievskiy
2026-06-03 15:24 ` [PATCH v17 00/10] virtio-net: live-TAP local migration Mark Cave-Ayland
2026-06-03 16:17 ` Vladimir Sementsov-Ogievskiy
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=877boh74kf.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=bchaney@akamai.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=farosas@suse.de \
--cc=jasowang@redhat.com \
--cc=jsnow@redhat.com \
--cc=mark.caveayland@nutanix.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=raphael.s.norwitz@gmail.com \
--cc=vsementsov@yandex-team.ru \
--cc=yc-core@yandex-team.ru \
--cc=zhao1.liu@intel.com \
/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.