From patchwork Tue Jan 8 16:48:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 1022043 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="sNk+NY8j"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43YyrM54Nmz9sLw for ; Wed, 9 Jan 2019 03:48:35 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729153AbfAHQse (ORCPT ); Tue, 8 Jan 2019 11:48:34 -0500 Received: from mail-eopbgr50086.outbound.protection.outlook.com ([40.107.5.86]:21248 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729069AbfAHQsd (ORCPT ); Tue, 8 Jan 2019 11:48:33 -0500 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=Fd4fjQ7eb5M4GcOoK2iDTfLR/7DIXoxyYCY2MlFbcYY=; b=sNk+NY8jvw1+99h1U66G9meJTAmxaAka1Falr8RUcifxL36MYgw2JgqRNhUEn+I0IlhYBK+q0FwjM48lcTUdfvtG0bvjTtrlPLZXed+IvdRZ8Igw3UsMCGvyuwqNaFeXjK/li1gZ5i3Z+Dxfj3DEFeQu5vaqowBLop/yNaS1tOk= Received: from AM6PR05MB6056.eurprd05.prod.outlook.com (20.179.2.148) by AM6PR05MB4405.eurprd05.prod.outlook.com (52.135.163.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1495.6; Tue, 8 Jan 2019 16:48:12 +0000 Received: from AM6PR05MB6056.eurprd05.prod.outlook.com ([fe80::5490:e4ea:7798:e65f]) by AM6PR05MB6056.eurprd05.prod.outlook.com ([fe80::5490:e4ea:7798:e65f%3]) with mapi id 15.20.1516.010; Tue, 8 Jan 2019 16:48:12 +0000 From: Ido Schimmel To: "netdev@vger.kernel.org" CC: "davem@davemloft.net" , Jiri Pirko , Petr Machata , Nir Dotan , mlxsw , Ido Schimmel Subject: [PATCH net 09/11] selftests: forwarding: Fix test for different devices Thread-Topic: [PATCH net 09/11] selftests: forwarding: Fix test for different devices Thread-Index: AQHUp3Hxn8zYmRj63EW13Q/veGd7EQ== Date: Tue, 8 Jan 2019 16:48:12 +0000 Message-ID: <20190108164732.4024-10-idosch@mellanox.com> References: <20190108164732.4024-1-idosch@mellanox.com> In-Reply-To: <20190108164732.4024-1-idosch@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6P192CA0024.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:83::37) To AM6PR05MB6056.eurprd05.prod.outlook.com (2603:10a6:20b:ab::20) authentication-results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR05MB4405; 6:RyKV6zk0pgkkriQTYG6rtj+H/eNBtvxiY7ynsw42jmLML3YijHnXCCAKANBLp8Tqhep+cbY6c62YganFestn14qBvSzQpgCQS6MOxjmmxi105PUR1bv9/88xXNuV/bSDRZE3bInJy9krJNuZbV3Jzr6WlKckin3eJoiVmZeL+2J4y06jj/paRaEBzyuP7lY5GTZ2KKIdPV71m160WWzTv+9/336hP5CSC/OXni8x6Tm41rBBDQAI4hy483eC89KP+GUqv8/e1QsPXc8pyEM69KlTPZ29mi2kSCnp/bkpOzC407ODFDr3HwzCUv4pHeVYy1Afj0YPCSqNZiVMHgZSTXOGxIDM4fbhbaTVA3k3uF1Q1QxzKONUb+c5M2p8xTieRnmoutdMhnQ14enQVPmhqeBcGmUxxNclRV6HOLqgqtdglJ0y8OHu6IQhL/4WPBd5NXQZFMwqy8SXJCtPpFVFDA==; 5:2OzZFUmvFAtnqdIQvUbwO4uWl5TlBNv1XdElydIdw5Xwyw3KbBjwXy2aU1CBuUiZvvNnoRO5HQYKO5MmDw7RjHiPfeCzH32SqMEkTNwG+AEnteP0CCKv4P95wFD9/lI4q5uJKXf4noRqolmyihhkwdKrxYKf1Slh3aA9ODLKhwAKwri9hQQco9GO4k6Y8yBwiYaatPwoEO9DxABjPGIjLg==; 7:rFi6Vwh9fs8rzjA831UdqAEz5WXqwdjXZSS05aq8VVkzQ5FVNlAO/S9U/cLUPWOKtggB1EJcwVaOXY3XYp3tED+2YN3EthlW/IhccEpKAwOEzJlEGtfls6KXt8NvRt80tN0hXcxFid7cB2h8bLSstw== x-ms-office365-filtering-correlation-id: a398879d-1bd3-4cc2-c242-08d6758913ca x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4405; x-ms-traffictypediagnostic: AM6PR05MB4405: x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(908002)(999002)(5005026)(6040522)(8220060)(2401047)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231475)(944501520)(52105112)(6055026)(6041310)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:AM6PR05MB4405; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4405; x-forefront-prvs: 0911D5CE78 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(136003)(39860400002)(396003)(366004)(189003)(199004)(106356001)(105586002)(2906002)(6486002)(6116002)(3846002)(99286004)(6506007)(305945005)(486006)(7736002)(102836004)(386003)(76176011)(86362001)(52116002)(26005)(66066001)(5640700003)(6436002)(186003)(97736004)(2501003)(6512007)(2351001)(25786009)(1076003)(66574012)(478600001)(81156014)(8936002)(36756003)(81166006)(68736007)(4326008)(50226002)(5660300001)(14444005)(575784001)(256004)(1730700003)(107886003)(8676002)(6916009)(53936002)(54906003)(316002)(11346002)(14454004)(2616005)(71200400001)(71190400001)(476003)(446003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4405; H:AM6PR05MB6056.eurprd05.prod.outlook.com; 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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: UyOZLqif7GWqv3er8oP50t1CNu5+RKw+ZwdIEIGvCITE71Is6C9kEkOLeRLR/dhtCvDX211Ec+rs2Otkp3f9nWds4daAheRCbv0pHRxpymTf65jBuxLg6Jy4cVf4/Ua/lhrZyNMyksk69ZaghvGL41yRkPUm4qvtbDfKaGMWQWyIWZTEq29PECw9NG/cVwGEus48PTkK8lBAE373Q1w33wvATfn1w5fxsHgePhKO+ns5Czplk/AocHBy2aC8qsoBEoupHnW/h6PLe0HWkRjhKwFMEEpBYIwHJVjxkirFs1lxx0ohRVGTRHdMPL3etEjC spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: a398879d-1bd3-4cc2-c242-08d6758913ca X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2019 16:48:11.6984 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4405 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When running the test on the Spectrum ASIC the generated packets are counted on the ingress filter and injected back to the pipeline because of the 'pass' action. The router block then drops the packets due to checksum error, as the test generates packets with zero checksum. When running the test on an emulator that is not as strict about checksum errors the test fails since packets are counted twice. Once by the emulated ASIC on its ingress filter and again by the kernel as the emulator does not perform checksum validation and allows the packets to be trapped by a matching host route. Fix this by changing the action to 'drop', which will prevent the packet from continuing further in the pipeline to the router block. For veth pairs this change is essentially a NOP given packets are only processed once (by the kernel). Fixes: a0b61f3d8ebf ("selftests: forwarding: vxlan_bridge_1d: Add an ECN decap test") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh b/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh index 56cef3b1c194..bb10e33690b2 100755 --- a/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh +++ b/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh @@ -629,7 +629,7 @@ __test_ecn_decap() RET=0 tc filter add dev $h1 ingress pref 77 prot ip \ - flower ip_tos $decapped_tos action pass + flower ip_tos $decapped_tos action drop sleep 1 vxlan_encapped_ping_test v2 v1 192.0.2.17 \ $orig_inner_tos $orig_outer_tos \