[Spice-devel] [PATCH spice-streaming-agent 0/3] refactor the protocol I/O

Lukáš Hrázký lhrazky at redhat.com
Thu Sep 27 09:16:42 UTC 2018


On Wed, 2018-09-26 at 10:47 -0500, Jonathon Jongsma wrote:
> So, off list we had discussed potentially investigating whether we
> wanted to use something like Cap'n Proto for the StreamDevice
> communication protocol. With that in mind, is it worth reviewing this
> series, or should we wait?

I think it's worth reviewing. Part of this would go away with Cap'n
Proto (the marshalling/demarshalling code itself), part of this would
have to be changed more or less, depending on the Cap'n Proto API and
whether we use their stream framing code.

Still, this cleans up the code and structures it in C++ way, so the
potential Cap'n Proto patches should be cleaner too...

On another topic, there is a bit less incentive to merge 3/3 (the poll
encapsulation) since we are now planning to move the daemon / session
agents management to the vd_agent. But it still could be used to do the
cursor updates, using poll instead of the thread (which is not clean
and has problems) for asynchronous operation.

Cheers,
Lukas

> On Tue, 2018-07-10 at 16:51 +0200, Lukáš Hrázký wrote:
> > Hi all,
> > 
> > the refactor continues, in this series I introduce the InboundMessage
> > and OutboundMessage classes for the StreamPort I/O.
> > 
> > 2/3 is heavily based on a previously posted patch by Christophe de
> > Dinechin. It is a carbon copy for the important parts, though I
> > changed a
> > lot of small details and so didn't dare to retain the authorship.
> > Christophe, I have no issue putting you as the author.
> > 
> > 3/3, the Poll class, is more of a RFC, though it should be good to
> > go.
> > There is no reason for this generalization of the poll interface in
> > current code, but the daemon patches by Frediano and also the cursor
> > thread having a FD that could be used in the poll loop can put it to
> > use.
> > 
> > Lukáš Hrázký (3):
> >   Introduce InboundMessages for the StreamPort class
> >   Introduce OutboundMessages for the StreamPort class
> >   Wrap the polling mechanism in a Poll class
> > 
> >  src/Makefile.am               |   2 +
> >  src/cursor-updater.cpp        | 128 +++++++++++--------
> >  src/poll.cpp                  |  51 ++++++++
> >  src/poll.hpp                  |  56 +++++++++
> >  src/spice-streaming-agent.cpp | 229 ++++++++++--------------------
> > ----
> >  src/stream-port.cpp           |  70 ++++++++++-
> >  src/stream-port.hpp           |  76 ++++++++++-
> >  7 files changed, 396 insertions(+), 216 deletions(-)
> >  create mode 100644 src/poll.cpp
> >  create mode 100644 src/poll.hpp
> > 


More information about the Spice-devel mailing list