From patchwork Fri Jul 21 14:49:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Het Gala X-Patchwork-Id: 13322098 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 27757C001E0 for ; Fri, 21 Jul 2023 14:50:17 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qMrRj-0002j5-Gv; Fri, 21 Jul 2023 10:49:32 -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 1qMrRg-0002ew-JK for qemu-devel@nongnu.org; Fri, 21 Jul 2023 10:49:28 -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 1qMrRe-0004lW-Tx for qemu-devel@nongnu.org; Fri, 21 Jul 2023 10:49:28 -0400 Received: from pps.filterd (m0127838.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36LCwUEq028352; Fri, 21 Jul 2023 07:49:25 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h= from:to:cc:subject:date:message-id:references:in-reply-to :content-type:content-id:content-transfer-encoding:mime-version; s=proofpoint20171006; bh=DZoVG4Hyk9lWJBTZiGUC+AfIlKGUOqYEFcO/lc HEz/M=; b=TdcBgdow6S32GzS2a6P34qju5l6C//JuH4i7d5AdUxIUNFUSpprEEn in6MO3EKQJEpZO+y6mKBQGWLuwPcPuu7Ji7huWn5s9mlRJy3pb7gCK1Z+/srxDsi FFDTH6TmkON/OMwKhjCiWeRuiZxJ5JZLTYPQWGT8w6kNaBKJ96NfyM/Hmv8VoFAm PFDvTZ5zK0rptUWqL0DTPX/ntU7FOrkoZoQKLRM2XIZUBXe2JdVAIuRu32KHc++6 K25nTVbig2iG2tWQuKlntsWCO0TLXoucSHZfScXas/IwV78KjZxBf7DAHCA2flL7 5wCJVGQmeXaZEIhLhXsWr1uFuxZzG8oA== Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2102.outbound.protection.outlook.com [104.47.55.102]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3rx3fmxgf2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jul 2023 07:49:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eEvLT5zhdmGfbykpiqepyGzWopLwhWbdojgjZsJrvzVy2q7aOzN+zxXbKaGku/LvGEx4Dt/bq2/HGBixXh8S0Ed8ZZ/un8si/BQTGuVeGDzEo/gdYaCOIqP4hmmoFdzHikKot/BxHv2Snr1aV5JJfv5DRPdCeuEg3nL9/W7VIMG95RlMIH7aPP69e9Zctnk7kJYzg8ZQ8ltYaMk8roZlKd7AhGXyL9tmM/5MMG7At2wx3TJ2VvesrmWE/1Ouh/dyWOSi1e8PKSzryU4ak9k1d0VD4EclcYV8OO1PevQAzBhfpvfLPBJefEzragJgiBc8yyHZAY97ckzB9lgSeMLvxQ== 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=DZoVG4Hyk9lWJBTZiGUC+AfIlKGUOqYEFcO/lcHEz/M=; b=mTG9fswANoEwIbbtsHGMMJd3XvTqN1PMI8xZpdMPUOz9UGb+CX6y+DFxGtW6xU1EwLNEonRL4IxmUTxK2kuvSMBnEF12j2OEMZX6Dt6OOFVCj7VRpmtrZbl6UcMJT3shwd4XI6fOxakmdiODFYbCrY0VgEdTmn6+iBbp8505ALWbcZyOxxuqbRX6ZFO+DiZpgEpvh8l+46QfkrQBdBJcxpCg81Dp2P1na6+koohRpcgzPlRMv/L3x4ShGwZ2aJdvbL3suHqJmigetdj9MSE4c3ytPDLMBgFaPSgNtaP/3lrv3oLGMOI8uPfhfWnSX/5eKusvv3n00shlXroH7hNTlw== 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=DZoVG4Hyk9lWJBTZiGUC+AfIlKGUOqYEFcO/lcHEz/M=; b=VTFDGyhjeuurZzy677C2UrCVveIKEmR0vgHmHW4Qy947dXHc6pO3K3RwCwNN1MoD4QoSXuS1toCGHoeln6w9iSo0mTa8x013OHsZlab1ayK/c9k88n7iruNKvLw9jcUVJcx8hQAqJ4nF1qq/5O15As8W4i/lkqY73QHKenQqryuqGx4lHn8z2QnpuE8iXHd0YqneOAaN/gZfpjxwEv4n9ZnkjQPmIP1dHsoS0Y6Jrm9S2JbcP73PGvDzMDTXYEg1PLlEqGHK8T1cT6UY8QhrJfIveGYVyutDJNPIhfMSIIKeOTkyhq/E4ZEZV2DXtLcbAqdPRQIsY3RfciTW3DkFwA== Received: from BYAPR02MB4343.namprd02.prod.outlook.com (2603:10b6:a03:57::18) by SA2PR02MB7561.namprd02.prod.outlook.com (2603:10b6:806:140::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.24; Fri, 21 Jul 2023 14:49:23 +0000 Received: from BYAPR02MB4343.namprd02.prod.outlook.com ([fe80::89a1:d75c:813:618e]) by BYAPR02MB4343.namprd02.prod.outlook.com ([fe80::89a1:d75c:813:618e%7]) with mapi id 15.20.6609.022; Fri, 21 Jul 2023 14:49:23 +0000 From: Het Gala To: "qemu-devel@nongnu.org" CC: Prerna Saxena , "quintela@redhat.com" , "dgilbert@redhat.com" , "pbonzini@redhat.com" , "berrange@redhat.com" , "armbru@redhat.com" , "eblake@redhat.com" , Manish Mishra , Aravind Retnakaran , Het Gala Subject: [PATCH v9 01/10] migration: New QAPI type 'MigrateAddress' Thread-Topic: [PATCH v9 01/10] migration: New QAPI type 'MigrateAddress' Thread-Index: Adm74omRkBS4AYfqEEK9gSKYOnRtWA== Date: Fri, 21 Jul 2023 14:49:22 +0000 Message-ID: <20230721144914.170991-2-het.gala@nutanix.com> References: <20230721144914.170991-1-het.gala@nutanix.com> In-Reply-To: <20230721144914.170991-1-het.gala@nutanix.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PH0P220CA0028.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:d3::17) To BYAPR02MB4343.namprd02.prod.outlook.com (2603:10b6:a03:57::18) x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BYAPR02MB4343:EE_|SA2PR02MB7561:EE_ x-ms-office365-filtering-correlation-id: 87a18a9b-dc40-41c3-69b9-08db89f9ac10 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: 9KHd+uSRoy2JBPalzVLtU+5CvGxlZ41irAm7F72rbI1nygoGmpV7isYP+Vhn+gFe9g9CaHcDg46VergPXOMMvTh6j0FNTXMX8WhQB15IJtQTp95e1lmzY5zoJKZMdmaMjuIUKlWWnauvrPy1VVPHjnb8mJpeCLCKRXwRMicgRGIUJOu7D00YdHodMm6xHtt6sST2NstA+XyqdBjs1Y8DbODMaikbI9iiYXLFDR17WAO0wKbKwxUfnDD1LHy2fvfpRoiRz+gQ+fCnQsL6N/eKPKQkkaP1YOAQBkyBKTJEs9xJkP0bxqH5LON+QKHqcRs1gWIEb3n85T2LasVjLoUoPzrzexA/qTDsMXqmfrqk+jubKgi4H9Zfy0082q/+D5hxfCmp/eD15JPVT6PF01g7sJuJ2cKtHQ1wlCl24sZWqbifsNnA29qL8ChvXFijGu/H2zPL8GRjnaJ3rmIspWE9BnMZPQGbIkCpRh9iorhRPhuZV9EKVysMM9tRQ008pKhZNvUoner24ZGrlUIvAt1goBQZ1wJQJCxnxoVf7FtXGgOwGYq0C90+haKg1sA3xSzhhIfYzHJN7kiKsElSIx+ln+C++plY31epRzFFWJqNR60IdH9P/ekFbUmBJbB048pF 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)(39860400002)(366004)(376002)(136003)(346002)(451199021)(2616005)(66899021)(6486002)(52116002)(6512007)(71200400001)(478600001)(86362001)(26005)(1076003)(107886003)(6506007)(36756003)(5660300002)(4326008)(44832011)(6916009)(41300700001)(8936002)(8676002)(316002)(2906002)(122000001)(38100700002)(54906003)(64756008)(66476007)(66556008)(66446008)(66946007)(38350700002)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?XHbEW5qS/kmeRkv5vPQpKF82G869?= =?utf-8?q?sBqcS32kvq7nNXoOe6l2hGuCR/sKNAFsGHcmE23UYau9ibotFP4HpWPL4mmR02iIj?= =?utf-8?q?uxpWm8XMHGgDoDA91SJjwNtVVgAieCb6doI8JMyU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HFU6KaLB9xgP3edyl8IkgjzTiFLBLyhluMcoYcuw?= =?utf-8?q?sR3yop8AzPV42VccHjF21Atx9HyYDAVxn9t1z0ZCzz27/h9osRS3uq8/m2rJ4QGXy?= =?utf-8?q?0hE2QFkw8vQhzmVWLJCZgvOjQerwwY8oaYgWWpdIA26gu+PGwe6WKuhkSP+6qdq37?= =?utf-8?q?Qc+WV8nq6HfrjJW7nry7MgYIHyd5puCAYSruGq8QmhhaHbYruOHnzgTNhwAYGuxQz?= =?utf-8?q?VFeNGSOCoPPY6YwLsCfbjfuBVFdDv0HoKob4TTgSofBQgsd53RrveTVOb90xh37zM?= =?utf-8?q?xHnBwBdmwyInnZtEk9neIErxU8lwiW1auj1XRqClgWPmiNgGb9Z8h+IplGTB0sj/I?= =?utf-8?q?HX28ldhS1Vdxq+4zukpWEPqKVXwiDtrbngv8bomYToNl2MvTCuihHKTlgXpyyycjI?= =?utf-8?q?jyOWh5QDWfCw6lOXA4APZAc5itqFLGmCNYGApDhqAZRCqOBAseRAQYm5ZRst1GiAm?= =?utf-8?q?saqhdalzTue/2u5MKyqktksDaGSbJoh4riFBAb+07BZQdBlK1TtdQ5BpAU6eaGmTz?= =?utf-8?q?Z6XinqFiw1FsDJWY3wB21qqItUfOB0lnJw=3D=3D?= Content-ID: <37ADCAD0E7AF7A4E9F9DBC360AE2D896@namprd02.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR02MB4343.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87a18a9b-dc40-41c3-69b9-08db89f9ac10 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2023 14:49:22.9288 (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: HJ7CHijSKEh+mSZEi1NJp5v857hGzhY3FgB6tyO8lSO9tpNPpILIlyF5Rof3XVXW/ubJvdzMqjb3kr7ictWX+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR02MB7561 X-Proofpoint-ORIG-GUID: y2V6RjeAwAzYqzFAwp_rK65x7RbmQzvY X-Proofpoint-GUID: y2V6RjeAwAzYqzFAwp_rK65x7RbmQzvY 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-21_09,2023-07-20_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..0f4a54a7ed 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.2 +## +{ 'enum': 'MigrationAddressType', + 'data': ['socket', 'exec', 'rdma'] } + +## +# @MigrationExecCommand: +# +# @args: command (list head) and arguments to execute. +# +# Since 8.2 +## +{ 'struct': 'MigrationExecCommand', + 'data': {'args': [ 'str' ] } } + +## +# @MigrationAddress: +# +# Migration endpoint configuration. +# +# Since 8.2 +## +{ 'union': 'MigrationAddress', + 'base': { 'transport' : 'MigrationAddressType'}, + 'discriminator': 'transport', + 'data': { + 'socket': 'SocketAddress', + 'exec': 'MigrationExecCommand', + 'rdma': 'InetSocketAddress' } } + ## # @migrate: #