From patchwork Wed Sep 13 08:46:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Maximets X-Patchwork-Id: 813224 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xsZyj1tYhz9s72 for ; Wed, 13 Sep 2017 18:46:36 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id A74F3B13; Wed, 13 Sep 2017 08:46:32 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id BD9E3AA5 for ; Wed, 13 Sep 2017 08:46:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E1F14159 for ; Wed, 13 Sep 2017 08:46:29 +0000 (UTC) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20170913084626euoutp0282bdb789843d4c6520b2943dee03d6e8~j33NIGRXo0919609196euoutp02T; Wed, 13 Sep 2017 08:46:26 +0000 (GMT) Received: from eusmges3.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170913084625eucas1p2620f2b7d65f9335e3d7f4431f24d8cd8~j33McB_3M0758707587eucas1p2f; Wed, 13 Sep 2017 08:46:25 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3.samsung.com (EUCPMTA) with SMTP id CE.0F.12867.160F8B95; Wed, 13 Sep 2017 09:46:25 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170913084625eucas1p19206756305b0ababebac2763317c363d~j33Lx30RZ1996619966eucas1p12; Wed, 13 Sep 2017 08:46:25 +0000 (GMT) X-AuditID: cbfec7f2-f793b6d000003243-0f-59b8f06114ac Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 4B.19.18832.160F8B95; Wed, 13 Sep 2017 09:46:25 +0100 (BST) Received: from imaximets.rnd.samsung.ru ([106.109.129.180]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OW700G87N190J00@eusync4.samsung.com>; Wed, 13 Sep 2017 09:46:25 +0100 (BST) From: Ilya Maximets To: ovs-dev@openvswitch.org, Ben Pfaff Date: Wed, 13 Sep 2017 11:46:18 +0300 Message-id: <1505292378-7745-1-git-send-email-i.maximets@samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEIsWRmVeSWpSXmKPExsWy7djPc7qJH3ZEGuy7qmXxanIDo8W0z7fZ La60/2S3mPvpOaPF+8t7WRxYPXbOusvu8ezmf0aP59d6WDz6tqxiDGCJ4rJJSc3JLEst0rdL 4MpY1KlWcEqp4uq/6awNjGtluhg5OSQETCQezutkhbDFJC7cW8/WxcjFISSwlFHi970eKOcz o8TZu6dYYDpWfN3CApFYxijR/GILM4TTzCTR0nuVDaSKTUBH4tTqI4wgtghQx7Kp38DizAK1 EqtfLGYGsYUFXCXaJn5k72Lk4GARUJX4NzMFJMwL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RkzuxqjVfWKfz54vmnptIx3ARs6VZeKfE+t9Olca5YfVTKn98od J7NF+3r3sc4KDGNTMnSr3FJmsc1sQdHjd6Ynp4Z9106dr/x/7iHB779q/+ubys54HLmzRnpj z+tykfnLlViKMxINtZiLihMBtDlGjv4BAAA= X-CMS-MailID: 20170913084625eucas1p19206756305b0ababebac2763317c363d X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?utf-8?q?Ilya_Maximets=1BSRR-Virtualization_Lab=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG0xlYWRpbmcgRW5naW5lZXI=?= X-Global-Sender: =?utf-8?q?Ilya_Maximets=1BSRR-Virtualization_Lab=1BSamsu?= =?utf-8?q?ng_Electronics=1BLeading_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BCISHQ=1BC10GD01GD010154?= CMS-TYPE: 201P X-CMS-RootMailID: 20170913084625eucas1p19206756305b0ababebac2763317c363d X-RootMTR: 20170913084625eucas1p19206756305b0ababebac2763317c363d References: X-Spam-Status: No, score=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ilya Maximets , Heetae Ahn Subject: [ovs-dev] [PATCH] tests/stp: Use long warps instead of multiple calls. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org This change fixes constant test failure on RHEL 7 system with CFLAGS='-march=native': >---------------------------------------------------------------< 2222: STP - flush the fdb and mdb when topology changed FAILED ... ./stp.at:609: ovs-appctl fdb/show br0 --- - +++ ./tests/testsuite.dir/at-groups/2222/stdout @@ -1,2 +1,3 @@ port VLAN MAC Age +LOCAL 1 00:0c:29:a0:27:d1 33 >---------------------------------------------------------------< Long warps takes threads a chance to perform some work on each step unlike multiple appctl calls. Also, code looks cleaner and works faster. CC: Tonghao Zhang Fixes: 427e9751f300 ("tests: Add and improve stp tests.") Signed-off-by: Ilya Maximets Tested-by: Tonghao Zhang --- tests/stp.at | 54 +++++++----------------------------------------------- 1 file changed, 7 insertions(+), 47 deletions(-) diff --git a/tests/stp.at b/tests/stp.at index e27600e..9550f72 100644 --- a/tests/stp.at +++ b/tests/stp.at @@ -429,9 +429,7 @@ AT_CHECK([ovs-ofctl add-flow br1 "in_port=8 icmp actions=2"]) AT_CHECK([ovs-ofctl add-flow br1 "in_port=2 icmp actions=8"]) # give time for STP to move initially - -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 +ovs-appctl time/warp 6000 3000 AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY_LISTENING], [0], [dnl port <>: STP state changed from disabled to listening @@ -446,17 +444,7 @@ AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(8),eth(src=50:54:00:00:00: ]) # give time for STP to synchronize - -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 +ovs-appctl time/warp 30000 3000 AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl port <>: STP state changed from disabled to listening @@ -524,8 +512,7 @@ ovs-appctl netdev-dummy/set-admin-state up ovs-appctl time/stop # give time for STP to move initially -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 +ovs-appctl time/warp 6000 3000 AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY_LISTENING], [0], [dnl port <>: STP state changed from disabled to listening @@ -537,17 +524,7 @@ port <>: STP state changed from disabled to listening ]) # give time for STP to synchronize -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 - -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 +ovs-appctl time/warp 30000 3000 AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY_FORWARDING], [0], [dnl port <>: STP state changed from learning to forwarding @@ -566,9 +543,7 @@ port <>: STP state changed from learning to forwarding # of stp ports will stop after 1s. So the root bridge can send quickly # topology change ack (other bridges may send TCN BPDU to root bridge) for # avoiding root brdige to flush fdb and mdb frequently. -for i in $(seq 0 35); do - ovs-appctl time/warp 1000 -done +ovs-appctl time/warp 36000 1000 # root bridge sends query packet # we don't want to lose that message, so send it twice @@ -591,20 +566,7 @@ OVS_WAIT_UNTIL([ovs-appctl mdb/show br2 | grep 'querier']) AT_CHECK([ovs-vsctl del-port br0 p2]) # give time for STP to synchronize -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 - -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 - -ovs-appctl time/warp 3000 -ovs-appctl time/warp 3000 +ovs-appctl time/warp 36000 3000 # check fdb and mdb AT_CHECK([ovs-appctl fdb/show br0], [0], [dnl @@ -652,9 +614,7 @@ ovs-appctl netdev-dummy/set-admin-state up ovs-appctl time/stop # give time for STP to move initially -for i in $(seq 0 30); do - ovs-appctl time/warp 1000 -done +ovs-appctl time/warp 31000 1000 AT_CHECK([ovs-appctl stp/show br0 | grep p1], [0], [dnl p1 designated forwarding 19 128.1