[ovs-dev] [PATCH ovn] northd-ddlog: Fix compilation error.

numans at ovn.org numans at ovn.org
Thu May 27 22:48:26 UTC 2021


From: Numan Siddique <numans at ovn.org>

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 <karthik.c at nutanix.com>
Signed-off-by: Numan Siddique <numans at ovn.org>
---
 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>,
+    router      : Intern<Router>,
     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,
-- 
2.31.1



More information about the dev mailing list