From patchwork Tue Feb 6 09:40:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1895589 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=XjjfQHfB; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (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 4TTdYW14vRz23g2 for ; Tue, 6 Feb 2024 20:41:35 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2D76F8223D; Tue, 6 Feb 2024 09:41:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G6aAbRtF_AyZ; Tue, 6 Feb 2024 09:41:29 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 03FB4821A2 Authentication-Results: smtp1.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=XjjfQHfB Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 03FB4821A2; Tue, 6 Feb 2024 09:41:17 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id CF3D6C0DE9; Tue, 6 Feb 2024 09:41:05 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0BF6EC0DFA for ; Tue, 6 Feb 2024 09:41:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id AF82A41E57 for ; Tue, 6 Feb 2024 09:40:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org AF82A41E57 Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=XjjfQHfB 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 92ODpnLihtH5 for ; Tue, 6 Feb 2024 09:40:57 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 2B72641E51 for ; Tue, 6 Feb 2024 09:40:57 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 2B72641E51 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707212456; 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=r0BqD/Bnj6ifNZcktVQ+p8qzpOEOwuUueXOrScQIQTQ=; b=XjjfQHfBHMXHlA/YNyJuX0SniyeRuHp7MMzweX94T1UykWwe98ZuSdsxL/nhs5d2pKw2Kl F1sE0/QpOQMwnE9NVOMpLoNLrVn6dCh6MRqfRrK1oq8Y4fDtC7SBHHARU2hz3TmDNW8vmv k/vLVX3Ld9a4kO62OGBAIFHPPAejMoY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-66-oxqRgF7COlWazXUYDbxnMg-1; Tue, 06 Feb 2024 04:40:54 -0500 X-MC-Unique: oxqRgF7COlWazXUYDbxnMg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5AC2483BA82 for ; Tue, 6 Feb 2024 09:40:53 +0000 (UTC) Received: from amusil.brq.redhat.com (unknown [10.43.17.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id DAE0B492BF0; Tue, 6 Feb 2024 09:40:52 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Tue, 6 Feb 2024 10:40:26 +0100 Message-ID: <20240206094043.530335-13-amusil@redhat.com> In-Reply-To: <20240206094043.530335-1-amusil@redhat.com> References: <20240206094043.530335-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v2 12/29] tests: Add macro for OFTABLE_LOG_TO_PHY table number. 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" Add macro for OFTABLE_LOG_TO_PHY and replace all table=65 occurrences in OF with table=OFTABLE_LOG_TO_PHY. Signed-off-by: Ales Musil --- tests/ovn-macros.at | 1 + tests/ovn.at | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at index 1070630e9..8d00c7729 100644 --- a/tests/ovn-macros.at +++ b/tests/ovn-macros.at @@ -995,3 +995,4 @@ m4_define([OFTABLE_OUTPUT_LARGE_PKT_DETECT], [37]) m4_define([OFTABLE_OUTPUT_LARGE_PKT_PROCESS], [38]) m4_define([OFTABLE_REMOTE_OUTPUT], [39]) m4_define([OFTABLE_LOCAL_OUTPUT], [40]) +m4_define([OFTABLE_LOG_TO_PHY], [65]) diff --git a/tests/ovn.at b/tests/ovn.at index be1b138fe..80ad679f3 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -13140,7 +13140,7 @@ for i in 1 2; do done done -AT_CHECK([as hv1 ovs-ofctl dump-flows br-int |awk '/table=65/ && !/actions=drop/{print substr($8, 16, length($8))}' |sort -n], [0], [dnl +AT_CHECK([as hv1 ovs-ofctl dump-flows br-int |awk '/table=OFTABLE_LOG_TO_PHY/ && !/actions=drop/{print substr($8, 16, length($8))}' |sort -n], [0], [dnl 10 11 ]) @@ -13149,7 +13149,7 @@ AT_CHECK([as hv1 ovs-ofctl dump-flows br-int |awk '/table=65/ && !/actions=drop/ as hv1 check ovs-vsctl del-port vif01 check ovn-nbctl --wait=hv sync -AT_CHECK([as hv1 ovs-ofctl dump-flows br-int |awk '/table=65/ && !/actions=drop/{print substr($8, 16, length($8))}' |sort -n], [0], [dnl +AT_CHECK([as hv1 ovs-ofctl dump-flows br-int |awk '/table=OFTABLE_LOG_TO_PHY/ && !/actions=drop/{print substr($8, 16, length($8))}' |sort -n], [0], [dnl 11 ]) @@ -13157,7 +13157,7 @@ as hv1 check ovs-vsctl add-port br-int vif01 \ -- set Interface vif01 external-ids:iface-id=lp01 check ovn-nbctl --wait=hv sync -AT_CHECK([as hv1 ovs-ofctl dump-flows br-int |awk '/table=65/ && !/actions=drop/{print substr($8, 16, length($8))}' |sort -n], [0], [dnl +AT_CHECK([as hv1 ovs-ofctl dump-flows br-int |awk '/table=OFTABLE_LOG_TO_PHY/ && !/actions=drop/{print substr($8, 16, length($8))}' |sort -n], [0], [dnl 2 11 ]) @@ -13996,11 +13996,11 @@ AT_CHECK([grep $garp hv2_br_phys_tx | sort], [0], []) check ovn-nbctl set Logical_Switch_Port ln_port tag_request=2014 # wait for earlier changes to take effect -OVS_WAIT_UNTIL([test 1 = `as hv2 ovs-ofctl dump-flows br-int table=65 | \ +OVS_WAIT_UNTIL([test 1 = `as hv2 ovs-ofctl dump-flows br-int table=OFTABLE_LOG_TO_PHY | \ grep "actions=mod_vlan_vid:2014" | wc -l` ]) -OVS_WAIT_UNTIL([test 1 = `as hv3 ovs-ofctl dump-flows br-int table=65 | \ +OVS_WAIT_UNTIL([test 1 = `as hv3 ovs-ofctl dump-flows br-int table=OFTABLE_LOG_TO_PHY | \ grep "actions=mod_vlan_vid:2014" | wc -l` ]) @@ -16206,7 +16206,7 @@ wait_row_count Port_Binding 1 logical_port=lsp0 'chassis=[[]]' # (2) Chassis hv2 should not add flows in OFTABLE_PHY_TO_LOG and OFTABLE_LOG_TO_PHY tables. AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=OFTABLE_PHY_TO_LOG | grep in_port=1], [1], []) -AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=65 | grep output], [1], []) +AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=OFTABLE_LOG_TO_PHY | grep output], [1], []) # (3) Chassis hv1 should bind lsp0 when physical to logical mapping exists on hv1. echo "verifying that hv1 binds lsp0 when hv1 physical/logical mapping is added" @@ -16219,7 +16219,7 @@ wait_column "$hv1_uuid" Port_Binding chassis logical_port=lsp0 # (4) Chassis hv1 should add flows in OFTABLE_PHY_TO_LOG and OFTABLE_LOG_TO_PHY tables. as hv1 ovs-ofctl dump-flows br-int AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_PHY_TO_LOG | grep in_port=1], [0], [ignore]) -AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=65 | grep actions=output:1], [0], [ignore]) +AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_LOG_TO_PHY | grep actions=output:1], [0], [ignore]) # (5) Chassis hv1 should release lsp0 binding and chassis hv2 should bind lsp0 when # the requested chassis for lsp0 is changed from hv1 to hv2. @@ -16233,10 +16233,10 @@ wait_column "$hv2_uuid" Port_Binding chassis logical_port=lsp0 # (6) Chassis hv2 should add flows and hv1 should not. AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=OFTABLE_PHY_TO_LOG | grep in_port=1], [0], [ignore]) -AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=65 | grep actions=output:1], [0], [ignore]) +AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=OFTABLE_LOG_TO_PHY | grep actions=output:1], [0], [ignore]) AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_PHY_TO_LOG | grep in_port=1], [1], []) -AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=65 | grep output], [1], []) +AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_LOG_TO_PHY | grep output], [1], []) OVN_CLEANUP([hv1],[hv2]) @@ -16313,14 +16313,14 @@ echo "hv1_uuid=${hv1_uuid}" OVS_WAIT_UNTIL([test 1 = $(grep -c "Claiming lport lsp0" hv1/ovn-controller.log)]) wait_column "$hv1_uuid" Port_Binding chassis logical_port=lsp0 AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_PHY_TO_LOG | grep in_port=1], [0], [ignore]) -AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=65 | grep actions=output:1], [0], [ignore]) +AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_LOG_TO_PHY | grep actions=output:1], [0], [ignore]) check ovn-nbctl --wait=hv lsp-set-options lsp0 requested-chassis=non-existant-chassis OVS_WAIT_UNTIL([test 1 -le $(grep -c "Releasing lport lsp0" hv1/ovn-controller.log)]) check ovn-nbctl --wait=hv sync wait_column '' Port_Binding chasssi logical_port=lsp0 AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_PHY_TO_LOG | grep in_port=1], [1], []) -AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=65 | grep output], [1], []) +AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_LOG_TO_PHY | grep output], [1], []) OVN_CLEANUP([hv1]) @@ -24428,7 +24428,7 @@ m4_define([DVR_N_S_PING], ]]) # Confirm that packet went out via localnet port - AT_CHECK([as hv1 ovs-ofctl dump-flows br-int | grep table=65 | grep priority=150 | grep src=00:00:01:01:02:07 | grep n_packets=1 | wc -l], [0], [[1 + AT_CHECK([as hv1 ovs-ofctl dump-flows br-int | grep table=OFTABLE_LOG_TO_PHY | grep priority=150 | grep src=00:00:01:01:02:07 | grep n_packets=1 | wc -l], [0], [[1 ]]) echo "----------- Post Traffic hv1 dump -----------" @@ -29383,7 +29383,7 @@ wait_row_count Port_Binding 1 logical_port=lsp1 chassis=$ch wait_row_count Port_Binding 1 logical_port=lsp2 chassis=$ch AS_BOX([check output flows for initial interfaces]) -as hv1 ovs-ofctl dump-flows br-int table=65 > offlows_table65.txt +as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_LOG_TO_PHY > offlows_table65.txt AT_CAPTURE_FILE([offlows_table65.txt]) AT_CHECK_UNQUOTED([grep -c "output:1" offlows_table65.txt], [0], [dnl 1 @@ -29413,7 +29413,7 @@ as hv1 ovn-appctl -t ovn-controller debug/resume check ovn-nbctl --wait=hv sync AS_BOX([check output flows for new interfaces]) -as hv1 ovs-ofctl dump-flows br-int table=65 > offlows_table65_2.txt +as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_LOG_TO_PHY > offlows_table65_2.txt AT_CAPTURE_FILE([offlows_table65_2.txt]) AT_CHECK_UNQUOTED([grep -c "output:3" offlows_table65_2.txt], [0], [dnl 1