From patchwork Fri May 14 04:20:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1478310 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.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 4FhFgy21k1z9sWW for ; Fri, 14 May 2021 14:20:43 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 0A0BC60645; Fri, 14 May 2021 04:20:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G-4XZ7II9wn4; Fri, 14 May 2021 04:20:40 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTP id 3A39C60622; Fri, 14 May 2021 04:20:39 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 12E21C000D; Fri, 14 May 2021 04:20:39 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id ADE2EC0001 for ; Fri, 14 May 2021 04:20:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 8F534400FC for ; Fri, 14 May 2021 04:20:37 +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 uqOszexUKx7L for ; Fri, 14 May 2021 04:20:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by smtp2.osuosl.org (Postfix) with ESMTPS id 17A31400B5 for ; Fri, 14 May 2021 04:20:35 +0000 (UTC) X-Originating-IP: 75.54.222.30 Received: from sigfpe.attlocal.net (75-54-222-30.lightspeed.rdcyca.sbcglobal.net [75.54.222.30]) (Authenticated sender: blp@ovn.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 5166240002; Fri, 14 May 2021 04:20:30 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Thu, 13 May 2021 21:20:26 -0700 Message-Id: <20210514042026.2799046-1-blp@ovn.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Cc: Leonid Ryhzyk , Ben Pfaff , Mihai Budiu Subject: [ovs-dev] [PATCH ovn] ovn-northd-ddlog: Fix weight overflows. 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" 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 Acked-by: Numan Siddique Acked-by: Han Zhou --- 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) :-