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

Re: [Xen-devel] [PATCH v4 3/3] public/io/netif.h: document new extra info for passing hash values



> -----Original Message-----
> From: Ian Campbell [mailto:ian.campbell@xxxxxxxxxx]
> Sent: 08 January 2016 16:06
> To: Paul Durrant; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Ian Jackson; Jan Beulich; Keir (Xen.org); Tim (Xen.org)
> Subject: Re: [PATCH v4 3/3] public/io/netif.h: document new extra info for
> passing hash values
> 
> On Thu, 2016-01-07 at 13:05 +0000, Paul Durrant wrote:
> >
> > Â/*
> > + * Hash types. (See NETIF_CTRL_TOEPLITZ_FLAG_* definitions above
> > + * for more information).
> > + */
> > +#define XEN_NETIF_HASH_TYPE_NONEÂÂÂÂÂÂÂÂ0
> > +#define XEN_NETIF_HASH_TYPE_IPV4ÂÂÂÂÂÂÂÂ1
> > +#define XEN_NETIF_HASH_TYPE_IPV4_TCPÂÂÂÂ2
> > +#define XEN_NETIF_HASH_TYPE_IPV6ÂÂÂÂÂÂÂÂ3
> > +#define XEN_NETIF_HASH_TYPE_IPV6_TCPÂÂÂÂ4
> 
> Should these be TYPE_TOEPLITZ_FOO? I suppose there are other possible
> TCPv4
> hashes for example.

I didn't consider that possibility of having multiple hashing schemes in 
operation at the same time, but I guess someone may want such a thing at some 
point.

> 
> Perhaps a comment along the lines "XEN_NETIF_HASH_TYPE_TOEPLITZ_*
> corresponds precisely to the bit positions ofÂNETIF_CTRL_TOEPLITZ_FLAG_*
> values", or even defining one in terms of the other?

Yes, that sounds reasonable...

> 
> The control side (previous patch) has a toeplitz specific mechanism, with
> individual hash bits with it, whereas this is presented more as a generic
> hash mechanism with specific bits corresponding to toeplitz hashes.
> i.e.ÂNETIF_CTRL_TOEPLITZ* vsÂXEN_NETIF_EXTRA_TYPE_HASH. Seems like a
> wrinkle, but I'm not sure if its an important one.
> 

...if perhaps I make the extra type XEN_NETIF_EXTRA_TYPE_TOEPLITZ_HASH. That 
would leave things more open for someone else adding an extra type for another 
hash and needed a slightly different format/set of flags.

  Paul

> Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.