Re: [PATCH spice-protocol v2] Add definition of STREAM_MSG_CAPABILITIES_MAX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> 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@xxxxxxxxxx>
> > > 
> > > Acked-by: Christophe de Dinechin <dinechin@xxxxxxxxxx>
> > > 
> > > > ---
> > > >  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
> 

Yes, is supposed to be a bitfield so adding _BYTES is IMHO a good idea.

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]