diff mbox

[Spice-devel,RFC] LZ4 compression option for SPICE

Message ID 17343709.DGNVESbVIr@javinlg
State New
Headers show

Commit Message

Javier Celaya Jan. 23, 2015, 2:06 p.m. UTC
Hello, this is the patch with the version check. Christophe, can you check 
that the version is the correct one?

El Martes, 20 de enero de 2015 17:08:07 Christophe Fergeau escribió:
> Hey,
> 
> Version check seems good, we probably can raise spice-server version in
> git preemptively so that you can have a working version check now.
> 
> Given that lz4 support is optional, spice_server_set_image_compression
> should probably error out if we try to set lz4 but it's not supported.

Ack

> 
> Christophe

Comments

Eric Blake Jan. 23, 2015, 4:25 p.m. UTC | #1
On 01/23/2015 07:06 AM, Javier Celaya wrote:
> Hello, this is the patch with the version check. Christophe, can you check 
> that the version is the correct one?
> 

> 
> Recently, SPICE included the lz4 compression algorithm. This patch adds
> a command line option to select it.
> ---
>  ui/spice-core.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/ui/spice-core.c b/ui/spice-core.c
> index 6467fa4..dadcae9 100644
> --- a/ui/spice-core.c
> +++ b/ui/spice-core.c
> @@ -359,6 +359,9 @@ static const char *compression_names[] = {
>      [ SPICE_IMAGE_COMPRESS_QUIC ]     = "quic",
>      [ SPICE_IMAGE_COMPRESS_GLZ ]      = "glz",
>      [ SPICE_IMAGE_COMPRESS_LZ ]       = "lz",
> +#if SPICE_SERVER_VERSION >= 0x000c07
> +    [ SPICE_IMAGE_COMPRESS_LZ4 ]      = "lz4",

How is libvirt going to introspect whether the command line supports
this option?  Is there some QMP command that lists the set of valid
compression formats understood by a given qemu binary?
diff mbox

Patch

From 896a3ea776ee95653a7cb8a0c90111a89b57c73f Mon Sep 17 00:00:00 2001
From: Javier Celaya <javier.celaya@flexvm.es>
Date: Wed, 7 Jan 2015 11:53:24 +0100
Subject: [PATCH] Add lz4 compression option for SPICE.

Recently, SPICE included the lz4 compression algorithm. This patch adds
a command line option to select it.
---
 ui/spice-core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ui/spice-core.c b/ui/spice-core.c
index 6467fa4..dadcae9 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -359,6 +359,9 @@  static const char *compression_names[] = {
     [ SPICE_IMAGE_COMPRESS_QUIC ]     = "quic",
     [ SPICE_IMAGE_COMPRESS_GLZ ]      = "glz",
     [ SPICE_IMAGE_COMPRESS_LZ ]       = "lz",
+#if SPICE_SERVER_VERSION >= 0x000c07
+    [ SPICE_IMAGE_COMPRESS_LZ4 ]      = "lz4",
+#endif
 };
 #define parse_compression(_name)                                        \
     parse_name(_name, "image compression",                              \
-- 
1.9.3