Ben Pfaff <[email protected]> wrote on 07/03/2016 04:35:10 PM:
> From: Ben Pfaff <[email protected]>
> To: Ryan Moats/Omaha/IBM@IBMUS
> Cc: [email protected]
> Date: 07/03/2016 04:35 PM
> Subject: Re: [ovs-dev,v21,4/8] Refactor lflow.c
>
> On Sun, Jul 03, 2016 at 10:35:29AM -0500, Ryan Moats wrote:
> > Refactor code block inside of SBREC_LOGICAL_FLOW_FOR_EACH
> > loop in add_logical_flow so that this can be reused when
> > incremental processing is added.
> >
> > The is_new parameter is added for use in a later patch set.
> >
> > Signed-off-by: Ryan Moats <[email protected]>
>
> Applied, thanks!
>
Since parts 3 and 4 have merged and part 2 didn't it looks
like you will be asking for a v22 of that patch. If so, you
are likely to get the same code with different explanations,
so let me try the new explanations on you in advance :)
Starting at L509 of the ofctrl.c (as it looks after applying
patch 2):
/* This is a modification operation, so check to see if there
* is a duplicate flow. If not, see if there is a flow whose
* match criteria is either more or less specific then this flow.
* If we find a duplicate flow or a flow that this flow should
* replace (because we are adding or removing match criteria),
* then drop the new flow as superseded. */
The new description of ovn_flow_lookup_by_uuid (which can have
it's name changed if you'd like, I'm still not sure what a good
name for it would be...)
/* Find the flow that the target flow can replace. The target flow
* can replace a flow in the flow table that:
* 1) has the same uuid as the target flow (i.e. comes from the same
* ovsdb table row),
* 2) has the same table_id and priority as the target flow,
* 3) either has the same match criteria as the target flow, or
* has a match criteria that is either a proper subset or proper
* superset of the target flow.
*
* The reason for the proper set and proper subset part of condition 3
* is that modifying logical flow criteria (for example adding an
* IP address to an already existing logical port) will lead to new
* match criteria being added to the flow, so we want to find the
* flow with the old match criteria to avoid having duplicate flows.
*
* A flow is considered a proper subset of a second flow (with respect
* to match criteria) if the first flow has wildcards that the
* second flow does not, the second flow does not have wildcards that the
* first flow does not, and the two flows are identical with the
* exception of the first flow's wildcards. */
Ryan
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev