Re: [Spice-devel] Getting involved with implementation of remote spice for 3D accelerated VMs

2017-01-11 Thread Victor Toso
Hi, On Mon, Jan 09, 2017 at 05:20:10PM +0100, Behrooz Shabani wrote: > Thanks for the info Victor. > > I will try to set it up and because I am new to the code base and have no > idea where to start, I will ping you on IRC for help if you don't mind > (assuming you're `toso`). As discussed by IRC

[Spice-devel] [spice-server v6] reds: drop sscanf() in favour of g_strsplit()

2017-01-11 Thread Victor Toso
From: Victor Toso As there is a need to iterate over every encoder:codec pair and we do a check for every encoder and every codec, g_strsplit() is less complex and easier to follow. This change makes much easier to extend the input which is currently a list of tuples encoder:video-codec. Signed

Re: [Spice-devel] [PATCH spice-gtk v5 3/9] Update spice-common

2017-01-11 Thread Victor Toso
Hi, On Fri, Jan 06, 2017 at 10:22:08AM -0500, Frediano Ziglio wrote: > > > > > > > > From: Victor Toso > > > > > > Victor Toso (1): > > > protocol: add preferred video codec message > > > > > > Signed-off-by: Victor Toso > > > --- > > > spice-common | 2 +- > > > 1 file changed, 1 ins

Re: [Spice-devel] [spice-gtk v2 3/3] ssl: Use accessors rather than direct struct access

2017-01-11 Thread Christophe Fergeau
On Wed, Jan 11, 2017 at 04:37:01PM +0100, Pavel Grunt wrote: > On Wed, 2017-01-11 at 10:50 +0100, Christophe Fergeau wrote: > > From: Sebastian Andrzej Siewior > > > > In OpenSSL 1.1.0, the struct fields are private so we can no longer > > directly access them. > > > > The accessors are not avai

Re: [Spice-devel] [spice-gtk v2 0/3] ssl: Add support for OpenSSL 1.1.0

2017-01-11 Thread Pavel Grunt
On Wed, 2017-01-11 at 15:26 +0100, Christophe Fergeau wrote: > On Wed, Jan 11, 2017 at 03:05:45PM +0100, Fabian Grünbichler wrote: > > AFAIK the situation regarding OpenSSL in Sid/Stretch is rather > > complicated - upstream / the OpenSSL maintainers / .. are pushing > > for a > > transition to 1.1

Re: [Spice-devel] [PATCH v3 1/2] Do endian swapping.

2017-01-11 Thread Victor Toso
Hi, Sorry for taking some time to reply back. On Mon, Jan 09, 2017 at 01:54:30PM +0100, Michal Suchanek wrote: > This allows running big endian and little endian guest side by side > using cut & paste between them. > > There is a general design idea that swapping should come as close to > virtio_

Re: [Spice-devel] [spice-gtk v2 3/3] ssl: Use accessors rather than direct struct access

2017-01-11 Thread Pavel Grunt
On Wed, 2017-01-11 at 10:50 +0100, Christophe Fergeau wrote: > From: Sebastian Andrzej Siewior > > In OpenSSL 1.1.0, the struct fields are private so we can no longer > directly access them. > > The accessors are not available in previous OpenSSL releases, so we > need > to add compat helpers. >

Re: [Spice-devel] [spice-server 09/17] sound: Add separate SND_MUTE_MASK

2017-01-11 Thread Frediano Ziglio
> > Currently MUTE and VOLUME commands use the same VOLUME mask. This commit > introduces a separate SND_MUTE_MASK for MUTE commands to make things > a bit more clear. > > Based on a patch from Frediano Ziglio > > Signed-off-by: Christophe Fergeau Acked-by: Frediano Ziglio Frediano > --- >

Re: [Spice-devel] [spice-server 11/17] sound: Prefer snd_set_command() over snd_*_send_*()

2017-01-11 Thread Frediano Ziglio
> > snd_set_command()/snd_send() are higher level methods which take care of > scheduling calls to the corresponding snd_*_send_*() methods when > appropriate. This commit switches a few direct snd_*_send_*() calls to > snd_set_command()/snd_send(). > > Based on a patch from Frediano Ziglio > >

Re: [Spice-devel] [spice-gtk v2 0/3] ssl: Add support for OpenSSL 1.1.0

2017-01-11 Thread Christophe Fergeau
On Wed, Jan 11, 2017 at 03:05:45PM +0100, Fabian Grünbichler wrote: > AFAIK the situation regarding OpenSSL in Sid/Stretch is rather > complicated - upstream / the OpenSSL maintainers / .. are pushing for a > transition to 1.1.0 (currently 1.1.0c), but there was quite a backlash > from various main

Re: [Spice-devel] [PATCH v2 2/2] Quiet uninitialized variable warning.

2017-01-11 Thread Christophe Fergeau
On Mon, Jan 09, 2017 at 02:11:02PM +0100, Michal Suchánek wrote: > On Mon, 09 Jan 2017 10:51:34 +0100 > Pavel Grunt wrote: > > Hello, > > > Hi Michal, > > > > On Fri, 2017-01-06 at 14:25 +0100, Michal Suchanek wrote: > > > Signed-off-by: Michal Suchanek > > > --- > > >  src/vdagentd/vdagentd.c

Re: [Spice-devel] [spice-gtk v2 0/3] ssl: Add support for OpenSSL 1.1.0

2017-01-11 Thread Fabian Grünbichler
On Wed, Jan 11, 2017 at 01:00:09PM +0100, Christophe Fergeau wrote: > Hey Fabian, > > On Wed, Jan 11, 2017 at 12:21:35PM +0100, Fabian Grünbichler wrote: > > On Wed, Jan 11, 2017 at 10:50:30AM +0100, Christophe Fergeau wrote: > > > Sebastian sent these patches privately a while ago, I've run some

Re: [Spice-devel] [spice-gtk v2 0/3] ssl: Add support for OpenSSL 1.1.0

2017-01-11 Thread Christophe Fergeau
Hey Fabian, On Wed, Jan 11, 2017 at 12:21:35PM +0100, Fabian Grünbichler wrote: > On Wed, Jan 11, 2017 at 10:50:30AM +0100, Christophe Fergeau wrote: > > Sebastian sent these patches privately a while ago, I've run some tests on > > them > > and helped split them. They add support for OpenSSL 1.1

Re: [Spice-devel] [spice-server 04/17] sound: Remove duplicate AudioFrame typedef

2017-01-11 Thread Christophe Fergeau
On Wed, Jan 11, 2017 at 05:58:55AM -0500, Frediano Ziglio wrote: > > > > It's already defined before in the same source file. > > > > Based on a patch from Frediano Ziglio > > > > Signed-off-by: Christophe Fergeau > > --- > > server/sound.c | 1 - > > 1 file changed, 1 deletion(-) > > > > di

Re: [Spice-devel] [spice-gtk v2 0/3] ssl: Add support for OpenSSL 1.1.0

2017-01-11 Thread Fabian Grünbichler
On Wed, Jan 11, 2017 at 10:50:30AM +0100, Christophe Fergeau wrote: > Sebastian sent these patches privately a while ago, I've run some tests on > them > and helped split them. They add support for OpenSSL 1.1.0 which makes some of > the > structures we were directly accessing private. This also

Re: [Spice-devel] [spice-server 08/17] sound: Implement snd_channel_config_socket

2017-01-11 Thread Frediano Ziglio
> > This is in preparation for switching SndChannelClient into a proper > RedChannelClient. The prototype of the new helper matches what is > expected from the RedChannel::config_socket vfunc. > > To be able to achieve that, this commit associates the sound channel > RedsStream instance with the

Re: [Spice-devel] [spice-server 02/17] sound: Remove dummy-channel.[ch]

2017-01-11 Thread Christophe Fergeau
On Wed, Jan 11, 2017 at 05:57:15AM -0500, Frediano Ziglio wrote: > > > > This is no longer used since "sound: Convert SndChannel to GObject" > > > > Signed-off-by: Christophe Fergeau > > Didn't notice could be already removed. > However this looks like a partial patch I had in my list, some cre

Re: [Spice-devel] [spice-server 03/17] sound: Remove extraneous whitespace

2017-01-11 Thread Christophe Fergeau
On Wed, Jan 11, 2017 at 05:50:43AM -0500, Frediano Ziglio wrote: > > > > No need for this whitespace before ';' > > --- > > server/sound.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/server/sound.c b/server/sound.c > > index f154465..1f6c243 100644 > > --- a/se

Re: [Spice-devel] [spice-server 06/17] sound: Don't dereference pointer before NULL check

2017-01-11 Thread Frediano Ziglio
> > Based on a patch from Frediano Ziglio > > Signed-off-by: Christophe Fergeau Acked-by: Frediano Ziglio Frediano > --- > server/sound.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/server/sound.c b/server/sound.c > index 7ebea90..1eab75b 100644 > --- a/

Re: [Spice-devel] [spice-server 05/17] sound: Remove unused __new_channel() argument

2017-01-11 Thread Frediano Ziglio
> > It became unused in 26027036c 'red_channel: remove unused migrate flag > from RedChannel' but was never removed from the function prototype. > > Signed-off-by: Christophe Fergeau Acked-by: Frediano Ziglio Frediano > --- > server/sound.c | 9 - > 1 file changed, 4 insertions(+),

Re: [Spice-devel] [spice-server 04/17] sound: Remove duplicate AudioFrame typedef

2017-01-11 Thread Frediano Ziglio
> > It's already defined before in the same source file. > > Based on a patch from Frediano Ziglio > > Signed-off-by: Christophe Fergeau > --- > server/sound.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/server/sound.c b/server/sound.c > index 1f6c243..d24a0d9 100644 > --- a/serv

Re: [Spice-devel] [spice-server 02/17] sound: Remove dummy-channel.[ch]

2017-01-11 Thread Frediano Ziglio
> > This is no longer used since "sound: Convert SndChannel to GObject" > > Signed-off-by: Christophe Fergeau Didn't notice could be already removed. However this looks like a partial patch I had in my list, some credit is missing. Also the other part of this initial patch ended up merged in yo

Re: [Spice-devel] [spice-server 03/17] sound: Remove extraneous whitespace

2017-01-11 Thread Frediano Ziglio
> > No need for this whitespace before ';' > --- > server/sound.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/server/sound.c b/server/sound.c > index f154465..1f6c243 100644 > --- a/server/sound.c > +++ b/server/sound.c > @@ -1508,7 +1508,7 @@ static void on_new_reco

Re: [Spice-devel] [spice-server 01/17] channel: Remove commented out function prototype

2017-01-11 Thread Frediano Ziglio
> This became obsolete when RedChannel became GObject-based. > > Signed-off-by: Christophe Fergeau > --- > server/red-channel.h | 12 > 1 file changed, 12 deletions(-) > > diff --git a/server/red-channel.h b/server/red-channel.h > index 11a4088..f2866f5 100644 > --- a/server/red-c

[Spice-devel] [spice-gtk v2 3/3] ssl: Use accessors rather than direct struct access

2017-01-11 Thread Christophe Fergeau
From: Sebastian Andrzej Siewior In OpenSSL 1.1.0, the struct fields are private so we can no longer directly access them. The accessors are not available in previous OpenSSL releases, so we need to add compat helpers. --- src/bio-gio.c | 108 ---

[Spice-devel] [spice-gtk v2 0/3] ssl: Add support for OpenSSL 1.1.0

2017-01-11 Thread Christophe Fergeau
Sebastian sent these patches privately a while ago, I've run some tests on them and helped split them. They add support for OpenSSL 1.1.0 which makes some of the structures we were directly accessing private. This also keeps support with older OpenSSL releases by adding some compat helpers. Thes

[Spice-devel] [spice-gtk v2 1/3] ssl: Stop creating our own X509_LOOKUP_METHOD

2017-01-11 Thread Christophe Fergeau
From: Sebastian Andrzej Siewior OpenSSL 1.1.0 does not seem to provide API to do that anymore. There is no need to create a custom lookup to begin with. This method here has no callbacks implemented and is doing nothing. The way I understand it, it is used to retrieve a `lookup' object which pro

[Spice-devel] [spice-gtk v2 2/3] ssl: Rework our custom BIO type

2017-01-11 Thread Christophe Fergeau
From: Sebastian Andrzej Siewior This commit changes to an actual new BIO method rather than reusing an existing BIO method, and overriding only the fields that we need. The approach before this commit would be causing issues with OpenSSL 1.1.0 as some of the fields we access have become opaque. -

Re: [Spice-devel] [spice-gtk 3/3] ssl: Use accessors rather than direct struct access

2017-01-11 Thread Pavel Grunt
On Wed, 2017-01-11 at 10:15 +0100, Christophe Fergeau wrote: > On Mon, Jan 09, 2017 at 03:38:43PM +0100, Pavel Grunt wrote: > > > +static int BIO_get_new_index(void) > > > +{ > > > +return 128; > > > > looking at openssl implementation > > https://github.com/openssl/openssl/commit/8b8d963db5bb

Re: [Spice-devel] [spice-gtk 3/3] ssl: Use accessors rather than direct struct access

2017-01-11 Thread Christophe Fergeau
On Mon, Jan 09, 2017 at 03:38:43PM +0100, Pavel Grunt wrote: > > +static int BIO_get_new_index(void) > > +{ > > +return 128; > > looking at openssl implementation > https://github.com/openssl/openssl/commit/8b8d963db5bb619fbada014f294f > d09a855a2650 > > it uses BIO_TYPE_START and increments

[Spice-devel] [spice-server 09/17] sound: Add separate SND_MUTE_MASK

2017-01-11 Thread Christophe Fergeau
Currently MUTE and VOLUME commands use the same VOLUME mask. This commit introduces a separate SND_MUTE_MASK for MUTE commands to make things a bit more clear. Based on a patch from Frediano Ziglio Signed-off-by: Christophe Fergeau --- server/sound.c | 25 +++-- 1 file chan

[Spice-devel] [spice-server 14/17] sound: Remove code from spice_server_record_get_samples()

2017-01-11 Thread Christophe Fergeau
It's ok to remove it because ? Based on a patch from Frediano Ziglio Signed-off-by: Christophe Fergeau --- Not sure what to say in this commit log either. server/sound.c | 9 - 1 file changed, 9 deletions(-) diff --git a/server/sound.c b/server/sound.c index 1a5f70c..434350a 100644

[Spice-devel] [spice-server 15/17] sound: Use RedChannelClient to receive/send data

2017-01-11 Thread Christophe Fergeau
You can see that SndChannelClient has much less field as the code to read/write from/to client is reused from RedChannelClient instead of creating a fake RedChannelClient just to make the system happy. One of the different between the old sound code and all other RedChannelClient objects was that

[Spice-devel] [spice-server 01/17] channel: Remove commented out function prototype

2017-01-11 Thread Christophe Fergeau
This became obsolete when RedChannel became GObject-based. Signed-off-by: Christophe Fergeau --- server/red-channel.h | 12 1 file changed, 12 deletions(-) diff --git a/server/red-channel.h b/server/red-channel.h index 11a4088..f2866f5 100644 --- a/server/red-channel.h +++ b/server

[Spice-devel] [spice-server 07/17] sound: Rework spice_server_playback_get_buffer() error handling

2017-01-11 Thread Christophe Fergeau
Missing detailed log... Based on a patch from Frediano Ziglio Signed-off-by: Christophe Fergeau --- As the log indicates, a better log would be needed for this one. Christophe server/sound.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server/sound.c b/ser

[Spice-devel] [spice-server 13/17] sound: Remove SndChannelClient::channel

2017-01-11 Thread Christophe Fergeau
We can get it from our DummyChannelClient rather than storing it in SndChannelClient. Based on a patch from Frediano Ziglio Signed-off-by: Christophe Fergeau --- server/sound.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/server/sound.c b/server/s

[Spice-devel] [spice-server 00/17] Convert SndChannelClient to GObject

2017-01-11 Thread Christophe Fergeau
Hey, This series is an attempt at splitting "sound: Convert SndChannelClient to GObject" https://lists.freedesktop.org/archives/spice-devel/2017-January/034773.html in much smaller chunks to ease reviews, and make git history more usable. This might be a bit artificial at times (especially the co

[Spice-devel] [spice-server 04/17] sound: Remove duplicate AudioFrame typedef

2017-01-11 Thread Christophe Fergeau
It's already defined before in the same source file. Based on a patch from Frediano Ziglio Signed-off-by: Christophe Fergeau --- server/sound.c | 1 - 1 file changed, 1 deletion(-) diff --git a/server/sound.c b/server/sound.c index 1f6c243..d24a0d9 100644 --- a/server/sound.c +++ b/server/sou

[Spice-devel] [spice-server 06/17] sound: Don't dereference pointer before NULL check

2017-01-11 Thread Christophe Fergeau
Based on a patch from Frediano Ziglio Signed-off-by: Christophe Fergeau --- server/sound.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/sound.c b/server/sound.c index 7ebea90..1eab75b 100644 --- a/server/sound.c +++ b/server/sound.c @@ -1125,11 +1125,11 @@ SP

[Spice-devel] [spice-server 10/17] sound: Add sanity checks in snd_{playback, record}_send

2017-01-11 Thread Christophe Fergeau
Filter out commands which should not happen. Should it be a g_warn_if_fail() or such instead? Based on a patch from Frediano Ziglio Signed-off-by: Christophe Fergeau --- server/sound.c | 4 1 file changed, 4 insertions(+) diff --git a/server/sound.c b/server/sound.c index 7941ea2..d45e4b

[Spice-devel] [spice-server 17/17] sound: Convert SndChannelClient to RedChannelClient

2017-01-11 Thread Christophe Fergeau
SndChannelClient is now inheriting from GObject, and has switched from using its own code for sending data to using RedChannelClient. This commit makes it directly inherit from RedChannelClient rather than having a channel_client field. This allows to get rid of the whole DummyChannel/DummyChannelC

[Spice-devel] [spice-server 02/17] sound: Remove dummy-channel.[ch]

2017-01-11 Thread Christophe Fergeau
This is no longer used since "sound: Convert SndChannel to GObject" Signed-off-by: Christophe Fergeau --- server/Makefile.am | 2 -- server/dummy-channel.c | 94 -- server/dummy-channel.h | 60 server/sound.c

[Spice-devel] [spice-server 16/17] sound: Turn {Playback, Record}ChannelClient into GObjects

2017-01-11 Thread Christophe Fergeau
This is in preparation for making them inherit from RedChannelClient. Doing it in one go would result in a very huge commit, so this commit starts by turning these into GObjects, while still using a DummyChannelClient instance for sending the data. Based on a patch from Frediano Ziglio Signed-of

[Spice-devel] [spice-server 11/17] sound: Prefer snd_set_command() over snd_*_send_*()

2017-01-11 Thread Christophe Fergeau
snd_set_command()/snd_send() are higher level methods which take care of scheduling calls to the corresponding snd_*_send_*() methods when appropriate. This commit switches a few direct snd_*_send_*() calls to snd_set_command()/snd_send(). Based on a patch from Frediano Ziglio Signed-off-by: Chr

[Spice-devel] [spice-server 05/17] sound: Remove unused __new_channel() argument

2017-01-11 Thread Christophe Fergeau
It became unused in 26027036c 'red_channel: remove unused migrate flag from RedChannel' but was never removed from the function prototype. Signed-off-by: Christophe Fergeau --- server/sound.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server/sound.c b/server/sou

[Spice-devel] [spice-server 08/17] sound: Implement snd_channel_config_socket

2017-01-11 Thread Christophe Fergeau
This is in preparation for switching SndChannelClient into a proper RedChannelClient. The prototype of the new helper matches what is expected from the RedChannel::config_socket vfunc. To be able to achieve that, this commit associates the sound channel RedsStream instance with the DummyChannelCli

[Spice-devel] [spice-server 12/17] sound: Remove SndChannelClient::send_data::marshaller

2017-01-11 Thread Christophe Fergeau
We can use the marshaller provided by the dummy RedChannelClient associated with SndChannelClient. Based on a patch from Frediano Ziglio Signed-off-by: Christophe Fergeau --- server/sound.c | 49 - 1 file changed, 28 insertions(+), 21 deletions(-

[Spice-devel] [spice-server 03/17] sound: Remove extraneous whitespace

2017-01-11 Thread Christophe Fergeau
No need for this whitespace before ';' --- server/sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/sound.c b/server/sound.c index f154465..1f6c243 100644 --- a/server/sound.c +++ b/server/sound.c @@ -1508,7 +1508,7 @@ static void on_new_record_channel_client(SndCh