qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 6/9] migration: modified migration QAPIs to accept 'channe


From: Het Gala
Subject: Re: [PATCH v6 6/9] migration: modified migration QAPIs to accept 'channels' argument for migration
Date: Thu, 8 Jun 2023 17:22:57 +0530
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2


On 06/06/23 3:45 pm, Het Gala wrote:
MigrateChannelList allows to connect accross multiple interfaces. Added
MigrateChannelList struct as argument to migration QAPIs.

Future patchset series plans to include multiple MigrateChannels
for multiple interfaces to be connected. That is the reason,
'MigrateChannelList'
is the preferred choice of argument over 'MigrateChannel' and making
migration QAPIs future proof.

For current patchset series, have limited the size of the list to single
element (single interface) as runtime check.

Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
Signed-off-by: Het Gala <het.gala@nutanix.com>
---
  migration/migration-hmp-cmds.c |  16 +++--
  migration/migration.c          |  34 ++++++++--
  qapi/migration.json            | 109 ++++++++++++++++++++++++++++++++-
  softmmu/vl.c                   |   2 +-
  4 files changed, 147 insertions(+), 14 deletions(-)

diff --git a/qapi/migration.json b/qapi/migration.json
index e61d25eba2..7d4160e130 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -1452,6 +1452,34 @@
      'exec': 'MigrationExecCommand',
      'rdma': 'InetSocketAddress' } }
+##
+# @MigrationChannelType:
+#
+# The migration channel-type request options.
+#
+# @main: Main outbound migration channel.
+#
+# Since 8.1
+##
+{ 'enum': 'MigrationChannelType',
+  'data': [ 'main' ] }
+
+##
+# @MigrationChannel:
+#
+# Migration stream channel parameters.
+#
+# @channel-type: Channel type for transfering packet information.
+#
+# @addr: Migration endpoint configuration on destination interface.
+#
+# Since 8.1
+##
+{ 'struct': 'MigrationChannel',
+  'data': {
+      'channel-type': 'MigrationChannelType',
+      'addr': 'MigrationAddress' } }
+
  ##
  # @migrate:
  #
@@ -1459,6 +1487,9 @@
  #
  # @uri: the Uniform Resource Identifier of the destination VM
  #
+# @channels: list of migration stream channels with each stream
+#     in the list connected to a destination interface endpoint.
+#
  # @blk: do block migration (full disk copy)
  #
  # @inc: incremental disk copy migration
@@ -1483,14 +1514,50 @@
  # 3. The user Monitor's "detach" argument is invalid in QMP and should
  #    not be used
  #
+# 4. The uri argument should have the Uniform Resource Identifier of
+#    default destination VM. This connection will be bound to default
+#    network.
+#
+# 5. For now, number of migration streams is restricted to one, i.e
+#    number of items in 'channels' list is just 1.
+#
+# 6. The 'uri' and 'channels' arguments are mutually exclusive;
+#    exactly one of the two should be present.
+#
  # Example:
  #
  # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
  # <- { "return": {} }
+# -> { "execute": "migrate",
+#      "arguments": {
+#          "channels": [ { "channel-type": "main",
+#                          "addr": { "transport": "socket",
+#                                    "type": "inet",
+#                                    "host": "10.12.34.9",
+#                                    "port": "1050" } } ] } }
+# <- { "return": {} }
+#
+# -> { "execute": "migrate",
+#      "arguments": {
+#          "channels": [ { "channel-type": "main",
+#                          "addr": { "transport": "exec",
+#                                    "args": [ "/bin/nc", "-p", "6000",
+#                                              "/some/sock" ] } } ] } }
+# <- { "return": {} }
+#
+# -> { "execute": "migrate",
+#      "arguments": {
+#          "channels": [ { "channel-type": "main",
+#                          "addr": { "transport": "rdma",
+#                                    "host": "10.12.34.9",
+#                                    "port": "1050" } } ] } }
+# <- { "return": {} }
+#
  ##
  { 'command': 'migrate',
-  'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
-           '*detach': 'bool', '*resume': 'bool' } }
+  'data': {'*uri': 'str', '*channels': [ 'MigrationChannel' ],
+           '*blk': 'bool', '*inc': 'bool', '*detach': 'bool',
+           '*resume': 'bool' } }
##
  # @migrate-incoming:
@@ -1501,6 +1568,9 @@
  # @uri: The Uniform Resource Identifier identifying the source or
  #     address to listen on
  #
+# @channels: list of migration stream channels with each stream
+#     in the list connected to a destination interface endpoint.
+#
  # Returns: nothing on success
  #
  # Since: 2.3
@@ -1516,13 +1586,46 @@
  #
  # 3. The uri format is the same as for -incoming
  #
+# 5. For now, number of migration streams is restricted to one, i.e
+#    number of items in 'channels' list is just 1.
+#
+# 4. The 'uri' and 'channels' arguments are mutually exclusive;
+#    exactly one of the two should be present.
+#
  # Example:
  #
  # -> { "execute": "migrate-incoming",
  #      "arguments": { "uri": "tcp::4446" } }
  # <- { "return": {} }
+#
+# -> { "execute": "migrate",
+#      "arguments": {
+#          "channels": [ { "channel-type": "main",
+#                          "addr": { "transport": "socket",
+#                                    "type": "inet",
+#                                    "host": "10.12.34.9",
+#                                    "port": "1050" } } ] } }
+# <- { "return": {} }
+#
+# -> { "execute": "migrate",
+#      "arguments": {
+#          "channels": [ { "channel-type": "main",
+#                          "addr": { "transport": "exec",
+#                                    "args": [ "/bin/nc", "-p", "6000",
+#                                              "/some/sock" ] } } ] } }
+# <- { "return": {} }
+#
+# -> { "execute": "migrate",
+#      "arguments": {
+#          "channels": [ { "channel-type": "main",
+#                          "addr": { "transport": "rdma",
+#                                    "host": "10.12.34.9",
+#                                    "port": "1050" } } ] } }
+# <- { "return": {} }
  ##
-{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
+{ 'command': 'migrate-incoming',
+             'data': {'*uri': 'str',
+                      '*channels': [ 'MigrationChannel' ] } }

Markus, I have tried to make the definitons short, compact and meaningful. Please have a look at it once again, and add your suggestions on what looks wrong. TIA!

Regards,
Het Gala



reply via email to

[Prev in Thread] Current Thread [Next in Thread]