diff mbox series

[ovs-dev,RFC,07/10] lflow.c: Set "changed" properly in lflow_handle_changed_ref().

Message ID 20220205084635.3725713-8-hzhou@ovn.org
State RFC
Headers show
Series Fine-grained address set incremental processing. | expand

Commit Message

Han Zhou Feb. 5, 2022, 8:46 a.m. UTC
The current code sets changed to true only when a lflow is reprocessed,
if the lflow is deleted (not found) the changed would be false, even if
we have deleted desired flows. Fortunately this should not cause real
problems yet because if a lflow is deleted it should later trigger the
lflow_handle_changed_flows(), which always update the engine state. But
it is still better to set it properly in lflow_handle_changed_ref() in
the first placer.

Signed-off-by: Han Zhou <hzhou@ovn.org>
---
 controller/lflow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/controller/lflow.c b/controller/lflow.c
index 965e91cce..0390e348a 100644
--- a/controller/lflow.c
+++ b/controller/lflow.c
@@ -516,6 +516,7 @@  lflow_handle_changed_ref(enum ref_type ref_type, const char *ref_name,
     if (ovs_list_is_empty(&lflows_todo)) {
         return true;
     }
+    *changed = true;
 
     struct hmap dhcp_opts = HMAP_INITIALIZER(&dhcp_opts);
     struct hmap dhcpv6_opts = HMAP_INITIALIZER(&dhcpv6_opts);
@@ -584,7 +585,6 @@  lflow_handle_changed_ref(enum ref_type ref_type, const char *ref_name,
         consider_logical_flow(lflow, &dhcp_opts, &dhcpv6_opts,
                               &nd_ra_opts, &controller_event_opts, false,
                               l_ctx_in, l_ctx_out);
-        *changed = true;
     }
     HMAP_FOR_EACH_SAFE (ofrn, ofrn_next, hmap_node, &flood_remove_nodes) {
         hmap_remove(&flood_remove_nodes, &ofrn->hmap_node);