]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Add public API for parallel compression method
authorJiang Jiacheng <jiangjiacheng@huawei.com>
Fri, 24 Feb 2023 09:27:10 +0000 (17:27 +0800)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 18 May 2023 13:47:30 +0000 (15:47 +0200)
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@huawei.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
include/libvirt/libvirt-domain.h

index 20862a69f27ceeca8a4b20eab0c50825f650c77b..3312b8339e4bd0bd1a31faa7d6c43853bad55cf2 100644 (file)
@@ -1270,9 +1270,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 should be used. 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
  */
@@ -1319,6 +1321,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:
  *