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 <jiangjiacheng@xxxxxxxxxx> --- 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-domain.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.cache" +/** + * 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 compression, + * 1 is maximum speed and 9 is maximum compression. + * + * Since: 9.1.0 + */ +# define VIR_MIGRATE_PARAM_COMPRESSION_ZLIB_LEVEL "compression.zlib.level" + +/** + * 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 compression, + * 1 is maximum speed and 20 is maximum compression. + * + * Since: 9.1.0 + */ +# define VIR_MIGRATE_PARAM_COMPRESSION_ZSTD_LEVEL "compression.zstd.level" + /** * VIR_MIGRATE_PARAM_AUTO_CONVERGE_INITIAL: * -- 2.33.0