From patchwork Mon Jan 13 22:52:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 1222380 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47xTPl43lpz9sNx for ; Tue, 14 Jan 2020 09:52:42 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id F387C86D73; Mon, 13 Jan 2020 22:52:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h2gsMCLFEHQ1; Mon, 13 Jan 2020 22:52:35 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 6DF3C86229; Mon, 13 Jan 2020 22:52:35 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 58315C18DD; Mon, 13 Jan 2020 22:52:35 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5139DC077D for ; Mon, 13 Jan 2020 22:52:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3AF1E858F7 for ; Mon, 13 Jan 2020 22:52:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eheRLk9nnVJ0 for ; Mon, 13 Jan 2020 22:52:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by fraxinus.osuosl.org (Postfix) with ESMTPS id DACD0858D4 for ; Mon, 13 Jan 2020 22:52:31 +0000 (UTC) Received: from localhost.localdomain.localdomain (unknown [216.113.160.77]) (Authenticated sender: hzhou@ovn.org) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 15605240004; Mon, 13 Jan 2020 22:52:28 +0000 (UTC) From: Han Zhou To: dev@openvswitch.org Date: Mon, 13 Jan 2020 14:52:24 -0800 Message-Id: <1578955945-19812-2-git-send-email-hzhou@ovn.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1578955945-19812-1-git-send-email-hzhou@ovn.org> References: <1578955945-19812-1-git-send-email-hzhou@ovn.org> Cc: Han Zhou Subject: [ovs-dev] [PATCH 2/3] ovn-controller.c: Move the position of handling OVN-SB related settings. 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: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Move the logic of handling OVN-SB related setting in external-ids after the ovs_idl_loop run, so that any change in the external-ids settings can take effect in the same iteration, without waiting for the next one. Signed-off-by: Han Zhou Tested-by: Flavio Fernandes Acked-by: Numan Siddique Acked-by: Mark Michelson --- controller/ovn-controller.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c index 3d843f7..abb1b4c 100644 --- a/controller/ovn-controller.c +++ b/controller/ovn-controller.c @@ -2012,10 +2012,6 @@ main(int argc, char *argv[]) while (!exiting) { engine_init_run(); - update_sb_db(ovs_idl_loop.idl, ovnsb_idl_loop.idl); - update_ssl_config(ovsrec_ssl_table_get(ovs_idl_loop.idl)); - ofctrl_set_probe_interval(get_ofctrl_probe_interval(ovs_idl_loop.idl)); - struct ovsdb_idl_txn *ovs_idl_txn = ovsdb_idl_loop_run(&ovs_idl_loop); unsigned int new_ovs_cond_seqno = ovsdb_idl_get_condition_seqno(ovs_idl_loop.idl); @@ -2027,6 +2023,10 @@ main(int argc, char *argv[]) ovs_cond_seqno = new_ovs_cond_seqno; } + update_sb_db(ovs_idl_loop.idl, ovnsb_idl_loop.idl); + update_ssl_config(ovsrec_ssl_table_get(ovs_idl_loop.idl)); + ofctrl_set_probe_interval(get_ofctrl_probe_interval(ovs_idl_loop.idl)); + struct ovsdb_idl_txn *ovnsb_idl_txn = ovsdb_idl_loop_run(&ovnsb_idl_loop); unsigned int new_ovnsb_cond_seqno