Skip to content

Virtio net failover fixes

Juan Quintela qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest27 patches 30 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/27migration: Network Failover can't work with a paused guestmigration/migration.c+13 -026 replies
2/27failover: fix indentantionhw/net/virtio-net.c softmmu/qdev-monitor.c+17 -200 replies
3/27failover: Use always atomics for primary_should_be_hiddenhw/net/virtio-net.c+1 -10 replies
4/27failover: primary bus is only used once, and where it is sethw/net/virtio-net.c include/hw/virtio/virtio-net.h+4 -50 replies
5/27failover: Remove unused parameterhw/net/virtio-net.c+3 -50 replies
6/27failover: Remove external partially_hotplugged propertyhw/net/virtio-net.c+0 -40 replies
7/27failover: qdev_device_add() returns err or dev sethw/net/virtio-net.c+0 -70 replies
8/27failover: Rename bool to failover_primary_hiddenhw/net/virtio-net.c include/hw/virtio/virtio-net.h+9 -80 replies
9/27failover: g_strcmp0() knows how to handle NULLhw/net/virtio-net.c+1 -10 replies
10/27failover: Remove primary_device_optshw/net/virtio-net.c include/hw/virtio/virtio-net.h+5 -170 replies
11/27failover: remove standby_id variablehw/net/virtio-net.c include/hw/virtio/virtio-net.h+3 -90 replies
12/27failover: Remove primary_device_dicthw/net/virtio-net.c include/hw/virtio/virtio-net.h+4 -140 replies
13/27failover: Remove memory leakhw/net/virtio-net.c+1 -30 replies
14/27failover: simplify virtio_net_find_primary()hw/net/virtio-net.c+3 -150 replies
15/27failover: should_be_hidden() should take a boolhw/core/qdev.c hw/net/virtio-net.c include/hw/qdev-core.h+13 -350 replies
16/27failover: Rename function to hide_device()hw/core/qdev.c hw/net/virtio-net.c include/hw/qdev-core.h+20 -190 replies
17/27failover: virtio_net_connect_failover_devices() does nothinghw/net/virtio-net.c+2 -150 replies
18/27failover: Rename to failover_find_primary_device()hw/net/virtio-net.c+9 -30 replies
19/27failover: simplify qdev_device_add() failover casesoftmmu/qdev-monitor.c+8 -70 replies
20/27failover: simplify qdev_device_add()softmmu/qdev-monitor.c+6 -260 replies
21/27failover: make sure that id always existhw/net/virtio-net.c softmmu/qdev-monitor.c+4 -30 replies
22/27failover: remove failover_find_primary_device() error parameterhw/net/virtio-net.c+3 -60 replies
23/27failover: split failover_find_primary_device_id()hw/net/virtio-net.c+47 -160 replies
24/27failover: We don't need to cache primary_device_id anymorehw/net/virtio-net.c include/hw/virtio/virtio-net.h+10 -110 replies
25/27failover: Caller of this two functions already have primary_devhw/net/virtio-net.c+14 -130 replies
26/27failover: simplify failover_unplug_primaryhw/net/virtio-net.c+10 -150 replies
27/27failover: Remove primary_dev memberhw/net/virtio-net.c include/hw/virtio/virtio-net.h+24 -320 replies

Reviews trailers per patch

1 of 27 patches has a Reviewed-by or Acked-by.

PatchDr. David Alan Gilbert
1/27R-b
2/27
3/27
4/27
5/27
6/27
7/27
8/27
9/27
10/27
11/27
12/27
13/27
14/27
15/27
16/27
17/27
18/27
19/27
20/27
21/27
22/27
23/27
24/27
25/27
26/27
27/27

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/27] Virtio net failover fixes

Hi

This is a big rework of the network failover setup. General idea is:
* We don't cache the name of the primary/standby devices
We have several problems there with stale pointers
* After this:
- We can always remove either the primary/standby devices without trouble
- Pluggin/unplugging works
- We go to device opts to see what the failover device are. Notice that we are plugging/unplugging the device, so it is not critical.
- Once there, I "fixed" managedsave for libvirt (now gives an error instead o= f just hanging)
* Fields not cached anymore:
- primary_device_dict
- primary_device_opts
- standby_id
- primary_device_id
- primary_dev
* I renamed the should_be_hidden() callback to hide device, but if people preffer the old name I can leave it.
* Add (some) doc to some functions
* Remove almost 100 lines of code while fixing things.

Please review.

Later, Juan.

Juan Quintela (27):
migration: Network Failover can't work with a paused guest
failover: fix indentantion
failover: Use always atomics for primary_should_be_hidden
failover: primary bus is only used once, and where it is set
failover: Remove unused parameter
failover: Remove external partially_hotplugged property
failover: qdev_device_add() returns err or dev set
failover: Rename bool to failover_primary_hidden
failover: g_strcmp0() knows how to handle NULL
failover: Remove primary_device_opts
failover: remove standby_id variable
failover: Remove primary_device_dict
failover: Remove memory leak
failover: simplify virtio_net_find_primary()
failover: should_be_hidden() should take a bool
failover: Rename function to hide_device()
failover: virtio_net_connect_failover_devices() does nothing
failover: Rename to failover_find_primary_device()
failover: simplify qdev_device_add() failover case
failover: simplify qdev_device_add()
failover: make sure that id always exist
failover: remove failover_find_primary_device() error parameter
failover: split failover_find_primary_device_id()
failover: We don't need to cache primary_device_id anymore
failover: Caller of this two functions already have primary_dev
failover: simplify failover_unplug_primary
failover: Remove primary_dev member

 include/hw/qdev-core.h         |  28 ++--
 include/hw/virtio/virtio-net.h |   9 +-
 hw/core/qdev.c                 |  19 +--
 hw/net/virtio-net.c            | 298 +++++++++++++--------------------
 migration/migration.c          |  13 ++
 softmmu/qdev-monitor.c         |  43 ++---
 6 files changed, 167 insertions(+), 243 deletions(-)

--=20
2.26.2