"dev" <dev-boun...@openvswitch.org> wrote on 08/06/2016 06:43:23 AM:
> From: nickcooper-zhangtonghao <nickcooper-zhangtong...@opencloud.tech> > To: dev@openvswitch.org > Cc: nickcooper-zhangtonghao <nickcooper-zhangtong...@opencloud.tech> > Date: 08/06/2016 06:43 AM > Subject: [ovs-dev] [PATCH] ovn-controller: Combine two Logical_Flow > loops into one. > Sent by: "dev" <dev-boun...@openvswitch.org> > > Signed-off-by: nickcooper-zhangtonghao <nickcooper- > zhangtong...@opencloud.tech> > --- > ovn/controller/lflow.c | 14 +++++--------- > 1 file changed, 5 insertions(+), 9 deletions(-) > > diff --git a/ovn/controller/lflow.c b/ovn/controller/lflow.c > index fda10eb..0cc92a7 100644 > --- a/ovn/controller/lflow.c > +++ b/ovn/controller/lflow.c > @@ -412,18 +412,14 @@ add_logical_flows(struct controller_ctx *ctx, > const struct lport_index *lports, > } > full_logical_flow_processing = false; > } else { > - /* First, remove any flows that should be removed. */ > SBREC_LOGICAL_FLOW_FOR_EACH_TRACKED (lflow, ctx->ovnsb_idl) { > + /* Remove any flows that should be removed. */ > if (sbrec_logical_flow_is_deleted(lflow)) { > ofctrl_remove_flows(&lflow->header_.uuid); > - } > - } > - > - /* Now, add/modify existing flows. */ > - SBREC_LOGICAL_FLOW_FOR_EACH_TRACKED (lflow, ctx->ovnsb_idl) { > - if (!sbrec_logical_flow_is_deleted(lflow)) { > - /* if the logical flow is a modification, just remove > - * the flows for this row, and then add new flows. */ > + } else { > + /* Now, add/modify existing flows. If the logical > + * flow is a modification, just remove the flows > + * for this row, and then add new flows. */ > if (!sbrec_logical_flow_is_new(lflow)) { > ofctrl_remove_flows(&lflow->header_.uuid); > } > -- I had to go back through the July archives to remember why we ended up with two logical flow loops and this change was always on my radar, but I just forgot about it while chasing other higher priority items. So, I went ahead and ran through the ovn unit tests with -j4 50 times to verify that the test failure rate I'm seeing is reasonable (I didn't get one...), so Acked-by: Ryan Moats <rmo...@us.ibm.com> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev