Skip to content

Commit

Permalink
northd: Add a noop handler for northd SB mac binding.
Browse files Browse the repository at this point in the history
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>
(cherry picked from commit d817b5c)
  • Loading branch information
numansiddique committed Feb 2, 2024
1 parent 6bd5661 commit cde8814
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion northd/inc-proc-northd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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,
Expand Down

0 comments on commit cde8814

Please sign in to comment.