[Spice-devel] [spice-protocol v1 1/4] streaming: define max of number of concurrent streams

Victor Toso victortoso at redhat.com
Thu Apr 19 09:50:49 UTC 2018


Hi,

On Thu, Apr 19, 2018 at 03:19:40AM -0400, Frediano Ziglio wrote:
> > 
> > From: Victor Toso <me at victortoso.com>
> > 
> > This definition is lacking in client while in server it is hardcoded
> > to 50. Having a well defined limitation allow us to make the code
> > more robust and optimized.
> > 
> > Signed-off-by: Victor Toso <victortoso at redhat.com>
> > ---
> >  spice/protocol.h | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/spice/protocol.h b/spice/protocol.h
> > index cbf2f01..12ba6c3 100644
> > --- a/spice/protocol.h
> > +++ b/spice/protocol.h
> > @@ -45,6 +45,8 @@
> >  #define SPICE_TICKET_KEY_PAIR_LENGTH 1024
> >  #define SPICE_TICKET_PUBKEY_BYTES (SPICE_TICKET_KEY_PAIR_LENGTH / 8 + 34)
> >  
> > +#define SPICE_MAX_NUM_STREAMS 64
> > +
> >  typedef struct SPICE_ATTR_PACKED SpiceLinkHeader {
> >      uint32_t magic;
> >      uint32_t major_version;
> 
> Some more comments would be great I think, kind of
> 
> /*
>  * This is the maximum number of streams possible.
>  * IDs will be in the interval [0, SPICE_MAX_NUM_STREAMS).
>  */

Looks good, yes.

> Not sure if this should be here or in common/messages.h.

I went for protocol.h because there are some limits defined
above. No other reason.

Cheers,
        toso
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180419/18a0feba/attachment-0001.sig>


More information about the Spice-devel mailing list