diff mbox series

[ovs-dev,v6,11/13] northd: Add a noop handler for northd SB mac binding.

Message ID 20240130212328.1483408-1-numans@ovn.org
State Accepted
Headers show
Series northd lflow incremental processing | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Numan Siddique Jan. 30, 2024, 9:23 p.m. UTC
From: Numan Siddique <numans@ovn.org>

northd engine node uses the sb mac binding table to
cleanup mac binding entries for deleted logical ports
and datapaths. Any update to SB mac binding doesn't
change the northd engine node state or data.  Hence
it is ok to add a noop_handler.

Presently, mac_binding_aging node depends on SB mac binding
too and it falls back to full recompute for any SB mac binding
changes.  It needs to be evaluated if mac_binding_aging
really needs to handle SB mac binding updates.  If not, we
can omit the SB mac binding updates (ovsdb_idl_omit_alert())
and also remove the noop_handler this patch adds for northd node.

Acked-by: Han Zhou <hzhou@ovn.org>
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
---
 northd/inc-proc-northd.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/northd/inc-proc-northd.c b/northd/inc-proc-northd.c
index f7c3d2bcf5..40a9e5e06c 100644
--- a/northd/inc-proc-northd.c
+++ b/northd/inc-proc-northd.c
@@ -177,7 +177,6 @@  void inc_proc_northd_init(struct ovsdb_idl_loop *nb,
     engine_add_input(&en_northd, &en_sb_mirror, NULL);
     engine_add_input(&en_northd, &en_sb_meter, NULL);
     engine_add_input(&en_northd, &en_sb_datapath_binding, NULL);
-    engine_add_input(&en_northd, &en_sb_mac_binding, NULL);
     engine_add_input(&en_northd, &en_sb_dns, NULL);
     engine_add_input(&en_northd, &en_sb_ha_chassis_group, NULL);
     engine_add_input(&en_northd, &en_sb_ip_multicast, NULL);
@@ -186,6 +185,17 @@  void inc_proc_northd_init(struct ovsdb_idl_loop *nb,
     engine_add_input(&en_northd, &en_sb_static_mac_binding, NULL);
     engine_add_input(&en_northd, &en_sb_chassis_template_var, NULL);
 
+    /* northd engine node uses the sb mac binding table to
+     * cleanup mac binding entries for deleted logical ports
+     * and datapaths. Any update to SB mac binding doesn't
+     * change the northd engine node state or data.  Hence
+     * it is ok to add a noop_handler here.
+     * Note: mac_binding_aging engine node depends on SB mac binding
+     * and it results in full recompute for any changes to it.
+     * */
+    engine_add_input(&en_northd, &en_sb_mac_binding,
+                     engine_noop_handler);
+
     engine_add_input(&en_northd, &en_sb_port_binding,
                      northd_sb_port_binding_handler);
     engine_add_input(&en_northd, &en_nb_nb_global,