From patchwork Mon Jan 26 08:48:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Javier Celaya X-Patchwork-Id: 432677 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C45801401EF for ; Mon, 26 Jan 2015 19:49:50 +1100 (AEDT) Received: from localhost ([::1]:40476 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFfMg-0001ib-Qg for incoming@patchwork.ozlabs.org; Mon, 26 Jan 2015 03:49:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFfMH-00019T-GG for qemu-devel@nongnu.org; Mon, 26 Jan 2015 03:49:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFfME-0001uQ-Q1 for qemu-devel@nongnu.org; Mon, 26 Jan 2015 03:49:21 -0500 Received: from mail.nologin.es ([62.82.228.235]:51605 helo=nologin.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFfME-0001qG-BT for qemu-devel@nongnu.org; Mon, 26 Jan 2015 03:49:18 -0500 X-Virus-Scanned: by cgpav Received: from [62.81.190.65] (HELO javinlg.localnet) by nologin.es (CommuniGate Pro SMTP 6.0.10) with ESMTPS id 6730144; Mon, 26 Jan 2015 09:48:53 +0100 From: Javier Celaya To: Eric Blake , spice-devel Date: Mon, 26 Jan 2015 09:48:53 +0100 Message-ID: <158031087.SthlJV7jIF@javinlg> Organization: Flexible Software Solutions S.L. User-Agent: KMail/4.14.1 (Linux/3.16.6-203.fc20.x86_64; KDE/4.14.3; x86_64; ; ) In-Reply-To: <54C27602.5070500@redhat.com> References: <1508539.cfTQauU1Ry@javinlg> <17343709.DGNVESbVIr@javinlg> <54C27602.5070500@redhat.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 62.82.228.235 Cc: devel@flexvm.es, Gerd Hoffmann , Anthony Liguori , qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [Spice-devel] [PATCH] [RFC] LZ4 compression option for SPICE X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sorry, I forgot to patch the command-line help. Hope it helps. El Viernes, 23 de enero de 2015 09:25:38 Eric Blake escribió: > 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? From 26864da931603791c70c570b9b46f21657ebcaec Mon Sep 17 00:00:00 2001 From: Javier Celaya 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. --- qemu-options.hx | 4 ++-- ui/spice-core.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 22cf3b9..f5c54ba 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -953,7 +953,7 @@ DEF("spice", HAS_ARG, QEMU_OPTION_spice, " [,tls-channel=[main|display|cursor|inputs|record|playback]]\n" " [,plaintext-channel=[main|display|cursor|inputs|record|playback]]\n" " [,sasl][,password=][,disable-ticketing]\n" - " [,image-compression=[auto_glz|auto_lz|quic|glz|lz|off]]\n" + " [,image-compression=[auto_glz|auto_lz|quic|glz|lz|lz4|off]]\n" " [,jpeg-wan-compression=[auto|never|always]]\n" " [,zlib-glz-wan-compression=[auto|never|always]]\n" " [,streaming-video=[off|all|filter]][,disable-copy-paste]\n" @@ -1028,7 +1028,7 @@ channels. The special name "default" can be used to set the default mode. For channels which are not explicitly forced into one mode the spice client is allowed to pick tls/plaintext as he pleases. -@item image-compression=[auto_glz|auto_lz|quic|glz|lz|off] +@item image-compression=[auto_glz|auto_lz|quic|glz|lz|lz4|off] Configure image compression (lossless). Default is auto_glz. 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