Re: [ovs-dev] [PATCH v2] lib/dpif-netdev: Integrate megaflow classifier.

2014-10-23 Thread Joe Stringer
On 23 October 2014 11:21, Joe Stringer wrote: > Hi Jarno, > > On 7 October 2014 14:43, Jarno Rajahalme wrote: > >> flow inserts and removals are simplified: >> >> - No need for classifier internal mutex, as dpif-netdev already has a >> 'flow_mutex'. >> - Number of memory allocations/frees can

Re: [ovs-dev] [PATCH v2] lib/dpif-netdev: Integrate megaflow classifier.

2014-10-23 Thread Joe Stringer
Hi Jarno, On 7 October 2014 14:43, Jarno Rajahalme wrote: > flow inserts and removals are simplified: > > - No need for classifier internal mutex, as dpif-netdev already has a > 'flow_mutex'. > - Number of memory allocations/frees can be halved. > > Lookup code path is a bit more effcient as w

Re: [ovs-dev] [PATCH v2] lib/dpif-netdev: Integrate megaflow classifier.

2014-10-16 Thread Jarno Rajahalme
On Oct 16, 2014, at 2:09 PM, Jarno Rajahalme wrote: > Thanks for the reviews, Alex! > > On Oct 14, 2014, at 3:31 PM, Alex Wang wrote: >> >> +/* Insert 'rule' into 'cls'. */ >> +static void >> +dpcls_insert(struct dpcls *cls, struct dpcls_rule *rule, >> + const struct netdev_flow_k

Re: [ovs-dev] [PATCH v2] lib/dpif-netdev: Integrate megaflow classifier.

2014-10-16 Thread Jarno Rajahalme
Thanks for the reviews, Alex! On Oct 14, 2014, at 3:31 PM, Alex Wang wrote: > static inline struct netdev_flow_key * > -miniflow_to_netdev_flow_key(const struct miniflow *mf) > +miniflow_to_netdev_flow_key(const struct miniflow *miniflow) > { > -return (struct netdev_flow_key *) CONST_CAST(

Re: [ovs-dev] [PATCH v2] lib/dpif-netdev: Integrate megaflow classifier.

2014-10-16 Thread Jarno Rajahalme
On Oct 14, 2014, at 4:22 PM, Alex Wang wrote: > the output of function 'netdev_flow_key_hash()' seems not got used, > for dpcls_lookup(), we calculate the hash inside the function, > for emc_lookup(), we use 'dpif_netdev_packet_get_dp_hash()' > for flow_table(), we use the 'flow_hash(&flow->flow

Re: [ovs-dev] [PATCH v2] lib/dpif-netdev: Integrate megaflow classifier.

2014-10-14 Thread Alex Wang
> > @ -2697,19 +2845,28 @@ fast_path_processing(struct dp_netdev_pmd_thread >> *pmd, >> ? &put_actions >> : &actions; >> >> -ovs_mutex_lock(&dp->flow_mutex); >> -/* XXX: There's a brief race where this flow could have >> already >> -

Re: [ovs-dev] [PATCH v2] lib/dpif-netdev: Integrate megaflow classifier.

2014-10-14 Thread Alex Wang
> > static inline struct netdev_flow_key * > -miniflow_to_netdev_flow_key(const struct miniflow *mf) > +miniflow_to_netdev_flow_key(const struct miniflow *miniflow) > { > -return (struct netdev_flow_key *) CONST_CAST(struct miniflow *, mf); > +struct netdev_flow_key *key; > + > +INIT_C

Re: [ovs-dev] [PATCH v2] lib/dpif-netdev: Integrate megaflow classifier.

2014-10-14 Thread Alex Wang
On Mon, Oct 13, 2014 at 6:51 PM, Alex Wang wrote: > Hey Jarno, > > I have some high-level comments/questions as follow: > > On Tue, Oct 7, 2014 at 2:43 PM, Jarno Rajahalme > wrote: > >> flow inserts and removals are simplified: >> >> - No need for classifier internal mutex, as dpif-netdev alread

Re: [ovs-dev] [PATCH v2] lib/dpif-netdev: Integrate megaflow classifier.

2014-10-13 Thread Alex Wang
Hey Jarno, I have some high-level comments/questions as follow: On Tue, Oct 7, 2014 at 2:43 PM, Jarno Rajahalme wrote: > flow inserts and removals are simplified: > > - No need for classifier internal mutex, as dpif-netdev already has a > 'flow_mutex'. > I'm thinking maybe we should keep the

[ovs-dev] [PATCH v2] lib/dpif-netdev: Integrate megaflow classifier.

2014-10-07 Thread Jarno Rajahalme
flow inserts and removals are simplified: - No need for classifier internal mutex, as dpif-netdev already has a 'flow_mutex'. - Number of memory allocations/frees can be halved. Lookup code path is a bit more effcient as well, as we can rely on netdev_flow_key always having inline data. This w