qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Leonardo Brás" <leobras.c@gmail.com>
To: Peter Xu <peterx@redhat.com>, lukasstraub2@web.de
Cc: qemu-devel@nongnu.org, berrange@redhat.com,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Juan Quintela <quintela@redhat.com>
Subject: Re: [PATCH v3 1/1] yank: Unregister function when using TLS migration
Date: Tue, 01 Jun 2021 17:49:09 -0300	[thread overview]
Message-ID: <bfff62aae4a7376d1f59de595a7f3f960202ebec.camel@gmail.com> (raw)
In-Reply-To: <YLZJME3kiFe0rMRe@t490s>

On Tue, 2021-06-01 at 10:50 -0400, Peter Xu wrote:
> On Tue, Jun 01, 2021 at 02:40:31AM -0300, Leonardo Bras wrote:
> > [...]
> >  inside migration_channel_connect() and
> > migration_channel_process_incoming() move yank_register_function()
> > so
> > it only runs once on a TLS migration.
> 
> Slightly inaccurate I guess, as it was run once too before this
> patch, but not
> paired for tls?

Yeah, I think I got confused over this:
I remembered having multiple instances of yank_register_function()
during TLS migration on qemu.org/master, but after re-testing it, I
think it was in fact something to do with V1 and V2.

So, yes, that's correct, in qemu.org/master there was a single
yank_register_function() and no pairing yank_unregister_function()
during TLS migration. 

> 
> IIUC when we call the 2nd time at below chunk we won't register
> again:
> 
>         if (object_dynamic_cast(OBJECT(ioc),
> TYPE_QIO_CHANNEL_SOCKET)) {
>             yank_register_function(MIGRATION_YANK_INSTANCE,
>                                    migration_yank_iochannel,
>                                    QIO_CHANNEL(ioc));
>         }
> 
> Because the 2nd call will be TYPE_QIO_CHANNEL_TLS, so
> object_dynamic_cast()
> will return with a failure, I think (note, TYPE_QIO_CHANNEL_TLS's
> parent is
> TYPE_QIO_CHANNEL, not TYPE_QIO_CHANNEL_SOCKET).
> 
> > 
> > Fixes: b5eea99ec2f ("migration: Add yank feature", 2021-01-13)
> > Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1964326
> > Signed-off-by: Leonardo Bras <leobras.c@gmail.com>
> 
> Reviewed-by: Peter Xu <peterx@redhat.com>
> 
> Thanks Leo!

Thank you Peter!





  parent reply	other threads:[~2021-06-01 20:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01  5:40 [PATCH v3 1/1] yank: Unregister function when using TLS migration Leonardo Bras
2021-06-01 11:00 ` Lukas Straub
2021-06-01 17:48   ` Leonardo Brás
2021-06-01 14:50 ` Peter Xu
2021-06-01 15:32   ` Lukas Straub
2021-06-01 16:04     ` Peter Xu
2021-06-01 20:49   ` Leonardo Brás [this message]
2021-06-08 17:51 ` Dr. David Alan Gilbert
2021-06-14 11:57 ` Dr. David Alan Gilbert
2021-06-27 11:10   ` Alexander Graf
2021-06-28 11:28     ` Dr. David Alan Gilbert
2021-06-28 13:12       ` Alexander Graf
2021-06-28 16:35         ` 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=bfff62aae4a7376d1f59de595a7f3f960202ebec.camel@gmail.com \
    --to=leobras.c@gmail.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=lukasstraub2@web.de \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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: link
Be 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).