From patchwork Fri Jan 5 03:24:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1882714 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T5plT2M8wz1ydb for ; Fri, 5 Jan 2024 14:26:29 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7BAE9846B5; Fri, 5 Jan 2024 03:26:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7BAE9846B5 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3QyS5l2p904R; Fri, 5 Jan 2024 03:26:26 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 9B3668468A; Fri, 5 Jan 2024 03:26:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 9B3668468A Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7866FC008E; Fri, 5 Jan 2024 03:26:25 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 37E31C0037 for ; Fri, 5 Jan 2024 03:26:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 74E94439AA for ; Fri, 5 Jan 2024 03:24:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 74E94439AA X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oML-jvx1u8Z3 for ; Fri, 5 Jan 2024 03:24:46 +0000 (UTC) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by smtp2.osuosl.org (Postfix) with ESMTPS id 63EB14034B for ; Fri, 5 Jan 2024 03:24:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 63EB14034B Received: by mail.gandi.net (Postfix) with ESMTPSA id 545A220002; Fri, 5 Jan 2024 03:24:44 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Thu, 4 Jan 2024 22:24:33 -0500 Message-ID: <20240105032433.767005-1-numans@ovn.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240105032000.766473-1-numans@ovn.org> References: <20240105032000.766473-1-numans@ovn.org> MIME-Version: 1.0 X-GND-Sasl: numans@ovn.org Subject: [ovs-dev] [PATCH ovn v4 14/16] northd: Add a noop handler for northd SB mac binding. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Numan Siddique 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. Signed-off-by: Numan Siddique --- northd/inc-proc-northd.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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,