From patchwork Thu May 24 14:27:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 10424889 Return-Path: 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 B2B5760327 for ; Thu, 24 May 2018 14:27:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B730D28987 for ; Thu, 24 May 2018 14:27:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB1AE295D9; Thu, 24 May 2018 14:27:32 +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, LOTS_OF_MONEY,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 2953F28987 for ; Thu, 24 May 2018 14:27:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033272AbeEXO1b (ORCPT ); Thu, 24 May 2018 10:27:31 -0400 Received: from mail-eopbgr50048.outbound.protection.outlook.com ([40.107.5.48]:23929 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1033277AbeEXO12 (ORCPT ); Thu, 24 May 2018 10:27: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=emkh9/wXAXo0HYupmymXkIJg/NAb0J0jNw1vu16ie6U=; b=JTBQLuDL4/OC3fTEl1JuVv3YTJaqcm5E0yJqH0O1UgsLDj3CjzU09UGDUTsb7YPHQIEEr8+ZLLQDp7Xir29TQrR+AZ5VuO3b6T8uhsNLFVMijNmNaeauRaBDNAOYNsytH7ZEE21CrFgsAyXe1WTYYCzkJHSv0oi6YhHRZLqjFQc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (78.45.160.211) by AM6PR05MB4184.eurprd05.prod.outlook.com (2603:10a6:209:40::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.797.11; Thu, 24 May 2018 14:27:25 +0000 From: Petr Machata To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: davem@davemloft.net, shuah@kernel.org, idosch@mellanox.com, jiri@mellanox.com Subject: [PATCH net-next 03/10] selftests: forwarding: Add $h3's clsact to mirror_topo_lib.sh In-Reply-To: References: Message-Id: <4119543d66caca1a06e70d55bb41c7748c36d28a.1527171860.git.petrm@mellanox.com> Date: Thu, 24 May 2018 16:27:21 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-Originating-IP: [78.45.160.211] X-ClientProxiedBy: LO2P265CA0227.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:b::23) To AM6PR05MB4184.eurprd05.prod.outlook.com (2603:10a6:209:40::29) 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:AM6PR05MB4184; X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4184; 3:ov/FhjzynlaazsbOBZPHHjVPtKoUVSPZDkUoFPI/Npu87Dqw0ExadnblMko90Z4426qCdyE2aA86XXu6Ifcw5bEs6SngiqrC6/XIBez9P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v4s1hBq9MefHWQJ+MapN8CSjRH/hRv/TML+57BXBsK2IhwxdrFNIO8tPk67QkvBwY8zZ0dRZvP93SIo9VAhRjLAB8Yf6SDEUzcX+O7CsD+/IS12se6QF0Ph548mQ4ngNEFsUfFmTPMCK554Kru2rP1OQSmLzDjx6KAWCKfdxLTT/DDem63NXEd1/PdEPY54CUJqjfmE3QVqHe7qL+qzVGMazJ19FhkTUqdyzX3eOAWwDs8Cg1u0bV; 4:nKH8/RRQatzWP094EX8Rjs5iEJUNH32GiXutzDR1C43kUtTM1Qu1eo0yuq10wUw3TBeLiw9rZxw5PcDpjmJJ/cpkK3bJSGJxxsQwbfGeCuqVEzb5N9OfPxlwFwpqK36fUOUlipBn7uWQrNe6qYqWErtDWy85/o6km8OBh46QaDbYj0WwQWXPlGIYmR7yWKypXg1/6fk/nXAQ5QZYi9NbrLujo4DGhpKfYxQ1s2pP7K/ZReGpRYHeN5T8xpEPsyfPnNWI4efPF1oo3XCYhjqdQQ== X-Microsoft-Antispam-PRVS: 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)(3002001)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:AM6PR05MB4184; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4184; X-Forefront-PRVS: 0682FC00E8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(366004)(39380400002)(39860400002)(199004)(189003)(956004)(6116002)(53936002)(3846002)(4326008)(2616005)(36756003)(446003)(97736004)(11346002)(5660300001)(66066001)(16526019)(47776003)(6666003)(107886003)(6486002)(86362001)(16586007)(26005)(478600001)(2906002)(76176011)(51416003)(58126008)(68736007)(118296001)(50466002)(25786009)(476003)(52116002)(6496006)(48376002)(7736002)(305945005)(106356001)(386003)(316002)(486006)(81166006)(81156014)(8676002)(105586002)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4184; H:t540p; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:3; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM6PR05MB4184; 23:S0OI73nAZE716yF3EpfY569rJEuHcNcxirAYz0FkO?= =?us-ascii?Q?TP+4gtXCk+We88PvdbmcDBn0QpKvdQE53BvEioFzUvuz02EDilqKqQILiCY8?= =?us-ascii?Q?AONvcrjRpKagq5g/ZjWa48x19K3jwbn1ODGyHjohOpjMLlZ6WPH8pvZ4vXrR?= =?us-ascii?Q?Bz4wNc/POqJnKdjb0cJEmWVkZOTsWPHADrzBdCATglmOnzS9VNtCaSiH03Zm?= =?us-ascii?Q?VvuQAGiNSVqIHnVfOW2llqL6tDhV3cbrZSgiO2ZFQwA6yR9z153uBFl7NtCR?= =?us-ascii?Q?WLSTF1K4VU1EKRZaL/TlXPYtZ6iIJeFr94uRL9BcMRaiUs3oNrXTKcdcEWPb?= =?us-ascii?Q?sv1Aca99+vIJ017UxtBo/sefiuIS0bRPAJclrgII8mewJkPpskUpCEOtkN48?= =?us-ascii?Q?rXfUqS5cN0oNF8Sv6sJAhsKIA91KHnoabwqpLpl4uw6OBvSdczuy5I+E+nOb?= =?us-ascii?Q?6zx627WPkJeoUrmtOuKWRRxc/hev16fVLxL1ICtSvj+TRtsbSAqR/j+0YJNL?= =?us-ascii?Q?jjk2XCtDl/cdGixT/lhkat1Qa1GeJKZe8KNGUGoe4DZbz0ps5bDCkwTuMGvL?= =?us-ascii?Q?rThgATI3hy89J2n0/YXhQ8GB+PcRTrFpDsWpnMptbkQBcCm38+P4PxzyeMed?= =?us-ascii?Q?7smBXU2WEMaDKz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fpYIdL5uiuSfeQMyIoW8kbXgrYvK6jgh5KPNB+2/2jh5EOGGWBCgIEo4HzgIZCKRR32Tn3sLD2+E3XIYDJOxNPc8hjvWi6zZLRm9TYBtD7VVP8pqwaH7iGHb9G2LHi35BgE1M5qcoU+9rHsRjYK/EAZyKrmzYlkEVpU2XoCiSv4WDBVO+Zq5XfDTIorm5mQOj3OJb9ZYvQzbyJ44RxW8Qi5SKO9h+SO8vOWKRxKi3KjPxVu8Hj3e34kztd/oeTgBH5pl0OsXLJsv2JG45PIqAr0MTQ==; 5:XXlrQBMAhHZO7sP8GUXAIqbnh3dUfxrwSRKMsce/zxXVI+kkfDpR3WTI2sBxGta0G+38TzGMfA9hw5BU3FKuiyq2F2NZmiPDQohHW7NY2YZPTbPy8BcF3KCtHj7AXcli08rxovGofiKOjWcCb5ODz4vOCuWKiuHDW2jU9Sy1pw4=; 24:8gGpEj2AD7YfdOrVA2QLgJCLFesEuNAyf5SlxAuYHVl2RntBVDd9pPYWxJ9XLi2cuEcdZelx5r0cFdjKyxasyxAjoem4WXQzNjWUyqodVug= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4184; 7:wrhLwXRBqX7GJlQe38xdI6zoWL3bUkpaDK/s45K9WLTJNTALnLjhXGrZ3x9k+Eoari16n+yBRWf6afiYNjtVoXXibtrzh/3CMt2Tu4Ch0ZQz2NMW2Wc7qd3z6iCG8YHWDGvJxIxxD/EJPqKKpdMChPJeKjj0NLCVcN4k/Riy/np3UAqEC7fckvCtlTtP+GKmZRxC2Gqw6uB/JgVTe4NDXSn2IuixZ4lq5FdZsyGKzx7netaGNOf5oWm+6aw2KQiS X-MS-Office365-Filtering-Correlation-Id: 7376e979-0c5d-4166-9116-08d5c182789a X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2018 14:27:25.2348 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7376e979-0c5d-4166-9116-08d5c182789a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4184 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Having a clsact qdisc on $h3 is useful in several tests, and will be useful in more tests to come. Move the registration from all the tests that need it into the topology file itself. Signed-off-by: Petr Machata --- tools/testing/selftests/net/forwarding/mirror_gre.sh | 2 -- tools/testing/selftests/net/forwarding/mirror_gre_changes.sh | 2 -- tools/testing/selftests/net/forwarding/mirror_topo_lib.sh | 2 ++ 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/mirror_gre.sh b/tools/testing/selftests/net/forwarding/mirror_gre.sh index c6786d1..e6fd7a1 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre.sh @@ -72,7 +72,6 @@ test_span_gre_mac() RET=0 mirror_install $swp1 $direction $tundev "matchall $tcflags" - tc qdisc add dev $h3 clsact tc filter add dev $h3 ingress pref 77 prot $prot \ flower ip_proto 0x2f src_mac $swp3mac dst_mac $h3mac \ action pass @@ -80,7 +79,6 @@ test_span_gre_mac() mirror_test v$h1 192.0.2.1 192.0.2.2 $h3 77 10 tc filter del dev $h3 ingress pref 77 - tc qdisc del dev $h3 clsact mirror_uninstall $swp1 $direction log_test "$direction $what: envelope MAC ($tcflags)" diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh b/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh index e22a9e4..aa29d46 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh @@ -73,7 +73,6 @@ test_span_gre_ttl() RET=0 mirror_install $swp1 ingress $tundev "matchall $tcflags" - tc qdisc add dev $h3 clsact tc filter add dev $h3 ingress pref 77 prot $prot \ flower ip_ttl 50 action pass @@ -84,7 +83,6 @@ test_span_gre_ttl() ip link set dev $tundev type $type ttl 100 tc filter del dev $h3 ingress pref 77 - tc qdisc del dev $h3 clsact mirror_uninstall $swp1 ingress log_test "$what: TTL change ($tcflags)" diff --git a/tools/testing/selftests/net/forwarding/mirror_topo_lib.sh b/tools/testing/selftests/net/forwarding/mirror_topo_lib.sh index 5b787972..04979e5 100644 --- a/tools/testing/selftests/net/forwarding/mirror_topo_lib.sh +++ b/tools/testing/selftests/net/forwarding/mirror_topo_lib.sh @@ -46,10 +46,12 @@ mirror_topo_h2_destroy() mirror_topo_h3_create() { simple_if_init $h3 + tc qdisc add dev $h3 clsact } mirror_topo_h3_destroy() { + tc qdisc del dev $h3 clsact simple_if_fini $h3 }