All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Chuan Zheng <zhengchuan@huawei.com>
Cc: zhang.zhanghailiang@huawei.com, quintela@redhat.com,
	yuxiating@huawei.com, qemu-devel@nongnu.org,
	xiexiangyou@huawei.com, dgilbert@redhat.com,
	alex.chen@huawei.com, jinyan12@huawei.com
Subject: Re: [PATCH v3 3/6] migration/tls: add MigrationState and tls_hostname into MultiFDSendParams
Date: Mon, 14 Sep 2020 10:02:09 +0100	[thread overview]
Message-ID: <20200914090209.GD1252186@redhat.com> (raw)
In-Reply-To: <1599965256-72150-4-git-send-email-zhengchuan@huawei.com>

On Sun, Sep 13, 2020 at 10:47:33AM +0800, Chuan Zheng wrote:
> MigrationState is need for tls session build and tls hostname is need
> for tls handshake, add both MigrationState and tls_hostname
> into MultiFDSendParams.
> 
> Signed-off-by: Chuan Zheng <zhengchuan@huawei.com>
> Signed-off-by: Yan Jin <jinyan12@huawei.com>
> ---
>  migration/multifd.c | 5 +++++
>  migration/multifd.h | 4 ++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/migration/multifd.c b/migration/multifd.c
> index d044120..3e41d9e 100644
> --- a/migration/multifd.c
> +++ b/migration/multifd.c
> @@ -543,11 +543,14 @@ void multifd_save_cleanup(void)
>  
>          socket_send_channel_destroy(p->c);
>          p->c = NULL;
> +        p->s = NULL;
>          qemu_mutex_destroy(&p->mutex);
>          qemu_sem_destroy(&p->sem);
>          qemu_sem_destroy(&p->sem_sync);
>          g_free(p->name);
>          p->name = NULL;
> +        g_free(p->tls_hostname);
> +        p->tls_hostname = NULL;
>          multifd_pages_clear(p->pages);
>          p->pages = NULL;
>          p->packet_len = 0;
> @@ -779,6 +782,8 @@ int multifd_save_setup(Error **errp)
>          p->packet->magic = cpu_to_be32(MULTIFD_MAGIC);
>          p->packet->version = cpu_to_be32(MULTIFD_VERSION);
>          p->name = g_strdup_printf("multifdsend_%d", i);
> +        p->s = migrate_get_current();
> +        p->tls_hostname = g_strdup(p->s->hostname);
>          socket_send_channel_create(multifd_new_send_channel_async, p);
>      }
>  
> diff --git a/migration/multifd.h b/migration/multifd.h
> index 448a03d..2b400e7 100644
> --- a/migration/multifd.h
> +++ b/migration/multifd.h
> @@ -66,11 +66,15 @@ typedef struct {
>  } MultiFDPages_t;
>  
>  typedef struct {
> +    /* Migration State */
> +    MigrationState *s;
>      /* this fields are not changed once the thread is created */
>      /* channel number */
>      uint8_t id;
>      /* channel thread name */
>      char *name;
> +    /* tls hostname */
> +    char *tls_hostname;

Why do we need this, when it is already accessible from the
MigrationState field you're adding


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2020-09-14  9:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-13  2:47 [PATCH v3 0/6] *** Add Multifd support for TLS migration *** Chuan Zheng
2020-09-13  2:47 ` [PATCH v3 1/6] migration/tls: save hostname into MigrationState Chuan Zheng
2020-09-14  9:00   ` Daniel P. Berrangé
2020-09-14 11:22     ` Zheng Chuan
2020-09-13  2:47 ` [PATCH v3 2/6] migration/tls: extract migration_tls_client_create for common-use Chuan Zheng
2020-09-13  2:47 ` [PATCH v3 3/6] migration/tls: add MigrationState and tls_hostname into MultiFDSendParams Chuan Zheng
2020-09-14  9:02   ` Daniel P. Berrangé [this message]
2020-09-14  9:20     ` Zheng Chuan
2020-09-14  9:26       ` Daniel P. Berrangé
2020-09-14  9:36         ` Zheng Chuan
2020-09-13  2:47 ` [PATCH v3 4/6] migration/tls: extract cleanup function for common-use Chuan Zheng
2020-09-13  2:47 ` [PATCH v3 5/6] migration/tls: add support for multifd tls-handshake Chuan Zheng
2020-09-13  2:47 ` [PATCH v3 6/6] migration/tls: add trace points for multifd-tls Chuan Zheng
2020-09-14  8:55   ` 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=20200914090209.GD1252186@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.chen@huawei.com \
    --cc=dgilbert@redhat.com \
    --cc=jinyan12@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=xiexiangyou@huawei.com \
    --cc=yuxiating@huawei.com \
    --cc=zhang.zhanghailiang@huawei.com \
    --cc=zhengchuan@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.