Subject: Re: [RFC 3/4] bond: support more Layer 4 protocols

From: Stephen Hemminger <[email-masked]>
Date: Fri, 5 Feb 2010 08:42:40 -0800

On Fri, 05 Feb 2010 11:38:05 +0100
Patrick McHardy <[email-masked]> wrote:

> Stephen Hemminger wrote:
> > +/* Map of protocols with standard ports available to include in hash */
> > +static const bool has_layer4[256] = {
> > +	[IPPROTO_TCP] = 1,
> > +	[IPPROTO_UDP] = 1,
> > +	[IPPROTO_UDPLITE] = 1,
> > +	[IPPROTO_SCTP] = 1,
> > +	[IPPROTO_DCCP] = 1,
> > +	[IPPROTO_ESP] = 1,
> > +};
> > +
> 
> How about using a bitmap or u8s to keep this more compact?

I thought about that, but couldn't find a clever way to initialize at
compile time other than hardcoding constants?