Hi all! Here is a new migration parameter backend-transfer, which allows to enable local migration of TAP virtio-net backend (and maybe other devices and backends in future), 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 kernel (for new TAP), and corresponding extra delay in migration downtime. v9: - preparation patches are moved to separate series: 1. [PATCH v9 0/7] net/tap: simple refactoring 2. [PATCH v9 0/9] net/tap: postpone connect - new interface: list of qdev paths - significant rework of architecture: don't mix backend and frontend code, instead create generic interfaces. Based-on: <[email protected]> Based-on: <[email protected]> Also, pushed to https://gitlab.com/vsementsov/qemu.git tag up-tap-fd-migration-v9 Vladimir Sementsov-Ogievskiy (8): migration: introduce .pre_incoming() vmsd handler qapi: introduce query-backend-transfer-support qapi: add backend-transfer migration parameter net: introduce vmstate_net_peer_backend virtio-net: support backend-transfer migration net/tap: support backend-transfer migration tests/functional: add skipWithoutSudo() decorator tests/functional: add test_tap_migration hw/net/virtio-net.c | 157 ++++++- include/hw/qdev-core.h | 10 + include/hw/virtio/virtio-net.h | 1 + include/migration/misc.h | 2 + include/migration/vmstate.h | 1 + include/net/net.h | 4 + migration/migration.c | 4 + migration/options.c | 31 ++ migration/savevm.c | 15 + migration/savevm.h | 1 + net/net.c | 47 +++ net/tap.c | 46 +- qapi/migration.json | 35 +- qapi/qdev.json | 26 ++ system/qdev-monitor.c | 74 ++++ tests/functional/qemu_test/decorators.py | 16 + tests/functional/x86_64/meson.build | 1 + tests/functional/x86_64/test_tap_migration.py | 398 ++++++++++++++++++ 18 files changed, 860 insertions(+), 9 deletions(-) create mode 100644 tests/functional/x86_64/test_tap_migration.py -- 2.48.1
