Re: [ovs-dev] [PATCH ovn] ovn-northd-ddlog: Fix weight overflows.

2021-05-14 Thread Ben Pfaff
On Fri, May 14, 2021 at 01:37:08PM -0700, Han Zhou wrote:
> On Thu, May 13, 2021 at 9:20 PM Ben Pfaff  wrote:
> >
> > This fixes test failures in "ovn -- ACL allow-stateless omit conntrack -
> > Port_Group -- ovn-northd-ddlog" with and without "dp-groups=yes".  See
> > https://github.com/vmware/differential-datalog/pull/977 for the full
> > story.
> >
> > Signed-off-by: Ben Pfaff 
> > Reported-by: Ihar Hrachyshka 
> > Reported-at:
> https://mail.openvswitch.org/pipermail/ovs-dev/2021-May/382967.html
> > Suggested-by: Leonid Ryhzyk 
> > Suggested-by: Mihai Budiu 

...

> Thanks Ben! (Great explanation in the ddlog doc)
> 
> Acked-by: Han Zhou 

Thanks so much for the review!
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn] ovn-northd-ddlog: Fix weight overflows.

2021-05-14 Thread Ben Pfaff
On Fri, May 14, 2021 at 07:08:16AM -0400, Numan Siddique wrote:
> On Fri, May 14, 2021 at 12:21 AM Ben Pfaff  wrote:
> >
> > This fixes test failures in "ovn -- ACL allow-stateless omit conntrack -
> > Port_Group -- ovn-northd-ddlog" with and without "dp-groups=yes".  See
> > https://github.com/vmware/differential-datalog/pull/977 for the full
> > story.
> >
> > Signed-off-by: Ben Pfaff 
> > Reported-by: Ihar Hrachyshka 
> > Reported-at: 
> > https://mail.openvswitch.org/pipermail/ovs-dev/2021-May/382967.html
> > Suggested-by: Leonid Ryhzyk 
> > Suggested-by: Mihai Budiu 
> 
> Thanks for fixing this.

Thanks, I applied it to ovn master.

> Should we need to document it somewhere in OVN to use "output relation" ?

Yes, I was somewhat lazy.  Now sent as followup patch:
https://mail.openvswitch.org/pipermail/ovs-dev/2021-May/383027.html
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn] ovn-northd-ddlog: Fix weight overflows.

2021-05-14 Thread Han Zhou
On Thu, May 13, 2021 at 9:20 PM Ben Pfaff  wrote:
>
> This fixes test failures in "ovn -- ACL allow-stateless omit conntrack -
> Port_Group -- ovn-northd-ddlog" with and without "dp-groups=yes".  See
> https://github.com/vmware/differential-datalog/pull/977 for the full
> story.
>
> Signed-off-by: Ben Pfaff 
> Reported-by: Ihar Hrachyshka 
> Reported-at:
https://mail.openvswitch.org/pipermail/ovs-dev/2021-May/382967.html
> Suggested-by: Leonid Ryhzyk 
> Suggested-by: Mihai Budiu 
> ---
>  northd/lswitch.dl | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/northd/lswitch.dl b/northd/lswitch.dl
> index 8b1f35ac4378..8fbb313b9666 100644
> --- a/northd/lswitch.dl
> +++ b/northd/lswitch.dl
> @@ -70,7 +70,7 @@ LogicalSwitchPortWithUnknownAddress(ls_uuid, lsp_uuid)
:-
>  lsp in nb::Logical_Switch_Port(._uuid = lsp_uuid),
>  lsp.is_enabled() and lsp.addresses.contains("unknown").
>
> -relation LogicalSwitchHasUnknownPorts(ls: uuid, has_unknown: bool)
> +output relation LogicalSwitchHasUnknownPorts(ls: uuid, has_unknown: bool)
>  LogicalSwitchHasUnknownPorts(ls, true) :-
LogicalSwitchPortWithUnknownAddress(ls, _).
>  LogicalSwitchHasUnknownPorts(ls, false) :-
>  nb::Logical_Switch(._uuid = ls),
> @@ -116,7 +116,7 @@ LogicalSwitchStatefulACL(ls, acl) :-
>  LogicalSwitchACL(ls, acl),
>  nb::ACL(._uuid = acl, .action = "allow-related").
>
> -relation LogicalSwitchHasStatefulACL(ls: uuid, has_stateful_acl: bool)
> +output relation LogicalSwitchHasStatefulACL(ls: uuid, has_stateful_acl:
bool)
>
>  LogicalSwitchHasStatefulACL(ls, true) :-
>  LogicalSwitchStatefulACL(ls, _).
> @@ -125,7 +125,7 @@ LogicalSwitchHasStatefulACL(ls, false) :-
>  nb::Logical_Switch(._uuid = ls),
>  not LogicalSwitchStatefulACL(ls, _).
>
> -relation LogicalSwitchHasACLs(ls: uuid, has_acls: bool)
> +output relation LogicalSwitchHasACLs(ls: uuid, has_acls: bool)
>
>  LogicalSwitchHasACLs(ls, true) :-
>  LogicalSwitchACL(ls, _).
> @@ -170,7 +170,7 @@ LogicalSwitchWithDNSRecords(ls) :-
>  nb::DNS(._uuid = dns_uuid, .records = records),
>  not records.is_empty().
>
> -relation LogicalSwitchHasDNSRecords(ls: uuid, has_dns_records: bool)
> +output relation LogicalSwitchHasDNSRecords(ls: uuid, has_dns_records:
bool)
>
>  LogicalSwitchHasDNSRecords(ls, true) :-
>  LogicalSwitchWithDNSRecords(ls).
> @@ -186,7 +186,7 @@ LogicalSwitchHasNonRouterPort0(ls_uuid) :-
>  lsp in nb::Logical_Switch_Port(._uuid = lsp_uuid),
>  lsp.__type != "router".
>
> -relation LogicalSwitchHasNonRouterPort(ls: uuid, has_non_router_port:
bool)
> +output relation LogicalSwitchHasNonRouterPort(ls: uuid,
has_non_router_port: bool)
>  LogicalSwitchHasNonRouterPort(ls, true) :-
>  LogicalSwitchHasNonRouterPort0(ls).
>  LogicalSwitchHasNonRouterPort(ls, false) :-
> @@ -285,7 +285,7 @@ SwitchLBVIP(sw_uuid, lb, vip, backends) :-
>  var kv = FlatMap(vips),
>  (var vip, var backends) = kv.
>
> -relation LogicalSwitchHasLBVIP(sw_uuid: uuid, has_lb_vip: bool)
> +output relation LogicalSwitchHasLBVIP(sw_uuid: uuid, has_lb_vip: bool)
>  LogicalSwitchHasLBVIP(sw_uuid, true) :-
>  SwitchLBVIP(.sw_uuid = sw_uuid).
>  LogicalSwitchHasLBVIP(sw_uuid, false) :-
> --
> 2.31.1
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Thanks Ben! (Great explanation in the ddlog doc)

Acked-by: Han Zhou 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn] ovn-northd-ddlog: Fix weight overflows.

2021-05-14 Thread Numan Siddique
On Fri, May 14, 2021 at 12:21 AM Ben Pfaff  wrote:
>
> This fixes test failures in "ovn -- ACL allow-stateless omit conntrack -
> Port_Group -- ovn-northd-ddlog" with and without "dp-groups=yes".  See
> https://github.com/vmware/differential-datalog/pull/977 for the full
> story.
>
> Signed-off-by: Ben Pfaff 
> Reported-by: Ihar Hrachyshka 
> Reported-at: 
> https://mail.openvswitch.org/pipermail/ovs-dev/2021-May/382967.html
> Suggested-by: Leonid Ryhzyk 
> Suggested-by: Mihai Budiu 

Thanks for fixing this.

Should we need to document it somewhere in OVN to use "output relation" ?

Acked-by: Numan Siddique 

Numan


> ---
>  northd/lswitch.dl | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/northd/lswitch.dl b/northd/lswitch.dl
> index 8b1f35ac4378..8fbb313b9666 100644
> --- a/northd/lswitch.dl
> +++ b/northd/lswitch.dl
> @@ -70,7 +70,7 @@ LogicalSwitchPortWithUnknownAddress(ls_uuid, lsp_uuid) :-
>  lsp in nb::Logical_Switch_Port(._uuid = lsp_uuid),
>  lsp.is_enabled() and lsp.addresses.contains("unknown").
>
> -relation LogicalSwitchHasUnknownPorts(ls: uuid, has_unknown: bool)
> +output relation LogicalSwitchHasUnknownPorts(ls: uuid, has_unknown: bool)
>  LogicalSwitchHasUnknownPorts(ls, true) :- 
> LogicalSwitchPortWithUnknownAddress(ls, _).
>  LogicalSwitchHasUnknownPorts(ls, false) :-
>  nb::Logical_Switch(._uuid = ls),
> @@ -116,7 +116,7 @@ LogicalSwitchStatefulACL(ls, acl) :-
>  LogicalSwitchACL(ls, acl),
>  nb::ACL(._uuid = acl, .action = "allow-related").
>
> -relation LogicalSwitchHasStatefulACL(ls: uuid, has_stateful_acl: bool)
> +output relation LogicalSwitchHasStatefulACL(ls: uuid, has_stateful_acl: bool)
>
>  LogicalSwitchHasStatefulACL(ls, true) :-
>  LogicalSwitchStatefulACL(ls, _).
> @@ -125,7 +125,7 @@ LogicalSwitchHasStatefulACL(ls, false) :-
>  nb::Logical_Switch(._uuid = ls),
>  not LogicalSwitchStatefulACL(ls, _).
>
> -relation LogicalSwitchHasACLs(ls: uuid, has_acls: bool)
> +output relation LogicalSwitchHasACLs(ls: uuid, has_acls: bool)
>
>  LogicalSwitchHasACLs(ls, true) :-
>  LogicalSwitchACL(ls, _).
> @@ -170,7 +170,7 @@ LogicalSwitchWithDNSRecords(ls) :-
>  nb::DNS(._uuid = dns_uuid, .records = records),
>  not records.is_empty().
>
> -relation LogicalSwitchHasDNSRecords(ls: uuid, has_dns_records: bool)
> +output relation LogicalSwitchHasDNSRecords(ls: uuid, has_dns_records: bool)
>
>  LogicalSwitchHasDNSRecords(ls, true) :-
>  LogicalSwitchWithDNSRecords(ls).
> @@ -186,7 +186,7 @@ LogicalSwitchHasNonRouterPort0(ls_uuid) :-
>  lsp in nb::Logical_Switch_Port(._uuid = lsp_uuid),
>  lsp.__type != "router".
>
> -relation LogicalSwitchHasNonRouterPort(ls: uuid, has_non_router_port: bool)
> +output relation LogicalSwitchHasNonRouterPort(ls: uuid, has_non_router_port: 
> bool)
>  LogicalSwitchHasNonRouterPort(ls, true) :-
>  LogicalSwitchHasNonRouterPort0(ls).
>  LogicalSwitchHasNonRouterPort(ls, false) :-
> @@ -285,7 +285,7 @@ SwitchLBVIP(sw_uuid, lb, vip, backends) :-
>  var kv = FlatMap(vips),
>  (var vip, var backends) = kv.
>
> -relation LogicalSwitchHasLBVIP(sw_uuid: uuid, has_lb_vip: bool)
> +output relation LogicalSwitchHasLBVIP(sw_uuid: uuid, has_lb_vip: bool)
>  LogicalSwitchHasLBVIP(sw_uuid, true) :-
>  SwitchLBVIP(.sw_uuid = sw_uuid).
>  LogicalSwitchHasLBVIP(sw_uuid, false) :-
> --
> 2.31.1
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH ovn] ovn-northd-ddlog: Fix weight overflows.

2021-05-13 Thread Ben Pfaff
This fixes test failures in "ovn -- ACL allow-stateless omit conntrack -
Port_Group -- ovn-northd-ddlog" with and without "dp-groups=yes".  See
https://github.com/vmware/differential-datalog/pull/977 for the full
story.

Signed-off-by: Ben Pfaff 
Reported-by: Ihar Hrachyshka 
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2021-May/382967.html
Suggested-by: Leonid Ryhzyk 
Suggested-by: Mihai Budiu 
---
 northd/lswitch.dl | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/northd/lswitch.dl b/northd/lswitch.dl
index 8b1f35ac4378..8fbb313b9666 100644
--- a/northd/lswitch.dl
+++ b/northd/lswitch.dl
@@ -70,7 +70,7 @@ LogicalSwitchPortWithUnknownAddress(ls_uuid, lsp_uuid) :-
 lsp in nb::Logical_Switch_Port(._uuid = lsp_uuid),
 lsp.is_enabled() and lsp.addresses.contains("unknown").
 
-relation LogicalSwitchHasUnknownPorts(ls: uuid, has_unknown: bool)
+output relation LogicalSwitchHasUnknownPorts(ls: uuid, has_unknown: bool)
 LogicalSwitchHasUnknownPorts(ls, true) :- 
LogicalSwitchPortWithUnknownAddress(ls, _).
 LogicalSwitchHasUnknownPorts(ls, false) :-
 nb::Logical_Switch(._uuid = ls),
@@ -116,7 +116,7 @@ LogicalSwitchStatefulACL(ls, acl) :-
 LogicalSwitchACL(ls, acl),
 nb::ACL(._uuid = acl, .action = "allow-related").
 
-relation LogicalSwitchHasStatefulACL(ls: uuid, has_stateful_acl: bool)
+output relation LogicalSwitchHasStatefulACL(ls: uuid, has_stateful_acl: bool)
 
 LogicalSwitchHasStatefulACL(ls, true) :-
 LogicalSwitchStatefulACL(ls, _).
@@ -125,7 +125,7 @@ LogicalSwitchHasStatefulACL(ls, false) :-
 nb::Logical_Switch(._uuid = ls),
 not LogicalSwitchStatefulACL(ls, _).
 
-relation LogicalSwitchHasACLs(ls: uuid, has_acls: bool)
+output relation LogicalSwitchHasACLs(ls: uuid, has_acls: bool)
 
 LogicalSwitchHasACLs(ls, true) :-
 LogicalSwitchACL(ls, _).
@@ -170,7 +170,7 @@ LogicalSwitchWithDNSRecords(ls) :-
 nb::DNS(._uuid = dns_uuid, .records = records),
 not records.is_empty().
 
-relation LogicalSwitchHasDNSRecords(ls: uuid, has_dns_records: bool)
+output relation LogicalSwitchHasDNSRecords(ls: uuid, has_dns_records: bool)
 
 LogicalSwitchHasDNSRecords(ls, true) :-
 LogicalSwitchWithDNSRecords(ls).
@@ -186,7 +186,7 @@ LogicalSwitchHasNonRouterPort0(ls_uuid) :-
 lsp in nb::Logical_Switch_Port(._uuid = lsp_uuid),
 lsp.__type != "router".
 
-relation LogicalSwitchHasNonRouterPort(ls: uuid, has_non_router_port: bool)
+output relation LogicalSwitchHasNonRouterPort(ls: uuid, has_non_router_port: 
bool)
 LogicalSwitchHasNonRouterPort(ls, true) :-
 LogicalSwitchHasNonRouterPort0(ls).
 LogicalSwitchHasNonRouterPort(ls, false) :-
@@ -285,7 +285,7 @@ SwitchLBVIP(sw_uuid, lb, vip, backends) :-
 var kv = FlatMap(vips),
 (var vip, var backends) = kv.
 
-relation LogicalSwitchHasLBVIP(sw_uuid: uuid, has_lb_vip: bool)
+output relation LogicalSwitchHasLBVIP(sw_uuid: uuid, has_lb_vip: bool)
 LogicalSwitchHasLBVIP(sw_uuid, true) :-
 SwitchLBVIP(.sw_uuid = sw_uuid).
 LogicalSwitchHasLBVIP(sw_uuid, false) :-
-- 
2.31.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev