Skip to content

migration: Add new migration channel connect and TLS upgrade APIs

Avihai Horon qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 19 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17migration: Fix logic of channels and transport compatibility checkmigration/migration.c+11 -61 reply
2/17migration: Move local_err check in migration_ioc_process_incoming()migration/migration.c+4 -41 reply
3/17migration: Rename default_channel to main_channelmigration/migration.c+5 -51 reply
4/17migration/multifd: Set p->running = true in the right placemigration/multifd.c+2 -29 replies
5/17migration/multifd: Wait for multifd channels creation before proceedingmigration/migration.c migration/multifd.c migration/multifd.h +1 more+42 -35 replies
6/17migration/tls: Rename main migration channel TLS functionsmigration/channel.c migration/tls.c migration/tls.h +1 more+16 -220 replies
7/17migration/tls: Add new migration channel TLS upgrade APImigration/tls.c migration/tls.h migration/trace-events+102 -00 replies
8/17migration: Use the new TLS upgrade API for main channelmigration/channel.c migration/tls.c migration/tls.h +1 more+17 -490 replies
9/17migration/multifd: Use the new TLS upgrade API for multifd channelsmigration/multifd.c migration/trace-events+16 -530 replies
10/17migration/postcopy: Use the new TLS upgrade API for preempt channelmigration/postcopy-ram.c migration/trace-events+7 -140 replies
11/17migration/tls: Make migration_tls_client_create() staticmigration/tls.c migration/tls.h+1 -50 replies
12/17migration/multifd: Consolidate TLS/non-TLS multifd channel error flowmigration/multifd.c+4 -110 replies
13/17migration: Store MigrationAddress in MigrationStatemigration/migration.c migration/migration.h+9 -00 replies
14/17migration: Rename migration_channel_connect()migration/channel.c migration/channel.h migration/exec.c +3 more+10 -140 replies
15/17migration: Add new migration channel connect APImigration/channel.c migration/channel.h migration/migration.c +2 more+105 -30 replies
16/17migration/multifd: Use the new migration channel connect API for multifdmigration/multifd.c migration/trace-events+21 -710 replies
17/17migration/postcopy: Use the new migration channel connect API for postcopy preemptmigration/postcopy-ram.c migration/postcopy-ram.h+42 -650 replies

Reviews trailers per patch

3 of 17 patches have a Reviewed-by or Acked-by.

PatchPeter Xu
1/17R-b
2/17R-b
3/17R-b
4/17
5/17
6/17
7/17
8/17
9/17
10/17
11/17
12/17
13/17
14/17
15/17
16/17
17/17

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/17] migration: Add new migration channel connect and TLS upgrade APIs

Hello,

Today there are several types of migration channels that can be used during migration: main migration channel, multifd channels and postcopy preempt channel. Each channel type has its own code to connect and to TLS upgrade itself when needed. There is no unified API for these tasks and it makes the code a bit unclear and cumbersome.

This series aims to solve this by introducing two new APIs for the above tasks that will replace the existing code.

The first one is an API to TLS upgrade migration channels. A new function, migration_tls_channel_connect(), is introduced and is used by main migration, multifd and postcopy preempt channels.

The second one is an API to connect migration channels. A new function, migration_channel_connect(), is introduced and is used by all migration channels other than main migration channel, i.e., multifd and postcopy preempt channels. The reason it's not used by main migration channel is because the main channel is a bit special and has different flows, and I didn't see a smooth way to include it.

Patch breakdown:
1-5: Some fixes and cleanups.
6-12: Add new migration channel TLS upgrade API.
13-17: Add new migration channel connect API.

Thanks for reviewing.

Avihai Horon (17):
migration: Fix logic of channels and transport compatibility check
migration: Move local_err check in migration_ioc_process_incoming()
migration: Rename default_channel to main_channel migration/multifd: Set p->running = true in the right place migration/multifd: Wait for multifd channels creation before
proceeding
migration/tls: Rename main migration channel TLS functions migration/tls: Add new migration channel TLS upgrade API
migration: Use the new TLS upgrade API for main channel migration/multifd: Use the new TLS upgrade API for multifd channels migration/postcopy: Use the new TLS upgrade API for preempt channel migration/tls: Make migration_tls_client_create() static migration/multifd: Consolidate TLS/non-TLS multifd channel error flow
migration: Store MigrationAddress in MigrationState
migration: Rename migration_channel_connect()
migration: Add new migration channel connect API migration/multifd: Use the new migration channel connect API for
multifd
migration/postcopy: Use the new migration channel connect API for
postcopy preempt

 migration/channel.h      |  30 +++++++--
 migration/migration.h    |   5 ++
 migration/multifd.h      |   3 +
 migration/postcopy-ram.h |   2 +-
 migration/tls.h          |  30 +++++++--
 migration/channel.c      | 106 +++++++++++++++++++++++++----
 migration/exec.c         |   2 +-
 migration/fd.c           |   2 +-
 migration/file.c         |   2 +-
 migration/migration.c    |  47 ++++++++-----
 migration/multifd.c      | 142 +++++++++++----------------------------
 migration/postcopy-ram.c | 111 +++++++++++-------------------
 migration/ram.c          |   7 ++
 migration/socket.c       |   2 +-
 migration/tls.c          |  94 +++++++++++++++++---------
 migration/trace-events   |  16 ++---
 16 files changed, 344 insertions(+), 257 deletions(-)
Signature · 1 line
2.26.3