diff mbox series

[v1,3/7] migration/tls: add MigrationState into MultiFDSendParams

Message ID 1599663177-53993-4-git-send-email-zhengchuan@huawei.com
State New
Headers show
Series *** Add Multifd support for TLS migration *** | expand

Commit Message

Zheng Chuan Sept. 9, 2020, 2:52 p.m. UTC
MigrationState is need for tls session build, add MigrationState
into MultiFDSendParams.

Signed-off-by: Chuan Zheng <zhengchuan@huawei.com>
Signed-off-by: Yan Jin <jinyan12@huawei.com>
---
 migration/multifd.c | 2 ++
 migration/multifd.h | 2 ++
 2 files changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/migration/multifd.c b/migration/multifd.c
index d044120..2e04803 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -543,6 +543,7 @@  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);
@@ -738,6 +739,7 @@  static void multifd_new_send_channel_async(QIOTask *task, gpointer opaque)
         object_unref(OBJECT(sioc));
         error_free(local_err);
     } else {
+        p->s = migrate_get_current();
         p->c = QIO_CHANNEL(sioc);
         qio_channel_set_delay(p->c, false);
         p->running = true;
diff --git a/migration/multifd.h b/migration/multifd.h
index 448a03d..8175b3c 100644
--- a/migration/multifd.h
+++ b/migration/multifd.h
@@ -66,6 +66,8 @@  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;