From patchwork Fri Jun 1 17:41:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 924260 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dWzkSAKA"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40yBXQ45DPz9ry1 for ; Sat, 2 Jun 2018 03:44:06 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 166ABF13; Fri, 1 Jun 2018 17:42:44 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id B7F01EF1 for ; Fri, 1 Jun 2018 17:42:42 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pl0-f67.google.com (mail-pl0-f67.google.com [209.85.160.67]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id BD2346D6 for ; Fri, 1 Jun 2018 17:42:41 +0000 (UTC) Received: by mail-pl0-f67.google.com with SMTP id n10-v6so15714867plp.0 for ; Fri, 01 Jun 2018 10:42:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AS1Ft0R6iJ0USXgk4PQP6Wy24CsDN1HpDTjiTuK3KWE=; b=dWzkSAKAhN/xD7N3Tl5VcKe080udcJmMOQYsFKpSsz/ImT3xHQTzYfOHyrgPav6eVe BaFBRK4fL2nfZVAmJUpyxxneOKU/8BVYJ3x6bg3DIVM4e7o64TP5wvZjFnbn+qjD9V6a vZJq2HxM2zwSYjLWQ046CZOYNNAKWuOvNF5BLzKXSdIyFp6UGA4dKRwEJD0hOEn2NGu6 1U8pU4l4GFtfXA2OAp7jiIlAu0CYgMUv0sAOYyZ22ruRVRPeDKwmO5DfIYxABYOvgJRm GlAA/zFRE+OG9NPFGQsTg8ylwhIyYl4LQWPsF5VPkJmVczPym0jxLBfxGLpXd3lyOimT pNlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AS1Ft0R6iJ0USXgk4PQP6Wy24CsDN1HpDTjiTuK3KWE=; b=rIeAXLi2ha0r9y995GW51ELSbFKfXJYYhAiaiECE5YBqmq4833ay2i0tbrmmqDslVk tItU9qJWWD+oVIrfqey43aWRAZzpeV2P+lMYbAJ9Ev+hNcm8Dqiw7qwr43XIChegHn01 q+mhCtttOERmLOZmBQ3M15hlYUHiG3Uf9jLdHrB4Oz9JAS7zarqO5ZyPR52ex9leb31D ip+dOFckX/YXAMFczW8OpHM4YlCMh6r8qsDa5S0DNb1OPfDVy+wwoIXJxZVIezlzyvUk vs4KaoRVjYzDVMYT2qh7BY1DQX4F/CuR9pyHYZ5cRvI7meDFwm8cIcvHWZXnkSf2cDbR 7Ksw== X-Gm-Message-State: ALKqPwfqj7j9E+D+c6LFwSfBNV+Rp6MfCShJIlgcF/H2zoA/0cS3ayiO 8eWYu6Hh2hh8qvG2wcU3fp9tSw== X-Google-Smtp-Source: ADUXVKJDTYcB8+ixtYGdmv2t9/BYNCeq5oDNLZJ3WuWQHKQRNuT5ikJDnfqcIMEpVDojlCuPEqXuzQ== X-Received: by 2002:a17:902:5709:: with SMTP id k9-v6mr11776805pli.165.1527874961089; Fri, 01 Jun 2018 10:42:41 -0700 (PDT) Received: from localhost.localdomain.localdomain (c-73-162-150-77.hsd1.ca.comcast.net. [73.162.150.77]) by smtp.gmail.com with ESMTPSA id v26-v6sm9600279pfe.13.2018.06.01.10.42.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jun 2018 10:42:40 -0700 (PDT) From: Han Zhou X-Google-Original-From: Han Zhou To: dev@openvswitch.org Date: Fri, 1 Jun 2018 10:41:54 -0700 Message-Id: <1527874926-40450-5-git-send-email-hzhou8@ebay.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1527874926-40450-1-git-send-email-hzhou8@ebay.com> References: <1527874926-40450-1-git-send-email-hzhou8@ebay.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH v3 04/16] ovn-controller: Split SB inputs as separate incremental engine nodes X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org This patch expands the incremental processing by spliting SB inputs from runtime_data and add them as input for flow_output. Signed-off-by: Han Zhou --- ovn/controller/ovn-controller.c | 44 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/ovn/controller/ovn-controller.c b/ovn/controller/ovn-controller.c index 91e0293..63b797f 100644 --- a/ovn/controller/ovn-controller.c +++ b/ovn/controller/ovn-controller.c @@ -589,6 +589,20 @@ create_ovnsb_indexes(struct ovsdb_idl *ovnsb_idl) OVSDB_INDEX_ASC, NULL); } +ENGINE_FUNC_SB(chassis); +ENGINE_FUNC_SB(encap); +ENGINE_FUNC_SB(address_set); +ENGINE_FUNC_SB(port_group); +ENGINE_FUNC_SB(multicast_group); +ENGINE_FUNC_SB(datapath_binding); +ENGINE_FUNC_SB(port_binding); +ENGINE_FUNC_SB(mac_binding); +ENGINE_FUNC_SB(logical_flow); +ENGINE_FUNC_SB(dhcp_options); +ENGINE_FUNC_SB(dhcpv6_options); +ENGINE_FUNC_SB(dns); +ENGINE_FUNC_SB(gateway_chassis); + struct ed_type_runtime_data { struct chassis_index chassis_index; @@ -867,10 +881,38 @@ main(int argc, char *argv[]) struct ed_type_runtime_data ed_runtime_data; struct ed_type_flow_output ed_flow_output; + ENGINE_NODE_SB(chassis, "chassis", &ctx); + ENGINE_NODE_SB(encap, "encap", &ctx); + ENGINE_NODE_SB(address_set, "address_set", &ctx); + ENGINE_NODE_SB(port_group, "port_group", &ctx); + ENGINE_NODE_SB(multicast_group, "multicast_group", &ctx); + ENGINE_NODE_SB(datapath_binding, "datapath_binding", &ctx); + ENGINE_NODE_SB(port_binding, "port_binding", &ctx); + ENGINE_NODE_SB(mac_binding, "mac_binding", &ctx); + ENGINE_NODE_SB(logical_flow, "logical_flow", &ctx); + ENGINE_NODE_SB(dhcp_options, "dhcp_options", &ctx); + ENGINE_NODE_SB(dhcpv6_options, "dhcpv6_options", &ctx); + ENGINE_NODE_SB(dns, "dns", &ctx); + ENGINE_NODE_SB(gateway_chassis, "gateway_chassis", &ctx); + ENGINE_NODE(runtime_data, "runtime_data", &ctx); ENGINE_NODE(flow_output, "flow_output", &ctx); - engine_add_input(&en_flow_output, &en_runtime_data, NULL); + + engine_add_input(&en_flow_output, &en_sb_chassis, NULL); + engine_add_input(&en_flow_output, &en_sb_encap, NULL); + engine_add_input(&en_flow_output, &en_sb_address_set, NULL); + engine_add_input(&en_flow_output, &en_sb_port_group, NULL); + engine_add_input(&en_flow_output, &en_sb_multicast_group, NULL); + engine_add_input(&en_flow_output, &en_sb_datapath_binding, NULL); + engine_add_input(&en_flow_output, &en_sb_port_binding, NULL); + engine_add_input(&en_flow_output, &en_sb_mac_binding, NULL); + engine_add_input(&en_flow_output, &en_sb_logical_flow, NULL); + engine_add_input(&en_flow_output, &en_sb_dhcp_options, NULL); + engine_add_input(&en_flow_output, &en_sb_dhcpv6_options, NULL); + engine_add_input(&en_flow_output, &en_sb_dns, NULL); + engine_add_input(&en_flow_output, &en_sb_gateway_chassis, NULL); + engine_init(&en_flow_output); ofctrl_init(&ed_flow_output.group_table,