diff mbox series

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

Message ID 20210527224704.1713553-1-numans@ovn.org
State Not Applicable
Headers show
Series [ovs-dev] northd-ddlog: Fix compilation error. | expand

Commit Message

Numan Siddique May 27, 2021, 10:47 p.m. UTC
From: Numan Siddique <numans@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@nutanix.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
---
 northd/lrouter.dl    | 5 +++--
 northd/ovn_northd.dl | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

Comments

0-day Robot May 27, 2021, 10:56 p.m. UTC | #1
Bleep bloop.  Greetings Numan Siddique, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


git-am:
error: sha1 information is lacking or useless (northd/lrouter.dl).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 northd-ddlog: Fix compilation error.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
Ben Pfaff May 27, 2021, 11:08 p.m. UTC | #2
On Thu, May 27, 2021 at 06:47:04PM -0400, numans@ovn.org wrote:
> From: Numan Siddique <numans@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@nutanix.com>
> Signed-off-by: Numan Siddique <numans@ovn.org>

Acked-by: Ben Pfaff <blp@ovn.org>
Numan Siddique May 27, 2021, 11:28 p.m. UTC | #3
On Thu, May 27, 2021 at 7:09 PM Ben Pfaff <blp@ovn.org> wrote:
>
> On Thu, May 27, 2021 at 06:47:04PM -0400, numans@ovn.org wrote:
> > From: Numan Siddique <numans@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@nutanix.com>
> > Signed-off-by: Numan Siddique <numans@ovn.org>
>
> Acked-by: Ben Pfaff <blp@ovn.org>

Thanks for the review.  I applied this patch to the main branch.

Numan

> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
diff mbox series

Patch

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,