From patchwork Thu Feb 1 16:18:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1894071 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=VlbB3jaQ; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TQkdz5qhKz1yQ0 for ; Fri, 2 Feb 2024 03:20:23 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 0475A42CC3; Thu, 1 Feb 2024 16:20:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0475A42CC3 Authentication-Results: smtp4.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=VlbB3jaQ 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 Mo5IpB8IlXUH; Thu, 1 Feb 2024 16:20:18 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 309D042866; Thu, 1 Feb 2024 16:19:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 309D042866 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C6188C0DE3; Thu, 1 Feb 2024 16:19:08 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1280EC0DD9 for ; Thu, 1 Feb 2024 16:19:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 3A28D84CF5 for ; Thu, 1 Feb 2024 16:18:53 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3A28D84CF5 Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VlbB3jaQ 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 NahGidmJCyqt for ; Thu, 1 Feb 2024 16:18:51 +0000 (UTC) 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 56472846B7 for ; Thu, 1 Feb 2024 16:18:39 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 56472846B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706804318; 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=W9k28TIhNQEW1Ly18ePyZoJhZBNfQN7j5cGKvsV1MAM=; b=VlbB3jaQBbfWBn/5aOFBlClRVA0Bw38saQDteq/Rw4EfIMDCcaXj4lts1uvXcr6yk9xHRT ea6Zj4uLDDvPWlieWVUm2HEXUGpsaVhuNmyfbfZoLB+GWHBTUfgOThEjEDSxtfGMETRzH8 jKN6jNB1BX6UT+BplWtifgPy+2Jka6g= 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-222-lOCv7AYhONWfxznXx6JesA-1; Thu, 01 Feb 2024 11:18:36 -0500 X-MC-Unique: lOCv7AYhONWfxznXx6JesA-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 3C4FD3C0BE44 for ; Thu, 1 Feb 2024 16:18:36 +0000 (UTC) Received: from amusil.redhat.com (unknown [10.45.224.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id A8C97111F9; Thu, 1 Feb 2024 16:18:35 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Thu, 1 Feb 2024 17:18:02 +0100 Message-ID: <20240201161804.210604-25-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 24/26] tests: Add macro for OFTABLE_CHK_LB_AFFINITY 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_CHK_LB_AFFINITY and replace all table=78 occurrences in OF with table=OFTABLE_CHK_LB_AFFINITY. Signed-off-by: Ales Musil --- tests/ovn-macros.at | 1 + tests/system-ovn-kmod.at | 16 ++++++++-------- tests/system-ovn.at | 6 +++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at index 9b01b1491..47cf67762 100644 --- a/tests/ovn-macros.at +++ b/tests/ovn-macros.at @@ -1007,3 +1007,4 @@ m4_define([OFTABLE_CHK_IN_PORT_SEC_ND], [74]) m4_define([OFTABLE_CHK_OUT_PORT_SEC], [75]) m4_define([OFTABLE_ECMP_NH_MAC], [76]) m4_define([OFTABLE_ECMP_NH], [77]) +m4_define([OFTABLE_CHK_LB_AFFINITY], [78]) diff --git a/tests/system-ovn-kmod.at b/tests/system-ovn-kmod.at index 88c72edcd..454dacd73 100644 --- a/tests/system-ovn-kmod.at +++ b/tests/system-ovn-kmod.at @@ -146,8 +146,8 @@ tcp,orig=(src=172.16.1.2,dst=172.16.1.100,sport=,dport=),reply ]) dp_key=$(printf "0x%x" $(fetch_column datapath tunnel_key external_ids:name=R2)) -AT_CHECK_UNQUOTED([ovs-ofctl dump-flows br-int table=78 --no-stats | strip_cookie | sed -e 's/load:0xc0a80[[0-9]]02/load:0xc0a8002/'], [0], [dnl - table=78, idle_timeout=60, tcp,metadata=$dp_key,nw_src=172.16.1.2,nw_dst=172.16.1.100,tp_dst=8080 actions=load:0x1->NXM_NX_REG10[[14]],load:0xc0a8002->NXM_NX_REG4[[]],load:0x50->NXM_NX_REG8[[0..15]] +AT_CHECK_UNQUOTED([ovs-ofctl dump-flows br-int table=OFTABLE_CHK_LB_AFFINITY --no-stats | strip_cookie | sed -e 's/load:0xc0a80[[0-9]]02/load:0xc0a8002/'], [0], [dnl + table=OFTABLE_CHK_LB_AFFINITY, idle_timeout=60, tcp,metadata=$dp_key,nw_src=172.16.1.2,nw_dst=172.16.1.100,tp_dst=8080 actions=load:0x1->NXM_NX_REG10[[14]],load:0xc0a8002->NXM_NX_REG4[[]],load:0x50->NXM_NX_REG8[[0..15]] ]) check_affinity_flows () { @@ -178,7 +178,7 @@ ovn-nbctl lr-lb-add R2 lb11-no-aff OVS_WAIT_FOR_OUTPUT([ for i in $(seq 1 5); do NS_EXEC([alice1], [nc -z 172.16.1.101 8080]) - ovs-ofctl del-flows br-int table=78 + ovs-ofctl del-flows br-int table=OFTABLE_CHK_LB_AFFINITY done dnl Each server should have at least one connection. @@ -235,7 +235,7 @@ AT_CHECK([ovs-appctl dpctl/flush-conntrack]) OVS_WAIT_FOR_OUTPUT([ for i in $(seq 1 5); do NS_EXEC([foo1], [nc -z 192.168.2.101 8080]) - ovs-ofctl del-flows br-int table=78 + ovs-ofctl del-flows br-int table=OFTABLE_CHK_LB_AFFINITY done dnl Each server should have at least one connection. @@ -443,8 +443,8 @@ tcp,orig=(src=fd72::2,dst=fd30::1,sport=,dport=),reply=(src=fd ]) dp_key=$(printf "0x%x" $(fetch_column datapath tunnel_key external_ids:name=R2)) -AT_CHECK_UNQUOTED([ovs-ofctl dump-flows br-int table=78 --no-stats | strip_cookie | sed -e 's/load:0xfd1[[0-9]]000000000000/load:0xfd1000000000000/'], [0], [dnl - table=78, idle_timeout=60, tcp6,metadata=$dp_key,ipv6_src=fd72::2,ipv6_dst=fd30::1,tp_dst=8080 actions=load:0x1->NXM_NX_REG10[[14]],load:0x2->NXM_NX_XXREG1[[0..63]],load:0xfd1000000000000->NXM_NX_XXREG1[[64..127]],load:0x50->NXM_NX_REG8[[0..15]] +AT_CHECK_UNQUOTED([ovs-ofctl dump-flows br-int table=OFTABLE_CHK_LB_AFFINITY --no-stats | strip_cookie | sed -e 's/load:0xfd1[[0-9]]000000000000/load:0xfd1000000000000/'], [0], [dnl + table=OFTABLE_CHK_LB_AFFINITY, idle_timeout=60, tcp6,metadata=$dp_key,ipv6_src=fd72::2,ipv6_dst=fd30::1,tp_dst=8080 actions=load:0x1->NXM_NX_REG10[[14]],load:0x2->NXM_NX_XXREG1[[0..63]],load:0xfd1000000000000->NXM_NX_XXREG1[[64..127]],load:0x50->NXM_NX_REG8[[0..15]] ]) check_affinity_flows () { @@ -475,7 +475,7 @@ ovn-nbctl lr-lb-add R2 lb11-no-aff OVS_WAIT_FOR_OUTPUT([ for i in $(seq 1 5); do NS_EXEC([alice1], [nc -z fd30::2 8080]) - ovs-ofctl del-flows br-int table=78 + ovs-ofctl del-flows br-int table=OFTABLE_CHK_LB_AFFINITY done dnl Each server should have at least one connection. @@ -530,7 +530,7 @@ ovn-nbctl ls-lb-add foo lb30-no-aff OVS_WAIT_FOR_OUTPUT([ for i in $(seq 1 5); do NS_EXEC([foo1], [nc -z fd12::b 8080]) - ovs-ofctl del-flows br-int table=78 + ovs-ofctl del-flows br-int table=OFTABLE_CHK_LB_AFFINITY done ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fd12::b) | grep -v fe80 | \ diff --git a/tests/system-ovn.at b/tests/system-ovn.at index 27b3cdc5b..e916d9ab0 100644 --- a/tests/system-ovn.at +++ b/tests/system-ovn.at @@ -12087,10 +12087,10 @@ OVS_WAIT_UNTIL([ ip netns exec vm1 nc -z 43.43.43.43 80 &> /dev/null ]) -OVS_WAIT_UNTIL([test $(ovs-ofctl dump-flows br-int | grep 'table=78, n_packets' -c) -eq 1]) +OVS_WAIT_UNTIL([test $(ovs-ofctl dump-flows br-int | grep 'table=OFTABLE_CHK_LB_AFFINITY, n_packets' -c) -eq 1]) dnl Find the backend that was hit. -backend=$(ovs-ofctl dump-flows br-int table=78 | \ +backend=$(ovs-ofctl dump-flows br-int table=OFTABLE_CHK_LB_AFFINITY | \ grep -oE 'load:0x2a2a2a0[[12]]' | sed -n 's/load:0x2a2a2a0\(.*\)/\1/p') dnl Remove the backend that was hit. @@ -12102,7 +12102,7 @@ fi check ovn-nbctl --wait=hv sync dnl The learnt flow should also be auto deleted. -AT_CHECK([ovs-ofctl dump-flows br-int | grep 'table=78, n_packets' -c], [1], [dnl +AT_CHECK([ovs-ofctl dump-flows br-int | grep 'table=OFTABLE_CHK_LB_AFFINITY, n_packets' -c], [1], [dnl 0 ])