diff mbox series

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

Message ID 1598037383-97100-4-git-send-email-hzhou@ovn.org
State Changes Requested
Headers show
Series Incremental processing for flow installation. | expand

Commit Message

Han Zhou Aug. 21, 2020, 7:16 p.m. UTC
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@ovn.org>
---
 controller/lflow.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

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)) {