qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/27] Virtio net failover fixes
@ 2020-11-18  8:37 Juan Quintela
  2020-11-18  8:37 ` [PATCH v2 01/27] migration: Network Failover can't work with a paused guest Juan Quintela
                   ` (28 more replies)
  0 siblings, 29 replies; 58+ messages in thread
From: Juan Quintela @ 2020-11-18  8:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P. Berrangé, Eduardo Habkost, Michael S. Tsirkin,
	Jason Wang, Juan Quintela, Dr. David Alan Gilbert, Paolo Bonzini

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




^ permalink raw reply	[flat|nested] 58+ messages in thread

end of thread, other threads:[~2020-12-08 19:10 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-18  8:37 [PATCH v2 00/27] Virtio net failover fixes Juan Quintela
2020-11-18  8:37 ` [PATCH v2 01/27] migration: Network Failover can't work with a paused guest Juan Quintela
2020-11-25 12:05   ` Dr. David Alan Gilbert
2020-12-02 10:13   ` Michael S. Tsirkin
2020-12-02 10:27     ` Daniel P. Berrangé
2020-12-02 10:31       ` Michael S. Tsirkin
2020-12-02 10:33         ` Michael S. Tsirkin
2020-12-02 10:51           ` Juan Quintela
2020-12-02 10:55             ` Daniel P. Berrangé
2020-12-02 11:19               ` Michael S. Tsirkin
2020-12-02 11:26                 ` Daniel P. Berrangé
2020-12-02 11:37                   ` Michael S. Tsirkin
2020-12-02 12:01                     ` Daniel P. Berrangé
2020-12-03 11:21                       ` Michael S. Tsirkin
2020-12-03 11:32                         ` Daniel P. Berrangé
2020-12-03 11:40                           ` Michael S. Tsirkin
2020-12-03 11:43                             ` Dr. David Alan Gilbert
2020-12-03 12:02                               ` Michael S. Tsirkin
2020-12-03 12:04                                 ` Dr. David Alan Gilbert
2020-12-03 12:11                               ` Michael S. Tsirkin
2020-12-03 12:16                                 ` Daniel P. Berrangé
2020-12-08 18:48                                   ` Michael S. Tsirkin
2020-12-03 11:45                             ` Daniel P. Berrangé
2020-12-03 12:01                               ` Michael S. Tsirkin
2020-12-03 12:06                                 ` Daniel P. Berrangé
2020-12-03 12:13                                   ` Michael S. Tsirkin
2020-12-08 18:32                       ` Michael S. Tsirkin
2020-12-02 10:34         ` Daniel P. Berrangé
2020-11-18  8:37 ` [PATCH v2 02/27] failover: fix indentantion Juan Quintela
2020-11-18  8:37 ` [PATCH v2 03/27] failover: Use always atomics for primary_should_be_hidden Juan Quintela
2020-11-18  8:37 ` [PATCH v2 04/27] failover: primary bus is only used once, and where it is set Juan Quintela
2020-11-18  8:37 ` [PATCH v2 05/27] failover: Remove unused parameter Juan Quintela
2020-11-18  8:37 ` [PATCH v2 06/27] failover: Remove external partially_hotplugged property Juan Quintela
2020-11-18  8:37 ` [PATCH v2 07/27] failover: qdev_device_add() returns err or dev set Juan Quintela
2020-11-18  8:37 ` [PATCH v2 08/27] failover: Rename bool to failover_primary_hidden Juan Quintela
2020-11-18  8:37 ` [PATCH v2 09/27] failover: g_strcmp0() knows how to handle NULL Juan Quintela
2020-11-18  8:37 ` [PATCH v2 10/27] failover: Remove primary_device_opts Juan Quintela
2020-11-18  8:37 ` [PATCH v2 11/27] failover: remove standby_id variable Juan Quintela
2020-11-18  8:37 ` [PATCH v2 12/27] failover: Remove primary_device_dict Juan Quintela
2020-11-18  8:37 ` [PATCH v2 13/27] failover: Remove memory leak Juan Quintela
2020-11-18  8:37 ` [PATCH v2 14/27] failover: simplify virtio_net_find_primary() Juan Quintela
2020-11-18  8:37 ` [PATCH v2 15/27] failover: should_be_hidden() should take a bool Juan Quintela
2020-11-18  8:37 ` [PATCH v2 16/27] failover: Rename function to hide_device() Juan Quintela
2020-11-18  8:37 ` [PATCH v2 17/27] failover: virtio_net_connect_failover_devices() does nothing Juan Quintela
2020-11-18  8:37 ` [PATCH v2 18/27] failover: Rename to failover_find_primary_device() Juan Quintela
2020-11-18  8:37 ` [PATCH v2 19/27] failover: simplify qdev_device_add() failover case Juan Quintela
2020-11-18  8:37 ` [PATCH v2 20/27] failover: simplify qdev_device_add() Juan Quintela
2020-11-18  8:37 ` [PATCH v2 21/27] failover: make sure that id always exist Juan Quintela
2020-11-18  8:37 ` [PATCH v2 22/27] failover: remove failover_find_primary_device() error parameter Juan Quintela
2020-11-18  8:37 ` [PATCH v2 23/27] failover: split failover_find_primary_device_id() Juan Quintela
2020-11-18  8:37 ` [PATCH v2 24/27] failover: We don't need to cache primary_device_id anymore Juan Quintela
2020-11-18  8:37 ` [PATCH v2 25/27] failover: Caller of this two functions already have primary_dev Juan Quintela
2020-11-18  8:37 ` [PATCH v2 26/27] failover: simplify failover_unplug_primary Juan Quintela
2020-11-18  8:37 ` [PATCH v2 27/27] failover: Remove primary_dev member Juan Quintela
2020-11-18  8:53 ` [PATCH v2 00/27] Virtio net failover fixes Michael S. Tsirkin
2020-12-02 10:16   ` Juan Quintela
2020-12-02 10:30     ` Michael S. Tsirkin
2020-12-02  9:55 ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).