From patchwork Fri Jun 19 11:10:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1312805 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49pGM32bvrz9sSf for ; Fri, 19 Jun 2020 21:10:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A238189991; Fri, 19 Jun 2020 11:10:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qql6g4EFebGm; Fri, 19 Jun 2020 11:10:50 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 9452489974; Fri, 19 Jun 2020 11:10:48 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 72497C0865; Fri, 19 Jun 2020 11:10:48 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id B9C41C016E for ; Fri, 19 Jun 2020 11:10:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id B6AB385E79 for ; Fri, 19 Jun 2020 11:10:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7TzT73cGSt3K for ; Fri, 19 Jun 2020 11:10:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 6FC0F87675 for ; Fri, 19 Jun 2020 11:10:44 +0000 (UTC) X-Originating-IP: 115.99.208.123 Received: from nusiddiq.home.org.com (unknown [115.99.208.123]) (Authenticated sender: numans@ovn.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 33C2AC0009; Fri, 19 Jun 2020 11:10:39 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Fri, 19 Jun 2020 16:40:35 +0530 Message-Id: <20200619111035.2356014-1-numans@ovn.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200619110950.2355684-1-numans@ovn.org> References: <20200619110950.2355684-1-numans@ovn.org> MIME-Version: 1.0 Cc: Han Zhou Subject: [ovs-dev] [PATCH ovn v13 5/7] tests: Enhance ovn-performance testing by adding gw router port. 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" From: Numan Siddique This covers the scenario of setting up/deleting of BFD tunnels for HA. Acked-by: Han Zhou Signed-off-by: Numan Siddique --- tests/ovn-performance.at | 106 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/tests/ovn-performance.at b/tests/ovn-performance.at index a12757e18..400b833e1 100644 --- a/tests/ovn-performance.at +++ b/tests/ovn-performance.at @@ -239,6 +239,16 @@ for i in 1 2; do ovn_attach n1 br-phys 192.168.0.$i done +for i in 1 2 3; do + sim_add gw$i + as gw$i + ovs-vsctl add-br br-phys + ovs-vsctl add-br br-ex + ovs-vsctl set open . external_ids:ovn-bridge-mappings="public:br-ex" + j=$((i + 2)) + ovn_attach n1 br-phys 192.168.0.$j +done + # Wait for the tunnel ports to be created and up. # Otherwise this may affect the lflow_run count. @@ -399,6 +409,102 @@ OVN_CONTROLLER_EXPECT_NO_HIT( [ovn-nbctl --wait=hv acl-add pg1 to-lport 1001 'outport == @pg1 && ip4.src == $pg1_ip4' allow] ) +# Create a public logical switch and attach the router to it. +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv ls-add public] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-add public public-lr1] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-set-type public-lr1 router] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-set-addresses public-lr1 router] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-set-options public-lr1 router-port=lr1-public] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lrp-add lr1 lr1-public 00:00:20:20:12:13 172.168.0.100/24] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-add public ln-public] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-set-type ln-public localnet] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-set-addresses ln-public unknown] +) + +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2], [lflow_run], + [ovn-nbctl --wait=hv lsp-set-options ln-public network_name=public] +) + +OVN_CONTROLLER_EXPECT_HIT_COND( + [hv1 hv2 gw1 gw2 gw3], [lflow_run], [=0 =0 >0 =0 =0], + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw1 30 && ovn-nbctl --wait=hv sync] +) + +# After this, BFD should be enabled from hv1 and hv2 to gw1. +# So there should be lflow_run hits in hv1, hv2, gw1 and gw2 +OVN_CONTROLLER_EXPECT_HIT_COND( + [hv1 hv2 gw1 gw2 gw3], [lflow_run], [>0 >0 >0 >0 =0], + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw2 20 && ovn-nbctl --wait=hv sync] +) + +OVN_CONTROLLER_EXPECT_HIT( + [hv1 hv2 gw1 gw2 gw3], [lflow_run], + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw3 10 && ovn-nbctl --wait=hv sync] +) + +# Make gw2 master. There is remote possibility that full recompute +# triggers for gw2 after it becomes master. Most of the time +# there will be no recompute. +OVN_CONTROLLER_EXPECT_HIT_COND( + [hv1 hv2 gw1 gw2 gw3], [lflow_run], [=0 =0 =0 >=0 =0], + [ovn-nbctl --wait=hv lrp-set-gateway-chassis lr1-public gw2 40 && ovn-nbctl --wait=hv sync] +) + +# Delete gw2 from gateway chassis +OVN_CONTROLLER_EXPECT_HIT( + [hv1 hv2 gw1 gw2 gw3], [lflow_run], + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw2 && ovn-nbctl --wait=hv sync] +) + +# Delete gw1 from gateway chassis +# After this, the BFD should be disabled entirely as gw3 is the +# only gateway chassis. +OVN_CONTROLLER_EXPECT_HIT_COND( + [hv1 hv2 gw1 gw2 gw3], [lflow_run], [>0 >0 >0 =0 >0], + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw1] +) + +# Delete gw3 from gateway chassis. There should be no lflow_run. +OVN_CONTROLLER_EXPECT_NO_HIT( + [hv1 hv2 gw1 gw2 gw3], [lflow_run], + [ovn-nbctl --wait=hv lrp-del-gateway-chassis lr1-public gw3] +) + for i in 1 2; do j=$((i%2 + 1)) lp=lp$i