[PATCH v5 00/19] virtio-net: live-TAP local migration

Vladimir Sementsov-Ogievskiy posted 19 patches 1 week, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250919095545.1912042-1-vsementsov@yandex-team.ru
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Markus Armbruster <armbru@redhat.com>, Michael Roth <michael.roth@amd.com>, Eric Blake <eblake@redhat.com>, Thomas Huth <thuth@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
There is a newer version of this series
hw/net/virtio-net.c                           | 138 +++++-
include/io/channel.h                          |  18 +
include/migration/misc.h                      |   1 +
include/net/tap.h                             |   5 +
include/qapi/util.h                           |  17 +
io/channel-socket.c                           |  13 +-
migration/migration.c                         |   8 +-
migration/options.c                           |  25 ++
migration/options.h                           |   2 +
migration/qemu-file.c                         |   3 +-
net/tap-bsd.c                                 |   3 +-
net/tap-linux.c                               |  19 +-
net/tap-solaris.c                             |   3 +-
net/tap-stub.c                                |   3 +-
net/tap.c                                     | 422 ++++++++++++++----
net/tap_int.h                                 |   4 +-
qapi/migration.json                           |  46 +-
tests/functional/qemu_test/decorators.py      |  16 +
.../test_x86_64_tap_fd_migration.py           | 343 ++++++++++++++
19 files changed, 970 insertions(+), 119 deletions(-)
create mode 100644 tests/functional/test_x86_64_tap_fd_migration.py
[PATCH v5 00/19] virtio-net: live-TAP local migration
Posted by Vladimir Sementsov-Ogievskiy 1 week, 2 days ago
Hi all!

Here is a  new migration parameter fds, which allows to enable the new
local migration of TAP device, including its properties
and open fds.

With this new option, management software doesn't need to
initialize new TAP and do a switch to it. Nothing should be
done around virtio-net in local migration: it just migrates
and continues to use same TAP device. So we avoid extra logic
in management software, extra allocations in kenel (for new TAP),
and corresponding extra delay in migration downtime.

v5:

Follows [PATCH v3 0/9] virtio-net: live-TAP local migration,
but called v5, to not conflict with

   [PATCH v4 0/8] TAP initialization refactoring

, which becomes obsolete, and with

   [PATCH v4 0/2] save qemu-file incoming non-blocking fds

(two patches simply included here, to not create extra
dependancy).

What was changed:

1. Now, based on master.

As already said patches 01-02 are from

   [PATCH v4 0/2] save qemu-file incoming non-blocking fds

(which still may be merged in separate)

Also note, that the series is in small conflict with
in-flight

   [PATCH v5 00/13] io: deal with blocking/non-blocking fds

, I'll rebase if it merged first.

2. New interface: simply one migration parameter

    fds = [ virtio-net ]

It could simply be reduced to boolean fds=true, but I think
that a possibility to specify target is good, see more in
patch 16.

The series supersedes:
[PATCH v4 0/8] TAP initialization refactoring
Supersedes: <20250911165101.1637608-1-vsementsov@yandex-team.ru>

Vladimir Sementsov-Ogievskiy (19):
  migration/qemu-file: don't make incoming fds blocking again
  io/channel: document how qio_channel_readv_full() handles fds
  net/tap: net_init_tap_one(): drop extra error propagation
  net/tap: net_init_tap_one(): move parameter checking earlier
  net/tap: rework net_tap_init()
  net/tap: setup exit notifier only when needed
  net/tap: split net_tap_fd_init()
  net/tap: rework tap_set_sndbuf()
  net/tap: rework sndbuf handling
  net/tap: introduce net_tap_setup()
  net/tap: move vhost fd initialization to net_tap_new()
  net/tap: use net_tap_setup() in net_init_bridge()
  net/tap: finalize net_tap_set_fd() logic
  migration: add MIG_EVENT_PRE_INCOMING
  net/tap: postpone tap setup to pre-incoming
  qapi: add interface for local TAP migration
  virtio-net: support fds migration of TAP backend
  tests/functional: add skipUnlessPasswordlessSudo() decorator
  tests/functional: add test_x86_64_tap_fd_migration

 hw/net/virtio-net.c                           | 138 +++++-
 include/io/channel.h                          |  18 +
 include/migration/misc.h                      |   1 +
 include/net/tap.h                             |   5 +
 include/qapi/util.h                           |  17 +
 io/channel-socket.c                           |  13 +-
 migration/migration.c                         |   8 +-
 migration/options.c                           |  25 ++
 migration/options.h                           |   2 +
 migration/qemu-file.c                         |   3 +-
 net/tap-bsd.c                                 |   3 +-
 net/tap-linux.c                               |  19 +-
 net/tap-solaris.c                             |   3 +-
 net/tap-stub.c                                |   3 +-
 net/tap.c                                     | 422 ++++++++++++++----
 net/tap_int.h                                 |   4 +-
 qapi/migration.json                           |  46 +-
 tests/functional/qemu_test/decorators.py      |  16 +
 .../test_x86_64_tap_fd_migration.py           | 343 ++++++++++++++
 19 files changed, 970 insertions(+), 119 deletions(-)
 create mode 100644 tests/functional/test_x86_64_tap_fd_migration.py

-- 
2.48.1