The en_northd_output does not produce any output and
server as "dummy" to avoid run of multiple engines.
Move en_mac_binding_aging under this node, because
mac_binding_aging does not have any dependency.

Signed-off-by: Ales Musil <[email protected]>
---
 northd/en-northd-output.c  | 8 ++++++++
 northd/en-northd-output.h  | 2 ++
 northd/inc-proc-northd.c   | 5 ++---
 northd/mac-binding-aging.c | 4 +---
 4 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/northd/en-northd-output.c b/northd/en-northd-output.c
index cdb2f9558..df7ea2b31 100644
--- a/northd/en-northd-output.c
+++ b/northd/en-northd-output.c
@@ -56,3 +56,11 @@ northd_output_lflow_handler(struct engine_node *node, void 
*data OVS_UNUSED)
     engine_set_node_state(node, EN_UPDATED);
     return true;
 }
+
+bool
+northd_output_mac_binding_aging_handler(struct engine_node *node,
+                                        void *data OVS_UNUSED)
+{
+    engine_set_node_state(node, EN_UPDATED);
+    return true;
+}
diff --git a/northd/en-northd-output.h b/northd/en-northd-output.h
index d0079ea67..7165d4b55 100644
--- a/northd/en-northd-output.h
+++ b/northd/en-northd-output.h
@@ -13,5 +13,7 @@ bool northd_output_sync_to_sb_handler(struct engine_node 
*node,
                                       void *data OVS_UNUSED);
 bool northd_output_lflow_handler(struct engine_node *node,
                                  void *data OVS_UNUSED);
+bool northd_output_mac_binding_aging_handler(struct engine_node *node,
+                                             void *data OVS_UNUSED);
 
 #endif
diff --git a/northd/inc-proc-northd.c b/northd/inc-proc-northd.c
index d23993a55..1c8550df5 100644
--- a/northd/inc-proc-northd.c
+++ b/northd/inc-proc-northd.c
@@ -236,9 +236,6 @@ void inc_proc_northd_init(struct ovsdb_idl_loop *nb,
     engine_add_input(&en_lflow, &en_sb_multicast_group, NULL);
     engine_add_input(&en_lflow, &en_sb_igmp_group, NULL);
     engine_add_input(&en_lflow, &en_northd, NULL);
-    /* XXX: The "en_mac_binding_aging" should be separate "root" node
-     * once I-P engine allows multiple root nodes. */
-    engine_add_input(&en_lflow, &en_mac_binding_aging, NULL);
 
     engine_add_input(&en_sync_to_sb_addr_set, &en_nb_address_set,
                      sync_to_sb_addr_set_nb_address_set_handler);
@@ -256,6 +253,8 @@ void inc_proc_northd_init(struct ovsdb_idl_loop *nb,
                      northd_output_sync_to_sb_handler);
     engine_add_input(&en_northd_output, &en_lflow,
                      northd_output_lflow_handler);
+    engine_add_input(&en_northd_output, &en_mac_binding_aging,
+                     northd_output_mac_binding_aging_handler);
 
     struct engine_arg engine_arg = {
         .nb_idl = nb->idl,
diff --git a/northd/mac-binding-aging.c b/northd/mac-binding-aging.c
index f65353a69..1c30e979e 100644
--- a/northd/mac-binding-aging.c
+++ b/northd/mac-binding-aging.c
@@ -131,9 +131,7 @@ en_mac_binding_aging_run(struct engine_node *node, void 
*data OVS_UNUSED)
         waker->should_schedule = false;
     }
 
-    /* This node is part of lflow, but lflow does not depend on it. Setting
-     * state as unchanged does not trigger lflow node when it is not needed. */
-    engine_set_node_state(node, EN_UNCHANGED);
+    engine_set_node_state(node, EN_UPDATED);
 }
 
 void *
-- 
2.39.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to