From nobody Tue Feb 10 10:54:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=huawei.com ARC-Seal: i=1; a=rsa-sha256; t=1677231424; cv=none; d=zohomail.com; s=zohoarc; b=m96TZVlWy05ZFcn9ti2Cif+0ZdHZxuRwLQ1hYy3xI0snQHrSj/xHRvnlfqJCU+Z6xX3+40O3SWrSmUcMygMXXcZnCpdACtcd0HsLXlyNQ6/JL2n5CXJ2XxbG4AZPtdI8Dj8+CRO7zjn6RcMZ7/jvkDWf2+qbQ1g7zMXLbTULgnk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677231424; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=j7tSEFcz6ogiy0xz59wOMZHLPJFIWkt/8R6sY0mEdf0=; b=H0/B31sd5Wq9TduRxgU+Kj6OBmTUQ1JCgZlZEo5mPc05vCHq04+uSLJ9Mm7qU61Lejndnz5Fgo57jtdICKp2Tm7MFPGR6AQfpnNyj9cT2bQATjy9490zNnlo9ZzbuoaCbRCLsTymQ7H9FC63+6bnZAQLY59z7yii1NtYIoxf3VM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=quarantine dis=quarantine) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1677231424216347.9317975992326; Fri, 24 Feb 2023 01:37:04 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-158-3_eEB7weMMGFbYJfIIfctg-1; Fri, 24 Feb 2023 04:36:42 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A31E880D0F3; Fri, 24 Feb 2023 09:36:40 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E1B7E404BEC0; Fri, 24 Feb 2023 09:36:39 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B48EC19465B2; Fri, 24 Feb 2023 09:36:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DAB6919465A0 for ; Fri, 24 Feb 2023 09:36:37 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CA559404BEC1; Fri, 24 Feb 2023 09:36:37 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C2EFF404BEC0 for ; Fri, 24 Feb 2023 09:36:37 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A3390811E6E for ; Fri, 24 Feb 2023 09:36:37 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-544-k25egn5gOsiBurFHv0-JzA-1; Fri, 24 Feb 2023 04:36:35 -0500 Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4PNPpt3fdvznWTv; Fri, 24 Feb 2023 17:33:58 +0800 (CST) Received: from localhost.localdomain (10.175.124.27) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Fri, 24 Feb 2023 17:36:31 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677231423; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=j7tSEFcz6ogiy0xz59wOMZHLPJFIWkt/8R6sY0mEdf0=; b=ink+hddE2C1UvJ7OLFYcfP0F4WDEZ/L0PDqGbw6cSh3MoGnm/vbuB7IcihSXuSwwMWCaq/ ZkEIV2Y0Xouk0zMgrG/v2BuP2+YQ6YOYPMJ1jHsWhXWGMq19AB/Mci9La2DH+arCNekMCq TRMk8Rvz0SYLcuLwCrCTu6RZvgR4eqs= X-MC-Unique: 3_eEB7weMMGFbYJfIIfctg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: k25egn5gOsiBurFHv0-JzA-1 From: Jiang Jiacheng To: Subject: [PATCH 1/3] Add public API for parallel compression method Date: Fri, 24 Feb 2023 17:27:10 +0800 Message-ID: <20230224092712.3033504-2-jiangjiacheng@huawei.com> In-Reply-To: <20230224092712.3033504-1-jiangjiacheng@huawei.com> References: <20230224092712.3033504-1-jiangjiacheng@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500022.china.huawei.com (7.185.36.66) X-CFilter-Loop: Reflected X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yubihong@huawei.com, linyilu@huawei.com, jiangjiacheng@huawei.com, xiexiangyou@huawei.com, zhengchuan@huawei.com, caozhongwang1@huawei.com, jdenemar@redhat.com, wanghao232@huawei.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677231425233100001 Content-Type: text/plain; charset="utf-8" Add description for VIR_MIGRATE_PARAM_COMPRESSION, it will be reused in choosing compression method during parallel migration. Add public API VIR_MIGRATE_PARAM_COMPRESSION_ZLIB_LEVEL, VIR_MIGRATE_PARAM_COMPRESSION_ZSTD_LEVEL for migration APIs to support set compress level during parallel migration. Signed-off-by: Jiang Jiacheng Reviewed-by: Jiri Denemark --- include/libvirt/libvirt-domain.h | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 5152ed4551..40b6b19495 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -1269,9 +1269,11 @@ typedef enum { * VIR_MIGRATE_PARAM_COMPRESSION: * * virDomainMigrate* params multiple field: name of the method used to - * compress migration traffic. Supported compression methods: xbzrle, mt. - * The parameter may be specified multiple times if more than one method - * should be used. + * compress migration traffic. Supported compression methods: xbzrle, mt, + * zlib, zstd. The parameter may be specified multiple times if more than + * one method. Not all combinations of compression methods and migration + * options may be allowed. Parallel migration of QEMU domains is only + * compatible with either zlib or zstd method. * * Since: 1.3.4 */ @@ -1318,6 +1320,28 @@ typedef enum { */ # define VIR_MIGRATE_PARAM_COMPRESSION_XBZRLE_CACHE "compression.xbzrle.ca= che" =20 +/** + * VIR_MIGRATE_PARAM_COMPRESSION_ZLIB_LEVEL: + * + * virDomainMigrate* params field: the level of compression for zlib as + * VIR_TYPED_PARAM_INT. Accepted values are in range 0-9. 0 is no compress= ion, + * 1 is maximum speed and 9 is maximum compression. + * + * Since: 9.1.0 + */ +# define VIR_MIGRATE_PARAM_COMPRESSION_ZLIB_LEVEL "compression.zlib.l= evel" + +/** + * VIR_MIGRATE_PARAM_COMPRESSION_ZSTD_LEVEL: + * + * virDomainMigrate* params field: the level of compression for zstd as + * VIR_TYPED_PARAM_INT. Accepted values are in range 0-20. 0 is no compres= sion, + * 1 is maximum speed and 20 is maximum compression. + * + * Since: 9.1.0 + */ +# define VIR_MIGRATE_PARAM_COMPRESSION_ZSTD_LEVEL "compression.zstd.l= evel" + /** * VIR_MIGRATE_PARAM_AUTO_CONVERGE_INITIAL: * --=20 2.33.0