From patchwork Wed May 2 15:44:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 10375959 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 F0C0A60384 for ; Wed, 2 May 2018 15:45:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1AC527FA9 for ; Wed, 2 May 2018 15:45:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D599E28E6E; Wed, 2 May 2018 15:45:08 +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=-2.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 240F127FA9 for ; Wed, 2 May 2018 15:45:07 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40bjJx5dXZzF2TT for ; Thu, 3 May 2018 01:45:05 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="To3Db6DV"; dkim-atps=neutral X-Original-To: linux-mlxsw@lists.ozlabs.org Delivered-To: linux-mlxsw@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=mellanox.com (client-ip=104.47.0.74; helo=eur01-he1-obe.outbound.protection.outlook.com; envelope-from=petrm@mellanox.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="To3Db6DV"; dkim-atps=neutral Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0074.outbound.protection.outlook.com [104.47.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40bjJp2LM8zF2T4 for ; Thu, 3 May 2018 01:44:57 +1000 (AEST) 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; bh=ImPQy8QBNnpwvG1Pk0fi8xAdiLLsFUiuq3LqQzufGHs=; b=To3Db6DV/L+B7jK4mvUXrHgwZD2suPtK7e2h7g3FHt4sohX14GpYH04zfirysfYTwyUYn4hXGnLjGVeXUzNkrmPD/KDBwkI3IOFINSyd3UPxMtkKRIwYPeCH1gAFVK4vy9TumxMcT27Tq+pVFTOiuyvoP6azcGbOyDrJXv13MF8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (78.45.160.211) by VI1PR05MB4192.eurprd05.prod.outlook.com (2603:10a6:803:4e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.715.20; Wed, 2 May 2018 15:44:35 +0000 From: Petr Machata To: Subject: [PATCH net-next mlxsw] selftests: forwarding: mirror_gre_nh: Unset RP filter Message-Id: <131d104fc62fb8b44e0749b6eb7d4f2256cb3927.1525275645.git.petrm@mellanox.com> Date: Wed, 02 May 2018 17:44:29 +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: HE1PR0402CA0059.eurprd04.prod.outlook.com (2603:10a6:7:7c::48) To VI1PR05MB4192.eurprd05.prod.outlook.com (2603:10a6:803:4e::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(2017052603328)(7153060)(7193020); SRVR:VI1PR05MB4192; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4192; 3:CHzsTU/RgO1rteGGbb2ECYHrEeEcTzX/L9ZAFgBcScCtPbyKHdWgb/lx5PzG8zgA8dgHjVWO6Uw0g+yisyQXfSaWhMSgxJnGajji5wERCtB95Xr+7IORXg3t8HePDMR3JpZU/lt7eBQkuJFVdeTXTOyFNjI3hXXGLWUw7CWBLlPnYGlGPhfNkAnmOoGg1VxaSCLtcmYkJEg2+UbzAqx6Q1PTitcWFJL9ShDL/ahArvIQzFcgh9bOszWSfgNvYTb2; 25:3qb4YwRh1QmueofTSLK+JWv08tHJKYYwJ7MwOOs07yN153o72G1t1aVFtQ4+kPMAo5ZFiw8D0mW69s+vvWyURfi4wsSf5/EMOJotV6+OI4Q3BpQkTOo582HWl301T3O50YO5cg5r+YHPas9BtW+Dy0lxqdfgY+TjLyMNtFR0akMQthuSrvRdOZ9u9dgMXe4/TbNsfoxDG6jA3zuElpmUcJBOZOhrd79lo/xtcu7FyO9vFo3J0NcP0dHRe8a4egO6VIblIgYFHDOI4yUUjttKl8nGU+xGzdl9VDUFeygpumpN3248jNhHLiXFq+DIO7tanBIxKyzZsXNcCHwTq1Rbug==; 31:PBLW8y4Xxnj4XBQJkdBO6wnv5f5TEDQEaAIvpsMZu8VagsCgkt4gY/erkmiPVcmt+7PwR2Hh7j5+keDxqJ9RtImSvuTLMz1VDKnBovY1X96mdOWXOira4DhI0DvmU5f4rTFquntocV5dJcT9ga+86SPGe491BlKfcGv8ySHD5YCRFNfyOmSI5pgndQUCiM4ZqtKZp91id2TTAMp7eSnDDtFcLYBluRMVEvululjFNkI= X-MS-TrafficTypeDiagnostic: VI1PR05MB4192: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4192; 20:i9bAguly9cJjdCFI4vprjHlP/NraukpP5yqtdMDlp2nTZa/YltAo5m6hTJOFgncZB3IODXdB2poOaJDMCWMJEukq49ZcXXRTqOdm24+n4zbMVIKyFpvjZg3AatN5l8zme1YR7wk528BWJ+38lE7/BgIvRdnq6rTBWiCj98W30l4+2RsXPhLE9MMwPdjUeztJVzvsRLakvVrjhuwH1IbnRMCJybg71CzvISbPDCJGGlKRY/6jEfVdoTM8/wXe0jvgLlbPAgvaBT9p/kVZXWeEv8QmDCgwoFe2E4GkL4wqLuOvi1zyIyOptNPl74mvhiTFqeuxRCDeJFUYvGUTYrnbtIp5d4WHW1WAZrnTg9w86ytiPv8JRnpHKE0R3DFhsqN9mjeay+zCmhA99pkhZ5X9e681WJmPr7N0AbQZXObl1MHLkTxIeQghYoODOtk2d4OHy8gVhsDDcQEqJE0h6NLXOZJXp3FfA8L7iIrBJgbdrCbVIXwxLg0rqlcPQ09QPATX; 4:1+nGJolypa/egJQAxpHloiqS81Lg51DlacJ9o/Xdbm/rwgxmwJ0rQw2F0saxzok1qfZmLfnH7Eafw8U/uk8zhxTlrkBuIRGET84yqmfYk+XT9tFuOArVSKjQ9DoqCDtsBBq5p4ZfWx+fflt7orxVvSnm/rLggG1PApKI3eqwHt6yxddWZcF28gUtzdYbziqMbkiqke+xfhWoBeuyPvUocl2tEMeTqxqHr0alu+RYuc/PVMA+0aEeNsZ4mLBcCOSGjXIg94CxZszZGYA3C4ZCGg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:VI1PR05MB4192; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB4192; X-Forefront-PRVS: 06607E485E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(396003)(346002)(39380400002)(366004)(199004)(189003)(2351001)(36756003)(26005)(118296001)(97736004)(6486002)(386003)(316002)(58126008)(478600001)(16586007)(86362001)(25786009)(2906002)(51416003)(575784001)(7736002)(52116002)(956004)(8936002)(81156014)(81166006)(47776003)(476003)(2616005)(53936002)(107886003)(66066001)(6496006)(8676002)(486006)(50466002)(106356001)(16526019)(48376002)(305945005)(3846002)(5660300001)(6666003)(68736007)(6116002)(105586002)(6916009)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB4192; H:t540p; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR05MB4192; 23:2JfCtBSDUCWAypE6OchSyXSNHISLjfABHNZ7LYM+e?= =?us-ascii?Q?3qKiPljjDv/8iQp0FpD6/st34eFgqO+6hkslQ7y+QOxZxHJkai0mz4NoVjP6?= =?us-ascii?Q?QAPmyzBluRYecBtF+N99xBx8R8uOtLlYSIa6bmahLzCqPSYuiOVIosVGh1Sl?= =?us-ascii?Q?XVK/Sio6PzY1ePBGxxa3+bQRYJw1oJ7mojdRWlKEt1SamKPax3ZtbGwMXs9T?= =?us-ascii?Q?/3HqsPVBtBODUnhUUYs3WtpUX8/61b8dKRuyBLDjelGB2Nv7/uB4kkxQgmLq?= =?us-ascii?Q?VsNAqklLU01pMgV3+mutjS0WwYWW0EFo5y6U7snJQq3P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IV85G6jsOsZ6qoBsNBlBUVRGRReklFE8ewld7exChwrQL7SSNpCuWDSxyo3z7glkJm9k9fwSwua/tB+6DMXAqzxqWVLCHtd6Avxu9i5wusKty/8IJmNLMnJtaw1If0o5OgaM7+EsVjgzsH+eDzl8tv4mcEuU8RW3DneDfH3WLF1KqeSX+vudrEWkImZBX9 X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4192; 6:KnJWV3fjrYzb8CNXjIMORN7LyWmJITsT4/I+m9Qb78wjHM9jykL3oMXOstAHvTOG3H6yK00r1ejRjKLD46x+yeAnfqXUm12G8YstWYV3IWqDWy/B3YV0CSmdB7sEqNgCOCwKzUU+Q5QhBekQhu5xCvvq7yAnPHQXRrj/DuTalAfNWQ/KG629tCVrzKwaGKfAFXPgHLfvGd2aLoXXB54bboKnc50B36JAWlwX/d6AMURmq78EprUhgcsmKT1UH4UTyBsF5mLzt7K+/eyp/C8N2iZc90SkoE0YNTEYfNeD3SdlpOPypyRz3SQrKtvJR/V2MjEvAAhjYT3DFPfYEEIhrersGh/CjfAtDpNcyjsUO6S6KJ7XXAwDcltMV22fIOWUT15Ba9p/I1pBL/3uURuB4YMV+XPYnvaPHJWjjYwVKhscRgXOoUCuTJ4qMPdcyNkA0RSuJMq6GvG1xEYecqHTVA==; 5:6kZLveOOfb98gGff0+hCUgfDGY0mQdJ+829lk9dw3QcOkgBMM943AKlicHmyT575vQIOTa5OO0yx8IrUsN+fO/8jOhNG0e/OwOdG4q4MxH9LVJmQu1k13aELEVkNCyqSaH2/Lf24DxnkMzoZIpEtWkEn7UWgYgYtvLitWDGVQS8=; 24:Ac3stpAuEADgLe2LuH7LaopdzkeNfO7MBh2n/WX7CUnIYPk+Xso+iMakTtnnuQ/m+kWtiZhmlWvMSa3pYZ+v+sCbAfelFWvBVmwyRKViLHg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4192; 7:ca67RiazywARWAgCCVCF3w7bKlDt8x11CvUrUpCjt/6I23RK/0W4WnE8umYHP483n6U//Nk43G2CnoKbgJAoAXxjiMN7suzwCDMIXGHpYszg44MbvPhaJdIyugVDFVUuHnu8Clc4ZksZKq9gkzOdDqUepb5yU4uG+x2XqmI4AL5/5zLolo6WkNvz0tMukb3efbkgaRhG46G4C7TIcGCQ9v/z3HwL1DKWM5JO762zhS2aWuS38ujUrJJ3MZfnAeFo X-MS-Office365-Filtering-Correlation-Id: 16cdfccd-274d-4e8b-8b07-08d5b0439bb4 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2018 15:44:35.6891 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 16cdfccd-274d-4e8b-8b07-08d5b0439bb4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4192 X-BeenThere: linux-mlxsw@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: mlxsw driver development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-internal@mellanox.com Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org X-Virus-Scanned: ClamAV using ClamSMTP The test fails to work if reverse-path filtering is in effect on the mirrored-to host interface, or for all interfaces. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/mirror_gre_nh.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh b/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh index a0d1ad4..3575e9b 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh @@ -29,6 +29,11 @@ setup_prepare() swp3=${NETIFS[p5]} h3=${NETIFS[p6]} + all_rp_filter=$(sysctl -n net.ipv4.conf.all.rp_filter) + h3_rp_filter=$(sysctl -n net.ipv4.conf.$h3.rp_filter) + sysctl -qw net.ipv4.conf.all.rp_filter=0 + sysctl -qw net.ipv4.conf.$h3.rp_filter=0 + vrf_prepare mirror_gre_topo_create @@ -60,6 +65,9 @@ cleanup() mirror_gre_topo_destroy vrf_cleanup + + sysctl -qw net.ipv4.conf.$h3.rp_filter=$h3_rp_filter + sysctl -qw net.ipv4.conf.all.rp_filter=$all_rp_filter } test_gretap()