From patchwork Mon Jun 25 23:20:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 10487541 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 AC45C601D5 for ; Mon, 25 Jun 2018 23:20:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99F25286A0 for ; Mon, 25 Jun 2018 23:20:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89ABC286F1; Mon, 25 Jun 2018 23:20:40 +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 0D93F286A0 for ; Mon, 25 Jun 2018 23:20:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754353AbeFYXUj (ORCPT ); Mon, 25 Jun 2018 19:20:39 -0400 Received: from mail-eopbgr40059.outbound.protection.outlook.com ([40.107.4.59]:27640 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752606AbeFYXUi (ORCPT ); Mon, 25 Jun 2018 19:20:38 -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=6Q6tvEPX+Ya3E1VaYGYDUKM5NiEwNh1IH4Ab72k5eEE=; b=GqvLgI4PpJ2bFKbPWDWn11lVBBSOUSDishX340cG+p/q52a5EjLm5NvN8RF4H3giAFrEQXGc10bQxVxrvVw6sBsrWvyyCrOeKyor7lHVEr4kmhlnabl2LFNlX0qrivXrFJG4OsmoA8xLKOva/OJJmz6TCZlXaYcO3hYJrarJFQo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (89.176.83.59) by AM6PR05MB4183.eurprd05.prod.outlook.com (2603:10a6:209:40::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.884.23; Mon, 25 Jun 2018 23:20:34 +0000 From: Petr Machata To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: davem@davemloft.net, shuah@kernel.org Subject: [PATCH net-next] selftests: forwarding: mirror_gre_vlan_bridge_1q: Unset rp_filter Message-Id: <66d218fb95026460e240752eec3af58920a14d86.1529968802.git.petrm@mellanox.com> Date: Tue, 26 Jun 2018 01:20:32 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-Originating-IP: [89.176.83.59] X-ClientProxiedBy: LO2P265CA0136.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9f::28) To AM6PR05MB4183.eurprd05.prod.outlook.com (2603:10a6:209:40::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2b33cf18-4b68-44a9-3d0b-08d5daf240bd X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4183; X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4183; 3:nACvXED1S5l/7t0HjeRpKOdYiQENESslqfAc1Xqz4N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h4wQ4y4tnqL58ICLl/lZSitwe8K+tIF12FJsVwv5xXcu7AGDShb7L2oEMYHxscjvIIEEqBwao/SiisWBkRB/CAojZx9HaRrRDr33KrwH5UeBdwNwatZzqhybp/WJVGohyLXtRpLx8gVoklirZbk+cxGipzx/GgZKC/Szztgbe0eROoLnYy10Vx2AdnPhKsIWtwaxhEvRaMX/yuQn8Nt/9dZZoPVnX+Qvq2cKIHyFG4UBPwRkzOnMRVZwySEp2pjk7vyuqa8ea3z2NV5E+ZiFyklnib+VrhuW/2KeMzp/wVmmwMafj1EsdKB; 4:oAKs2U/DE3lwwnHiBe6SWsUbNzKE5+Axpim1YPwjrpi37ySCpLYlN9F1FwVXCfsCANDKiVNv7i/g8csrWEG1GYnse3QO8cgMhlJiamkOCuF5GWLImuWo7kgupRZwbzHmwx/PXZk7W4dyRvsIrF0gCkVxqLTQjgSoQDw37RJSghZQK0MpYIDOx0gl3btu62Ay8toCmUgX0+dcNqrmFtgSgxHr6VuWBEBEMeREXyclvjxhjuIm7AEsw1u5jMguIoiuj2B7L8A8Fj5MSHuusFUGUw== 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)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:AM6PR05MB4183; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4183; X-Forefront-PRVS: 0714841678 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(136003)(366004)(39860400002)(346002)(376002)(189003)(199004)(478600001)(118296001)(6486002)(8936002)(68736007)(50466002)(53936002)(2906002)(305945005)(7736002)(16586007)(2616005)(316002)(956004)(66066001)(8676002)(476003)(58126008)(81166006)(6496006)(6116002)(16526019)(52116002)(48376002)(3846002)(26005)(86362001)(81156014)(186003)(47776003)(15760500003)(4326008)(25786009)(51416003)(36756003)(486006)(386003)(105586002)(106356001)(97736004)(14444005)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4183; 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; AM6PR05MB4183; 23:ZQCKnDLntS5ZKf9ph87ond5nR9FHT5xmEjMqpHFGT?= =?us-ascii?Q?tsionBt3MY5XcCdUbd/HQkDVNUDFiK5kQ9SLO+50Cp4LvNQVxG0jQXlpSuXD?= =?us-ascii?Q?rHsglkCMm2eMwk78+dxrJDsY48PD1jJrFhRow/uIg8oXTzLIJE8ZvAK1DJMx?= =?us-ascii?Q?EdB7/RBgYodjKzUiyqRnzLgKUAHMe0EmXrfnsQavi1JHaVgf9Bp2OBhJv9hr?= =?us-ascii?Q?ryResS9t7a0FWSsxkJMI/4lr7DBWIIOIfXYdry9ayplcu+BNO0g45nxXhik9?= =?us-ascii?Q?LNH1X7xxtX+JM+ehONgVyjitaCQW36CoXjakOhqC2r84WWBp/rcuw/qk+DKI?= =?us-ascii?Q?QslFdEQ0EX0pB3WKt6mUqPl1QG2OVYR41GgHMJvCckulf1l5A32yC+t5GNtE?= =?us-ascii?Q?RHTdWVxNbgTBQs/pTPxqEqRLrzpNtaqDE6X9vADTIlFAwwYUKkH+x8ZGtb79?= =?us-ascii?Q?TTBjGC26EOFY0nqvCw/rUsJgAPbLcQH1DA3PxVaY3UQ4DRjCmhhoZBJ5/Das?= =?us-ascii?Q?rNy6qv41SzPwODzbSLs16ARdtb6Umsy3oITodXl2muYZcKs9ZSc1XeS7GXio?= =?us-ascii?Q?eMcGs+PLDHnbuKys14U8rPBldRpszkG56P1MM2aUUElvc1N/grSpgFNT1GGP?= =?us-ascii?Q?M51ZRVWswNgW2dcgrrnCIZMgQWf5usO428wnhVLeNwsdzdsuHHLFnRiebWz2?= =?us-ascii?Q?iqttdLmSV34G2iDEMr9G9ZrSVVmDJjizeNu06BnI6xTzkm4/+pq3UKclXvC+?= =?us-ascii?Q?MzwOpOJW0cZT9OLAxXJpD3/OgbJFwd331L6hLD0tejkBGGzGmVY2rOwBOXIf?= =?us-ascii?Q?gL6rKoCwpSFWWEpMs283SGIt4121QheEBOKz+EPUqN4HiGjtXP9xsCLKlQug?= =?us-ascii?Q?ZQEsVDNW38PpmPd/aSuH090H8z+KEr52wCs6VdcBF4amHedJu0jCpAKxsv9I?= =?us-ascii?Q?RU73ZsT/bRFtVhZaT5JysZBmx7OCHmh9DOHrs/PYwBadDvoRV47cDPT2CiCH?= =?us-ascii?Q?UJjXhw6vFC9IZiXJpbVqsJsSnvLr6JCqJm63Ib20HfHg/+l7k03BOsSysc+b?= =?us-ascii?Q?du1wkMwDqrBuFtg0EtLbY/TFUyPOn+slsgjHwOXpDRKUMG4U7SS7aTU+hq6j?= =?us-ascii?Q?02/bAcEfUo=3D?= X-Microsoft-Antispam-Message-Info: GDNB6w/eEbcb5bMAGKAf3NAj7DNi94tSQf+B4Az4nUogzflQ+nNg65JjvU4Ve1T/lJtlTcAbtefEA9EMFxQoLzRzc2vWz6PG7czFySaO6hsxm6jPvEq0wTtUdCsNTUrd1QTmIqcElVJDVOgfjhj9oWdYrKwloBUalmMRq6RAK7b4/x1bEgSpGN0L6P2D1sl0QI4VyzoUepZuWTamWZtsKoPmREYhDvi7MOo/tWga6TLNaydPor/F6QN8sfOcoTh0xF4+2XJyaeqI8LrPwGZ7M+d+qlYUJzD9PRp9wqY4tOG8QQK9BLTtgTA8Yc1f23hVrpwO7DckWmiN+uC49fa+K9age1EaokH/mdnQG4+X5PM= X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4183; 6:SL7FGtBiBuyRAKnI1lqy1aCcdkXsq0S8OgTbAzGnW3lnUhR6lX0dFPAT0Qg2xumuJLL7Pq1Ib2jRmKMhtyHp/k/5TADup7x5e0okeYuA61KOVggShNATMTWVzCHFHKgc1aem2dNBZfYt/BTnyc1mar76GcPL5ryyVeQwEypv051ULPmetdTkaRzo3VaOksHMKWw2ajCqIc6WvHO5ooeU71WEi82P5s+K01I7Z4xgyhvkw+Jfz4T56Sv0r3+DjQa96OQEwQeuy1q77nvEk6AG3NXA52uctJEqnJW5TZ2Be0T9T41ap6cDsS79jXaexG0bjW79xfT1CxDa0Fn+9FQrOjXSv3TfKMZpQJwvc7kbue4bPbanidGIQVwdnQkyNfrgBAARw/DAOU8VFYMEpLUU8cJZGU5Ndt+OI89T/GYlNIhOvMiarQyhhhWqEnP/vSM/drSVZzp6HPRfIwcidwZbkw==; 5:2Hftkg4JOAiWZH3LrhrtJYpNMp0uQLFEV0G4PRzjPQkX6aSQi858+OLRcSeoUpL9VY34ZclkUmDFtAbH8Reb8t1SQLYBcAvnO11GeBR3qg15bmVwfvq0PV2x7CEo8cR6Isybn/2KeYx+etwQmpUcwd/zG9yEcicqpexF8i349F4=; 24:91N0a9Gx3vLIO59r8Ev0tKj9te12S2q5StareG9WlIJ80YyfjtOzQy7g67NvMbZkIWhuJnEy0JLDPr0ezm9Zn1s5cXfcwzwudH0t21pKL2I= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4183; 7:C5wlEdX/bImZu1T2Et2DwYGDd75cDZzGtYQbJsZctaUXwggMAnaWgijYoCuQdrBfs7p9r3HgsHBXsq1cMov8A3VHI2VbuUkou3SMzZeA+rPHalanQFXy793h8gX4ggs66lpc/ozC1Zfj6OToVXvk+trsVhOPWm5h2FUw7wgVuuwieEwCtRrv0YEqMLVeMK04yR9VO7y/f//pGLj5pXj6VSalSAkYiDXZDR4ZHfmlu6uqvqU6WO/JNrXBmyy5TgbS X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2018 23:20:34.2440 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2b33cf18-4b68-44a9-3d0b-08d5daf240bd X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4183 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 The IP addresses of tunnel endpoint at H3 are set at the VLAN device $h3.555. Therefore when test_gretap_untagged_egress() sets vlan 555 to egress untagged at $swp3, $h3's rp_filter rejects these packets. The test then spuriously fails. Therefore turn off net.ipv4.conf.{all, $h3}.rp_filter. Fixes: 9c7c8a82442c ("selftests: forwarding: mirror_gre_vlan_bridge_1q: Add more tests") Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel --- .../selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh index 5dbc7a08f4bd..1ac5038ae256 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh @@ -39,6 +39,12 @@ setup_prepare() swp3=${NETIFS[p5]} h3=${NETIFS[p6]} + # gt4's remote address is at $h3.555, not $h3. Thus the packets arriving + # directly to $h3 for test_gretap_untagged_egress() are rejected by + # rp_filter and the test spuriously fails. + sysctl_set net.ipv4.conf.all.rp_filter 0 + sysctl_set net.ipv4.conf.$h3.rp_filter 0 + vrf_prepare mirror_gre_topo_create @@ -65,6 +71,9 @@ cleanup() mirror_gre_topo_destroy vrf_cleanup + + sysctl_restore net.ipv4.conf.$h3.rp_filter + sysctl_restore net.ipv4.conf.all.rp_filter } test_vlan_match()