[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/26] migration/tls: add tls_hostname into MultiFDSendParams
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 19/26] migration/tls: add tls_hostname into MultiFDSendParams |
Date: |
Fri, 25 Sep 2020 13:06:48 +0100 |
From: Chuan Zheng <zhengchuan@huawei.com>
Since multifd creation is async with migration_channel_connect, we should
pass the hostname from MigrationState to MultiFDSendParams.
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com>
Signed-off-by: Yan Jin <jinyan12@huawei.com>
Message-Id: <1600139042-104593-4-git-send-email-zhengchuan@huawei.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
migration/multifd.c | 5 +++++
migration/multifd.h | 2 ++
2 files changed, 7 insertions(+)
diff --git a/migration/multifd.c b/migration/multifd.c
index fd57378db8..de34276c43 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -548,6 +548,8 @@ void multifd_save_cleanup(void)
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;
@@ -751,10 +753,12 @@ int multifd_save_setup(Error **errp)
int thread_count;
uint32_t page_count = MULTIFD_PACKET_SIZE / qemu_target_page_size();
uint8_t i;
+ MigrationState *s;
if (!migrate_use_multifd()) {
return 0;
}
+ s = migrate_get_current();
thread_count = migrate_multifd_channels();
multifd_send_state = g_malloc0(sizeof(*multifd_send_state));
multifd_send_state->params = g_new0(MultiFDSendParams, thread_count);
@@ -779,6 +783,7 @@ 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->tls_hostname = g_strdup(s->hostname);
socket_send_channel_create(multifd_new_send_channel_async, p);
}
diff --git a/migration/multifd.h b/migration/multifd.h
index 448a03d89a..8d6751f5ed 100644
--- a/migration/multifd.h
+++ b/migration/multifd.h
@@ -71,6 +71,8 @@ typedef struct {
uint8_t id;
/* channel thread name */
char *name;
+ /* tls hostname */
+ char *tls_hostname;
/* channel thread id */
QemuThread thread;
/* communication channel */
--
2.26.2
- [PULL 09/26] migration/dirtyrate: Compare page hash results for recorded sampled page, (continued)
- [PULL 09/26] migration/dirtyrate: Compare page hash results for recorded sampled page, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 10/26] migration/dirtyrate: skip sampling ramblock with size below MIN_RAMBLOCK_SIZE, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 11/26] migration/dirtyrate: Implement set_sample_page_period() and is_sample_period_valid(), Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 12/26] migration/dirtyrate: Implement calculate_dirtyrate() function, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 13/26] migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 14/26] migration/dirtyrate: Add trace_calls to make it easier to debug, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 15/26] migration: Truncate state file in xen-save-devices-state, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 16/26] migration: increase max-bandwidth to 128 MiB/s (1 Gib/s), Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 17/26] migration/tls: save hostname into MigrationState, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 18/26] migration/tls: extract migration_tls_client_create for common-use, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 19/26] migration/tls: add tls_hostname into MultiFDSendParams,
Dr. David Alan Gilbert (git) <=
- [PULL 20/26] migration/tls: extract cleanup function for common-use, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 21/26] migration/tls: add support for multifd tls-handshake, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 22/26] migration/tls: add trace points for multifd-tls, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 24/26] virtiofsd: document cache=auto default, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 25/26] virtiofsd: Used glib "shared" thread pool, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 26/26] virtiofsd: Add -o allow_direct_io|no_allow_direct_io options, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 23/26] monitor: Use LOCK_GUARD macros, Dr. David Alan Gilbert (git), 2020/09/25
- Re: [PULL 00/26] migration and friends queue, no-reply, 2020/09/25