[Spice-devel] [PATCH spice-protocol v2] Add definition of STREAM_MSG_CAPABILITIES_MAX

Jonathon Jongsma jjongsma at redhat.com
Thu Nov 2 08:49:46 UTC 2017


On Thu, 2017-11-02 at 04:34 -0400, Frediano Ziglio wrote:
> > 
> > Jonathon Jongsma writes:
> > 
> > > This message is specified to have a size limit of 1024, so
> > > provide this
> > > as a #define
> > > 
> > > Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
> > 
> > Acked-by: Christophe de Dinechin <dinechin at redhat.com>
> > 
> > > ---
> > >  spice/stream-device.h | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/spice/stream-device.h b/spice/stream-device.h
> > > index bf919ed..57de98b 100644
> > > --- a/spice/stream-device.h
> > > +++ b/spice/stream-device.h
> > > @@ -98,7 +98,7 @@ typedef enum StreamMsgType {
> > >   * If it is not sent, it means that guest/host doesn't support
> > > any
> > >   extension.
> > >   * Guest should send this as a reply from same type of message
> > >   * from the host.
> > > - * This message should be limited to 1024 bytes. This allows
> > > + * This message should be limited to
> > > STREAM_MSG_CAPABILITIES_MAX. This
> > > allows
> > >   * plenty of negotiations.
> > >   *
> > >   * States allowed: Initial(host), Idle(guest)
> > > @@ -108,6 +108,8 @@ typedef struct StreamMsgCapabilities {
> > >      uint8_t capabilities[0];
> > >  } StreamMsgCapabilities;
> > > 
> > > +#define STREAM_MSG_CAPABILITIES_MAX 1024
> > > +
> > >  /* Define the format of the stream, start a new stream.
> > >   * This message is sent by the guest to the host to
> > >   * tell the host the new stream format.
> 
> Is it clear if the unit is bit or bytes? Maybe
> STREAM_MSG_CAPABILITIES_MAX_BYTES ?
> 
> Frediano


Hmm, that's a good point. I didn't really think much about what format
the capabilities would take. I suppose it's intended as a bitfield? I
had already pushed the patch after Christophe's ack, but I can push a
fix if you want.

Jonathon


More information about the Spice-devel mailing list