From patchwork Thu Jul 13 10:57:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Het Gala X-Patchwork-Id: 13311834 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 B22DAC001DC for ; Thu, 13 Jul 2023 10:58:49 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJu0y-0002TL-2W; Thu, 13 Jul 2023 06:57:40 -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 1qJu0o-0002T4-It for qemu-devel@nongnu.org; Thu, 13 Jul 2023 06:57:30 -0400 Received: from mx0a-002c1b01.pphosted.com ([148.163.151.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJu0l-0003aB-6X for qemu-devel@nongnu.org; Thu, 13 Jul 2023 06:57:30 -0400 Received: from pps.filterd (m0127837.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 36D4rtjn028091; Thu, 13 Jul 2023 03:57:22 -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=Kc7k29J7SSu5rkMtqGhCPJpuxRwa2osBLPOGNDHVE NM=; b=ZcZXylErv4okc7wnwHGclqgqFq5fDX2Re88C8lIvHD2m665XvcIdNEz+K AC8d6e+21hI5lMmUeYwZho7erFgoMZhAnIh7GxA2SSuXGt5C9bfjRoibGYhkBDE/ cImQuKDCZTDGgbnKEP+C3az3OtF9m/A/IyeEDBDzqJz2/ijODrL4+H8mCWblyP4S chFJtdz0LoFxoRcdAGb+46gIdS7S5PzNNlwK242dm44AGcgRTswO6Jj1tuXdPx2r J1zsOEORXZ/HPnrLYasqRsK/R9lORH4XCnCB1cCSd6kfjHTlh6RjLIclW/e1y/ed C5WI23EsHQlFA6t8ldpUlfFVton0Q== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2174.outbound.protection.outlook.com [104.47.55.174]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3rsyb41s42-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jul 2023 03:57:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aL0jXc8/U5puFAcu4qgQl3AxpJLNmbnEZT7chOIi1LyvOLDDyENh0nAq5c3C+EXX5xX3rZoKhclzFVttJtqe9/HF5DnnFg+EFhGJk31BD8dYm9VQjUcHFz3MvVn+w769LstvCDMwXAQsL1OvSlz9LcKSQlxZFkNAibw3nHR4dvoZhSMreQZNkwh+332AKFoNr8t5Fy5dew8EGmztnp6YJn81yLer8NFyUhr9gxC/vLd4oLKn8XRdEbfwH0RSBhr2bAoqpkLSdzG1ZLViKIX1LgQO8wMeJyX/wNjP6i3UwkV+mAMlbuls8OiKneU8nOGJbVt51wXswpyiT2k05MbN6g== 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=Kc7k29J7SSu5rkMtqGhCPJpuxRwa2osBLPOGNDHVENM=; b=F1vGKKVXz90WudszIQs3Ta74mfg5GuUWD+uQvUfhm6BIZYk6bbkpvWfyOrJEW1NplzwsnJyxhJ0gUWOmTaqm6XMTCwIa7Ub6VdCuJByZJPqe1CtuwVQdrBjFk0GqeHDio3noJiu/UO//ws/wWDyVqm447Tu2gvo4qZ310t8vVqEvXKL2D5gkdAxvxgd4aI26BZ/rve6ONE9zA1V8k9XxnwT1QP+eyF+/udL+AQQPLCwY05Fm/BQb88sCU1lvN+AF2zz0RCp62zroAST+5ijGMhw00AJVH9USorgR+KUJcC+9cL8ao3YiVFTqkJxrk/E/I/ZK3KYhwMH2XLiFJf+LcA== 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=Kc7k29J7SSu5rkMtqGhCPJpuxRwa2osBLPOGNDHVENM=; b=yMTEcrhryTQgSZ9oESLc5hEfHxintL29oIO6abV01BwE+e1rnX86EcWneJhXQKhuNotar0vMxLe0a/8uERioqVCediWPFMeEDUSPmpg+bWKzni3aMsgfpUY4MRDSvuClQ76+BVqBcU4dCs5GZVd6UJANGd4nXJRmkdeS4E/Kgcj3GQfIUc4U7QI5jqGHk9gmpm8mGtO74zgDweK4LmE3fi/b4bdQBVpzAcmTy9yvkpuRXBC6KGFTzlRV5SSzVkoBDQP8snRWI63thYgEBe5UYx+NDEOeMIRi0DBCDHARC9bVOTP4LUXZkIwDWO6hF+rRIFCPT+60Cz7tPDMMizawrA== Received: from BYAPR02MB4343.namprd02.prod.outlook.com (2603:10b6:a03:57::18) by CH0PR02MB7946.namprd02.prod.outlook.com (2603:10b6:610:103::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 10:57:20 +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.024; Thu, 13 Jul 2023 10:57:20 +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 v8 1/9] migration: New QAPI type 'MigrateAddress' Date: Thu, 13 Jul 2023 10:57:05 +0000 Message-Id: <20230713105713.236883-2-het.gala@nutanix.com> X-Mailer: git-send-email 2.22.3 In-Reply-To: <20230713105713.236883-1-het.gala@nutanix.com> References: <20230713105713.236883-1-het.gala@nutanix.com> X-ClientProxiedBy: PH0P220CA0014.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:d3::28) To BYAPR02MB4343.namprd02.prod.outlook.com (2603:10b6:a03:57::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR02MB4343:EE_|CH0PR02MB7946:EE_ X-MS-Office365-Filtering-Correlation-Id: a22388c8-6367-4a3b-0997-08db838fee16 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: WoOItqmdLvXHdUX5j1oIbutw5kgMJu3yesJBoiKo9ChvV3IC9u2XcuaCp6EHGs11+Rw791JQ33dHYyh1JVfwidJrCNffV6JOICBi7uCKH9yMxwnbx2fsPfTHZ96j6xcC4KVKaEmZtNITBarNsyfzsNwv8CCdKmLazI7GD74OjLX9xgKEUqPo+/0GeRkH9gHkYNZT7KKzcCVcrW3LaNEYd3Jp+EndKZJvmDM5BCA8cmLLWGm9nOoiUG37lrb3wVZ8hRwgHIUgIwrlkOPJdVgm13GPYqTgCDKu9jobt0RrkXUJxyKj2lBDlj4a0f46wfeWqJXoov+NL+XAbIoit8Rd+l+2opW6qY2UvUzELdeosIrZFmC2flhaH6JTvLKdLYbdPmWHDxZGyUaa9e+MEO5V5paZEboV8uu+f33zru+AitZNU2hr6DRgPjODFL2NB3MdMoJrCcw3nLiXfvqCXQj6busa/NBCW9eQEg2iMifWzVBGEj8IUOD+zq6H1lfE1T3q6FDQfnGC9EAi5mYH2PA+Iv816kwT7fDIuiFu/JwT+81Ww/vRPJXHFh8H9TOuvIvhimPNo+NQLgF1szxaEUwwObmG7uXA3/LsCzf9ZPBh2xbPxdiYGrTrDS9dSUvpe/kU 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)(346002)(376002)(39860400002)(396003)(136003)(366004)(451199021)(44832011)(5660300002)(8936002)(66556008)(8676002)(4326008)(41300700001)(316002)(66476007)(2906002)(6916009)(66946007)(6666004)(6486002)(6512007)(52116002)(1076003)(6506007)(26005)(186003)(66899021)(107886003)(2616005)(36756003)(86362001)(38350700002)(38100700002)(478600001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?SKUt8iEtL7PTCjUVN5w0AIhHsNzk?= =?utf-8?q?arj6zzc2kv3T9YmfKXWXs5E5O6PgB9xO1K7KKOco+HmAiEO03Y8+OYohUTelj7uqD?= =?utf-8?q?CM7krSLhHFXLfN+jEw7xP5IF0C6fgZZj5m5bx7BwI6zPN7MXCnh5NhiREBY2cz2MO?= =?utf-8?q?rLChnonfgGRAYW7elFSlEJaxf6lVSutACosy7a8CrsYV7RcTyOTwKMaxntGO2k5e3?= =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ExxXiq0NYQdYoaO6t+/7w5tdDtTd0di2paoVFVLQbC68Ls1AN8S6g88fSSp1dIEvw?= =?utf-8?q?WpAZQ+71ZR0uic/cSHy7uOWUreUpK8LDf6JBXjrIGRWffope9mJM2D05ekdvccFPW?= =?utf-8?q?hKAQMqtIlkINXWgnJ6EJtwifCUV3tYAVsbymH3fJOen7T/dRllCk4pmVtQebuob77?= =?utf-8?q?l6pEwTZe5Loz6eXN1gvc4IbhUhJ1/IBPbMfkBMqbM3vP+V+eFYfwfKtt9GgWxitLV?= =?utf-8?q?uG3jV/qhCKS/euvlkcYuLvZELBlyLCF8V22Y+EaYAW5pFxMUKOyWZmgCw+tbT5TF5?= =?utf-8?q?DPdy8lZMbNUFjInwI0doNAgBv4ZnQcDeKIrBpgC67isvgJN67xz8R/necRCPkfhiq?= =?utf-8?q?oHggesbGn8i4V9SXc1APpd1u6JyZqNcQf2N+XhZ87IWaIZ82Bgbp1PjuqU+/lotXU?= =?utf-8?q?CKmkI1kQIvV6?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: a22388c8-6367-4a3b-0997-08db838fee16 X-MS-Exchange-CrossTenant-AuthSource: BYAPR02MB4343.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 10:57:20.2773 (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: CrNB6UEXtG4UqshfxVzUoNnEpEFDozrdonUagpebwbx2+a6Ct3tAp3L4kyesPGyEI4eAr3A/PJxX6c8+lAuVhA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR02MB7946 X-Proofpoint-ORIG-GUID: M6wYZ8CnXIfkAe6MqYptAZojSKaWgOrT X-Proofpoint-GUID: M6wYZ8CnXIfkAe6MqYptAZojSKaWgOrT 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-13_04,2023-07-11_01,2023-05-22_02 X-Proofpoint-Spam-Reason: safe Received-SPF: pass client-ip=148.163.151.68; envelope-from=het.gala@nutanix.com; helo=mx0a-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 type string. The current implementation follows double encoding scheme for fetching migration parameters like '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. Note: this commit only adds the type, and actual uses comes in later commits. 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: #