Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru> writes:

> To migrate TAP device (including open fds) locally, user should:
>
> 1. enable local-tap migration capability both on source and target
> 2. use additional local-incoming=true option for tap on target
>
> Why capability is not enough? We need an option to modify early
> initialization of TAP, to avoid opening new fds. The capability
> may not be set at the moment of netdev initialization.

Bummer.  No way around that?

> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>

[...]

> diff --git a/qapi/migration.json b/qapi/migration.json
> index 2387c21e9c..992a5b1e2b 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -517,6 +517,12 @@
>  #     each RAM page.  Requires a migration URI that supports seeking,
>  #     such as a file.  (since 9.0)
>  #
> +# @local-tap: Migrate TAPs locally, keeping backend alive. Open file
> +#     descriptors and TAP-related state are migrated. Only may be
> +#     used when migration channel is unix socket. For target device
> +#     also @local-incoming option must be specified (since 10.2)
> +#     (since 10.2)
> +#
>  # Features:
>  #
>  # @unstable: Members @x-colo and @x-ignore-shared are experimental.

Missing here: local-tap is also experimental.

> @@ -536,7 +542,8 @@
>             { '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',
> +           { 'name': 'local-tap', 'features': [ 'unstable' ] } ] }
>  
>  ##
>  # @MigrationCapabilityStatus:
> diff --git a/qapi/net.json b/qapi/net.json
> index 78bcc9871e..8f53549d58 100644
> --- a/qapi/net.json
> +++ b/qapi/net.json
> @@ -353,6 +353,15 @@
>  # @poll-us: maximum number of microseconds that could be spent on busy
>  #     polling for tap (since 2.7)
>  #
> +# @local-incoming: Do load open file descriptor for that TAP
> +#     on incoming migration. May be used only if QEMU is started
> +#     for incoming migration. Will work only together with local-tap
> +#     migration capability enabled (default: false) (Since: 10.2)

Scratch "Do".

Re "Maybe be used only": what happens when you use it without incoming
migration or when local-tap is off?

Does "local-incoming": false count as invalid use then?

Two spaces between sentences for consistency, please.

> +#
> +# Features:
> +#
> +# @unstable: Member @local-incoming is experimental

Period at the end for consistency, please.

> +#
>  # Since: 1.2
>  ##
>  { 'struct': 'NetdevTapOptions',
> @@ -371,7 +380,8 @@
>      '*vhostfds':   'str',
>      '*vhostforce': 'bool',
>      '*queues':     'uint32',
> -    '*poll-us':    'uint32'} }
> +    '*poll-us':    'uint32',
> +    '*local-incoming': { 'type': 'bool', 'features': [ 'unstable' ] } } }
>  
>  ##
>  # @NetdevSocketOptions:


Reply via email to