From patchwork Thu Feb 1 16:17:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1894050 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=PGhOQV17; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::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 4TQkc834l9z23h3 for ; Fri, 2 Feb 2024 03:18:48 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 007DA436F7; Thu, 1 Feb 2024 16:18:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 007DA436F7 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=PGhOQV17 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 Ot5LlPv8vPBY; Thu, 1 Feb 2024 16:18:43 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id ED857436B0; Thu, 1 Feb 2024 16:18:39 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org ED857436B0 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9AA40C0DF3; Thu, 1 Feb 2024 16:18:30 +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 04ED7C0DDF for ; Thu, 1 Feb 2024 16:18:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 8A86B4222D for ; Thu, 1 Feb 2024 16:18:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 8A86B4222D 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=PGhOQV17 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 iFOF9ym7HJQV for ; Thu, 1 Feb 2024 16:18:24 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id E7E664220B for ; Thu, 1 Feb 2024 16:18:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E7E664220B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706804302; 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=i3U4rIw95WLuovcSXJkg8U6GOe3ds6mfsBQfEvXXrdY=; b=PGhOQV17Kd2aX9w+zgp4oTWF8VV56rHxcOX1gevh1mVL3S7tzEifQ7dRrHQNZzDWMfA9wW P8BKTb2NMJRABJ4594UVeND7nqihSYDTHCoyfBaHyTk/zCFd51ii8riPGGUBkDRxVYlD/0 Ow0xkWDbVwTBg+wYIHO9GwC8mRCyccQ= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-571-7mW_hN3sNM-9KopVajlDqQ-1; Thu, 01 Feb 2024 11:18:21 -0500 X-MC-Unique: 7mW_hN3sNM-9KopVajlDqQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 8C92E285F989 for ; Thu, 1 Feb 2024 16:18:21 +0000 (UTC) Received: from amusil.redhat.com (unknown [10.45.224.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id E6AAE1BDB1; Thu, 1 Feb 2024 16:18:20 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Thu, 1 Feb 2024 17:17:49 +0100 Message-ID: <20240201161804.210604-12-amusil@redhat.com> In-Reply-To: <20240201161804.210604-1-amusil@redhat.com> References: <20240201161804.210604-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 11/26] 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 56b9497c9..4f2b8196d 100644 --- a/tests/ovn-macros.at +++ b/tests/ovn-macros.at @@ -994,3 +994,4 @@ m4_define([OFTABLE_LOG_INGRESS_PIPELINE], [8]) m4_define([OFTABLE_OUTPUT_LARGE_PKT_DETECT], [37]) 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 6c10fdbd0..68c8e836a 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