From patchwork Thu May 27 22:47:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1484917 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=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Frjcn41y7z9sTD for ; Fri, 28 May 2021 08:47:21 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 586AB4020B; Thu, 27 May 2021 22:47:19 +0000 (UTC) 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 vLPxDnUVhP2O; Thu, 27 May 2021 22:47:18 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTP id AA4EC40015; Thu, 27 May 2021 22:47:17 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6F0E6C000E; Thu, 27 May 2021 22:47:17 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 414AAC0001 for ; Thu, 27 May 2021 22:47:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2875B83668 for ; Thu, 27 May 2021 22:47:16 +0000 (UTC) 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 tyTZsx_OWvfm for ; Thu, 27 May 2021 22:47:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by smtp1.osuosl.org (Postfix) with ESMTPS id 36E1B835F2 for ; Thu, 27 May 2021 22:47:14 +0000 (UTC) Received: (Authenticated sender: numans@ovn.org) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id E6E1A1BF204; Thu, 27 May 2021 22:47:10 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Thu, 27 May 2021 18:47:04 -0400 Message-Id: <20210527224704.1713553-1-numans@ovn.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Cc: Karthik Chandrashekar Subject: [ovs-dev] [PATCH] northd-ddlog: Fix compilation error. 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 After the commit in the Fixes tag, compilation is failing with the below error: ddlog -i ../northd/ovn_northd.dl -o ./northd -L .local/ddlog/lib -L ./northd error: ovn/northd/lrouter.dl:823.24-823.27: Unknown field lr     router in &Router(.lr = nb::Logical_Router{.static_routes = routes}), This patch fixes it. Fixes: 494e59e341b0("Static Routes: Add ability to specify "discard" nexthop") CC: Karthik Chandrashekar Signed-off-by: Numan Siddique Acked-by: Ben Pfaff --- northd/lrouter.dl | 5 +++-- northd/ovn_northd.dl | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/northd/lrouter.dl b/northd/lrouter.dl index 524fdda55..6c25b1ca9 100644 --- a/northd/lrouter.dl +++ b/northd/lrouter.dl @@ -815,12 +815,13 @@ relation &DiscardRoute(lrsr: nb::Logical_Router_Static_Route, Some{(var ip_prefix, var plen)} = ip46_parse_cidr(lrsr.ip_prefix). relation RouterDiscardRoute_( - router : Ref, + router : Intern, key : route_key) RouterDiscardRoute_(.router = router, .key = route.key) :- - router in &Router(.lr = nb::Logical_Router{.static_routes = routes}), + router in &Router(), + nb::Logical_Router(._uuid = router._uuid, .static_routes = routes), var route_id = FlatMap(routes), route in &DiscardRoute(.lrsr = nb::Logical_Router_Static_Route{._uuid = route_id}). diff --git a/northd/ovn_northd.dl b/northd/ovn_northd.dl index d6638e2ac..cb8418540 100644 --- a/northd/ovn_northd.dl +++ b/northd/ovn_northd.dl @@ -6419,7 +6419,7 @@ for (Route(.port = port, } /* Install drop routes for all the static routes with nexthop = "discard" */ -Flow(.logical_datapath = router.lr._uuid, +Flow(.logical_datapath = router._uuid, .stage = s_ROUTER_IN_IP_ROUTING(), .priority = priority as integer, .__match = ip_match,