From patchwork Tue Jan 30 21:23:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1893125 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=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (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 4TPdVS6z5dz1yQ0 for ; Wed, 31 Jan 2024 08:25:04 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id E5D1B43565; Tue, 30 Jan 2024 21:25:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org E5D1B43565 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 0T-SBBhs-gmt; Tue, 30 Jan 2024 21:25:01 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 7609143559; Tue, 30 Jan 2024 21:25:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 7609143559 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3EF81C0077; Tue, 30 Jan 2024 21:25:00 +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 10D9BC008E for ; Tue, 30 Jan 2024 21:24:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id CC0A242EF9 for ; Tue, 30 Jan 2024 21:23:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org CC0A242EF9 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 wCIwGYYQwxYD for ; Tue, 30 Jan 2024 21:23: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 B312342EC3 for ; Tue, 30 Jan 2024 21:23:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B312342EC3 Received: by mail.gandi.net (Postfix) with ESMTPSA id C9BC320005; Tue, 30 Jan 2024 21:23:41 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Tue, 30 Jan 2024 16:23:28 -0500 Message-ID: <20240130212328.1483408-1-numans@ovn.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240130212028.1482153-1-numans@ovn.org> References: <20240130212028.1482153-1-numans@ovn.org> MIME-Version: 1.0 X-GND-Sasl: numans@ovn.org Cc: Dumitru Ceara Subject: [ovs-dev] [PATCH ovn v6 11/13] 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. Acked-by: Han Zhou Acked-by: Dumitru Ceara 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,