Re: [Spice-devel] [PATCH 0/2] Make plugin version checking more robust

2018-03-27 Thread Christophe Fergeau
With the right patch attached this time.. ;) I've only compile-tested this as this really is just a proof of concept at this point. Christophe On Mon, Mar 26, 2018 at 06:47:08PM +0200, Christophe Fergeau wrote: > On Mon, Mar 26, 2018 at 11:27:19AM +0200, Christophe de Dinech

Re: [Spice-devel] [PATCH 0/2] Make plugin version checking more robust

2018-03-27 Thread Christophe Fergeau
On Tue, Mar 27, 2018 at 10:28:24AM +0200, Christophe de Dinechin wrote: > > > > On 27 Mar 2018, at 10:12, Christophe Fergeau wrote: > > > > With the right patch attached this time.. ;) I've only compile-tested > > this as this really is just a proof

Re: [Spice-devel] [PATCH spice-server 1/2] Add support for building with meson

2018-03-27 Thread Christophe Fergeau
Couple of notes for people trying this, On Thu, Mar 22, 2018 at 02:18:20PM -0300, Eduardo Lima (Etrunko) wrote: > diff --git a/meson.build b/meson.build > new file mode 100644 > index ..f373e662 > --- /dev/null > +++ b/meson.build > @@ -0,0 +1,175 @@ > +# > +# project definition > +# > +#

Re: [Spice-devel] [PATCH spice-server 1/2] Add support for building with meson

2018-03-27 Thread Christophe Fergeau
On Tue, Mar 27, 2018 at 08:53:06AM -0300, Eduardo Lima (Etrunko) wrote: > No, I think it should work, but this .wrap file is useful the first time > user clones the repository, it will fetch spice-common automatically. Hmm, but is this 'subproject' command going to handle git submodule updates pro

Re: [Spice-devel] [PATCH spice-server 1/2] Add support for building with meson

2018-03-27 Thread Christophe Fergeau
On Tue, Mar 27, 2018 at 09:57:35AM -0300, Eduardo Lima (Etrunko) wrote: > On 27/03/18 09:51, Christophe Fergeau wrote: > > On Tue, Mar 27, 2018 at 08:53:06AM -0300, Eduardo Lima (Etrunko) wrote: > >> No, I think it should work, but this .wrap file is useful the first time &g

Re: [Spice-devel] [PATCH 12/22] Add exception handling classes

2018-03-28 Thread Christophe Fergeau
> Do you have something against requiring string constants in English for our > error messages? > > Is it so difficult to understand that if I have: > > WriteError(“can’t write”, “header”, filename) > WriteError(“can’t write”, “boson”, filename) > > I can localize all the combinatio

Re: [Spice-devel] [PATCH 12/22] Add exception handling classes

2018-03-28 Thread Christophe Fergeau
On Wed, Mar 28, 2018 at 02:44:56PM +0200, Christophe de Dinechin wrote: > In my proposal, that message is built in format_message with something like: > > int written = snprintf(buffer, size, "%s writing %s for file ‘%s'", > what(), operation, filename.c_str()); > return append_strerr

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-28 Thread Christophe Fergeau
On Wed, Mar 28, 2018 at 11:10:36AM +0200, Christophe de Dinechin wrote: > > > > On 26 Mar 2018, at 19:06, Christophe Fergeau wrote: > > > > On Fri, Mar 23, 2018 at 01:05:23PM +0100, Christophe de Dinechin wrote: > >> 2. ODR-related problems > >> >

Re: [Spice-devel] [PATCH 0/2] Make plugin version checking more robust

2018-03-28 Thread Christophe Fergeau
On Wed, Mar 28, 2018 at 10:47:27AM +0200, Christophe de Dinechin wrote: > > What matters in my opinion is that we decide to break it, once we've > > made that decision, the number of commits which are going to make ABI > > breaking changes is less important. > > Introducing “subtle” changes such a

Re: [Spice-devel] [PATCH 0/2] Make plugin version checking more robust

2018-03-28 Thread Christophe Fergeau
On Wed, Mar 28, 2018 at 06:06:19PM +0200, Christophe de Dinechin wrote: > > If my task is to "move version check to the agent", do I _have_ to change > > the semantics of the version check? No. > > Of course you have to. There is no “PluginVersionIsCompatible” > anymore, etc, so the version number

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-29 Thread Christophe Fergeau
On Wed, Mar 28, 2018 at 05:54:21PM +0200, Christophe de Dinechin wrote: > > With that said, I find the current "ODR" portion of the commit log > > misleading, it's easy to get the impression that after this change, we > > won't have any ODR problem anymore (this is what I initially thought!). > >

Re: [Spice-devel] [PATCH 12/22] Add exception handling classes

2018-03-29 Thread Christophe Fergeau
On Wed, Mar 28, 2018 at 05:35:35PM +0200, Christophe de Dinechin wrote: > > On 28 Mar 2018, at 17:04, Christophe Fergeau wrote: > > The part I'm missing is how you extract this limited number of full > > strings that we'll need to translate into a po file (or equi

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-29 Thread Christophe Fergeau
On Thu, Mar 29, 2018 at 10:36:06AM +0200, Christophe de Dinechin wrote: > > > > On 29 Mar 2018, at 10:05, Christophe Fergeau wrote: > > > > On Wed, Mar 28, 2018 at 05:54:21PM +0200, Christophe de Dinechin wrote: > >>> With that said, I find the cur

[Spice-devel] [spice-server] cursor: Consistently use g_memdup() for cursor data

2018-04-05 Thread Christophe Fergeau
Currently, red-parse-qxl.c open codes g_memdup() when it needs to duplicate the cursor data, while red-stream-device.c does this using spice_memdup(). This commit makes use of g_memdup() in both cases so that this memory is consistently allocated through glib. Signed-off-by: Christophe Fergeau

[Spice-devel] [spice-server] cursor: Delay release of QXL guest cursor resources

2018-04-05 Thread Christophe Fergeau
the proper fix would be in QEMU so that spice-server does not need to have that kind of knowledge regarding QEMU internal implementation, this commit reverts to the pre-1c6e7cf7 behaviour to avoid a regression while QEMU is being fixed. https://bugzilla.redhat.com/show_bug.cgi?id=1540919 Signed-off

Re: [Spice-devel] [spice-server] cursor: Consistently use g_memdup() for cursor data

2018-04-05 Thread Christophe Fergeau
On Thu, Apr 05, 2018 at 04:43:17AM -0400, Frediano Ziglio wrote: > > > > Currently, red-parse-qxl.c open codes g_memdup() when it needs to > > "open codes" ? > well, currently uses g_malloc+memcpy which can be rewritten with > g_memdup. Yes, doing this can be seen as reimplementing g_memdup, whi

Re: [Spice-devel] [spice-server] cursor: Consistently use g_memdup() for cursor data

2018-04-05 Thread Christophe Fergeau
On Thu, Apr 05, 2018 at 10:55:13AM +0200, Christophe Fergeau wrote: > On Thu, Apr 05, 2018 at 04:43:17AM -0400, Frediano Ziglio wrote: > > > > > > Currently, red-parse-qxl.c open codes g_memdup() when it needs to > > > > "open codes" ? > >

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-05 Thread Christophe Fergeau
On Fri, Mar 23, 2018 at 01:05:23PM +0100, Christophe de Dinechin wrote: > 3. Major.minor numbering scheme > > The major.minor numbering scheme initially selected makes it harder > to fixes cases where an incompatibility was detected after release. I'm still of the opinion that we should break ABI

Re: [Spice-devel] [PATCH spice-streaming-agent] Revert "build: Use pkgconfig to detect libjpeg"

2018-04-06 Thread Christophe Fergeau
Ah I thought this was done already, but yeah, Acked-by: Christophe Fergeau On Thu, Apr 05, 2018 at 06:03:15PM +0100, Frediano Ziglio wrote: > This reverts commit 5240f212ed364d5139f30810b14884f8e2c03535. > RHEL 7 does not provide a pkg-config module for libjpeg. > > Signed-off-

Re: [Spice-devel] [PATCH spice-streaming-agent] Use pkg-config to find jpeg library if available

2018-04-06 Thread Christophe Fergeau
found])) +]) AC_SUBST(JPEG_LIBS) dnl === Acked-by: Christophe Fergeau On Fri, Apr 06, 2018 at 07:41:22AM +0100, Frediano Ziglio wrote: > Newer libraries provide pkg-config module for libjpeg, attempt > to use it,

Re: [Spice-devel] [PATCH spice-streaming-agent] ci: Add make package

2018-04-09 Thread Christophe Fergeau
On Mon, Apr 09, 2018 at 10:53:34AM +0300, Snir Sheriber wrote: > make is no longer installed by default in fedora:latest Sure, Acked-by: Christophe Fergeau though make/gcc-c++ should also come from 'dnf builddep spice-streaming-agent' if this is no longer installed by default

Re: [Spice-devel] [spice-gtk v1 2/2] channel-usbredir: Fix crash on channel-up

2018-04-10 Thread Christophe Fergeau
On Fri, Apr 06, 2018 at 09:59:44AM +0200, Victor Toso wrote: > From: Victor Toso > > By adding a guard to not handle channel-up on SpiceUsbredirChannel in > case struct usbredirhost wasn't initialized yet. Same guard is in > place for the generic usbredir_handle_msg() function to avoid handling >

Re: [Spice-devel] [spice-server] cursor: Delay release of QXL guest cursor resources

2018-04-10 Thread Christophe Fergeau
grade both at once or not, spice-server will have the same behaviour as in the 0.12 branch. Christophe On Thu, Apr 05, 2018 at 10:36:27AM +0200, Christophe Fergeau wrote: > There's an implicit API/ABI contract between QEMU and SPICE that SPICE > will keep the guest QXL resources aliv

Re: [Spice-devel] [PATCH spice-server] red-parse-qxl: Remove unused device_data field

2018-04-10 Thread Christophe Fergeau
; --- a/server/red-parse-qxl.h > +++ b/server/red-parse-qxl.h > @@ -113,7 +113,6 @@ typedef struct RedCursorCmd { > } trail; > SpicePoint16 position; > } u; > -uint8_t *device_data; > } RedCursorCmd; Acked-by: Christophe Fergeau it's present in the

Re: [Spice-devel] [spice-gtk v1 2/2] channel-usbredir: Fix crash on channel-up

2018-04-10 Thread Christophe Fergeau
On Tue, Apr 10, 2018 at 02:17:45PM +0200, Victor Toso wrote: > Hi, > > On Tue, Apr 10, 2018 at 01:37:05PM +0200, Victor Toso wrote: > > Hi, > > > > On Tue, Apr 10, 2018 at 12:41:16PM +0200, Christophe Fergeau wrote: > > > On Fri, Apr 06, 2018 at 09:59:44AM +0

Re: [Spice-devel] [spice-server] cursor: Delay release of QXL guest cursor resources

2018-04-10 Thread Christophe Fergeau
gt; > Christophe > > > > > > > When do you plan to remove this patch from spice-server? > > > > > On Thu, Apr 05, 2018 at 10:36:27AM +0200, Christophe Fergeau wrote: > > > > There's an implicit API/ABI contract between QEMU and SPICE that SPICE &

[Spice-devel] [spice-server 2/2] cursor: Rename cursor_marshall to red_marshall_cursor_command

2018-04-11 Thread Christophe Fergeau
The name is more consistent with red_marshall_cursor_init. --- server/cursor-channel.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/cursor-channel.c b/server/cursor-channel.c index 522261e3f..a549c5fe0 100644 --- a/server/cursor-channel.c +++ b/server/cursor-c

[Spice-devel] [spice-server 1/2] cursor: Delay release of QXL guest cursor resources

2018-04-11 Thread Christophe Fergeau
Ziglio. https://bugzilla.redhat.com/show_bug.cgi?id=1540919 Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 3 +++ server/red-parse-qxl.h | 1 + server/red-worker.c| 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server/red-parse-qxl.c b/server/red-pa

Re: [Spice-devel] [spice-server 1/2] cursor: Delay release of QXL guest cursor resources

2018-04-12 Thread Christophe Fergeau
s to the pre-1c6e7cf7 behaviour to avoid a regression > > while QEMU is being fixed. > > > > This version of the fix is based on a suggestion from Frediano Ziglio. > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1540919 > > > > Signed-off-by: Christop

Re: [Spice-devel] [spice-server 2/2] cursor: Rename cursor_marshall to red_marshall_cursor_command

2018-04-12 Thread Christophe Fergeau
On Wed, Apr 11, 2018 at 01:16:57PM -0400, Frediano Ziglio wrote: > > > > The name is more consistent with red_marshall_cursor_init. > > --- > > server/cursor-channel.c | 8 > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > Why command (so red_marshall_cursor) ? > The item is

Re: [Spice-devel] [spice-server 1/2] cursor: Delay release of QXL guest cursor resources

2018-04-12 Thread Christophe Fergeau
> > > > This version of the fix is based on a suggestion from Frediano Ziglio. > > > > > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1540919 > > > > > > > > Signed-off-by: Christophe Fergeau > > > > --- > > > > serve

Re: [Spice-devel] [PATCH spice-server 1/3] stream: implement interface for manual flush

2018-04-12 Thread Christophe Fergeau
ata are written. This is the default. > + * If not set you should call red_stream_flush to force 'If not set, you should ...' > + * data to be sent. Failing to call red_stream_flush on a > + * manual flush stream could lead to latency. > + * Disabling auto flush can

Re: [Spice-devel] [PATCH spice-server 2/3] stream: implements flush using TCP_CORK

2018-04-12 Thread Christophe Fergeau
RedStream *stream, const void > *in_buf, size_t n) > > bool red_stream_set_auto_flush(RedStream *s, bool enable) > { > -return enable; > +if (s->priv->use_cork == !enable) { Might be slightly more readable if 'enable' is renamed to 'auto_flush' Acked-by: Christophe Fergeau signature.asc Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-server 3/3] common-graphics-channel: use manual flushing on stream to decrease packet fragmentation

2018-04-12 Thread Christophe Fergeau
On Tue, Jan 16, 2018 at 02:18:15PM +, Frediano Ziglio wrote: > In order to use new TCP_CORK feature disable auto flush. 'the new TCP_CORK feature, disable auto flush' Might be worth explaining in the commit log why you disable auto_flush only for RedCommonGraphicsChannel. > > Signed-off-by:

Re: [Spice-devel] [spice-server 2/2] cursor: Rename cursor_marshall to red_marshall_cursor_command

2018-04-13 Thread Christophe Fergeau
On Thu, Apr 12, 2018 at 11:09:39AM +0200, Christophe Fergeau wrote: > On Wed, Apr 11, 2018 at 01:16:57PM -0400, Frediano Ziglio wrote: > > > > > > The name is more consistent with red_marshall_cursor_init. > > > --- > > > server/cursor-channel.c | 8 -

Re: [Spice-devel] [PATCH spice-gtk 1/4] gio-coroutine: Fix C inheritance

2018-04-16 Thread Christophe Fergeau
pice-gtk set GConditiionWaitSource::self. So this ends up all working even though this is wrong. Acked-by: Christophe Fergeau but I'd add more details to the log Christophe > > Signed-off-by: Frediano Ziglio > --- > src/gio-coroutine.c | 2 +- > 1 file changed, 1 insertion(+), 1 delet

Re: [Spice-devel] [PATCH spice-gtk 0/4] Miscellaneous small patches

2018-04-16 Thread Christophe Fergeau
For the series Acked-by: Christophe Fergeau but see my comment on 1/4 On Fri, Apr 13, 2018 at 03:49:15PM +0100, Frediano Ziglio wrote: > Frediano Ziglio (4): > gio-coroutine: Fix C inheritance > gio-coroutine: Make waitFuncs static > gio-coroutine: Remove only assigne

Re: [Spice-devel] [PATCH spice-gtk 3/4] gio-coroutine: Remove only assigned self field

2018-04-16 Thread Christophe Fergeau
Alternatively, this could come first in the series, with the nice side-effect of fixing that GSource inheritance issue that you mentioned ;) With the order that you chose, this allows to make the fix more obvious, and to better document why it was not a problem (by luck). On Fri, Apr 13, 2018 at 0

[Spice-devel] [spice-server 05/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_cursor_cmd()

2018-04-16 Thread Christophe Fergeau
This is in preparation for next commit --- server/red-parse-qxl.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index 80746ecbb..c08d18160 100644 --- a/server/red-parse-qxl.c +++ b/server/red-parse-qxl.c @

[Spice-devel] [spice-server 01/10] qxl: Remove red_put_blend()

2018-04-16 Thread Christophe Fergeau
SpiceBlend is a typedef to SpiceCopy, and red_put_blend() and red_put_copy() are identical, so we can add a #define red_put_blend red_put_copy similar to the one we already have for red_get_blend. --- server/red-parse-qxl.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/

[Spice-devel] [spice-server 07/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_message

2018-04-16 Thread Christophe Fergeau
This is in preparation for next commit. --- server/red-parse-qxl.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index eb80ba81b..5408cfa5a 100644 --- a/server/red-parse-qxl.c +++ b/server/red-parse-qxl.c @@ -12

[Spice-devel] [spice-server 02/10] qxl: Move red_drawable_unref/red_drawable_new

2018-04-16 Thread Christophe Fergeau
RedDrawable really is a RedDrawCmd which is parsed by red-parse-qxl.h This commit moves them close to the other functions creating/unref'ing QXL commands parsed by red-parse-qxl.h --- server/red-parse-qxl.c | 21 + server/red-parse-qxl.h | 2 ++ server/red-worker.c| 20 ---

[Spice-devel] [spice-server 09/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_update_cmd

2018-04-16 Thread Christophe Fergeau
This is in preparation for next commit. --- server/red-parse-qxl.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index d7ae53804..d4a7decd3 100644 --- a/server/red-parse-qxl.c +++ b/server/red-parse-qxl.c @@ -1258,

[Spice-devel] [spice-server 00/10] qxl: Move more guest resource release to red-parse-qxl

2018-04-16 Thread Christophe Fergeau
Hey, Currently, after parsing a QXL command through red-parse-qxl, the code which got the command has to tell red-parse-qxl when it no longer needs the command, but also to remember to release the command QXL resources itself. This series moves this 'release resource' logic to red-parse-qxl. Chri

[Spice-devel] [spice-server 04/10] qxl: Fix guest resources release in red_put_drawable()

2018-04-16 Thread Christophe Fergeau
At the moment, we'll unconditionally release the guest QXL resources in red_put_drawable() even if red_get_drawable() failed and did not initialize drawable->release_info_ext properly. This commit checks the QXLReleaseInfo in release_info_ext is non-0 before attempting to release it. --- server/re

[Spice-devel] [spice-server 03/10] qxl: Make red_{get, put}_drawable static

2018-04-16 Thread Christophe Fergeau
Rather than needing to call red_drawable_new() and then initialize it with red_get_drawable(), we can improve slightly red_drawable new so that red_drawable_{new,ref,unref} is all which is used by code out of red-parse-qxl.c. --- server/red-parse-qxl.c | 17 - server/red-parse-qxl.

[Spice-devel] [spice-server 06/10] qxl: Add red_cursor_cmd_new and red_cursor_cmd_free helpers

2018-04-16 Thread Christophe Fergeau
Currently, the cursor channel is allocating RedCursorCmd instances itself, and then calling into red-parse-qxl.h to initialize it, and doing something similar when releasing the data. This commit moves this common code to red-parse-qxl.[ch] --- server/cursor-channel.c | 6 +- server/

[Spice-devel] [spice-server 08/10] qxl: Release QXL resource in red_put_message

2018-04-16 Thread Christophe Fergeau
--- server/red-parse-qxl.c | 6 -- server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index 5408cfa5a..d7ae53804 100644 --- a/server/red-parse-qxl.c +++ b/server/red-pars

[Spice-devel] [spice-server 10/10] qxl: Release QXL resources in red_put_update_cmd

2018-04-16 Thread Christophe Fergeau
--- server/red-parse-qxl.c | 10 +++--- server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index d4a7decd3..313cd1bfb 100644 --- a/server/red-parse-qxl.c +++ b/server/

Re: [Spice-devel] [spice-server 05/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_cursor_cmd()

2018-04-16 Thread Christophe Fergeau
On Mon, Apr 16, 2018 at 06:58:18AM -0400, Frediano Ziglio wrote: > Don't like this, lot of structures in this file use "qxl", for coherence > I would change all or nothing but changing all would mean a lot of changes > with not much value Imo 'red' and 'qxl' are not very good names, I'd prefer to

Re: [Spice-devel] [spice-server 04/10] qxl: Fix guest resources release in red_put_drawable()

2018-04-16 Thread Christophe Fergeau
On Mon, Apr 16, 2018 at 07:25:19AM -0400, Frediano Ziglio wrote: > > > > At the moment, we'll unconditionally release the guest QXL resources in > > red_put_drawable() even if red_get_drawable() failed and did not > > initialize drawable->release_info_ext properly. > > This commit checks the QXLRe

[Spice-devel] [spice-server] Slight simplification of red_channel_client_push() logic

2018-04-16 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/red-channel-client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/red-channel-client.c b/server/red-channel-client.c index f154c5c63..d46c299c2 100644 --- a/server/red-channel-client.c +++ b/server/red-channel

Re: [Spice-devel] [PATCH spice-server] ci: Workaround bug in Valgrind detecting memcpy instead of memmove

2018-04-16 Thread Christophe Fergeau
On Mon, Apr 16, 2018 at 05:02:33PM +0100, Frediano Ziglio wrote: > Due to a bug in current packaged Valgrind check-valgrind is failing > with: > > ==17986== Source and destination overlap in memcpy_chk(0x72c060, 0x72c068, 33) > ==17986==at 0x4C344F0: __memcpy_chk (vg_replace_strmem.c:1581) > =

Re: [Spice-devel] [PATCH spice-server] ci: Workaround bug in Valgrind detecting memcpy instead of memmove

2018-04-17 Thread Christophe Fergeau
On Mon, Apr 16, 2018 at 02:07:57PM -0400, Frediano Ziglio wrote: > > > > On Mon, Apr 16, 2018 at 05:02:33PM +0100, Frediano Ziglio wrote: > > > Due to a bug in current packaged Valgrind check-valgrind is failing > > > with: > > > > > > ==17986== Source and destination overlap in memcpy_chk(0x72c0

Re: [Spice-devel] [spice-server 05/10] qxl: Rename 'qxl' to 'qxl_cmd' in red_get_cursor_cmd()

2018-04-17 Thread Christophe Fergeau
an initial patch changing all of these if you prefer. > > > > Christophe > > > > I would personally keep red and qxl and add a qxl_instance. Fwiw, here is what renaming everything would look like. Quite some churn indeed :( From 22a4eb242a7b5da0c37a5ebf9aaf8156be423785

Re: [Spice-devel] [PATCH spice-server v2] ci: Workaround bug in Valgrind detecting memcpy instead of memmove

2018-04-17 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Tue, Apr 17, 2018 at 11:19:16AM +0100, Frediano Ziglio wrote: > Due to a bug in current packaged Valgrind in the CI (1:3.13.0-13.fc27) > check-valgrind is failing with: > > ==17986== Source and destination overlap in memcpy_chk(0x72c060, 0x72c068, 3

Re: [Spice-devel] [PATCH spice-server 3/3] common-graphics-channel: Use manual flushing on stream to decrease packet fragmentation

2018-04-17 Thread Christophe Fergeau
ent_watch_update_mask(rcc, SPICE_WATCH_EVENT_READ); > +/* channel has no pending data to send so now we can flush data in > + * order to avoid data stall into buffers in case of manual > + * flushing > + */

Re: [Spice-devel] [spice-server 04/10] qxl: Fix guest resources release in red_put_drawable()

2018-04-17 Thread Christophe Fergeau
On Mon, Apr 16, 2018 at 06:51:52PM +0300, Uri Lublin wrote: > On 04/16/2018 01:13 PM, Christophe Fergeau wrote: > > At the moment, we'll unconditionally release the guest QXL resources in > > red_put_drawable() even if red_get_drawable() failed and did not > > initialize

[Spice-devel] [spice-server v2 6/9] qxl: Add red_cursor_cmd_new and red_cursor_cmd_free helpers

2018-04-17 Thread Christophe Fergeau
Currently, the cursor channel is allocating RedCursorCmd instances itself, and then calling into red-parse-qxl.h to initialize it, and doing something similar when releasing the data. This commit moves this common code to red-parse-qxl.[ch] Signed-off-by: Christophe Fergeau --- server/cursor

[Spice-devel] [spice-server v2 0/9] qxl: Move more guest resource release to red-parse-qxl

2018-04-17 Thread Christophe Fergeau
-parse-qxl. Changes since v1: - moved renaming patch to the end, and made it much more extensive - added a new patch unifying identical methods - reworked 'qxl: Fix guest resources release in red_put_drawable()' so that it's similar to the cursor changes Christophe Christophe F

[Spice-devel] [spice-server v2 4/9] qxl: Make red_{get, put}_drawable static

2018-04-17 Thread Christophe Fergeau
Rather than needing to call red_drawable_new() and then initialize it with red_get_drawable(), we can improve slightly red_drawable new so that red_drawable_{new,ref,unref} is all which is used by code out of red-parse-qxl.c. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 17

[Spice-devel] [spice-server v2 8/9] qxl: Release QXL resources in red_put_update_cmd

2018-04-17 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 11 +++ server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index a5e363579..afd136e43 100644 --- a

[Spice-devel] [spice-server v2 5/9] qxl: Fix guest resources release in red_put_drawable()

2018-04-17 Thread Christophe Fergeau
gned-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index cc6a8b51d..ccb01d92d 100644 --- a/server/red-parse-qxl.c +++ b/server/red-parse-qxl.c @@ -1012,7

[Spice-devel] [spice-server v2 3/9] qxl: Move red_drawable_unref/red_drawable_new

2018-04-17 Thread Christophe Fergeau
RedDrawable really is a RedDrawCmd which is parsed by red-parse-qxl.h This commit moves them close to the other functions creating/unref'ing QXL commands parsed by red-parse-qxl.h Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 21 + server/red-parse-

[Spice-devel] [spice-server v2 7/9] qxl: Release QXL resource in red_put_message

2018-04-17 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 6 -- server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index b0c47cfeb..a5e363579 100644 --- a/server

[Spice-devel] [spice-server v2 9/9] qxl: Improve 'red' and 'qxl' argument names

2018-04-17 Thread Christophe Fergeau
's quite easy to wonder what a 'red' is if you are not familiar with the convention. This commit adds a suffix to each of these 'red'/'qxl' variables so that it's clearer what they are referring to. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c |

[Spice-devel] [spice-server v2 1/9] qxl: Remove red_put_blend()

2018-04-17 Thread Christophe Fergeau
SpiceBlend is a typedef to SpiceCopy, and red_put_blend() and red_put_copy() are identical, so we can add a #define red_put_blend red_put_copy similar to the one we already have for red_get_blend. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 7 +-- 1 file changed, 1

[Spice-devel] [spice-server v2 2/9] qxl: Remove 'blackness' and 'invers' put/get methods

2018-04-17 Thread Christophe Fergeau
SpiceWhiteness/SpiceBlackness/SpiceInvers are 3 typedef for the same type, no need to have 3 identical red_put_xxx/red_get_xxx methods. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 25 - 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a

Re: [Spice-devel] [PATCH spice-gtk] build: Generate correct version when spice-gtk is a submodule

2018-04-18 Thread Christophe Fergeau
Hey, This script comes from https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=build-aux/git-version-gen;h=6d073fcaddd827a396af4c52f1bf00bdd84a9f66;hb=HEAD where this issue might already be fixed, the line that you changed seems to be replaced by: elif test "`git log -1 --pretty=format:x

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-18 Thread Christophe Fergeau
On Tue, Apr 17, 2018 at 06:39:05PM +0200, Christophe de Dinechin wrote: > When does this kind of scenario happen? Imagine we added support for > loading/unloading plugins. Version 13 adds a new interface to unload > plugins, and a new “unloadable plugin” entry point. Therefore, > starting with vers

Re: [Spice-devel] [PATCH spice-streaming-agent 1/3] Ensure that plugins cannot bypass version check

2018-04-19 Thread Christophe Fergeau
On Wed, Apr 18, 2018 at 12:47:41PM +0100, Frediano Ziglio wrote: > From: Christophe de Dinechin > > This change addresses two issues related to plugin version checking: > > 1. It is possible for plugins to bypass version checking or do it wrong >(as a matter of fact, the mjpeg fallback sets

Re: [Spice-devel] [PATCH spice-streaming-agent 2/3] Change numbering schema

2018-04-19 Thread Christophe Fergeau
On Wed, Apr 18, 2018 at 12:47:42PM +0100, Frediano Ziglio wrote: > From: Christophe de Dinechin > > A major.minor numbering scheme is not ideal for ABI checks. > In particular, it makes it difficult to react to an incompatibility > that was detected post release. > > [More info] > > The major.m

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-20 Thread Christophe Fergeau
On Fri, Apr 20, 2018 at 10:10:17AM +0200, Christophe de Dinechin wrote: > There is no easy way to test if a method is there. There is, however, > an easy way to test if a C entry point is there in a shared library. > This is the difference between your scenario and mine. In mine, I can > explicitly

Re: [Spice-devel] [PATCH spice-streaming-agent 1/3] Ensure that plugins cannot bypass version check

2018-04-20 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Thu, Apr 19, 2018 at 05:48:33PM +0100, Frediano Ziglio wrote: > From: Christophe de Dinechin > > This change addresses two issues related to plugin version checking: > > 1. It is possible for plugins to bypass version checking or do it wrong &g

Re: [Spice-devel] [PATCH spice-streaming-agent 3/3] Add a macro to deal with the boilerplate of writing a streaming agent plugin

2018-04-20 Thread Christophe Fergeau
Looks good to me, Acked-by: Christophe Fergeau On Thu, Apr 19, 2018 at 05:48:35PM +0100, Frediano Ziglio wrote: > From: Christophe de Dinechin > > Signed-off-by: Christophe de Dinechin > --- > include/spice-streaming-agent/plugin.hpp | 9 + > 1 file cha

Re: [Spice-devel] [PATCH spice-streaming-agent] Eliminate signed/unsigned warning

2018-04-23 Thread Christophe Fergeau
Hey, I believe my comment from https://lists.freedesktop.org/archives/spice-devel/2018-February/042062.html still apply, by default -Wno-sign-compare is in the CFLAGS/CXXFLAGS, so I'd mention in the log that you need to use non-default CXXFLAGS to hit this. Apart from this, looks good to me. Chri

Re: [Spice-devel] How to check if the spice-streaming-agent workscorrectly

2018-04-23 Thread Christophe Fergeau
On Mon, Apr 23, 2018 at 02:08:45PM +0200, Lukáš Hrázký wrote: > On Mon, 2018-04-23 at 19:22 +0800, 孙得霖 wrote: > > hi, > > @lhrazky > > host: > > qemu-kvm: 1.5.3 > > spice-server: 0.13.3 > > This is an old version of spice server. You need to build the current > git master of the server on

[Spice-devel] [spice-server v3 13/14] qxl: Introduce RedQXLGuestResources

2018-04-24 Thread Christophe Fergeau
This allows to share a bit of code in red-parse-qxl.c, but does not help with reducing the number of args which are passed to the parsing functions. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 112 ++--- server/red-parse-qxl.h | 20

[Spice-devel] [spice-server v3 01/14] qxl: Move red_drawable_unref/red_drawable_new

2018-04-24 Thread Christophe Fergeau
/unref'ing QXL commands parsed by red-parse-qxl.h. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 26 ++ server/red-parse-qxl.h | 12 server/red-worker.c| 20 3 files changed, 30 insertions(+), 28 deletions(-) diff --

[Spice-devel] [spice-server v3 10/14] display-channel: Store full RedSurfaceCmd, not just QXLReleaseInfoExt

2018-04-24 Thread Christophe Fergeau
Now that we have a refcounted RedSurfaceCmd, we can store the command itself in DisplayChannel rather than copying QXLReleaseInfoExt. This will let us move the release of the QXL guest resources in red-parse-qxl in the next commit. Signed-off-by: Christophe Fergeau --- server/display-channel

[Spice-devel] [spice-server v3 06/14] qxl: Add red_message_{new, ref, unref} helpers

2018-04-24 Thread Christophe Fergeau
instead, and get a consistent API. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 37 ++--- server/red-parse-qxl.h | 7 --- server/red-worker.c| 8 3 files changed, 42 insertions(+), 10 deletions(-) diff --git a/server/red-parse

[Spice-devel] [spice-server v3 09/14] qxl: Add red_surface_cmd_{new, ref, unref} helpers

2018-04-24 Thread Christophe Fergeau
Currently, RedWorker is using stack-allocated variables for RedSurfaceCmd. Surface commands are rare enough that we can dynamically allocated them insntead, and make the API in red-parse-qxl.h consistent with how other QXL commands are handled. Signed-off-by: Christophe Fergeau --- server/red

[Spice-devel] [spice-server v3 07/14] qxl: Release QXL resources in red_put_update_cmd

2018-04-24 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 11 +++ server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index dfa362b47..919f928e6 100644 --- a

[Spice-devel] [spice-server v3 12/14] qxl: Improve 'red' and 'qxl' argument names

2018-04-24 Thread Christophe Fergeau
's quite easy to wonder what a 'red' is if you are not familiar with the convention. This commit adds a suffix to each of these 'red'/'qxl' variables so that it's clearer what they are referring to. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c |

[Spice-devel] [spice-server v3 05/14] qxl: Release QXL resource in red_put_message

2018-04-24 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 7 +-- server/red-parse-qxl.h | 3 ++- server/red-worker.c| 3 +-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index ac612dd5d..24d3b838f 100644 --- a/server

[Spice-devel] [spice-server v3 08/14] qxl: Add red_update_cmd_{new, ref, unref} helpers

2018-04-24 Thread Christophe Fergeau
instead, and get a consistent API. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 38 ++ server/red-parse-qxl.h | 7 --- server/red-worker.c| 14 +++--- 3 files changed, 45 insertions(+), 14 deletions(-) diff --git a/server/red-parse

[Spice-devel] [spice-server v3 04/14] qxl: Add red_cursor_cmd_{new, ref, unref} helpers

2018-04-24 Thread Christophe Fergeau
, red_cursor_cmd_free() would currently be enough, but this makes the API consistent with red_drawable_{new,ref,unref}. Signed-off-by: Christophe Fergeau --- server/cursor-channel.c | 8 ++-- server/red-parse-qxl.c | 40 +--- server/red-parse-qxl.h

[Spice-devel] [spice-server v3 11/14] qxl: Release QXL resources in red_put_surface_cmd

2018-04-24 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/display-channel.c | 3 --- server/red-parse-qxl.c | 12 server/red-parse-qxl.h | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/server/display-channel.c b/server/display-channel.c index 0cc32813b..01835e965

[Spice-devel] [spice-server v3 03/14] qxl: Fix guest resources release in red_put_drawable()

2018-04-24 Thread Christophe Fergeau
nly free the guest QXL resources when RedDrawable::qxl is set. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c index a705c0d9d..d03625e43 100644 ---

[Spice-devel] [spice-server v3 00/14] qxl: Move more guest resource release to red-parse-qxl

2018-04-24 Thread Christophe Fergeau
ed-parse-qxl.h interface Changes since v1: - moved renaming patch to the end, and made it much more extensive - added a new patch unifying identical methods - reworked 'qxl: Fix guest resources release in red_put_drawable()' so that it's similar to the cursor changes Christoph

[Spice-devel] [spice-server v3 14/14] qxl: Use QXLCommandExt in external red-parse-qxl.h API

2018-04-24 Thread Christophe Fergeau
Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 146 +++- server/red-parse-qxl.h | 12 ++-- server/red-worker.c | 12 ++-- server/tests/test-qxl-parsing.c | 32 +++-- 4 files changed, 107 insertions(+), 95

[Spice-devel] [spice-server v3 02/14] qxl: Make red_{get, put}_drawable static

2018-04-24 Thread Christophe Fergeau
Rather than needing to call red_drawable_new() and then initialize it with red_get_drawable(), we can improve slightly red_drawable new so that red_drawable_{new,ref,unref} is all which is used by code out of red-parse-qxl.c. Signed-off-by: Christophe Fergeau --- server/red-parse-qxl.c | 17

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-24 Thread Christophe Fergeau
On Tue, Apr 24, 2018 at 05:01:33PM +0200, Christophe de Dinechin wrote: > But we still have the capability to reject a plugin (in a well > defined, non-crashing way) for other reasons. > [...] > To summarize, the purpose of the compatibility check is to guarantee > well-defined behavior on the entr

Re: [Spice-devel] how to debug spice-gtk on windows

2018-04-26 Thread Christophe Fergeau
On Thu, Apr 26, 2018 at 10:20:25AM +0300, Sameeh Jubran wrote: > Since the code is compiled using MingW and not VS I would suggest using the > "OutputDebugString" function along with DebugView for viewing the prints. You should also be able to use some mingw version of gdb Christophe signature.

Re: [Spice-devel] [PATCH spice-gtk] tests: Shut up warnings about unitialized struct fields

2018-04-26 Thread Christophe Fergeau
On Tue, Apr 24, 2018 at 04:24:32PM -0300, Eduardo Lima (Etrunko) wrote: > Build complains about lots of unitialized fields in TestCase definition, This has been committed, but I don't think this was happening with git master and the default build flags? This should be mentioned in the commit log i

Re: [Spice-devel] Gitlab - 2018!

2018-04-26 Thread Christophe Fergeau
Hey, I don't think I've answered to these various threads, but personally I'm fine with the move. Christophe On Tue, Apr 24, 2018 at 05:15:33PM +0200, Victor Toso wrote: > Hey, > > JFYI, we'll be migrating to gitlab.freedesktop.org late this > week, see: > > https://gitlab.freedesktop.org/free

Re: [Spice-devel] [PATCH spice-streaming-agent] build: Use same options to compile unit tests

2018-04-26 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Mon, Apr 23, 2018 at 04:11:00PM +0100, Frediano Ziglio wrote: > Unit test where not compiling with same options. > In this case warnings are different producing different results. > > Signed-off-by: Frediano Ziglio > --- > src/unittes

Re: [Spice-devel] [PATCH spice-streaming-agent 1/4] Add some information to the log

2018-04-26 Thread Christophe Fergeau
On Mon, Apr 23, 2018 at 04:07:41PM +0100, Frediano Ziglio wrote: > Allows to track different frame timing. > > Signed-off-by: Frediano Ziglio > --- > src/spice-streaming-agent.cpp | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/src/spice-streaming-agent.cpp b/src/spice

Re: [Spice-devel] [PATCH spice-streaming-agent v2] Eliminate signed/unsigned warning

2018-04-26 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Mon, Apr 23, 2018 at 03:25:39PM +0100, Frediano Ziglio wrote: > From: Christophe de Dinechin > > Currently -Wsign-compare is disabled by default in the default settings > (m4/spice-compile-warnings.m4). > However is good and not that expensive

Re: [Spice-devel] [PATCH spice-streaming-agent 4/4] Add option to disable logging full frames

2018-04-26 Thread Christophe Fergeau
On Mon, Apr 23, 2018 at 04:07:44PM +0100, Frediano Ziglio wrote: > In some cases we want to avoid saving huge amount of data on the log. > > Signed-off-by: Frediano Ziglio > --- > src/spice-streaming-agent.cpp | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/src/s

<    2   3   4   5   6   7   8   9   10   11   >