From patchwork Fri May 7 04:06:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1475333 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.137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 4Fbxlw5NvGz9sPf for ; Fri, 7 May 2021 14:09:16 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 14E0A41993; Fri, 7 May 2021 04:09:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CMg38iHQemR3; Fri, 7 May 2021 04:09:11 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTP id D4EED404E7; Fri, 7 May 2021 04:08:59 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C5D09C0011; Fri, 7 May 2021 04:08:59 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 32D7FC0022 for ; Fri, 7 May 2021 04:08:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3B208404B6 for ; Fri, 7 May 2021 04:07:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eHptKl-rs4t3 for ; Fri, 7 May 2021 04:07:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by smtp4.osuosl.org (Postfix) with ESMTPS id CDB754053E for ; Fri, 7 May 2021 04:07:49 +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 relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 1411AC0006; Fri, 7 May 2021 04:07:46 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Thu, 6 May 2021 21:06:57 -0700 Message-Id: <20210507040659.26830-26-blp@ovn.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210507040659.26830-1-blp@ovn.org> References: <20210507040659.26830-1-blp@ovn.org> MIME-Version: 1.0 Cc: Leonid Ryzhyk , Ben Pfaff Subject: [ovs-dev] [PATCH ovn v3 25/27] ovn-northd-ddlog: Intern nb::Logical_Switch_Port. 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: Leonid Ryzhyk Use the `--intern-table` switch to intern `Logical_Switch_Port` records, so that they can be copied and compared efficiently by pointer. Signed-off-by: Leonid Ryzhyk Signed-off-by: Ben Pfaff --- northd/helpers.dl | 2 +- northd/lrouter.dl | 4 ++-- northd/lswitch.dl | 28 ++++++++++++++-------------- northd/multicast.dl | 6 +++--- northd/ovn-nb.dlopts | 1 + northd/ovn_northd.dl | 38 +++++++++++++++++++------------------- 6 files changed, 40 insertions(+), 39 deletions(-) diff --git a/northd/helpers.dl b/northd/helpers.dl index 820e37bb3072..757532e46c0e 100644 --- a/northd/helpers.dl +++ b/northd/helpers.dl @@ -23,7 +23,7 @@ output relation Warning[string] /* Switch-to-router logical port connections */ relation SwitchRouterPeer(lsp: uuid, lsp_name: string, lrp: uuid) SwitchRouterPeer(lsp, lsp_name, lrp) :- - nb::Logical_Switch_Port(._uuid = lsp, .name = lsp_name, .__type = "router", .options = options), + &nb::Logical_Switch_Port(._uuid = lsp, .name = lsp_name, .__type = "router", .options = options), Some{var router_port} = options.get("router-port"), &nb::Logical_Router_Port(.name = router_port, ._uuid = lrp). diff --git a/northd/lrouter.dl b/northd/lrouter.dl index 3b5047c3ec01..a85e12d1b3df 100644 --- a/northd/lrouter.dl +++ b/northd/lrouter.dl @@ -92,7 +92,7 @@ FirstHopLogicalRouter(lrouter, lswitch) :- relation LogicalSwitchRouterPort(lsp: uuid, lsp_router_port: string, ls: uuid) LogicalSwitchRouterPort(lsp, lsp_router_port, ls) :- LogicalSwitchPort(lsp, ls), - nb::Logical_Switch_Port(._uuid = lsp, .__type = "router", .options = options), + &nb::Logical_Switch_Port(._uuid = lsp, .__type = "router", .options = options), Some{var lsp_router_port} = options.get("router-port"). /* @@ -359,7 +359,7 @@ typedef LBForceSNAT = NoForceSNAT | ForceSNAT | SkipSNAT -function snat_for_lb(lr_options: Map, lb: Ref): LBForceSNAT { +function snat_for_lb(lr_options: Map, lb: Intern): LBForceSNAT { if (lb.options.get_bool_def("skip_snat", false)) { return SkipSNAT }; diff --git a/northd/lswitch.dl b/northd/lswitch.dl index cc0777f743c1..1004427b725c 100644 --- a/northd/lswitch.dl +++ b/northd/lswitch.dl @@ -22,7 +22,7 @@ import helpers import ipam import vec -function is_enabled(lsp: nb::Logical_Switch_Port): bool { is_enabled(lsp.enabled) } +function is_enabled(lsp: Intern): bool { is_enabled(lsp.enabled) } function is_enabled(sp: SwitchPort): bool { sp.lsp.is_enabled() } function is_enabled(sp: Intern): bool { sp.lsp.is_enabled() } @@ -33,7 +33,7 @@ SwitchRouterPeerRef(lsp, Some{rport}) :- rport in &RouterPort(.lrp = &nb::Logical_Router_Port{._uuid = lrp}). SwitchRouterPeerRef(lsp, None) :- - nb::Logical_Switch_Port(._uuid = lsp), + &nb::Logical_Switch_Port(._uuid = lsp), not SwitchRouterPeer(lsp, _, _). /* LogicalSwitchPortCandidate. @@ -50,7 +50,7 @@ Warning[message] :- LogicalSwitchPortCandidate(lsp_uuid, ls_uuid), var lss = ls_uuid.group_by(lsp_uuid).to_set(), lss.size() > 1, - lsp in nb::Logical_Switch_Port(._uuid = lsp_uuid), + lsp in &nb::Logical_Switch_Port(._uuid = lsp_uuid), var message = "Bad configuration: logical switch port ${lsp.name} belongs " "to more than one logical switch". @@ -66,7 +66,7 @@ LogicalSwitchPort(lsp_uuid, ls_uuid) :- relation LogicalSwitchPortWithUnknownAddress(ls: uuid, lsp: uuid) LogicalSwitchPortWithUnknownAddress(ls_uuid, lsp_uuid) :- LogicalSwitchPort(lsp_uuid, ls_uuid), - lsp in nb::Logical_Switch_Port(._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) @@ -81,7 +81,7 @@ relation PortStaticAddresses(lsport: uuid, ip4addrs: Set, ip6addrs: Set< PortStaticAddresses(.lsport = port_uuid, .ip4addrs = ip4_addrs.union(), .ip6addrs = ip6_addrs.union()) :- - nb::Logical_Switch_Port(._uuid = port_uuid, .addresses = addresses), + &nb::Logical_Switch_Port(._uuid = port_uuid, .addresses = addresses), var address = FlatMap(if (addresses.is_empty()) { set_singleton("") } else { addresses }), (var ip4addrs, var ip6addrs) = if (not is_dynamic_lsp_address(address)) { split_addresses(address) @@ -133,7 +133,7 @@ relation LogicalSwitchLocalnetPort0(ls_uuid: uuid, lsp: (uuid, string)) LogicalSwitchLocalnetPort0(ls_uuid, (lsp_uuid, lsp.name)) :- ls in nb::Logical_Switch(._uuid = ls_uuid), var lsp_uuid = FlatMap(ls.ports), - lsp in nb::Logical_Switch_Port(._uuid = lsp_uuid), + lsp in &nb::Logical_Switch_Port(._uuid = lsp_uuid), lsp.__type == "localnet". relation LogicalSwitchLocalnetPorts(ls_uuid: uuid, localnet_ports: Vec<(uuid, string)>) @@ -173,7 +173,7 @@ relation LogicalSwitchHasNonRouterPort0(ls: uuid) LogicalSwitchHasNonRouterPort0(ls_uuid) :- ls in nb::Logical_Switch(._uuid = ls_uuid), var lsp_uuid = FlatMap(ls.ports), - lsp in nb::Logical_Switch_Port(._uuid = lsp_uuid), + lsp in &nb::Logical_Switch_Port(._uuid = lsp_uuid), lsp.__type != "router". relation LogicalSwitchHasNonRouterPort(ls: uuid, has_non_router_port: bool) @@ -512,9 +512,9 @@ relation &SwitchACL(sw: Intern, function oVN_FEATURE_PORT_UP_NOTIF(): string { "port-up-notif" } relation SwitchPortUp0(lsp: uuid) SwitchPortUp0(lsp) :- - nb::Logical_Switch_Port(._uuid = lsp, .__type = "router"). + &nb::Logical_Switch_Port(._uuid = lsp, .__type = "router"). SwitchPortUp0(lsp) :- - nb::Logical_Switch_Port(._uuid = lsp, .name = lsp_name, .__type = __type), + &nb::Logical_Switch_Port(._uuid = lsp, .name = lsp_name, .__type = __type), sb::Port_Binding(.logical_port = lsp_name, .up = up, .chassis = Some{chassis_uuid}), sb::Chassis(._uuid = chassis_uuid, .other_config = other_config), if (other_config.get_bool_def(oVN_FEATURE_PORT_UP_NOTIF(), false)) { @@ -525,11 +525,11 @@ SwitchPortUp0(lsp) :- relation SwitchPortUp(lsp: uuid, up: bool) SwitchPortUp(lsp, true) :- SwitchPortUp0(lsp). -SwitchPortUp(lsp, false) :- nb::Logical_Switch_Port(._uuid = lsp), not SwitchPortUp0(lsp). +SwitchPortUp(lsp, false) :- &nb::Logical_Switch_Port(._uuid = lsp), not SwitchPortUp0(lsp). relation SwitchPortHAChassisGroup0(lsp_uuid: uuid, hac_group_uuid: uuid) SwitchPortHAChassisGroup0(lsp_uuid, ha_chassis_group_uuid(ls_uuid)) :- - lsp in nb::Logical_Switch_Port(._uuid = lsp_uuid), + lsp in &nb::Logical_Switch_Port(._uuid = lsp_uuid), lsp.__type == "external", Some{var hac_group_uuid} = lsp.ha_chassis_group, ha_chassis_group in nb::HA_Chassis_Group(._uuid = hac_group_uuid), @@ -542,7 +542,7 @@ relation SwitchPortHAChassisGroup(lsp_uuid: uuid, hac_group_uuid: Option) SwitchPortHAChassisGroup(lsp_uuid, Some{hac_group_uuid}) :- SwitchPortHAChassisGroup0(lsp_uuid, hac_group_uuid). SwitchPortHAChassisGroup(lsp_uuid, None) :- - lsp in nb::Logical_Switch_Port(._uuid = lsp_uuid), + lsp in &nb::Logical_Switch_Port(._uuid = lsp_uuid), not SwitchPortHAChassisGroup0(lsp_uuid, _). /* SwitchPort relation collects all attributes of a logical switch port @@ -558,7 +558,7 @@ SwitchPortHAChassisGroup(lsp_uuid, None) :- * - 'hac_group_uuid' - uuid of sb::HA_Chassis_Group, only for "external" ports */ typedef SwitchPort = SwitchPort { - lsp: nb::Logical_Switch_Port, + lsp: Intern, json_name: string, sw: Intern, peer: Option>, @@ -602,7 +602,7 @@ SwitchPort[SwitchPort{ .mcast_cfg = mcast_cfg, .hac_group_uuid = hac_group_uuid }.intern()] :- - nb::Logical_Switch_Port[lsp], + lsp in &nb::Logical_Switch_Port(), LogicalSwitchPort(lsp._uuid, lswitch_uuid), sw in &Switch(._uuid = lswitch_uuid, .other_config = other_config, diff --git a/northd/multicast.dl b/northd/multicast.dl index bd9bc9b46f61..dfd58f4770bd 100644 --- a/northd/multicast.dl +++ b/northd/multicast.dl @@ -96,7 +96,7 @@ typedef McastPortCfg = McastPortCfg { relation McastPortCfg[Intern] McastPortCfg[McastPortCfg{lsp_uuid, false, flood, flood_reports}.intern()] :- - nb::Logical_Switch_Port(._uuid = lsp_uuid, .options = options), + &nb::Logical_Switch_Port(._uuid = lsp_uuid, .options = options), var flood = options.get_bool_def("mcast_flood", false), var flood_reports = options.get_bool_def("mcast_flood_reports", false). @@ -195,7 +195,7 @@ IgmpSwitchGroupPort(address, switch, lsp_uuid) :- var pb_port_uuid = FlatMap(pb_ports), sb::Port_Binding(._uuid = pb_port_uuid, .logical_port = lsp_name), &SwitchPort( - .lsp = nb::Logical_Switch_Port{._uuid = lsp_uuid, .name = lsp_name}, + .lsp = &nb::Logical_Switch_Port{._uuid = lsp_uuid, .name = lsp_name}, .sw = switch). IgmpSwitchGroupPort(address, switch, localnet_port.0) :- IgmpSwitchGroupPort(address, switch, _), @@ -235,7 +235,7 @@ IgmpRouterGroupPort(address, rtr_port.router, rtr_port.lrp._uuid) :- None -> true }, var flood_port = FlatMap(sw_flood_ports), - &SwitchPort(.lsp = nb::Logical_Switch_Port{._uuid = flood_port}, + &SwitchPort(.lsp = &nb::Logical_Switch_Port{._uuid = flood_port}, .peer = Some{rtr_port}). /* Aggregated IGMP group for routers: merges all IgmpRouterGroupPort for diff --git a/northd/ovn-nb.dlopts b/northd/ovn-nb.dlopts index c1ceb4f1496a..402a44636ab9 100644 --- a/northd/ovn-nb.dlopts +++ b/northd/ovn-nb.dlopts @@ -22,3 +22,4 @@ --intern-table NAT --intern-table Address_Set --intern-table Logical_Router_Port +--intern-table Logical_Switch_Port diff --git a/northd/ovn_northd.dl b/northd/ovn_northd.dl index f7744a1dae75..9536b38816f5 100644 --- a/northd/ovn_northd.dl +++ b/northd/ovn_northd.dl @@ -501,7 +501,7 @@ RefChassis(lr_uuid, chassis_uuid) :- ReachableLogicalRouter(lr_uuid, lr2_uuid), FirstHopLogicalRouter(lr2_uuid, ls_uuid), LogicalSwitchPort(lsp_uuid, ls_uuid), - nb::Logical_Switch_Port(._uuid = lsp_uuid, .name = lsp_name), + &nb::Logical_Switch_Port(._uuid = lsp_uuid, .name = lsp_name), sb::Port_Binding(.logical_port = lsp_name, .chassis = chassis_uuids), Some{var chassis_uuid} = chassis_uuids. relation RefChassisSet0(lr_uuid: uuid, chassis_uuids: Set) @@ -725,7 +725,7 @@ sb::Out_Address_Set(hash128(as_name), as_name, pg_ip4addrs.union()) :- // avoid name collisions with user-defined Address_Sets not &nb::Address_Set(.name = as_name), PortStaticAddresses(.lsport = port_uuid, .ip4addrs = stat), - SwitchPortNewDynamicAddress(&SwitchPort{.lsp = nb::Logical_Switch_Port{._uuid = port_uuid}}, + SwitchPortNewDynamicAddress(&SwitchPort{.lsp = &nb::Logical_Switch_Port{._uuid = port_uuid}}, dyn_addr), var dynamic = match (dyn_addr) { None -> set_empty(), @@ -750,7 +750,7 @@ sb::Out_Address_Set(hash128(as_name), as_name, pg_ip6addrs.union()) :- // avoid name collisions with user-defined Address_Sets not &nb::Address_Set(.name = as_name), PortStaticAddresses(.lsport = port_uuid, .ip6addrs = stat), - SwitchPortNewDynamicAddress(&SwitchPort{.lsp = nb::Logical_Switch_Port{._uuid = port_uuid}}, + SwitchPortNewDynamicAddress(&SwitchPort{.lsp = &nb::Logical_Switch_Port{._uuid = port_uuid}}, dyn_addr), var dynamic = match (dyn_addr) { None -> set_empty(), @@ -789,8 +789,8 @@ PortGroupPort(pg_uuid, pg_name, port) :- sb::Out_Port_Group(._uuid = hash128(sb_name), .name = sb_name, .ports = port_names) :- PortGroupPort(.pg_uuid = _uuid, .pg_name = nb_name, .port = port_uuid), - &SwitchPort(.lsp = lsp@nb::Logical_Switch_Port{._uuid = port_uuid, - .name = port_name}, + &SwitchPort(.lsp = lsp@&nb::Logical_Switch_Port{._uuid = port_uuid, + .name = port_name}, .sw = &Switch{._uuid = ls_uuid}), TunKeyAllocation(.datapath = ls_uuid, .tunkey = tunkey), var sb_name = "${tunkey}_${nb_name}", @@ -1846,7 +1846,7 @@ for (&Switch(._uuid =ls_uuid)) { * send all IP packets through the conntrack action, which handles * defragmentation, in order to match L4 headers. */ -for (&SwitchPort(.lsp = lsp@nb::Logical_Switch_Port{.__type = "router"}, +for (&SwitchPort(.lsp = lsp@&nb::Logical_Switch_Port{.__type = "router"}, .json_name = lsp_name, .sw = &Switch{._uuid = ls_uuid, .has_stateful_acl = true})) { /* Can't use ct() for router ports. Consider the @@ -1875,7 +1875,7 @@ for (&SwitchPort(.lsp = lsp@nb::Logical_Switch_Port{.__type = "router"}, .external_ids = stage_hint(lsp._uuid)) } -for (&SwitchPort(.lsp = lsp@nb::Logical_Switch_Port{.__type = "localnet"}, +for (&SwitchPort(.lsp = lsp@&nb::Logical_Switch_Port{.__type = "localnet"}, .json_name = lsp_name, .sw = &Switch{._uuid = ls_uuid, .has_stateful_acl = true})) { Flow(.logical_datapath = ls_uuid, @@ -3224,7 +3224,7 @@ for (&SwitchPort(.lsp = lsp, .sw = sw, .json_name = json_name) .external_ids = stage_hint(lsp._uuid)) } -function lsp_is_up(lsp: nb::Logical_Switch_Port): bool = { +function lsp_is_up(lsp: Intern): bool = { lsp.up == Some{true} } @@ -3245,12 +3245,12 @@ function lsp_is_up(lsp: nb::Logical_Switch_Port): bool = { "(arp.op == 2 && arp.spa == ${virtual_ip}))", .actions = "bind_vport(${sp.json_name}, inport); next;", .external_ids = stage_hint(lsp._uuid)) :- - sp in &SwitchPort(.lsp = lsp@nb::Logical_Switch_Port{.__type = "virtual"}), + sp in &SwitchPort(.lsp = lsp@&nb::Logical_Switch_Port{.__type = "virtual"}), Some{var virtual_ip} = lsp.options.get("virtual-ip"), Some{var virtual_parents} = lsp.options.get("virtual-parents"), Some{var ip} = ip_parse(virtual_ip), var vparent = FlatMap(string_split(virtual_parents, ",")), - vp in &SwitchPort(.lsp = nb::Logical_Switch_Port{.name = vparent}), + vp in &SwitchPort(.lsp = &nb::Logical_Switch_Port{.name = vparent}), vp.sw == sp.sw. /* @@ -3379,7 +3379,7 @@ Flow(.logical_datapath = sp.sw._uuid, var lbvipbackend = FlatMap(lbvip.backends), Some{var svc_monitor} = lbvipbackend.svc_monitor, sp in &SwitchPort( - .lsp = nb::Logical_Switch_Port{.name = svc_monitor.port_name}), + .lsp = &nb::Logical_Switch_Port{.name = svc_monitor.port_name}), var svc_mon_src_ip = svc_monitor.src_ip, SvcMonitorMac(svc_monitor_mac). @@ -3571,7 +3571,7 @@ for (lsp in &SwitchPort Some{var dhcpv4_options_uuid} = lsp.lsp.dhcpv4_options in { for (dhcpv4_options in &nb::DHCP_Options(._uuid = dhcpv4_options_uuid)) { - for (SwitchPortIPv4Address(.port = &SwitchPort{.lsp = nb::Logical_Switch_Port{._uuid = lsp.lsp._uuid}}, .ea = ea, .addr = addr)) { + for (SwitchPortIPv4Address(.port = &SwitchPort{.lsp = &nb::Logical_Switch_Port{._uuid = lsp.lsp._uuid}}, .ea = ea, .addr = addr)) { Some{(var options_action, var response_action, var ipv4_addr_match)} = build_dhcpv4_action(json_key, dhcpv4_options, addr.addr) in { @@ -3628,7 +3628,7 @@ for (lsp in &SwitchPort Some{var dhcpv6_options_uuid} = lsp.lsp.dhcpv6_options in { for (dhcpv6_options in &nb::DHCP_Options(._uuid = dhcpv6_options_uuid)) { - for (SwitchPortIPv6Address(.port = &SwitchPort{.lsp = nb::Logical_Switch_Port{._uuid = lsp.lsp._uuid}}, .ea = ea, .addr = addr)) { + for (SwitchPortIPv6Address(.port = &SwitchPort{.lsp = &nb::Logical_Switch_Port{._uuid = lsp.lsp._uuid}}, .ea = ea, .addr = addr)) { Some{(var options_action, var response_action)} = build_dhcpv6_action(json_key, dhcpv6_options, addr.addr) in { @@ -4287,7 +4287,7 @@ Flow(.logical_datapath = ls_uuid, .actions = "put_fdb(inport, eth.src); next;", .external_ids = stage_hint(lsp_uuid)) :- LogicalSwitchPortWithUnknownAddress(ls_uuid, lsp_uuid), - sp in &SwitchPort(.lsp = nb::Logical_Switch_Port{._uuid = lsp_uuid, .__type = ""}, + sp in &SwitchPort(.lsp = &nb::Logical_Switch_Port{._uuid = lsp_uuid, .__type = ""}, .ps_addresses = vec_empty()). Flow(.logical_datapath = ls_uuid, @@ -6969,7 +6969,7 @@ Flow(.logical_datapath = peer.router._uuid, "${rEG_NEXT_HOP()} == ${virtual_ip}", .actions = "eth.dst = 00:00:00:00:00:00; next;", .external_ids = stage_hint(sp.lsp._uuid)) :- - sp in &SwitchPort(.lsp = lsp@nb::Logical_Switch_Port{.__type = "virtual"}), + sp in &SwitchPort(.lsp = lsp@&nb::Logical_Switch_Port{.__type = "virtual"}), Some{var virtual_ip_s} = lsp.options.get("virtual-ip"), Some{var virtual_parents} = lsp.options.get("virtual-parents"), Some{var virtual_ip} = ip_parse(virtual_ip_s), @@ -6984,14 +6984,14 @@ Flow(.logical_datapath = peer.router._uuid, "${rEG_NEXT_HOP()} == ${virtual_ip}", .actions = "eth.dst = ${address.ea}; next;", .external_ids = stage_hint(sp.lsp._uuid)) :- - sp in &SwitchPort(.lsp = lsp@nb::Logical_Switch_Port{.__type = "virtual"}), + sp in &SwitchPort(.lsp = lsp@&nb::Logical_Switch_Port{.__type = "virtual"}), Some{var virtual_ip_s} = lsp.options.get("virtual-ip"), Some{var virtual_parents} = lsp.options.get("virtual-parents"), Some{var virtual_ip} = ip_parse(virtual_ip_s), pb in sb::Port_Binding(.logical_port = sp.lsp.name), not (is_empty_set_or_string(pb.virtual_parent) or pb.chassis == None), Some{var virtual_parent} = pb.virtual_parent, - vp in &SwitchPort(.lsp = nb::Logical_Switch_Port{.name = virtual_parent}), + vp in &SwitchPort(.lsp = &nb::Logical_Switch_Port{.name = virtual_parent}), var address = FlatMap(vp.static_addresses), sp2 in &SwitchPort(.sw = sp.sw, .peer = Some{peer}), Some{_} = find_lrp_member_ip(peer.networks, IPv4{virtual_ip}). @@ -7651,7 +7651,7 @@ SwitchPortReservedTags(parent_name, tags) :- var tags = tag.group_by(parent_name).to_set(). SwitchPortReservedTags(parent_name, set_empty()) :- - nb::Logical_Switch_Port(.name = parent_name), + &nb::Logical_Switch_Port(.name = parent_name), not SwitchPortReservedTag(.parent_name = parent_name). /* Allocate tags for ports that require dynamically allocated tags and do not @@ -7713,7 +7713,7 @@ sb::Out_IP_Multicast(._uuid = cfg.datapath, relation PortExists(name: string) -PortExists(name) :- nb::Logical_Switch_Port(.name = name). +PortExists(name) :- &nb::Logical_Switch_Port(.name = name). PortExists(name) :- &nb::Logical_Router_Port(.name = name). sb::Out_Load_Balancer(._uuid = lb._uuid,