From patchwork Tue Feb 6 09:40:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1895605 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=EJRYNwr7; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.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 4TTdcy14kDz23g2 for ; Tue, 6 Feb 2024 20:44:34 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6DCB181D7D; Tue, 6 Feb 2024 09:44:32 +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 ft8H2S99XypE; Tue, 6 Feb 2024 09:44:31 +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 smtp1.osuosl.org 60E6881DAB 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=EJRYNwr7 Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 60E6881DAB; Tue, 6 Feb 2024 09:44:31 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3006EC0DD0; Tue, 6 Feb 2024 09:44:31 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 87CB9C0072 for ; Tue, 6 Feb 2024 09:44:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E74718218D for ; Tue, 6 Feb 2024 09:42:32 +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 SbmtTVd9pZo7 for ; Tue, 6 Feb 2024 09:42:31 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=amusil@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 256CB822F8 Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 256CB822F8 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 256CB822F8 for ; Tue, 6 Feb 2024 09:41:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707212496; 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=lcWa6d03SlJY92rl2rkKAwDgFkUvm9TWh/PT9RJ6hyE=; b=EJRYNwr7perMF57qfUsbvPm1kr2y22tMykDBTVt/kfzuP2BwUZJOxHfCMxCrWowAEcOaOI xxRx4Wan8No6VbSsx4dd1xwPXdsjYDiE6xNKYEVqy3sGN5bjZyg6THe8efl0SxXtanftjA w7vLemcbY6Gcc2CVYSzga9HfFbJcG/w= 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-438-p4RBdLvGOWuYVIN3VoMS7Q-1; Tue, 06 Feb 2024 04:40:55 -0500 X-MC-Unique: p4RBdLvGOWuYVIN3VoMS7Q-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 B961A85A58E for ; Tue, 6 Feb 2024 09:40:54 +0000 (UTC) Received: from amusil.brq.redhat.com (unknown [10.43.17.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 45702492BF0; Tue, 6 Feb 2024 09:40:54 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Tue, 6 Feb 2024 10:40:28 +0100 Message-ID: <20240206094043.530335-15-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 14/29] tests: Add macro for OFTABLE_MAC_LOOKUP 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_MAC_LOOKUP and replace all table=67 occurrences in OF with table=OFTABLE_MAC_LOOKUP. Signed-off-by: Ales Musil --- tests/ovn-macros.at | 1 + tests/ovn.at | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at index 6550f0cf4..c3cab516b 100644 --- a/tests/ovn-macros.at +++ b/tests/ovn-macros.at @@ -997,3 +997,4 @@ m4_define([OFTABLE_REMOTE_OUTPUT], [39]) m4_define([OFTABLE_LOCAL_OUTPUT], [40]) m4_define([OFTABLE_LOG_TO_PHY], [65]) m4_define([OFTABLE_MAC_BINDING], [66]) +m4_define([OFTABLE_MAC_LOOKUP], [67]) diff --git a/tests/ovn.at b/tests/ovn.at index 10fed0281..7f280545b 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -24564,16 +24564,16 @@ grep opcode=PUT_ARP | grep OF_Table_ID=10 | wc -l`]) AT_CHECK([test 1 = `as hv1 ovs-ofctl dump-flows br-int table=10 | grep arp | \ grep controller | grep -v n_packets=0 | wc -l`]) -# Wait for an entry in table=67 +# Wait for an entry in table=OFTABLE_MAC_LOOKUP OVS_WAIT_UNTIL( - [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=67 | grep n_packets=0 \ + [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_MAC_LOOKUP | grep n_packets=0 \ | wc -l`] ) # Send garp again. This time the packet should not be sent to ovn-controller. send_garp 1 1 $eth_src $eth_dst $spa $tpa -# Wait for an entry in table=67 -OVS_WAIT_UNTIL([test 1 = `as hv1 ovs-ofctl dump-flows br-int table=67 | grep n_packets=1 | wc -l`]) +# Wait for an entry in table=OFTABLE_MAC_LOOKUP +OVS_WAIT_UNTIL([test 1 = `as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_MAC_LOOKUP | grep n_packets=1 | wc -l`]) # The packet should not be sent to ovn-controller. The packet # count should be 1 only. @@ -24621,7 +24621,7 @@ OVS_WAIT_UNTIL([test 3 = `cat hv1/ovn-controller.log | grep NXT_PACKET_IN2 | \ grep table_id=10 | wc -l`]) OVS_WAIT_UNTIL( - [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=67 | grep dl_src=50:54:00:00:00:33 \ + [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_MAC_LOOKUP | grep dl_src=50:54:00:00:00:33 \ | wc -l`] ) @@ -24635,7 +24635,7 @@ find mac_binding ip=10.0.0.50], [0], [lr0-sw0 send_garp 1 1 $eth_src $eth_dst $spa $tpa OVS_WAIT_UNTIL( - [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=67 | grep dl_src=50:54:00:00:00:33 \ + [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_MAC_LOOKUP | grep dl_src=50:54:00:00:00:33 \ | grep n_packets=1 | wc -l`] ) @@ -24660,17 +24660,17 @@ send_arp_reply 1 1 $eth_src $eth_dst $spa $tpa OVS_WAIT_UNTIL([test 4 = `cat hv1/ovn-controller.log | grep NXT_PACKET_IN2 | \ grep table_id=10 | wc -l`]) -# Wait for an entry in table=67 for the learnt mac_binding entry. +# Wait for an entry in table=OFTABLE_MAC_LOOKUP for the learnt mac_binding entry. OVS_WAIT_UNTIL( - [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=67 | grep dl_src=50:54:00:00:00:23 \ + [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_MAC_LOOKUP | grep dl_src=50:54:00:00:00:23 \ | wc -l`] ) # Send the same garp reply. This time it should not be sent to ovn-controller. send_arp_reply 1 1 $eth_src $eth_dst $spa $tpa OVS_WAIT_UNTIL( - [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=67 | grep dl_src=50:54:00:00:00:23 \ + [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_MAC_LOOKUP | grep dl_src=50:54:00:00:00:23 \ | grep n_packets=1 | wc -l`] ) @@ -24679,7 +24679,7 @@ grep table_id=10 | wc -l`]) send_arp_reply 1 1 $eth_src $eth_dst $spa $tpa OVS_WAIT_UNTIL( - [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=67 | grep dl_src=50:54:00:00:00:23 \ + [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_MAC_LOOKUP | grep dl_src=50:54:00:00:00:23 \ | grep n_packets=2 | wc -l`] ) @@ -33399,7 +33399,7 @@ sip=`ip_to_hex 172 16 1 10` tip=`ip_to_hex 172 16 1 50` test_arp vif-north1 f0f000000011 $sip $tip OVS_WAIT_UNTIL( - [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=67 | grep dl_src=f0:f0:00:00:00:11 | wc -l`] + [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_MAC_LOOKUP | grep dl_src=f0:f0:00:00:00:11 | wc -l`] ) echo "Send traffic North to South" @@ -33422,7 +33422,7 @@ sip=`ip_to_hex 10 0 0 10` tip=`ip_to_hex 10 0 0 50` test_arp vif-north2 f0f000000022 $sip $tip OVS_WAIT_UNTIL( - [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=67 | grep dl_src=f0:f0:00:00:00:22 | wc -l`] + [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_MAC_LOOKUP | grep dl_src=f0:f0:00:00:00:22 | wc -l`] ) echo "Send traffic South to North2" @@ -33438,7 +33438,7 @@ sip=`ip_to_hex 192 168 0 10` tip=`ip_to_hex 192 168 0 50` test_arp vif-north3 f0f000000033 $sip $tip OVS_WAIT_UNTIL( - [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=67 | grep dl_src=f0:f0:00:00:00:33 | wc -l`] + [test 1 = `as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_MAC_LOOKUP | grep dl_src=f0:f0:00:00:00:33 | wc -l`] ) echo "Send traffic South to North3"