From patchwork Tue Mar 12 15:59:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1911162 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=CasAbDH4; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TvJJV4K25z1yWy for ; Wed, 13 Mar 2024 03:00:26 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 463A5414C5; Tue, 12 Mar 2024 16:00:22 +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 t8y9xD5CwJb5; Tue, 12 Mar 2024 16:00:18 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 191A341489 Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=CasAbDH4 Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 191A341489; Tue, 12 Mar 2024 16:00:18 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id AF7EFC0DD6; Tue, 12 Mar 2024 16:00:17 +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 C5EC5C0037 for ; Tue, 12 Mar 2024 16:00:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id A7F1241465 for ; Tue, 12 Mar 2024 16:00:15 +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 keuZ75B1D-6e for ; Tue, 12 Mar 2024 16:00:14 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=lorenzo.bianconi@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 0CE024117B Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 0CE024117B Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 0CE024117B for ; Tue, 12 Mar 2024 16:00:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710259212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Mpy3wk7DWyTaBZHe+17lOt3EEu05HIPqs9ItxG3qvN8=; b=CasAbDH4Y7aohq7U5RkCdDZG6w0y9l5zRd6J6pqBVRk88qHvSr3+Q0p0+XRl/rrGe/QpGL xDfNpzXl/iozMvTbd5Ra1z6iyogUK4p9R3kSkS8ZDs8E8LxB4Sm9kbOqXoQ11TInieRNdv 2GQkldDg6VCRli5WgKBG4e8ORAz0UFI= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-206-a4h7yUAGOMO2h29CdmirCg-1; Tue, 12 Mar 2024 12:00:11 -0400 X-MC-Unique: a4h7yUAGOMO2h29CdmirCg-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-33e4397540bso3493628f8f.3 for ; Tue, 12 Mar 2024 09:00:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710259209; x=1710864009; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Mpy3wk7DWyTaBZHe+17lOt3EEu05HIPqs9ItxG3qvN8=; b=RhZ+v7uOYWq4C+WZSOgOYlA73JnKRUJvU9pMByyNNqc87L7d+WFtTmGWJDILQUTuWO 2bo6V1DZRNLkq4PQ76DyBXNyMOvHv8zldCuRZLg8FYTwkRRkKm/ZFuSu3wTRI49fKbd0 2YwTb0jyZ05Dn66HvaqBfpkzOvIO6kZzLbUu4JEVcsSJXT/uF5jQ8GulRY2Sj0R361bD C8wYxrQDXINmjxk4+dEWnnIcLSpTB7zQ2G/9E/TEiVdWvbpOeB3XbPlraWTQGezi06X1 P3b8A+19Eo6EZXXoOiXRRpf5hXeaaQVfTAp1MP5yP8pLdgUMy/PuM562NXxkukpDQJ5H 8s9w== X-Gm-Message-State: AOJu0Yx0pBh7idbQCgG+PYaQ9AHiy39Zl0Mi2LOgbBLsj4U6yhLCIREj QWv/pvxqmDtnizvmTOAmyfENSQUzYDMSVrt9w9AU0efIEwWedGX4KBPnRZuXeeafbs1OZo1KLuX 2zXb5sU5tpO6t6RkN/PkSkjtZXELtzw9EFVO9B86j9BW2ttoXcuu02JEj7GZK4T8HW6nBH/MSm9 QP9s6wUi6Ji7aE1DI14vu9B/aSgdfBIbdesT7DKMjqWkMr X-Received: by 2002:adf:fb0a:0:b0:33e:7f51:c91c with SMTP id c10-20020adffb0a000000b0033e7f51c91cmr3357999wrr.49.1710259208686; Tue, 12 Mar 2024 09:00:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEE4wyBYav6jfDM835x+uk2SdW9LekM5MQqCOlyiAmkhH+VD+pLOIn4+MULaExfs3OMkjORNQ== X-Received: by 2002:adf:fb0a:0:b0:33e:7f51:c91c with SMTP id c10-20020adffb0a000000b0033e7f51c91cmr3357974wrr.49.1710259208014; Tue, 12 Mar 2024 09:00:08 -0700 (PDT) Received: from localhost (net-93-71-3-198.cust.vodafonedsl.it. [93.71.3.198]) by smtp.gmail.com with ESMTPSA id j5-20020adff005000000b0033e91e53e8fsm6547492wro.24.2024.03.12.09.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 09:00:07 -0700 (PDT) From: Lorenzo Bianconi To: dev@openvswitch.org Date: Tue, 12 Mar 2024 16:59:58 +0100 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: dceara@redhat.com Subject: [ovs-dev] [PATCH ovn v2 2/3] northd: Add nexhop id in ct_label.label. 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" Introduce the nexthop identifier in the ct_label.label field for ecmp-symmetric replies connections. This field will be used by ovn-controller to track ct entries and to flush them if requested by the CMS (e.g. removing the related static routes). Signed-off-by: Lorenzo Bianconi --- northd/en-lflow.c | 2 ++ northd/inc-proc-northd.c | 1 + northd/northd.c | 63 +++++++++++++++++++++++++++------------- northd/northd.h | 1 + tests/ovn.at | 4 +-- tests/system-ovn.at | 58 +++++++++++++++++++++--------------- 6 files changed, 83 insertions(+), 46 deletions(-) diff --git a/northd/en-lflow.c b/northd/en-lflow.c index c4b927fb8..9cb616da8 100644 --- a/northd/en-lflow.c +++ b/northd/en-lflow.c @@ -62,6 +62,8 @@ lflow_get_input_data(struct engine_node *node, EN_OVSDB_GET(engine_get_input("SB_igmp_group", node)); lflow_input->sbrec_logical_dp_group_table = EN_OVSDB_GET(engine_get_input("SB_logical_dp_group", node)); + lflow_input->sbrec_ecmp_nh_table = + EN_OVSDB_GET(engine_get_input("SB_ecmp_nexthop", node)); lflow_input->sbrec_mcast_group_by_name_dp = engine_ovsdb_node_get_index( diff --git a/northd/inc-proc-northd.c b/northd/inc-proc-northd.c index 1c58da0bf..9a3b9a5e7 100644 --- a/northd/inc-proc-northd.c +++ b/northd/inc-proc-northd.c @@ -259,6 +259,7 @@ void inc_proc_northd_init(struct ovsdb_idl_loop *nb, engine_add_input(&en_lflow, &en_port_group, lflow_port_group_handler); engine_add_input(&en_lflow, &en_lr_stateful, lflow_lr_stateful_handler); engine_add_input(&en_lflow, &en_ls_stateful, lflow_ls_stateful_handler); + engine_add_input(&en_lflow, &en_sb_ecmp_nexthop, NULL); engine_add_input(&en_sync_to_sb_addr_set, &en_northd, NULL); engine_add_input(&en_sync_to_sb_addr_set, &en_lr_stateful, NULL); diff --git a/northd/northd.c b/northd/northd.c index 7b8f442e1..f897ffda0 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -10558,14 +10558,16 @@ find_static_route_outport(struct ovn_datapath *od, const struct hmap *lr_ports, } static void -add_ecmp_symmetric_reply_flows(struct lflow_table *lflows, - struct ovn_datapath *od, - bool ct_masked_mark, - const char *port_ip, - struct ovn_port *out_port, - const struct parsed_route *route, - struct ds *route_match, - struct lflow_ref *lflow_ref) +add_ecmp_symmetric_reply_flows( + struct lflow_table *lflows, + struct ovn_datapath *od, + bool ct_masked_mark, + const char *port_ip, + struct ovn_port *out_port, + const struct parsed_route *route, + struct ds *route_match, + struct lflow_ref *lflow_ref, + const struct sbrec_ecmp_nexthop_table *sbrec_ecmp_nh_table) { const struct nbrec_logical_router_static_route *st_route = route->route; struct ds match = DS_EMPTY_INITIALIZER; @@ -10601,15 +10603,28 @@ add_ecmp_symmetric_reply_flows(struct lflow_table *lflows, * ds_put_cstr() call. The previous contents are needed. */ ds_put_cstr(&match, " && !ct.rpl && (ct.new || ct.est)"); + struct ds nexthop_label = DS_EMPTY_INITIALIZER; + + const struct sbrec_ecmp_nexthop *sb_ecmp_nexthop; + SBREC_ECMP_NEXTHOP_TABLE_FOR_EACH (sb_ecmp_nexthop, sbrec_ecmp_nh_table) { + if (!strcmp(st_route->nexthop, sb_ecmp_nexthop->nexthop)) { + int id = sb_ecmp_nexthop->id; + ds_put_format(&nexthop_label, "ct_label.label = %d;", id); + break; + } + } + ds_put_format(&actions, "ct_commit { ct_label.ecmp_reply_eth = eth.src; " - " %s = %" PRId64 ";}; " + " %s = %" PRId64 "; %s }; " "next;", - ct_ecmp_reply_port_match, out_port->sb->tunnel_key); + ct_ecmp_reply_port_match, out_port->sb->tunnel_key, + ds_cstr(&nexthop_label)); ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_ECMP_STATEFUL, 100, ds_cstr(&match), ds_cstr(&actions), &st_route->header_, lflow_ref); + ds_destroy(&nexthop_label); /* Bypass ECMP selection if we already have ct_label information * for where to route the packet. @@ -10660,10 +10675,12 @@ add_ecmp_symmetric_reply_flows(struct lflow_table *lflows, } static void -build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od, - bool ct_masked_mark, const struct hmap *lr_ports, - struct ecmp_groups_node *eg, - struct lflow_ref *lflow_ref) +build_ecmp_route_flow( + struct lflow_table *lflows, struct ovn_datapath *od, + bool ct_masked_mark, const struct hmap *lr_ports, + struct ecmp_groups_node *eg, + struct lflow_ref *lflow_ref, + const struct sbrec_ecmp_nexthop_table *sbrec_ecmp_nh_table) { bool is_ipv4 = IN6_IS_ADDR_V4MAPPED(&eg->prefix); @@ -10721,7 +10738,7 @@ build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od, add_ecmp_symmetric_reply_flows(lflows, od, ct_masked_mark, lrp_addr_s, out_port, route_, &route_match, - lflow_ref); + lflow_ref, sbrec_ecmp_nh_table); } ds_clear(&match); ds_put_format(&match, REG_ECMP_GROUP_ID" == %"PRIu16" && " @@ -12581,7 +12598,8 @@ build_static_route_flows_for_lrouter( struct ovn_datapath *od, const struct chassis_features *features, struct lflow_table *lflows, const struct hmap *lr_ports, const struct hmap *bfd_connections, - struct lflow_ref *lflow_ref) + struct lflow_ref *lflow_ref, + const struct sbrec_ecmp_nexthop_table *sbrec_ecmp_nh_table) { ovs_assert(od->nbr); ovn_lflow_add_default_drop(lflows, od, S_ROUTER_IN_IP_ROUTING_ECMP, @@ -12630,7 +12648,7 @@ build_static_route_flows_for_lrouter( /* add a flow in IP_ROUTING, and one flow for each member in * IP_ROUTING_ECMP. */ build_ecmp_route_flow(lflows, od, features->ct_no_masked_label, - lr_ports, group, lflow_ref); + lr_ports, group, lflow_ref, sbrec_ecmp_nh_table); } const struct unique_routes_node *ur; HMAP_FOR_EACH (ur, hmap_node, &unique_routes) { @@ -15541,6 +15559,7 @@ struct lswitch_flow_build_info { struct ds actions; size_t thread_lflow_counter; const char *svc_monitor_mac; + const struct sbrec_ecmp_nexthop_table *sbrec_ecmp_nh_table; }; /* Helper function to combine all lflow generation which is iterated by @@ -15588,7 +15607,7 @@ build_lswitch_and_lrouter_iterate_by_lr(struct ovn_datapath *od, build_static_route_flows_for_lrouter(od, lsi->features, lsi->lflows, lsi->lr_ports, lsi->bfd_connections, - NULL); + NULL, lsi->sbrec_ecmp_nh_table); build_mcast_lookup_flows_for_lrouter(od, lsi->lflows, &lsi->match, &lsi->actions, NULL); build_ingress_policy_flows_for_lrouter(od, lsi->lflows, lsi->lr_ports, @@ -15905,7 +15924,8 @@ build_lswitch_and_lrouter_flows( const struct hmap *svc_monitor_map, const struct hmap *bfd_connections, const struct chassis_features *features, - const char *svc_monitor_mac) + const char *svc_monitor_mac, + const struct sbrec_ecmp_nexthop_table *sbrec_ecmp_nh_table) { char *svc_check_match = xasprintf("eth.dst == %s", svc_monitor_mac); @@ -15939,6 +15959,7 @@ build_lswitch_and_lrouter_flows( lsiv[index].svc_check_match = svc_check_match; lsiv[index].thread_lflow_counter = 0; lsiv[index].svc_monitor_mac = svc_monitor_mac; + lsiv[index].sbrec_ecmp_nh_table = sbrec_ecmp_nh_table; ds_init(&lsiv[index].match); ds_init(&lsiv[index].actions); @@ -15981,6 +16002,7 @@ build_lswitch_and_lrouter_flows( .svc_monitor_mac = svc_monitor_mac, .match = DS_EMPTY_INITIALIZER, .actions = DS_EMPTY_INITIALIZER, + .sbrec_ecmp_nh_table = sbrec_ecmp_nh_table, }; /* Combined build - all lflow generation from lswitch and lrouter @@ -16140,7 +16162,8 @@ void build_lflows(struct ovsdb_idl_txn *ovnsb_txn, input_data->svc_monitor_map, input_data->bfd_connections, input_data->features, - input_data->svc_monitor_mac); + input_data->svc_monitor_mac, + input_data->sbrec_ecmp_nh_table); if (parallelization_state == STATE_INIT_HASH_SIZES) { parallelization_state = STATE_USE_PARALLELIZATION; diff --git a/northd/northd.h b/northd/northd.h index 2d4bc9363..7a6a15b52 100644 --- a/northd/northd.h +++ b/northd/northd.h @@ -175,6 +175,7 @@ struct lflow_input { const struct sbrec_multicast_group_table *sbrec_multicast_group_table; const struct sbrec_igmp_group_table *sbrec_igmp_group_table; const struct sbrec_logical_dp_group_table *sbrec_logical_dp_group_table; + const struct sbrec_ecmp_nexthop_table *sbrec_ecmp_nh_table; /* Indexes */ struct ovsdb_idl_index *sbrec_mcast_group_by_name_dp; diff --git a/tests/ovn.at b/tests/ovn.at index e87df6c8d..2a2bc96c7 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -29181,7 +29181,7 @@ AT_CHECK([ for hv in 1 2; do grep table=17 hv${hv}flows | \ grep "priority=100" | \ - grep -c "ct(commit,zone=NXM_NX_REG11\\[[0..15\\]],.*exec(move:NXM_OF_ETH_SRC\\[[\\]]->NXM_NX_CT_LABEL\\[[32..79\\]],load:0x[[0-9]]->NXM_NX_CT_MARK\\[[16..31\\]]))" + grep -c "ct(commit,zone=NXM_NX_REG11\\[[0..15\\]],.*exec(move:NXM_OF_ETH_SRC\\[[\\]]->NXM_NX_CT_LABEL\\[[32..79\\]],load:0x[[0-9]]->NXM_NX_CT_MARK\\[[16..31\\]],load:0x[[0-9]]->NXM_NX_CT_LABEL\\[[96..127\\]]))" grep table=25 hv${hv}flows | \ grep "priority=200" | \ @@ -29306,7 +29306,7 @@ AT_CHECK([ for hv in 1 2; do grep table=17 hv${hv}flows | \ grep "priority=100" | \ - grep -c "ct(commit,zone=NXM_NX_REG11\\[[0..15\\]],.*exec(move:NXM_OF_ETH_SRC\\[[\\]]->NXM_NX_CT_LABEL\\[[32..79\\]],load:0x[[0-9]]->NXM_NX_CT_MARK\\[[16..31\\]]))" + grep -c "ct(commit,zone=NXM_NX_REG11\\[[0..15\\]],.*exec(move:NXM_OF_ETH_SRC\\[[\\]]->NXM_NX_CT_LABEL\\[[32..79\\]],load:0x[[0-9]]->NXM_NX_CT_MARK\\[[16..31\\]],load:0x[[0-9]]->NXM_NX_CT_LABEL\\[[96..127\\]]))" grep table=25 hv${hv}flows | \ grep "priority=200" | \ diff --git a/tests/system-ovn.at b/tests/system-ovn.at index 2411b0267..7ae54113a 100644 --- a/tests/system-ovn.at +++ b/tests/system-ovn.at @@ -6121,19 +6121,21 @@ NS_CHECK_EXEC([bob1], [ping -q -c 3 -i 0.3 -w 2 10.0.0.2 | FORMAT_PING], \ # and just ensure that the known ethernet address is present. AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(172.16.0.1) | \ sed -e 's/zone=[[0-9]]*/zone=/' | -sed -e 's/mark=[[0-9]]*/mark=/'], [0], [dnl -icmp,orig=(src=172.16.0.1,dst=10.0.0.2,id=,type=8,code=0),reply=(src=10.0.0.2,dst=172.16.0.1,id=,type=0,code=0),zone=,mark=,labels=0x401020400000000 -tcp,orig=(src=172.16.0.1,dst=10.0.0.2,sport=,dport=),reply=(src=10.0.0.2,dst=172.16.0.1,sport=,dport=),zone=,mark=,labels=0x401020400000000,protoinfo=(state=) +sed -e 's/mark=[[0-9]]*/mark=/' | +sed -e 's/labels=0x[[0-9]]/labels=0x?/'], [0], [dnl +icmp,orig=(src=172.16.0.1,dst=10.0.0.2,id=,type=8,code=0),reply=(src=10.0.0.2,dst=172.16.0.1,id=,type=0,code=0),zone=,mark=,labels=0x?000000000401020400000000 +tcp,orig=(src=172.16.0.1,dst=10.0.0.2,sport=,dport=),reply=(src=10.0.0.2,dst=172.16.0.1,sport=,dport=),zone=,mark=,labels=0x?000000000401020400000000,protoinfo=(state=) ]) # Ensure datapaths show conntrack states as expected # Like with conntrack entries, we shouldn't try to predict # port binding tunnel keys. So omit them from expected labels. -ovs-appctl dpctl/dump-flows | grep 'ct_state(+new-est-rpl+trk).*ct(.*label=0x401020400000000/.*)' -AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(+new-est-rpl+trk).*ct(.*label=0x401020400000000/.*)' -c], [0], [dnl +AT_CHECK([ovs-appctl dpctl/dump-flows | sed -e 's/label=0x[[0-9]]/label=0x?/' | \ +grep 'ct_state(+new-est-rpl+trk).*ct(.*label=0x?000000000401020400000000/.*)' -c], [0], [dnl 2 ]) -AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(-new+est+rpl+trk).*ct_label(0x401020400000000)' -c], [0], [dnl +AT_CHECK([[ovs-appctl dpctl/dump-flows | sed -e 's/ct_label(0x[0-9]/ct_label(0x?/' | \ +grep 'ct_state(-new+est+rpl+trk).*ct_label(0x?000000000401020400000000)' -c]], [0], [dnl 2 ]) @@ -6152,18 +6154,21 @@ NS_CHECK_EXEC([bob1], [ping -q -c 3 -i 0.3 -w 2 10.0.0.2 | FORMAT_PING], \ [0], [dnl 3 packets transmitted, 3 received, 0% packet loss, time 0ms ]) -AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(+new-est-rpl+trk).*ct(.*label=0x1001020400000000/.*)' -c], [0], [dnl +AT_CHECK([ovs-appctl dpctl/dump-flows | sed -e 's/label=0x[[0-9]]/label=0x?/' | \ +grep 'ct_state(+new-est-rpl+trk).*ct(.*label=0x?000000001001020400000000/.*)' -c], [0], [dnl 2 ]) -AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(-new+est+rpl+trk).*ct_label(0x1001020400000000)' -c], [0], [dnl +AT_CHECK([[ovs-appctl dpctl/dump-flows | sed -e 's/ct_label(0x[0-9]/ct_label(0x?/' | \ +grep 'ct_state(-new+est+rpl+trk).*ct_label(0x?000000001001020400000000)' -c]], [0], [dnl 2 ]) -AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 0x1001020400000000 | FORMAT_CT(172.16.0.1) | \ +AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 1001020400000000 | FORMAT_CT(172.16.0.1) | \ sed -e 's/zone=[[0-9]]*/zone=/' | -sed -e 's/mark=[[0-9]]*/mark=/' | sort], [0], [dnl -icmp,orig=(src=172.16.0.1,dst=10.0.0.2,id=,type=8,code=0),reply=(src=10.0.0.2,dst=172.16.0.1,id=,type=0,code=0),zone=,mark=,labels=0x1001020400000000 -tcp,orig=(src=172.16.0.1,dst=10.0.0.2,sport=,dport=),reply=(src=10.0.0.2,dst=172.16.0.1,sport=,dport=),zone=,mark=,labels=0x1001020400000000,protoinfo=(state=) +sed -e 's/mark=[[0-9]]*/mark=/' | +sed -e 's/labels=0x[[0-9]]/labels=0x?/' | sort], [0], [dnl +icmp,orig=(src=172.16.0.1,dst=10.0.0.2,id=,type=8,code=0),reply=(src=10.0.0.2,dst=172.16.0.1,id=,type=0,code=0),zone=,mark=,labels=0x?000000001001020400000000 +tcp,orig=(src=172.16.0.1,dst=10.0.0.2,sport=,dport=),reply=(src=10.0.0.2,dst=172.16.0.1,sport=,dport=),zone=,mark=,labels=0x?000000001001020400000000,protoinfo=(state=) ]) # Check entries in table 76 and 77 expires w/o traffic OVS_WAIT_UNTIL([ @@ -6322,11 +6327,12 @@ NS_CHECK_EXEC([bob1], [ping -q -c 3 -i 0.3 -w 2 fd01::2 | FORMAT_PING], \ # Ensure datapaths show conntrack states as expected # Like with conntrack entries, we shouldn't try to predict # port binding tunnel keys. So omit them from expected labels. -AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(+new-est-rpl+trk).*ct(.*label=0x401020400000000/.*)' -c], [0], [dnl +AT_CHECK([ovs-appctl dpctl/dump-flows | sed -e 's/label=0x[[0-9]]/label=0x?/' | \ +grep 'ct_state(+new-est-rpl+trk).*ct(.*label=0x?000000000401020400000000/.*)' -c], [0], [dnl 2 ]) - -AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(-new+est+rpl+trk).*ct_label(0x401020400000000)' -c], [0], [dnl +AT_CHECK([[ovs-appctl dpctl/dump-flows | sed -e 's/ct_label(0x[0-9]/ct_label(0x?/' | \ +grep 'ct_state(-new+est+rpl+trk).*ct_label(0x?000000000401020400000000)' -c]], [0], [dnl 2 ]) @@ -6335,9 +6341,10 @@ AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(-new+est+rpl+trk).*ct_lab # and just ensure that the known ethernet address is present. AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fd01::2) | \ sed -e 's/zone=[[0-9]]*/zone=/' | -sed -e 's/mark=[[0-9]]*/mark=/' | sort], [0], [dnl -icmpv6,orig=(src=fd07::1,dst=fd01::2,id=,type=128,code=0),reply=(src=fd01::2,dst=fd07::1,id=,type=129,code=0),zone=,mark=,labels=0x401020400000000 -tcp,orig=(src=fd07::1,dst=fd01::2,sport=,dport=),reply=(src=fd01::2,dst=fd07::1,sport=,dport=),zone=,mark=,labels=0x401020400000000,protoinfo=(state=) +sed -e 's/mark=[[0-9]]*/mark=/' | +sed -e 's/labels=0x[[0-9]]/labels=0x?/' | sort], [0], [dnl +icmpv6,orig=(src=fd07::1,dst=fd01::2,id=,type=128,code=0),reply=(src=fd01::2,dst=fd07::1,id=,type=129,code=0),zone=,mark=,labels=0x?000000000401020400000000 +tcp,orig=(src=fd07::1,dst=fd01::2,sport=,dport=),reply=(src=fd01::2,dst=fd07::1,sport=,dport=),zone=,mark=,labels=0x?000000000401020400000000,protoinfo=(state=) ]) # Flush conntrack entries for easier output parsing of next test. @@ -6354,18 +6361,21 @@ NS_CHECK_EXEC([bob1], [ping -q -c 3 -i 0.3 -w 2 fd01::2 | FORMAT_PING], \ 3 packets transmitted, 3 received, 0% packet loss, time 0ms ]) -AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(+new-est-rpl+trk).*ct(.*label=0x1001020400000000/.*)' -c], [0], [dnl +AT_CHECK([ovs-appctl dpctl/dump-flows | sed -e 's/label=0x[[0-9]]/label=0x?/' | \ +grep 'ct_state(+new-est-rpl+trk).*ct(.*label=0x?000000001001020400000000/.*)' -c], [0], [dnl 2 ]) -AT_CHECK([ovs-appctl dpctl/dump-flows | grep 'ct_state(-new+est+rpl+trk).*ct_label(0x1001020400000000)' -c], [0], [dnl +AT_CHECK([[ovs-appctl dpctl/dump-flows | sed -e 's/ct_label(0x[0-9]/ct_label(0x?/' | \ +grep 'ct_state(-new+est+rpl+trk).*ct_label(0x?000000001001020400000000)' -c]], [0], [dnl 2 ]) -AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 0x1001020400000000 | FORMAT_CT(fd01::2) | \ +AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 1001020400000000 | FORMAT_CT(fd01::2) | \ sed -e 's/zone=[[0-9]]*/zone=/' | -sed -e 's/mark=[[0-9]]*/mark=/'], [0], [dnl -icmpv6,orig=(src=fd07::1,dst=fd01::2,id=,type=128,code=0),reply=(src=fd01::2,dst=fd07::1,id=,type=129,code=0),zone=,mark=,labels=0x1001020400000000 -tcp,orig=(src=fd07::1,dst=fd01::2,sport=,dport=),reply=(src=fd01::2,dst=fd07::1,sport=,dport=),zone=,mark=,labels=0x1001020400000000,protoinfo=(state=) +sed -e 's/mark=[[0-9]]*/mark=/' | +sed -e 's/labels=0x[[0-9]]/labels=0x?/'], [0], [dnl +icmpv6,orig=(src=fd07::1,dst=fd01::2,id=,type=128,code=0),reply=(src=fd01::2,dst=fd07::1,id=,type=129,code=0),zone=,mark=,labels=0x?000000001001020400000000 +tcp,orig=(src=fd07::1,dst=fd01::2,sport=,dport=),reply=(src=fd01::2,dst=fd07::1,sport=,dport=),zone=,mark=,labels=0x?000000001001020400000000,protoinfo=(state=) ]) # Check entries in table 76 and 77 expires w/o traffic