Message ID | 0651437857445ed3bf6fc4a99faf56f02733f46b.1527788672.git.petrm@mellanox.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-kselftest-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4BE0F603B5 for <patchwork-linux-kselftest@patchwork.kernel.org>; Thu, 31 May 2018 17:52:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AB9928F30 for <patchwork-linux-kselftest@patchwork.kernel.org>; Thu, 31 May 2018 17:52:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F97728F86; Thu, 31 May 2018 17:52:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B22D728F30 for <patchwork-linux-kselftest@patchwork.kernel.org>; Thu, 31 May 2018 17:52:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755828AbeEaRwe (ORCPT <rfc822;patchwork-linux-kselftest@patchwork.kernel.org>); Thu, 31 May 2018 13:52:34 -0400 Received: from mail-db5eur01on0065.outbound.protection.outlook.com ([104.47.2.65]:63312 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755894AbeEaRw2 (ORCPT <rfc822; linux-kselftest@vger.kernel.org>); Thu, 31 May 2018 13:52:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dETSnHNe/gmuNgd5afM+qSh0bEitHHKnPP07fWfEH6k=; b=xknAcGz9LTfvfNjH4oQXNAfrDYvTLOH6aiiWRu/YSc2NMCp42Q1A1H30M1l7fCTrCQ+lyUpxhz6QO1fYS1DhRyhExMVh3SjB5hpILVUIRXV2WKeIfqjLQgH/NEc3whKTGi47CMTRW4TC0RoshAxWI9iE4imdTtukOHJjw8qTPWI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (78.45.160.211) by AM6PR05MB4182.eurprd05.prod.outlook.com (2603:10a6:209:40::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.797.11; Thu, 31 May 2018 17:52:25 +0000 From: Petr Machata <petrm@mellanox.com> To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: davem@davemloft.net, shuah@kernel.org, idosch@mellanox.com Subject: [PATCH net-next 4/9] selftests: forwarding: mirror_gre_lib: Add STP test In-Reply-To: <cover.1527788672.git.petrm@mellanox.com> References: <cover.1527788672.git.petrm@mellanox.com> Message-Id: <0651437857445ed3bf6fc4a99faf56f02733f46b.1527788672.git.petrm@mellanox.com> Date: Thu, 31 May 2018 19:52:20 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [78.45.160.211] X-ClientProxiedBy: CWLP265CA0198.GBRP265.PROD.OUTLOOK.COM (2603:10a6:401:4e::18) To AM6PR05MB4182.eurprd05.prod.outlook.com (2603:10a6:209:40::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4182; X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4182; 3:Jaa60hJOgwG9lCT7BbvRzE2wLGeJic6yXe95+9L/QvMVGX3nBe4lm3mgLXg9JX5Qqezkc/qNpcMBFNg3tyciQTtbhb1Hf+I6/X9VVAKfG23WrqyB8R3q6IO3OAttLipM7n0eqODYyjz2fyjwOEELli/L5s0prFLuhxmMMYJ9b5qEheYBWn/QDJ8AcqdPFoYeYJy5yBelqHp6EMpBqvxnANjwZ0UmG6JvhvolyPYBW4D56Nw+W/ocZKpsbfeZRWYU; 25:pWdeSFC1KWw1/Q6IJ4xHcbF43tVEK9vIXFOB8krC7qyWgnoGmXC4lSFoU26wbxOqOHGQQkbBe5YPpMuPh+262CMOiRX/wn9PjRuquMa+6wqsWMijUI9wliOLULrXBCR+nWDINJhvDK8JWOIwkgQjRodZeQHVeWiPrfKAfzzKoDxjPjlAaN1lI/Mdsn7LxKWxQZGhD7BudTMUJI+XDrkHYwgr7Im6/exIYuswqw5xyZPo6ODHzszoFv7kysN7Ff6ONZ1grAJJbVDHnHcGk+wouMMCNnKKK7g6GOKXiXGCeq3bN3ZsRORMrpY+jD60WTf/mDopytP2tmT9K61Z1S7C+A==; 31:pYZGu2cTRzw0g09L51YSbFL9aiAc5fPftahkBnQCDBRDBooi+qKFJvQ2inDxEtRD9KyJAGFTBuo4WRS/F+Vnf29F+a2hj96Alw9OFeMqgIbeaC6yEi+409ySgeZdxPMWPtglKfo+bXwgW1xoL7leVTwwXileSYIHFwns4ip8Dcau5F8gGxLWANeKgsekItqhR4PXZgm87lb/w5NDxoW1rAAl3w4rabyJw58Lx/p7g4c= X-MS-TrafficTypeDiagnostic: AM6PR05MB4182: X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4182; 20:scRkcPhdBqQW+mxu5O57A4yw5DK4MPf6sQ8L807ALJtgE8LBq+YtYnHFyoGgpBZCUUxBz4BmTfzUtdRs5BZsmokcOMg4deMOaRj0FYgYVYty0ad0l5S1X1NGtGUIKJhbeiEC01ROTlMC82RKJXvbSz+7I+6plS8xLTZqy7s/FKdgZSwsLS4m/6yFm397xV1tTgoj8k96+Tp5AdX+5dhuDdyhUfYvnnJ4B1vn5Ade6hVKx+QcErTIkwItvsb39OBx623tc1+3LQw5UI/ZY614ZQoAjYHFJ/gjX/LXbBuDzIVIZIFzxZTO0Gn7zQakJR+ZmX5zOYzWbW4CxdD0S/9uGzDWNJgLJkuqco5TG+ap+yJqxrDDSN0PjAvuqcbxGeCSt8yHk0XHKI+L3LzKvFDH/uzagEqcrC7Wef403fOAPSoRpT0f8e6DxECmG7wvCidbfhzvTLtafH9JTFGOU7s+ZTGiI/2LQ4tQT5Tn9WXZVvpx+bJaJkx77UzzIYi3KmBr; 4:wV55D0aQ4jpn94jTzHzJr5ceWbFZTijyf07kwvT1Cwo2Fn6FqbwZztdD6a9NReuooEN69rq4lrD+WUWuboDxHY00V+aN6mtvCZYKnEu2yYwabmCAmVWeu4xLADaZEcpY+Ue7vvZUCDGkMRml6Iy5mHkQ9lCK5SvNePlDk+QqEX9TKNi/KWEyx+OtWNtALmH9JiYkuj2mR2F0IUu/8x7IWNhVXo4W1U3gmqjW2ZzelNWggp+gqg6Y60iB2GxQ5dcEgQwASLMq+8RNVp2I/UJXbw== X-Microsoft-Antispam-PRVS: <AM6PR05MB41821C46495D0B6004AC77B8DB630@AM6PR05MB4182.eurprd05.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:AM6PR05MB4182; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4182; X-Forefront-PRVS: 06891E23FB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(39380400002)(39860400002)(396003)(366004)(189003)(199004)(8676002)(316002)(76176011)(118296001)(81166006)(107886003)(5660300001)(86362001)(36756003)(446003)(386003)(51416003)(6116002)(3846002)(59450400001)(25786009)(50466002)(81156014)(2906002)(58126008)(16586007)(48376002)(16526019)(68736007)(4326008)(6666003)(486006)(47776003)(66066001)(6486002)(106356001)(11346002)(105586002)(478600001)(53936002)(52116002)(97736004)(956004)(305945005)(6496006)(476003)(2616005)(26005)(8936002)(7736002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4182; H:t540p; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM6PR05MB4182; 23:VetxfNXtlq/a7RuNKsG+XgTFyTM1mKYR/c/9hDY8x?= =?us-ascii?Q?DpZWnaJz8bk3xAl+73bs2N+A2TjZ79JfF/0LBJ8HpfdN3TA+nV5An+eSQT/Z?= =?us-ascii?Q?Ntfd31GUciH7mN2WPxuCW+0lug+AmAV9MNmsldmY7VWsqA0qSQAwHjO8kb/1?= =?us-ascii?Q?uxIVSCed1A0FlTkcJL8/darZEa5NIqEwrDm5KRN/YDJTkn2+HKQrnJp62L0w?= =?us-ascii?Q?4FNSO+3zoRTWUuZZmipmJ7+X/ZOqjD3AQQJTPvM4pOGMi3DxM2hBF2SiNfFu?= =?us-ascii?Q?uQzM/28PTBYcc/6jCKiaHS9dOcXSoc8arR1KbXTbQqNE4WXrvhX+y45vvnA2?= =?us-ascii?Q?qp8eMjlh4fixbTYIM2wgZGtjk0WBgZdfbeTzxlpble+4pi9+uCMMlZN3nWPb?= =?us-ascii?Q?GRz6WKeKStVBjqko0ezIgKJ0iEdRKSiA73V0iXWnq/HYKHWYvAWZZDhKAwfj?= =?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Qlck8JsjfxdnVqlIpCftetGxSQNLW4hpb4htMYa933BOGgzvdiOb X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4182; 6:6uKNluVyCtOzRckM4STgffF317zs94z6QbvLMxo0KIqAs5TEW0QaJSw1LTRugV1oXNlHOLpNCByBRbe7LUNijUst7nN8ywfl9+5iLpOFHQRO95NwVN9rhCvROvaQKDsntKlKDm167wOSvhdjFtbZGAw5MBvjVCE7TW/HSUlPBzqt7ul+fACuBuuCj50Aewm1TVOYrHrrc8DrRTcUhw7tn6cjgM9j+uaXyNCcNFW/pU2xj5XTy6Y1xtOvVhoMHtUdQL+l2fRMoYucCgCwq1T3pJDxGommvKU8uhJthrhmjrz/wALz21MLH2ffw3HzEc/kO86UTDytMimn4i4WQRr2VG0bpqSeLMnJL+loN/YPpEmtRcSL3npj83c1JYQaxmr2gpFYAM6ZtL+GDfm0Y49z0m2Wuj9/ZBQYy+o+Vv9bJQe2ltEiGzESf2XlPwSmIRgvh6YaImLTaGSapeudjXbyiA==; 5:hUKNSrW51BAOeJC9SEkYWJGRmVli5Q0MaAs66v7WbX1xMeHwN7AxMBHGnQJQ6AN+XXf8TgaLH26YH2+9hEMTX2awOyAP99acGqrNe91mgOY1t2uShC9HN0ZFZtJSSb6VKc0KmPnd9rkK87EDnnRoZTYGYtDDinivtZDJHsVsoHY=; 24:Iv3vmNZTgFHeLfjgQbpdskjCDQadc5p3uCfr3bzAaAa+h14yd+Vhb+7R3SgGy8tL1RmzmEUxGde9e4X3DAI1lhE0Bn9d4xjH64hCAhcrxGo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4182; 7:mYsh1d6kccfGXAlMetzSkx/5Ek0HZumqhbfh/ImNwAGNSLRA+VHaGz0N85uloH5ZsFwnW8JPgdnwalhENid8mJUjAsjh7q+myu4oTrCxTgUTxayveXb268Pxt7rXYvmVfFFsUU/LBP2faBZRg2hAd6m+MBxZxp7lVWSwx6NZhdKZ+Djpin+Evj7jyiYPCqi89gw7c7/S6/DCikh7C159xLM3xy3jq5icuclkzpKH4CTn5DBjt5KOxDGQ7EBhmNs4 X-MS-Office365-Filtering-Correlation-Id: fa15391e-995e-4a70-dc55-08d5c71f4512 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2018 17:52:25.5820 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fa15391e-995e-4a70-dc55-08d5c71f4512 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4182 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kselftest.vger.kernel.org> X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh index 92ef6dd..619b469 100644 --- a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh @@ -96,3 +96,35 @@ full_test_span_gre_dir_vlan() { full_test_span_gre_dir_vlan_ips "$@" 192.0.2.1 192.0.2.2 } + +full_test_span_gre_stp_ips() +{ + local tundev=$1; shift + local nbpdev=$1; shift + local what=$1; shift + local ip1=$1; shift + local ip2=$1; shift + local h3mac=$(mac_get $h3) + + RET=0 + + mirror_install $swp1 ingress $tundev "matchall $tcflags" + quick_test_span_gre_dir_ips $tundev ingress $ip1 $ip2 + + bridge link set dev $nbpdev state disabled + sleep 1 + fail_test_span_gre_dir_ips $tundev ingress $ip1 $ip2 + + bridge link set dev $nbpdev state forwarding + sleep 1 + quick_test_span_gre_dir_ips $tundev ingress $ip1 $ip2 + + mirror_uninstall $swp1 ingress + + log_test "$what: STP state ($tcflags)" +} + +full_test_span_gre_stp() +{ + full_test_span_gre_stp_ips "$@" 192.0.2.1 192.0.2.2 +}
Add a reusable full test that toggles STP state of a given bridge port and checks that the mirroring reacts appropriately. The test will be used by bridge tests in follow-up patches. Signed-off-by: Petr Machata <petrm@mellanox.com> --- .../selftests/net/forwarding/mirror_gre_lib.sh | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+)