[PATCH v13 0/8] virtio-net: live-TAP local migration

Vladimir Sementsov-Ogievskiy posted 8 patches 2 days, 20 hours ago
Failed in applying to current master (apply log)
hw/core/machine.c                             |   1 +
hw/net/virtio-net.c                           | 137 +++++-
include/hw/virtio/virtio-net.h                |   2 +
include/migration/misc.h                      |   2 +
include/net/net.h                             |   6 +
migration/options.c                           |  18 +-
net/net.c                                     |  47 ++
net/tap.c                                     | 246 ++++++++--
qapi/migration.json                           |  12 +-
qapi/net.json                                 |   7 +-
tests/functional/qemu_test/decorators.py      |  16 +
tests/functional/x86_64/meson.build           |   1 +
tests/functional/x86_64/test_tap_migration.py | 456 ++++++++++++++++++
13 files changed, 900 insertions(+), 51 deletions(-)
create mode 100755 tests/functional/x86_64/test_tap_migration.py
[PATCH v13 0/8] virtio-net: live-TAP local migration
Posted by Vladimir Sementsov-Ogievskiy 2 days, 20 hours ago
Hi all!

Here is a new migration parameter "local", 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.

v13:
01: simplify extra "else if" to "else"
03: reword documentation (with Markus), drop r-b [sorry, but to be sure,
    that it is OK for Peter too]
06: - reword documentation
    - error-out instead of silently ignore
      br=, ifname=, sndbuf=, vnet_hdr=, when mentioned together
      with new incoming-fds parameter.
    - fix stealing packages from TAP by source qemu process after
      source STOP

Vladimir Sementsov-Ogievskiy (8):
  net/tap: move vhost-net open() calls to tap_parse_vhost_fds()
  net/tap: move vhost initialization to tap_setup_vhost()
  qapi: add local migration parameter
  net: introduce vmstate_net_peer_backend
  virtio-net: support local migration of backend
  net/tap: support local migration with virtio-net
  tests/functional: add skipWithoutSudo() decorator
  tests/functional: add test_tap_migration

 hw/core/machine.c                             |   1 +
 hw/net/virtio-net.c                           | 137 +++++-
 include/hw/virtio/virtio-net.h                |   2 +
 include/migration/misc.h                      |   2 +
 include/net/net.h                             |   6 +
 migration/options.c                           |  18 +-
 net/net.c                                     |  47 ++
 net/tap.c                                     | 246 ++++++++--
 qapi/migration.json                           |  12 +-
 qapi/net.json                                 |   7 +-
 tests/functional/qemu_test/decorators.py      |  16 +
 tests/functional/x86_64/meson.build           |   1 +
 tests/functional/x86_64/test_tap_migration.py | 456 ++++++++++++++++++
 13 files changed, 900 insertions(+), 51 deletions(-)
 create mode 100755 tests/functional/x86_64/test_tap_migration.py

-- 
2.52.0
Re: [PATCH v13 0/8] virtio-net: live-TAP local migration
Posted by Markus Armbruster 2 days, 3 hours ago
Does not apply on current master for me.  What's your base?
Re: [PATCH v13 0/8] virtio-net: live-TAP local migration
Posted by Vladimir Sementsov-Ogievskiy 1 day, 23 hours ago
On 20.03.26 12:39, Markus Armbruster wrote:
> Does not apply on current master for me.  What's your base?
> 

Based-on: <20260318113144.15697-1-vsementsov@yandex-team.ru>
    "[PATCH v4 00/13] net: refactoring and fixes"


Or, branch up-tap-fd-migration-with-bk-opt  at  https://gitlab.com/vsementsov/qemu.git

-- 
Best regards,
Vladimir
Re: [PATCH v13 0/8] virtio-net: live-TAP local migration
Posted by Vladimir Sementsov-Ogievskiy 2 days, 20 hours ago
On 19.03.26 18:53, Vladimir Sementsov-Ogievskiy wrote:
> Hi all!
> 
> Here is a new migration parameter "local", 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.
> 
> v13:
> 01: simplify extra "else if" to "else"
> 03: reword documentation (with Markus), drop r-b [sorry, but to be sure,
>      that it is OK for Peter too]
> 06: - reword documentation
>      - error-out instead of silently ignore
>        br=, ifname=, sndbuf=, vnet_hdr=, when mentioned together
>        with new incoming-fds parameter.
>      - fix stealing packages from TAP by source qemu process after
>        source STOP

Based-on: <20260318113144.15697-1-vsementsov@yandex-team.ru>
    "[PATCH v4 00/13] net: refactoring and fixes"

-- 
Best regards,
Vladimir