Re: [ovs-dev] [PATCH 01/10] lib/flow: Simplify miniflow accessors, add ipv6 support.

2014-04-29 Thread Jarno Rajahalme
On Apr 24, 2014, at 5:15 PM, Ethan Jackson wrote: > In the commit message s/suppoort/support/ > > Out of curiosity why replace the miniflow_get inline functions with macros? I got tired of writing (or rather copy&pasting) the “offset of(struct flow, )”. The macro can take the field name as an

Re: [ovs-dev] [PATCH 01/10] lib/flow: Simplify miniflow accessors, add ipv6 support.

2014-04-29 Thread Jarno Rajahalme
On Apr 21, 2014, at 6:08 PM, YAMAMOTO Takashi wrote: >> >> On Apr 20, 2014, at 7:49 PM, YAMAMOTO Takashi wrote: >> +hash = mhash_finish(hash, 13); /* No need to match byte length here. */ >>> >>> is it worth being special? >>> >> >> I知 not exactly sure what you ask here,

Re: [ovs-dev] [PATCH 01/10] lib/flow: Simplify miniflow accessors, add ipv6 support.

2014-04-24 Thread Ethan Jackson
In the commit message s/suppoort/support/ Out of curiosity why replace the miniflow_get inline functions with macros? > +/* Separate loops for better optimization. */ Why do we need separate loops? You think it somehow improves the branch predictor or something? Does this actually help

Re: [ovs-dev] [PATCH 01/10] lib/flow: Simplify miniflow accessors, add ipv6 support.

2014-04-21 Thread YAMAMOTO Takashi
> > On Apr 20, 2014, at 7:49 PM, YAMAMOTO Takashi wrote: > >>> +hash = mhash_finish(hash, 13); /* No need to match byte length >>> here. */ >> >> is it worth being special? >> > > I知 not exactly sure what you ask here, but in general, the length parameter > is used to distinguish be

Re: [ovs-dev] [PATCH 01/10] lib/flow: Simplify miniflow accessors, add ipv6 support.

2014-04-21 Thread Jarno Rajahalme
On Apr 20, 2014, at 7:49 PM, YAMAMOTO Takashi wrote: >> +hash = mhash_finish(hash, 13); /* No need to match byte length >> here. */ > > is it worth being special? > I’m not exactly sure what you ask here, but in general, the length parameter is used to distinguish between inputs tha

Re: [ovs-dev] [PATCH 01/10] lib/flow: Simplify miniflow accessors, add ipv6 support.

2014-04-20 Thread YAMAMOTO Takashi
> +hash = mhash_finish(hash, 13); /* No need to match byte length here. > */ is it worth being special? YAMAMOTO Takashi ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [PATCH 01/10] lib/flow: Simplify miniflow accessors, add ipv6 support.

2014-04-18 Thread Jarno Rajahalme
Add new macro MINIFLOW_MAP(FIELD) that returns the map covering the given struct flow field. Change the miniflow accessors to macros so that they can take the field name directly. Use these to add ipv6 suppoort to miniflow_hash_5tuple(). Add ipv6 support to flow_hash_5tuple() as well so that the