Re: [Spice-devel] [PATCH spice-common 0/4] RFC: add structured logging and log category

2017-06-14 Thread Christophe de Dinechin
> On 14 Jun 2017, at 19:53, Marc-André Lureau > wrote: > > Hi > > - Original Message - c) Bugs which we have to be able to reproduce, because there is no useful information in the debug log, e.g.

Re: [Spice-devel] [PATCH spice-server] reds: use a single field for RedsClientMonitorsConfig buffer size

2017-06-14 Thread Christophe Fergeau
On Wed, Jun 14, 2017 at 08:54:13AM +0100, Frediano Ziglio wrote: > buffer_pos was just the buffer size beside for a short time > during buffer reallocation so just use a field. > > Change suggested by Christophe Fergeau. I have a local patch removing RedsClientMonitorsConfig altogether in favour

Re: [Spice-devel] [PATCH spice-common 1/2] log: remove deprecated SPICE_ABORT_LEVEL support

2017-06-14 Thread Jonathon Jongsma
On Wed, 2017-06-14 at 11:51 -0400, Frediano Ziglio wrote: > > > > On Wed, 2017-06-14 at 12:00 +0200, Victor Toso wrote: > > > Hi, > > > > > > On Tue, Jun 13, 2017 at 06:31:38PM +0200, Christophe Fergeau > > > wrote: > > > > On Tue, Jun 13, 2017 at 03:47:53PM +0100, Frediano Ziglio > > > > wrote:

[Spice-devel] [PATCH spice-gtk] build-sys: remove -DSPICE_DISABLE_ABORT

2017-06-14 Thread marcandre . lureau
From: Marc-André Lureau spice-gtk doesn't use spice_abort(). SPICE_DISABLE_ABORT was mostly used to change default abort behaviour on criticals in spice-common, but since it works fine without this flag since 2012 (commit 05a203af120016), we can safely remove that

[Spice-devel] [RFC PATCH spice-server v2 06/19] stream-device: Create channel for stream device

2017-06-14 Thread Frediano Ziglio
So can be used by the device to communicate with the clients. Signed-off-by: Frediano Ziglio --- server/stream-device.c | 20 1 file changed, 20 insertions(+) diff --git a/server/stream-device.c b/server/stream-device.c index 47eb3ac..6c4eccb 100644 ---

[Spice-devel] [RFC PATCH spice-server v2 01/19] char-device: Allows to handle port events from any char device

2017-06-14 Thread Frediano Ziglio
From spice_server_port_event API you can send port events to any char device. Although currently this is used only for "port" devices implemented in spicevmc.c this will allow to support such events using different objects. This will be used for instance for a streaming device which will be a

[Spice-devel] [RFC PATCH spice-server v2 09/19] stream-channel: Allows not fixed size

2017-06-14 Thread Frediano Ziglio
Remove the fixed size stream and support any display size. Signed-off-by: Frediano Ziglio --- server/stream-channel.c | 34 -- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/server/stream-channel.c b/server/stream-channel.c

[Spice-devel] [RFC PATCH spice-server v2 12/19] stream-channel: Do not show an empty blank screen on start

2017-06-14 Thread Frediano Ziglio
Start showing something when we have a surface and stream instead of showing a blank screen which is now not useful. Was useful for debugging purposes to understand that the new channel was sending messages correctly to client and client could handle them. Signed-off-by: Frediano Ziglio

[Spice-devel] [RFC PATCH spice-server v2 08/19] stream-device: Handle streaming data from device to channel

2017-06-14 Thread Frediano Ziglio
Handle stream data from device sending to the channel. Channel will forward to clients as proper DisplayChannel messaging creating and destroying the channel stream as needed. Signed-off-by: Frediano Ziglio --- server/stream-channel.c | 107

[Spice-devel] [RFC PATCH spice-server v2 18/19] WIP stream-device: handle cursor from device

2017-06-14 Thread Frediano Ziglio
TODO: reuse message code (limit messages based on type ??) document limit on cursor. use finalize instead of dispose for message. reuse code to close and destroy channels Signed-off-by: Frediano Ziglio --- server/stream-device.c | 117

[Spice-devel] [RFC PATCH spice-server v2 13/19] char-device: Do not stop and clear interface on reset

2017-06-14 Thread Frediano Ziglio
This allows less hard reset to the device so can be used to reset the device into a clean but working state. Signed-off-by: Frediano Ziglio --- server/char-device.c | 2 -- server/reds.c| 6 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git

[Spice-devel] [RFC PATCH spice-server v2 04/19] stream-channel: Write a really base channel to implement the streaming

2017-06-14 Thread Frediano Ziglio
Currently only compile, not used and not much sense Signed-off-by: Frediano Ziglio --- server/Makefile.am | 2 + server/stream-channel.c | 171 server/stream-channel.h | 53 +++ 3 files changed, 226

[Spice-devel] [RFC PATCH spice-server v2 00/19] Allows guests to send display data as video streams

2017-06-14 Thread Frediano Ziglio
This patcheset add a device to allow guest machines with assigned hardware devices to send encoded video and other informations that will be handled as a normal display by Spice. New GPU devices are capable to capture and encode video in an efficient way. As the GPU in this case is assigned to

[Spice-devel] [RFC PATCH spice-server v2 07/19] stream-channel: Implements initialization

2017-06-14 Thread Frediano Ziglio
Send proper messages to client to see the display. Currently a blank display will be showed to the clients connecting. Signed-off-by: Frediano Ziglio --- server/stream-channel.c | 46 -- 1 file changed, 44 insertions(+), 2

[Spice-devel] [RFC PATCH spice-server v2 02/19] stream-device: Add device to handle streaming

2017-06-14 Thread Frediano Ziglio
Add a stub device in guest. The aim of this device is make possible for the guest to send a stream through a DisplayChannel (in the sense of protocol channel). This stub allows the guest to send some data and you can see some debug lines of data arrived on host logs. Signed-off-by: Frediano

[Spice-devel] [RFC PATCH spice-server v2 16/19] stream-channel: Activate streaming report from client

2017-06-14 Thread Frediano Ziglio
Setting the capability is not enough, each stream must be enabled so do so if client support them. Signed-off-by: Frediano Ziglio --- server/stream-channel.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/server/stream-channel.c

[Spice-devel] [RFC PATCH spice-server v2 14/19] stream-device: Start supporting resetting device when close/open on guest

2017-06-14 Thread Frediano Ziglio
When guest close the device the host device has to be reset too. This make easier to restart the guest device which can happen in case of reboot, agent issues or if we want to update the agent. Signed-off-by: Frediano Ziglio --- server/stream-channel.c | 30

Re: [Spice-devel] [PATCH spice-common 1/2] log: remove deprecated SPICE_ABORT_LEVEL support

2017-06-14 Thread Jonathon Jongsma
On Wed, 2017-06-14 at 12:00 +0200, Victor Toso wrote: > Hi, > > On Tue, Jun 13, 2017 at 06:31:38PM +0200, Christophe Fergeau wrote: > > On Tue, Jun 13, 2017 at 03:47:53PM +0100, Frediano Ziglio wrote: > > > This feature was marked obsolete by efd1d3cb4d8eee more than > > > an year ago. > > > >

[Spice-devel] [RFC PATCH spice-server v2 19/19] WIP: Try to reduce delay

2017-06-14 Thread Frediano Ziglio
This is an hacky patch that tryes to reduce lag --- server/stream-channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/stream-channel.c b/server/stream-channel.c index 433e42a..e5e073f 100644 --- a/server/stream-channel.c +++ b/server/stream-channel.c @@ -510,7

[Spice-devel] [RFC PATCH spice-server v2 05/19] stream-channel: Start implementing DisplayChannel properly

2017-06-14 Thread Frediano Ziglio
Handle messages from clients. Some some messages to clients. Signed-off-by: Frediano Ziglio --- server/stream-channel.c | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/server/stream-channel.c

[Spice-devel] [RFC PATCH spice-server v2 11/19] stream-channel: Support client connection/disconnection

2017-06-14 Thread Frediano Ziglio
On new client we must restart the stream so new clients can receive correct data without having to wait next full screen (which on idle screen could take ages). On disconnection we should tell the guest to stop streaming not wasting resources to stream not needed data. Signed-off-by: Frediano

Re: [Spice-devel] [PATCH spice-common 1/2] log: remove deprecated SPICE_ABORT_LEVEL support

2017-06-14 Thread Christophe Fergeau
On Wed, Jun 14, 2017 at 10:40:27AM -0500, Jonathon Jongsma wrote: > > Stable releases in spice, I see. IMHO, we should consider 0.13.1 for > > that. Stable releases in spice-server take too long. > > > > Yeah, I agree we probably need a new spice-server release soon. > Yup, I've been saying

Re: [Spice-devel] [PATCH spice-common 1/2] log: remove deprecated SPICE_ABORT_LEVEL support

2017-06-14 Thread Marc-André Lureau
Hi - Original Message - > > > > On Wed, 2017-06-14 at 12:00 +0200, Victor Toso wrote: > > > Hi, > > > > > > On Tue, Jun 13, 2017 at 06:31:38PM +0200, Christophe Fergeau wrote: > > > > On Tue, Jun 13, 2017 at 03:47:53PM +0100, Frediano Ziglio wrote: > > > > > This feature was marked

Re: [Spice-devel] [PATCH spice-server] log: remove not widely used logging domain usage

2017-06-14 Thread Marc-André Lureau
Hi, - Original Message - > As discussed recently the usage of domain for logging has > different issues (they are not filtered and handled coherently) > and are not widely used in the code. > > Signed-off-by: Frediano Ziglio ack > --- > server/dispatcher.c | 2 --

[Spice-devel] [RFC PATCH spice-protocol 4/4] Add support for setting cursor shape from guest

2017-06-14 Thread Frediano Ziglio
This allows to better support client mouse using streaming device Signed-off-by: Frediano Ziglio --- spice/stream-device.h | 17 + 1 file changed, 17 insertions(+) diff --git a/spice/stream-device.h b/spice/stream-device.h index a37b911..cad487d 100644 ---

[Spice-devel] [RFC PATCH spice-protocol 0/4] Protocol extension to support sending display data as video streams

2017-06-14 Thread Frediano Ziglio
This protocol is intended for guest machines with assigned hardware devices to send encoded video and other informations that will be handled as a normal display by Spice. New GPU devices are capable to capture and encode video in an efficient way. As the GPU in this case is assigned to the guest

[Spice-devel] [RFC PATCH spice-protocol 3/4] Add error reports from server to guest

2017-06-14 Thread Frediano Ziglio
--- spice/stream-device.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/spice/stream-device.h b/spice/stream-device.h index 3ce74d0..a37b911 100644 --- a/spice/stream-device.h +++ b/spice/stream-device.h @@ -67,6 +67,8 @@ typedef enum StreamDevType {

[Spice-devel] [RFC PATCH spice-protocol 1/4] Add protocol to send streams to server

2017-06-14 Thread Frediano Ziglio
This protocol allows a guest to send a video stream to the server. Signed-off-by: Frediano Ziglio --- spice/Makefile.am | 1 + spice/stream-device.h | 96 +++ 2 files changed, 97 insertions(+) create mode 100644

Re: [Spice-devel] [PATCH spice-gtk 3/5] widget: skip spice_egl_resize_display() if context is not ready

2017-06-14 Thread Marc-André Lureau
On Thu, Jun 8, 2017 at 3:39 PM Marc-André Lureau wrote: > Hi > > On Thu, Jun 8, 2017 at 12:55 PM Pavel Grunt wrote: > >> On Thu, 2017-06-08 at 00:55 +0400, marcandre.lur...@redhat.com wrote: >> > From: Marc-André Lureau

Re: [Spice-devel] [PATCH spice-gtk 2/5] widget: minor code style improvements

2017-06-14 Thread Marc-André Lureau
On Thu, Jun 8, 2017 at 12:59 PM Christophe Fergeau wrote: > On Thu, Jun 08, 2017 at 04:41:55AM -0400, Marc-André Lureau wrote: > > Hi > > > > - Original Message - > > > On Thu, Jun 08, 2017 at 04:31:20AM -0400, Marc-André Lureau wrote: > > > > Hi > > > > > > > >

Re: [Spice-devel] [PATCH spice-common 1/2] log: remove deprecated SPICE_ABORT_LEVEL support

2017-06-14 Thread Frediano Ziglio
> > On Wed, 2017-06-14 at 12:00 +0200, Victor Toso wrote: > > Hi, > > > > On Tue, Jun 13, 2017 at 06:31:38PM +0200, Christophe Fergeau wrote: > > > On Tue, Jun 13, 2017 at 03:47:53PM +0100, Frediano Ziglio wrote: > > > > This feature was marked obsolete by efd1d3cb4d8eee more than > > > > an

[Spice-devel] [PATCH spice-server] log: remove not widely used logging domain usage

2017-06-14 Thread Frediano Ziglio
As discussed recently the usage of domain for logging has different issues (they are not filtered and handled coherently) and are not widely used in the code. Signed-off-by: Frediano Ziglio --- server/dispatcher.c | 2 -- server/lz4-encoder.c | 2 -- server/red-worker.c |

Re: [Spice-devel] [PATCH spice-gtk 0/5] "Couldn't find current GLX or EGL context" on X11

2017-06-14 Thread Marc-André Lureau
On Thu, Jun 8, 2017 at 12:56 AM wrote: > From: Marc-André Lureau > > Hi, > > The following patches fixes the "Couldn't find current GLX or EGL > context" error on X11. I don't know when and why the regression > happened, but there is

Re: [Spice-devel] [PATCH spice-common 0/4] RFC: add structured logging and log category

2017-06-14 Thread Christophe Fergeau
On Wed, Jun 14, 2017 at 10:44:49AM +0200, Christophe de Dinechin wrote: > > > On 13 Jun 2017, at 12:17, Marc-André Lureau > > wrote: > > > > >> - Better memory locality (not wasting a whole cache line for a single flag) > > > > minor, because log is not for hot

Re: [Spice-devel] [PATCH spice-server] reds: use a single field for RedsClientMonitorsConfig buffer size

2017-06-14 Thread Christophe Fergeau
On Wed, Jun 14, 2017 at 05:29:16PM +0200, Christophe Fergeau wrote: > On Wed, Jun 14, 2017 at 08:54:13AM +0100, Frediano Ziglio wrote: > > buffer_pos was just the buffer size beside for a short time > > during buffer reallocation so just use a field. > > > > Change suggested by Christophe

Re: [Spice-devel] [spice-server] reds: Replace RedsClientMonitorsConfig with SpiceBuffer

2017-06-14 Thread Frediano Ziglio
> > RedsClientMonitorsConfig duplicates what SpiceBuffer does, > so using we can replace it with SpiceBuffer and make > reds_on_main_agent_monitors_config() simpler. > > Signed-off-by: Christophe Fergeau > --- > server/reds-private.h | 8 +--- > server/reds.c

[Spice-devel] [spice-server] reds: Replace RedsClientMonitorsConfig with SpiceBuffer

2017-06-14 Thread Christophe Fergeau
RedsClientMonitorsConfig duplicates what SpiceBuffer does, so using we can replace it with SpiceBuffer and make reds_on_main_agent_monitors_config() simpler. Signed-off-by: Christophe Fergeau --- server/reds-private.h | 8 +--- server/reds.c | 29

Re: [Spice-devel] [PATCH spice-common 1/2] log: remove deprecated SPICE_ABORT_LEVEL support

2017-06-14 Thread Marc-André Lureau
Hi - Original Message - > This feature was marked obsolete by efd1d3cb4d8eee more than > an year ago. > > Signed-off-by: Frediano Ziglio I suggest a follow-up patch to remove all #if SPICE_DISABLE_ABORT handling (I sent a patch to spice-gtk since it seems useless

Re: [Spice-devel] [PATCH spice-common 0/4] RFC: add structured logging and log category

2017-06-14 Thread Christophe de Dinechin
> On 14 Jun 2017, at 17:06, Christophe Fergeau wrote: > > On Wed, Jun 14, 2017 at 10:44:49AM +0200, Christophe de Dinechin wrote: >> >>> On 13 Jun 2017, at 12:17, Marc-André Lureau >>> wrote: >>> >> - Better memory locality (not

Re: [Spice-devel] [PATCH spice-common 0/4] RFC: add structured logging and log category

2017-06-14 Thread Marc-André Lureau
Hi - Original Message - > >> c) Bugs which we have to be able to reproduce, because there is no > >> useful information in the debug log, e.g. > >> https://bugzilla.redhat.com/show_bug.cgi?id=1017261. Here, we know an > >> assertion failed, but nothing about what happened to get there, so

[Spice-devel] [PATCH spice-gtk] RFC: build-sys: remove the spice-controller library

2017-06-14 Thread marcandre . lureau
From: Marc-André Lureau The spice-controller was a small library to let NPAPI browser plugins communicate with the spice client. Due to usage of vala, the library could not promise ABI stability, and was also considerer a pretty poor implementation. Furthermore,

Re: [Spice-devel] [spice-server] Remove use of spice_debug(NULL)

2017-06-14 Thread Frediano Ziglio
> > On Tue, 2017-06-13 at 19:08 +0200, Christophe Fergeau wrote: > > This is causing issues with potential improvements to the logging > > system, and I've always found this usage a bit odd anyway. > > This means we also need to remove -Wformat-zero-length from our > > CFLAGS > > to avoid

[Spice-devel] [PATCH spice-server] reds: use a single field for RedsClientMonitorsConfig buffer size

2017-06-14 Thread Frediano Ziglio
buffer_pos was just the buffer size beside for a short time during buffer reallocation so just use a field. Change suggested by Christophe Fergeau. Signed-off-by: Frediano Ziglio --- server/reds-private.h | 1 - server/reds.c | 9 - 2 files changed, 4

Re: [Spice-devel] [PATCH spice-common 3/4] RFC: Add spice log categories

2017-06-14 Thread Victor Toso
Hi, On Tue, Jun 13, 2017 at 10:55:23AM -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > > > If you set G_LOG_USE_STRUCTURED, glib will use structured log API. But > > > there is a single structured log handler (contrary to traditional glog > > > that can have per-domain).

Re: [Spice-devel] [PATCH spice-common 1/2] log: remove deprecated SPICE_ABORT_LEVEL support

2017-06-14 Thread Frediano Ziglio
> > On Tue, Jun 13, 2017 at 03:47:53PM +0100, Frediano Ziglio wrote: > > This feature was marked obsolete by efd1d3cb4d8eee more than > > an year ago. > > How many stable releases has this been in? How many distros have been > shipping said stable releases, for how long? > > (rethorical

Re: [Spice-devel] [PATCH spice-gtk] RFC: build-sys: remove the spice-controller library

2017-06-14 Thread Marc-André Lureau
Hi Jeremy - Original Message - > On 06/14/2017 02:55 PM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > The spice-controller was a small library to let NPAPI browser plugins > > communicate with the spice client. Due to usage of vala,

Re: [Spice-devel] [PATCH spice-gtk] RFC: build-sys: remove the spice-controller library

2017-06-14 Thread Jeremy White
On 06/14/2017 02:55 PM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The spice-controller was a small library to let NPAPI browser plugins > communicate with the spice client. Due to usage of vala, the library > could not promise ABI stability,

Re: [Spice-devel] [PATCH spice-common 0/4] RFC: add structured logging and log category

2017-06-14 Thread Christophe de Dinechin
> On 13 Jun 2017, at 12:17, Marc-André Lureau > wrote: > >> - Better memory locality (not wasting a whole cache line for a single flag) > > minor, because log is not for hot traces. My experience differs from yours, and as a result, the idea that “log is not

Re: [Spice-devel] [PATCH spice-common 0/4] RFC: add structured logging and log category

2017-06-14 Thread Victor Toso
Hi, On Wed, Jun 14, 2017 at 10:44:49AM +0200, Christophe de Dinechin wrote: > > > On 13 Jun 2017, at 12:17, Marc-André Lureau > > wrote: > > >> - Better memory locality (not wasting a whole cache line for a single flag) > > > > minor, because log is not for hot

Re: [Spice-devel] [PATCH spice-gtk v3] Remove unnecessary debug check from SPICE_DEBUG

2017-06-14 Thread Marc-André Lureau
Hi - Original Message - > On Fri, 2017-06-09 at 14:29 -0400, Marc-André Lureau wrote: > > Hi > > > > - Original Message - > > > Hi > > > > > > - Original Message - > > > > > If I was reading the code of a project and noticed that they > > > > > checked a > > > > > global

Re: [Spice-devel] [PATCH spice-common 1/2] log: remove deprecated SPICE_ABORT_LEVEL support

2017-06-14 Thread Victor Toso
Hi, On Tue, Jun 13, 2017 at 06:31:38PM +0200, Christophe Fergeau wrote: > On Tue, Jun 13, 2017 at 03:47:53PM +0100, Frediano Ziglio wrote: > > This feature was marked obsolete by efd1d3cb4d8eee more than > > an year ago. > > How many stable releases has this been in? * Spice-gtk: v0.31, v0.32,

Re: [Spice-devel] [PATCH spice-common 2/4] Replace spice_* logging with g_*

2017-06-14 Thread Frediano Ziglio
Yesterday trying to remove some environment variable I realized that by default spice_critical is fatal while g_critical is not introducing a regression with possible security problems. > > From: Marc-André Lureau > > --- > common/canvas_base.c| 148

Re: [Spice-devel] [PATCH spice-common 2/4] Replace spice_* logging with g_*

2017-06-14 Thread Frediano Ziglio
> > Hi > > - Original Message - > > Yesterday trying to remove some environment variable I realized that > > by default spice_critical is fatal while g_critical is not introducing > > a regression with possible security problems. > > > > Correct (unless SPICE_DISABLE_ABORT is defined,

Re: [Spice-devel] [PATCH spice-common 3/4] RFC: Add spice log categories

2017-06-14 Thread Frediano Ziglio
> > From: Marc-André Lureau > > A log category is defined with SPICE_LOG_CATEGORY(). The macro will > register a structure with a constructor (and unregister it on > unloading with a destructor). > > spice_log_init() must be called at initialization time, to set