From patchwork Mon Jul 10 12:27:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Het Gala X-Patchwork-Id: 13306863 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 DFFD7EB64DC for ; Mon, 10 Jul 2023 12:29:51 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIq0A-0008LF-KQ; Mon, 10 Jul 2023 08:28:26 -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 1qIq08-0008JP-T9 for qemu-devel@nongnu.org; Mon, 10 Jul 2023 08:28:25 -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 1qIpzy-0000jw-Ip for qemu-devel@nongnu.org; Mon, 10 Jul 2023 08:28:24 -0400 Received: from pps.filterd (m0127841.ppops.net [127.0.0.1]) by mx0b-002c1b01.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 36A6g0PY002141; Mon, 10 Jul 2023 05:28:11 -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=yE8QNBoBo1yNhXkzaJo4kdSTJRNOhJiLF7qssFTcp p4=; b=zNGwQ68YkupVX+xYpBPaXmFv7y3obfX4ntjEpWd/tqSCH2nj7bfvLFImY JK8tdKYZpDUj2vTmUnmRg1YaKRHsm4bobeeAGXMsgFlvg5EQxmRQKZSvLHKUJvu4 Y/RvYvqx6a/XTwxziZm11XSs0reJ5pt1DXG8QZk/fsiyi2h9pYh32hexJIZwqKSM FQUu6GhUZQUFjdFdpwlrUpNvaDqa5VIWXhNpKaPrVv60ECKKIgYPLIlsTWpSUoln sLt2x/a4auz/4GLm+rRZgDcuCjz/BYQkxZ6PBOELomDANQWOK7j1tGHDmh2zYnoZ 3V9lHmZexYXMJHLYlDbKnV6dIJddA== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2170.outbound.protection.outlook.com [104.47.55.170]) by mx0b-002c1b01.pphosted.com (PPS) with ESMTPS id 3rq5b5b2te-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jul 2023 05:28:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YRwCY24YMAyv/SvunnFQEmpJkKRecknftpFwA4GjwOmMUUYQlRK7OfIpXpk3x0cl6qI64T9AKf0m/nvfSOiyK50xjcFVdWBsUjrqWJF1h/R5oYG3WSlJLJ4K+JehC9yvoSvcA5GvBVTS/ltgc7IeyzjP7FSMCSG152Bnu95ZYXXHaglVSUhL5t1LjDdu1ya7FCF9tsJQmgypw34yjTExTBFeKZ2+HSzX7D9aAkWAMaMVZRyoF+J6NWCQ8YKnjFxbxffj/rMBV4umod7DRgIBJ93yq/9PB4hwYlm4WBbazIIflGeR63p+U6rnPHDLUfejStV4rXPdVQASQjEh99YgBg== 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=yE8QNBoBo1yNhXkzaJo4kdSTJRNOhJiLF7qssFTcpp4=; b=Q48lwgwiuYGhiPUG6neWfUppGRnDhmU6fV7ZCOnigdi0+XxgrSGVTe/7/c72KqKp8rWDk8Ps9p8kCpKa6yt4tZAOYxCrBuz+AomsZiIErPJoQGHprEuxgbUHJ8dZmCmHqWscAnEnMmunZJ71cJfgBMRmKipXUTvmff6kUWab7AAlI6E09XATGoi2TDjr5/zPj+WFHsN0tkwXdqqpav+fKx/sk/jUqf4z8swUs0oIQgdt66VZDusFcktkKGGD6Rfga4xRw41QFmJ6ICLtuheKJ6iszmT7HoDkOhqFKFtJXgtPzKM4SAlrsr2VCbO5Xznq/JPda83c+MF/xMgliCf8bw== 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=yE8QNBoBo1yNhXkzaJo4kdSTJRNOhJiLF7qssFTcpp4=; b=iOVsX8PST/Dsr4VM8SqXE2U6HUdj+nlXQAtLrqmheGyXiwgYIqoNYvqX9DJK3QCqjPVs2yB0D1bvSJgF6wXWoxNOUXM5IupCYPXx8DCAnhQ7lXcEO+HNIldHiw8lx9Yq87IHBXrG9lAAUSe2STTzBX1KLj2rrgFkBBZd/koImLDthW6lbwP2xSuSmCi38Et/xo7z4OpRV1VQ+ZeJ2kD9KyPG9QjhROBUo5vy0mnRwr9fi/5mqlCD5R8nR//TxWKbkRZ/J1eQGNS6+7daIRNBNw0O/6Hh2UaIfBQCcKaCoeOGCDryTTsEppJ39sQKciZK7yxe5VnLQ65Pa/Md9NABkQ== Received: from BYAPR02MB4343.namprd02.prod.outlook.com (2603:10b6:a03:57::18) by MW6PR02MB9934.namprd02.prod.outlook.com (2603:10b6:303:23d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.13; Mon, 10 Jul 2023 12:28:09 +0000 Received: from BYAPR02MB4343.namprd02.prod.outlook.com ([fe80::26a6:11ae:fb38:5920]) by BYAPR02MB4343.namprd02.prod.outlook.com ([fe80::26a6:11ae:fb38:5920%7]) with mapi id 15.20.6588.017; Mon, 10 Jul 2023 12:28:09 +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 v7 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol. Date: Mon, 10 Jul 2023 12:27:42 +0000 Message-Id: <20230710122750.69194-2-het.gala@nutanix.com> X-Mailer: git-send-email 2.22.3 In-Reply-To: <20230710122750.69194-1-het.gala@nutanix.com> References: <20230710122750.69194-1-het.gala@nutanix.com> X-ClientProxiedBy: PH8PR15CA0003.namprd15.prod.outlook.com (2603:10b6:510:2d2::25) To BYAPR02MB4343.namprd02.prod.outlook.com (2603:10b6:a03:57::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR02MB4343:EE_|MW6PR02MB9934:EE_ X-MS-Office365-Filtering-Correlation-Id: eb343ff1-30a8-4b89-6f40-08db81411ebf 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: bzJFUpILrq6GBPKOQzT8gNAblI1YYkLwOPA0awmRqr3wLYLSTigEyWxxWcUSDjajQmNq8BB2d0fcrN5U95grWVBhLHcin1f3DW7aNTGqO/BSnYH5Ntr/qtcr7kwmwVb8NhCK7/7yh1Gsw7t/KaPZuKDDJs5P7AaKrlQ14Svf8twytUllJ70XSQ2NZvxkeq00m6YrvIc+gQt0Z+21hZqUEsXquKqo4+Gw9Tzj469JZLFsrF+uersgH07jtz9vTRz/81fvxCfOU545ImknkOa8iTxF4xmelCB9599gGE+MminQVfFZo7B3ObtAXn8809fARUMOWmTBKt9Wg5tLmJp57OLyrdCWy+jG1qsb+Po/2yFgTXkTlQLIouq2QZiA1FBTs5KFfEEp9D6bylgPKs4KEW0MZ3UA2v7ed51M7BpFlQb3PYwFaby8x0uNd3Z9IgEFVSS80XtKrskpqMvDBDjAM9IK1bfSLG9bUn1JwmJydeVvKipNcaVHqQyrjmBEaio8tKO3tJg1LzwZMGW+uI/2V12UapIWIoHkIh3c9s2mEdBk5aLv1T/sFvIFbiyqeWCjTd8FW2AOu+RHraQO2/sqUREaA09lPTmzGJecKwHhqb6hoCxPg8/2YFAj8ql0hGBp 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)(396003)(136003)(39860400002)(366004)(376002)(346002)(451199021)(38350700002)(5660300002)(66476007)(8936002)(8676002)(44832011)(38100700002)(66946007)(66556008)(36756003)(2906002)(478600001)(6916009)(86362001)(4326008)(41300700001)(316002)(6666004)(6512007)(6486002)(66899021)(1076003)(52116002)(186003)(6506007)(107886003)(26005)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?FDWNJqCCZ1qo8lenZqswYEW+MjYk?= =?utf-8?q?8YBO1W8dfgejNmVwmJYbnb6jkBSH44dBeWwmTcbIk/ZgvrrFolYH7b9jLjlaVAK1W?= =?utf-8?q?olQGzdSpJkRXp+6VjM0P0ASR1Tj6RBPO0/sSlOvBwovASGE0678orcG5SyNg+KBVa?= =?utf-8?q?I2ybxdob1lvEKHoccdjPaZ8Zf40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A2yA7RULshNxgU86nJG6vAMRJtiKJUXd3yXt18e5s?= =?utf-8?q?LsnN2LIo2OTIr9nJbJYY8Z2MYhWmO7rgIzZgFihJrdsGOhPE8ITo7M718o9ayDC1p?= =?utf-8?q?dMDZUnMoD0PTmi8HJVnVH2M3Y4JwryrddkL6Y4VqDcgXQ35eDZfyJQE0sJ5gjW2MW?= =?utf-8?q?Aykn/JwwT5l2w2/EFVqF5LCP16K4dxT9JQ4q27YooKF7OAvSAMlgxlhl+ZGyH0sjQ?= =?utf-8?q?7541lAr2q8oeJxQrSu/WHR9gJGKx/LXXrLAsez2tNphlCmqnAEXYRHCG7CmoNFBXX?= =?utf-8?q?6FNClHazwsg54UdsfLKOhAqR/sZ29P34jo50Kc9E5kyfX9OC+IHXI3KV/loWLHN1v?= =?utf-8?q?YBkdmmoTatOc399ksDXT4FxGg7hlda88lvRFU7blwc8/yZdIq6uogKjn5u40m4c0K?= =?utf-8?q?Flz5AnnJ+ZndkOmSXthnhVq2yWtjyGZSKwYJN8hmiMSx5IrhrLHFpPzxv5MREuFP/?= =?utf-8?q?FbuoTJoJLd/z?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb343ff1-30a8-4b89-6f40-08db81411ebf X-MS-Exchange-CrossTenant-AuthSource: BYAPR02MB4343.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 12:28:09.2985 (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: ukV9CRLd9AgBxIB4he5DozFSYmsrIZvIw92B0usezJgwAzLonrBXTGxniWbjLqJ3iaNWeO8av49lKUO69qSFfA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR02MB9934 X-Proofpoint-ORIG-GUID: MIaDcasKt4Uv6X_htx_25kUwFJ0AGUhD X-Proofpoint-GUID: MIaDcasKt4Uv6X_htx_25kUwFJ0AGUhD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-10_09,2023-07-06_02,2023-05-22_02 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é Acked-by: Markus Armbruster --- qapi/migration.json | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/qapi/migration.json b/qapi/migration.json index 47dfef0278..b583642c2d 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1417,6 +1417,47 @@ ## { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} } +## +# @MigrationAddressType: +# +# The migration stream transport mechanisms. +# +# @socket: Migrate via socket. +# +# @exec: Direct the migration stream to another process. +# +# @rdma: Migrate via RDMA. +# +# Since 8.1 +## +{ 'enum': 'MigrationAddressType', + 'data': ['socket', 'exec', 'rdma'] } + +## +# @MigrationExecCommand: +# +# @args: command (list head) and arguments to execute. +# +# Since 8.1 +## +{ 'struct': 'MigrationExecCommand', + 'data': {'args': [ 'str' ] } } + +## +# @MigrationAddress: +# +# Migration endpoint configuration. +# +# Since 8.1 +## +{ 'union': 'MigrationAddress', + 'base': { 'transport' : 'MigrationAddressType'}, + 'discriminator': 'transport', + 'data': { + 'socket': 'SocketAddress', + 'exec': 'MigrationExecCommand', + 'rdma': 'InetSocketAddress' } } + ## # @migrate: #