From: "Dr. David Alan Gilbert" <dgilbert@redhat.com> To: Jens Freimann <jfreimann@redhat.com> Cc: "Michael S. Tsirkin" <mst@redhat.com>, armbru@redhat.com, qemu-devel@nongnu.org, pkrempa@redhat.com, ehabkost@redhat.com, mdroth@linux.vnet.ibm.com, liran.alon@oracle.com, laine@redhat.com, ogerlitz@mellanox.com, ailan@redhat.com Subject: Re: [Qemu-devel] [RFC PATCH 0/2] implement the failover feature for assigned network devices Date: Mon, 8 Apr 2019 18:00:00 +0100 [thread overview] Message-ID: <20190408165959.GI2687@work-vm> (raw) In-Reply-To: <20190408130050.66zn2725wky3aoqd@jenstp.localdomain> * Jens Freimann (jfreimann@redhat.com) wrote: > On Mon, Apr 08, 2019 at 10:16:50AM +0100, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (mst@redhat.com) wrote: > > > On Fri, Apr 05, 2019 at 09:56:29AM +0100, Dr. David Alan Gilbert wrote: > > > > * Jens Freimann (jfreimann@redhat.com) wrote: > > > > > On Fri, Mar 22, 2019 at 02:44:45PM +0100, Jens Freimann wrote: > > > > > > This is another attempt at implementing the host side of the > > > > > > net_failover concept > > > > > > (https://www.kernel.org/doc/html/latest/networking/net_failover.html) > > > > > > > > > > > > The general idea is that we have a pair of devices, a vfio-pci and a > > > > > > emulated device. Before migration the vfio device is unplugged and data > > > > > > flows to the emulated device, on the target side another vfio-pci device > > > > > > is plugged in to take over the data-path. In the guest the net_failover > > > > > > module will pair net devices with the same MAC address. > > > > > > > > > > > > * In the first patch the infrastructure for hiding the device is added > > > > > > for the qbus and qdev APIs. A "hidden" boolean is added to the device > > > > > > state and it is set based on a callback to the standby device which > > > > > > registers itself for handling the assessment: "should the primary device > > > > > > be hidden?" by cross validating the ids of the devices. > > > > > > > > > > > > * In the second patch the virtio-net uses the API to hide the vfio > > > > > > device and unhides it when the feature is acked. > > > > > > > > > > > > Previous discussion: https://patchwork.ozlabs.org/cover/989098/ > > > > > > > > > > > > To summarize concerns/feedback from previous discussion: > > > > > > 1.- guest OS can reject or worse _delay_ unplug by any amount of time. > > > > > > Migration might get stuck for unpredictable time with unclear reason. > > > > > > This approach combines two tricky things, hot/unplug and migration. > > > > > > -> We can surprise-remove the PCI device and in QEMU we can do all > > > > > > necessary rollbacks transparent to management software. Will it be > > > > > > easy, probably not. > > > > > > > > This sounds 'fun' - bonus cases are things like what happens if the > > > > guest gets rebooted somewhere during the process or if it's currently > > > > sitting in the bios/grub/etc > > > > > > Um, during which process? Guests are gradually fixed to support > > > surprise removal well. Part of it is thunderbolt which makes > > > it incredibly easy. Yes - bios/grub will need to learn to > > > handle this well. > > > > Ignoring the actual mechanism of the unplug itself; there are probably > > loads of cases; e.g. > > > > running with both cards > > hot unplug real card > > start migration > > guest reboots > > Kernel sees only the virtio card > > migration completes > > hotadd the real card back > > > > so the guest has to know to pair the real card even though it booted > > with only the virtio card. > > Maybe I misunderstand, but, when the 'real card' is added back after > migration the net_failover driver in the guest will know to pair it > with the virtio card because they have the same MAC address. Did you > mean something else? OK if it knows to do that. > > I'm sure there are loads of other corners. > > Probably yes. Yeh, that was just my worry - just there's loads of this type of corner around reboots. Dave > regards, > Jens -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
WARNING: multiple messages have this Message-ID (diff)
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com> To: Jens Freimann <jfreimann@redhat.com> Cc: pkrempa@redhat.com, ehabkost@redhat.com, "Michael S. Tsirkin" <mst@redhat.com>, armbru@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, liran.alon@oracle.com, laine@redhat.com, ogerlitz@mellanox.com, ailan@redhat.com Subject: Re: [Qemu-devel] [RFC PATCH 0/2] implement the failover feature for assigned network devices Date: Mon, 8 Apr 2019 18:00:00 +0100 [thread overview] Message-ID: <20190408165959.GI2687@work-vm> (raw) Message-ID: <20190408170000.4WZ4N2w9lSq_l8kB-tUB0vNUFwBhljyR-D7Apy9o5Rw@z> (raw) In-Reply-To: <20190408130050.66zn2725wky3aoqd@jenstp.localdomain> * Jens Freimann (jfreimann@redhat.com) wrote: > On Mon, Apr 08, 2019 at 10:16:50AM +0100, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (mst@redhat.com) wrote: > > > On Fri, Apr 05, 2019 at 09:56:29AM +0100, Dr. David Alan Gilbert wrote: > > > > * Jens Freimann (jfreimann@redhat.com) wrote: > > > > > On Fri, Mar 22, 2019 at 02:44:45PM +0100, Jens Freimann wrote: > > > > > > This is another attempt at implementing the host side of the > > > > > > net_failover concept > > > > > > (https://www.kernel.org/doc/html/latest/networking/net_failover.html) > > > > > > > > > > > > The general idea is that we have a pair of devices, a vfio-pci and a > > > > > > emulated device. Before migration the vfio device is unplugged and data > > > > > > flows to the emulated device, on the target side another vfio-pci device > > > > > > is plugged in to take over the data-path. In the guest the net_failover > > > > > > module will pair net devices with the same MAC address. > > > > > > > > > > > > * In the first patch the infrastructure for hiding the device is added > > > > > > for the qbus and qdev APIs. A "hidden" boolean is added to the device > > > > > > state and it is set based on a callback to the standby device which > > > > > > registers itself for handling the assessment: "should the primary device > > > > > > be hidden?" by cross validating the ids of the devices. > > > > > > > > > > > > * In the second patch the virtio-net uses the API to hide the vfio > > > > > > device and unhides it when the feature is acked. > > > > > > > > > > > > Previous discussion: https://patchwork.ozlabs.org/cover/989098/ > > > > > > > > > > > > To summarize concerns/feedback from previous discussion: > > > > > > 1.- guest OS can reject or worse _delay_ unplug by any amount of time. > > > > > > Migration might get stuck for unpredictable time with unclear reason. > > > > > > This approach combines two tricky things, hot/unplug and migration. > > > > > > -> We can surprise-remove the PCI device and in QEMU we can do all > > > > > > necessary rollbacks transparent to management software. Will it be > > > > > > easy, probably not. > > > > > > > > This sounds 'fun' - bonus cases are things like what happens if the > > > > guest gets rebooted somewhere during the process or if it's currently > > > > sitting in the bios/grub/etc > > > > > > Um, during which process? Guests are gradually fixed to support > > > surprise removal well. Part of it is thunderbolt which makes > > > it incredibly easy. Yes - bios/grub will need to learn to > > > handle this well. > > > > Ignoring the actual mechanism of the unplug itself; there are probably > > loads of cases; e.g. > > > > running with both cards > > hot unplug real card > > start migration > > guest reboots > > Kernel sees only the virtio card > > migration completes > > hotadd the real card back > > > > so the guest has to know to pair the real card even though it booted > > with only the virtio card. > > Maybe I misunderstand, but, when the 'real card' is added back after > migration the net_failover driver in the guest will know to pair it > with the virtio card because they have the same MAC address. Did you > mean something else? OK if it knows to do that. > > I'm sure there are loads of other corners. > > Probably yes. Yeh, that was just my worry - just there's loads of this type of corner around reboots. Dave > regards, > Jens -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2019-04-08 17:00 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20190322134447.14831-1-jfreimann@redhat.com> 2019-04-04 8:29 ` [Qemu-devel] [RFC PATCH 0/2] implement the failover feature for assigned network devices Jens Freimann 2019-04-05 8:56 ` Dr. David Alan Gilbert 2019-04-05 8:56 ` Dr. David Alan Gilbert 2019-04-05 9:20 ` Jens Freimann 2019-04-05 9:20 ` Jens Freimann 2019-04-08 5:53 ` Markus Armbruster 2019-04-08 5:53 ` Markus Armbruster 2019-04-05 23:22 ` Michael S. Tsirkin 2019-04-05 23:22 ` Michael S. Tsirkin 2019-04-05 23:46 ` Eduardo Habkost 2019-04-05 23:46 ` Eduardo Habkost 2019-04-08 5:26 ` Markus Armbruster 2019-04-08 5:26 ` Markus Armbruster 2019-04-12 19:50 ` Eduardo Habkost 2019-04-12 19:50 ` Eduardo Habkost 2019-04-08 9:16 ` Dr. David Alan Gilbert 2019-04-08 9:16 ` Dr. David Alan Gilbert 2019-04-08 13:00 ` Jens Freimann 2019-04-08 13:00 ` Jens Freimann 2019-04-08 17:00 ` Dr. David Alan Gilbert [this message] 2019-04-08 17:00 ` Dr. David Alan Gilbert 2019-04-08 13:22 ` Michael S. Tsirkin 2019-04-08 13:22 ` Michael S. Tsirkin 2019-05-29 0:35 ` si-wei liu 2019-05-29 2:47 ` Michael S. Tsirkin 2019-04-04 12:53 ` Daniel P. Berrangé
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190408165959.GI2687@work-vm \ --to=dgilbert@redhat.com \ --cc=ailan@redhat.com \ --cc=armbru@redhat.com \ --cc=ehabkost@redhat.com \ --cc=jfreimann@redhat.com \ --cc=laine@redhat.com \ --cc=liran.alon@oracle.com \ --cc=mdroth@linux.vnet.ibm.com \ --cc=mst@redhat.com \ --cc=ogerlitz@mellanox.com \ --cc=pkrempa@redhat.com \ --cc=qemu-devel@nongnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).