Hi all!
Here is a new migration capability "local-tap", which
allows 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.
Note that patch 07 is reused from
[PATCH 00/33] vhost-user-blk: live-backend local migration
to not create extra dependency on a big series.
v3:
- drop tap_dump_packet (actually we already have qemu_hexdump,
which is even called in network code (under ifdef).
- rework save/load code in tap.c to VMSD
test:
- avoid using shell
- use sudo, and add skipUnlesPasswordlessSudo decorator
- don't keep extra open fd for ping.log
- use scratch file for ping.log (not hardcoded /tmp/ping.log)
Based on [PATCH v3 00/19] TAP initialization refactoring, or in other
words:
Based-on: <20250903124934.1169899-1-vsementsov@yandex-team.ru>
Vladimir Sementsov-Ogievskiy (9):
net/tap: add some trace points
net/tap: keep exit notifier only when downscript set
net/tap: refactor net_tap_setup_vhost()
qapi: add interface for local TAP migration
net/tap: implement interfaces for local migration
virtio-net: support local tap migration
tests/functional: exec_command_and_wait_for_pattern: add vm arg
tests/functional: add skipUnlessPasswordlessSudo() decorator
tests/functional: add test_x86_64_tap_fd_migration
hw/net/virtio-net.c | 100 ++++-
include/hw/virtio/virtio-net.h | 2 +
include/net/tap.h | 4 +
migration/options.c | 7 +
migration/options.h | 1 +
net/tap.c | 279 ++++++++++----
net/trace-events | 6 +
qapi/migration.json | 9 +-
qapi/net.json | 12 +-
tests/functional/qemu_test/cmd.py | 7 +-
tests/functional/qemu_test/decorators.py | 16 +
.../test_x86_64_tap_fd_migration.py | 345 ++++++++++++++++++
12 files changed, 703 insertions(+), 85 deletions(-)
create mode 100644 tests/functional/test_x86_64_tap_fd_migration.py
--
2.48.1