From patchwork Fri May 19 09:46:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Het Gala X-Patchwork-Id: 13248127 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E750BC77B75 for ; Fri, 19 May 2023 09:48:34 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzwh1-0000AN-NF; Fri, 19 May 2023 05:46:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzwgx-00009H-KB for qemu-devel@nongnu.org; Fri, 19 May 2023 05:46:32 -0400 Received: from mx0b-002c1b01.pphosted.com ([148.163.155.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzwgu-0008RH-Sg for qemu-devel@nongnu.org; Fri, 19 May 2023 05:46:30 -0400 Received: from pps.filterd (m0127844.ppops.net [127.0.0.1]) by mx0b-002c1b01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34J5ECPH005134; Fri, 19 May 2023 02:46:26 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=proofpoint20171006; bh=PWv0dLSW9skaAjax9Lvcd+8+cGRLygn4rK/llLhQdJQ=; b=e3XoJU049PEQigJlbYfBBHzHaAxc5pizBaMUCHwHPMJdgx30xZbHWZYOmxg8ZY3Koznb xXv2e0+c0KqRlTj0rwzoKnXDotcE4YDDnOY/gRQn9eR/DDuCD2Xrc2RtOUThQvwN815F AcpYvS6AcM7VQA316c83uwsMFAbUwlZ6eHrfxr/7ZSBGiLsDoCrlfUF06gOpmRo4zXwD QcK2QG0H5gcpBRRLfMsJTsQUp3vGjhObvPUE9mhesTqWh7LffpbkXozL64d42L89TUl5 8nNhVzCeDZBFEEVcJNQsYGtY/CNeZYk/5JHPUSOOje9CYRzoo1ctmfML9EeVAiBvvwE3 WA== Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2049.outbound.protection.outlook.com [104.47.56.49]) by mx0b-002c1b01.pphosted.com (PPS) with ESMTPS id 3qmw0vda29-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 May 2023 02:46:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZuJ4tiHAjAPSdy7MIOTm7fyexd9Y4dwf071ghQSlDp9Z+bavQ+U5Ufy/JibWqG0S+KaAboDcNrmBbFLCGDHXA1jE68MifHLqHz4UHTLdokB6IwVNPaaGQmQjCBZqmpAnUC02WUkyVtUDTvyK0raf/lv1pG5TES22TYGous6MWLe5dTIFRk0oNNlIzq0obhHfMz5JpXHz1JNWMy6SBJO8FcdgDGk3NUbSk/dAtOvQFy1z9gYbnoE+v9K7o182fagToPYCc5Mt5e8t97G+GhNxYHFWE5SzzllwHWsxrqBa2P69tfiFKa4qc01okP8XOJysLJJS0uGBjVMtEh79m/6r4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PWv0dLSW9skaAjax9Lvcd+8+cGRLygn4rK/llLhQdJQ=; b=Y7xg3ew4hBrOb6I0b0EET6pavhHrsjSpLbFP5x/Jxlpbv+JYeMit5RnkxxqQ9S9+xmqlEKCeXwHTFLp/Y+b7CUjfOBuFYGgpJFG1xJ+5xSwhI+enu6lk+8Op2ZXbDyQEICIHW5psmQoiA9DlbIZoY7V0amwfeBdV7Cy6vee52TrQcvDQBGpZMPDggexUwtfeJuPwow0aa08Mh5PKl+rZkttwRwchEDfS7pec5hpx2QO3sBBQdWkaZuKcrSn1+wl8alHQM2Shw7W+c5STVkKupuuqes4TMWQ3VO+Se3UKZJzZ529gJP0bzHqGHXYJdrGBt+n5k8+Tv84FGnX0AiqAjw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PWv0dLSW9skaAjax9Lvcd+8+cGRLygn4rK/llLhQdJQ=; b=RQhOxibmIPJnXjlaWYNuw0mPXTrjlgRn9Yhf/qCGFlO+FYpAx/wxiOu/FeGthJsMaCo+j+EsGkz4f62lwPxcAT2U3LiwZZ6YtNGS4mwwufVO7CA3mZzkAFz/lbXYaK4zoz4lW9Tec0LAxmcXUH7+YUrTyFLnrKM480izKrqsnBzc4WiX2K33GF2HyRGIsX5NOdgMX9hRsolm4+dgPafJSNzMVdqOEbUj/m2lcFoa8T7EO0GCDdwU3+c6YZ3SYNU6LVh7rnBFTi/WeCCNCN39/PpKuE2gqmuVuosyB8fDPqEobWCQgdkhk4XEEFAri4ZbQiCO/59lBuL1iDao9zdOYw== Received: from BYAPR02MB4343.namprd02.prod.outlook.com (2603:10b6:a03:57::18) by DM8PR02MB7912.namprd02.prod.outlook.com (2603:10b6:8:11::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.21; Fri, 19 May 2023 09:46:24 +0000 Received: from BYAPR02MB4343.namprd02.prod.outlook.com ([fe80::4500:569:a3d6:71c9]) by BYAPR02MB4343.namprd02.prod.outlook.com ([fe80::4500:569:a3d6:71c9%7]) with mapi id 15.20.6411.019; Fri, 19 May 2023 09:46:24 +0000 From: Het Gala To: qemu-devel@nongnu.org Cc: prerna.saxena@nutanix.com, quintela@redhat.com, dgilbert@redhat.com, pbonzini@redhat.com, berrange@redhat.com, armbru@redhat.com, eblake@redhat.com, manish.mishra@nutanix.com, aravind.retnakaran@nutanix.com, Het Gala Subject: [PATCH v5 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol. Date: Fri, 19 May 2023 09:46:09 +0000 Message-Id: <20230519094617.7078-2-het.gala@nutanix.com> X-Mailer: git-send-email 2.22.3 In-Reply-To: <20230519094617.7078-1-het.gala@nutanix.com> References: <20230519094617.7078-1-het.gala@nutanix.com> X-ClientProxiedBy: BY5PR13CA0031.namprd13.prod.outlook.com (2603:10b6:a03:180::44) To BYAPR02MB4343.namprd02.prod.outlook.com (2603:10b6:a03:57::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR02MB4343:EE_|DM8PR02MB7912:EE_ X-MS-Office365-Filtering-Correlation-Id: 8350c28a-3208-4189-7a15-08db584de895 x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x363LYGamy/23Pib6JotCCGvEKECBgOB4Ah8HPLx7Fuw1F5CIpDgVXjDWE6xAqIwfAmTCJ5COODhb/d5An+kZ7WyUpYvC/7Jx8f9dpmaPpoV2fgU5iJITv7+ebLbNfHDcNvK6wPag3k8DETCQCiMfe58rWysJeTdLN5lDi1KSUx5kGKai8VQDEWdwZMKxJ+ha1szy6CgMEJmXsPP+veAIVbSCl1+MPbGbKqSj5tcLtWyyB6z32M68u2LK6QPAwcsVL2XFBfSct4ps0h703xp+7jmaKR+WGMWvDgXNEbkBPvH9NpbAdERW//x452hzlVSYO6+CYaREeCZNmrIi0LO6JwvlqjY+auyH8RMdvEezJZgCj41dDhK2Q7M/DKMjIJFxrRhbFzSOkyUkDkxZfXD9QC1RBCZ5Zefw0dn3mwTSI1BVCyzZRIVksMZ4PN1n/YAqIpFkP/3lLVuMvvzkmi0KHp0tTyGG7tGnbeWZpQRgaFz66sG7LEEb1m8+TIMI0oYzXHDOxHPFOGexGwJQ4X3M4eW4MUdq/Iqgh8IART3JQISWNQYeajS40BGXo++rbc7P1D/qk3+RjPcOYlAiy9fk6m+QfR0w9P3gLQ+69u6waqyrQjHZbS/Agcn7KRkaGEQ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR02MB4343.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(39860400002)(136003)(376002)(396003)(366004)(346002)(451199021)(66899021)(36756003)(44832011)(8676002)(8936002)(5660300002)(316002)(41300700001)(66476007)(38350700002)(4326008)(38100700002)(6916009)(86362001)(66556008)(66946007)(107886003)(6512007)(6506007)(1076003)(26005)(2906002)(186003)(52116002)(6486002)(478600001)(6666004)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?kiBgvey+dPp/cN7yQL9YePDptEv8?= =?utf-8?q?PvwJHklq+MHnn1/wTLU4MNn6CQO6JwfZlRfF6vvCcrdCSmeZi1081HbK+jekHCPe0?= =?utf-8?q?0JJcH4gqeiDDRiH0jAHuomWThNaNYws6MPzjFVU766tHGSbeI061WzZfYnZzJXpls?= =?utf-8?q?zQ1sqrl/57HzAthze3+6yBqTJF39gQE7cNDiPyhAW6fvRCrFWtAXrr5j1URUuCYEd?= =?ut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utf-8?q?oUXQNLsByBZGBXm0mSxG9kL7XpxzCog5Cwl/diMM/i5gPjOv9h8vy+Yl6gpXf7q0W?= =?utf-8?q?GAlWbt1+u3G82jVH9zjvowCg909N5ArhjMQoEgrEnV1elv8L3o0JWvUAu4hFzs3uL?= =?utf-8?q?vhm9x3dKYu1hGMQvazkszCseQ84VdGa5AasEbHMMnebhNlSgEV5jvj6rSInQktPkB?= =?utf-8?q?Mw6jviLzkg6ZyOF+EgZBVcQ+v4k+VCg9MrP9YtVHiX544FcKMLSvAijo4iHctXxxj?= =?utf-8?q?SYFNuXCE4uG15vb8Ys8x2TW0mjslYHeIux4mKMsFZChTRCPg6fraTVK1/0qr+n6zZ?= =?utf-8?q?YJ6FZlmnOKH8Pd8Xv7F9ARNpuNzjdkdpz+ZlqJADo9boFyftskl6y4NJcCb6S9rgf?= =?utf-8?q?uXVEeHjt+4Lk37Q0LlzK4wrToV41LMNaCIBD2hQKIxY3nIAcSlM0zzHs42+23k+qu?= =?utf-8?q?23BNFPhIwyB1?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8350c28a-3208-4189-7a15-08db584de895 X-MS-Exchange-CrossTenant-AuthSource: BYAPR02MB4343.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2023 09:46:24.3380 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xUVKbLjIHYTmTK8kZ7CraSdecbRVhUkBZYHErSHL2pnDinpk6VDlWvYrNTfwUW37AN/DxdmnhTofrQcHc97EgQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR02MB7912 X-Proofpoint-ORIG-GUID: t1xgrJC0m_lF783KDlYVBdNEitTnT_9o X-Proofpoint-GUID: t1xgrJC0m_lF783KDlYVBdNEitTnT_9o X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-19_05,2023-05-17_02,2023-02-09_01 X-Proofpoint-Spam-Reason: safe Received-SPF: pass client-ip=148.163.155.12; envelope-from=het.gala@nutanix.com; helo=mx0b-002c1b01.pphosted.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org This patch introduces well defined MigrateAddress struct and its related child objects. The existing argument of 'migrate' and 'migrate-incoming' QAPI - 'uri' is of string type. The current migration flow follows double encoding scheme for fetching migration parameters such as 'uri' and this is not an ideal design. Motive for intoducing struct level design is to prevent double encoding of QAPI arguments, as Qemu should be able to directly use the QAPI arguments without any level of encoding. Suggested-by: Aravind Retnakaran Signed-off-by: Het Gala Reviewed-by: Juan Quintela Reviewed-by: Daniel P. Berrangé --- qapi/migration.json | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/qapi/migration.json b/qapi/migration.json index 179af0c4d8..c500744bb7 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1407,6 +1407,47 @@ ## { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} } +## +# @MigrateTransport: +# +# The supported communication transport mechanisms for migration +# +# @socket: Supported communication type between two devices for migration. +# Socket is able to cover all of 'tcp', 'unix', 'vsock' and +# 'fd' already +# +# @exec: Supported communication type to redirect migration stream into file. +# +# @rdma: Supported communication type to redirect rdma type migration stream. +# +# Since 8.1 +## +{ 'enum': 'MigrateTransport', + 'data': ['socket', 'exec', 'rdma'] } + +## +# @MigrateExecCommand: + # + # Since 8.1 + ## +{ 'struct': 'MigrateExecCommand', + 'data': {'args': [ 'str' ] } } + +## +# @MigrateAddress: +# +# The options available for communication transport mechanisms for migration +# +# Since 8.1 +## +{ 'union': 'MigrateAddress', + 'base': { 'transport' : 'MigrateTransport'}, + 'discriminator': 'transport', + 'data': { + 'socket': 'SocketAddress', + 'exec': 'MigrateExecCommand', + 'rdma': 'InetSocketAddress' } } + ## # @migrate: #