[ovs-dev] [PATCH ovn v2 3/9] lflow.c: No need to remove flows for adding new datapath.

Han Zhou hzhou at ovn.org
Mon Sep 7 06:45:36 UTC 2020


When handling a new datapath, the flows should have never existed, so there is
no need to remove them before adding. Although it seems not harmful to do it,
the implementation was not complete. To remove existing flows, it also need to
remove the flow references. Because the flows never existed, so this wasn't a
problem. So, instead of fixing the incomplete flow removing, this patch simply
avoid the unnecessary operation.

Signed-off-by: Han Zhou <hzhou at ovn.org>
---
 controller/lflow.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/controller/lflow.c b/controller/lflow.c
index 1515612..0c35b7d 100644
--- a/controller/lflow.c
+++ b/controller/lflow.c
@@ -907,9 +907,6 @@ lflow_add_flows_for_datapath(const struct sbrec_datapath_binding *dp,
     const struct sbrec_logical_flow *lflow;
     SBREC_LOGICAL_FLOW_FOR_EACH_EQUAL (
         lflow, lf_row, l_ctx_in->sbrec_logical_flow_by_logical_datapath) {
-        /* Remove the lflow from flow_table if present before processing it. */
-        ofctrl_remove_flows(l_ctx_out->flow_table, &lflow->header_.uuid);
-
         if (!consider_logical_flow(lflow, &dhcp_opts, &dhcpv6_opts,
                                    &nd_ra_opts, &controller_event_opts,
                                    l_ctx_in, l_ctx_out)) {
-- 
2.1.0



More information about the dev mailing list