From patchwork Mon Nov 19 16:11:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 10688853 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F0C7717FE for ; Mon, 19 Nov 2018 16:11:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0B2429947 for ; Mon, 19 Nov 2018 16:11:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4B422A0F8; Mon, 19 Nov 2018 16:11:14 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 5C56F29947 for ; Mon, 19 Nov 2018 16:11:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729888AbeKTCfP (ORCPT ); Mon, 19 Nov 2018 21:35:15 -0500 Received: from mail-eopbgr140072.outbound.protection.outlook.com ([40.107.14.72]:6759 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729796AbeKTCfP (ORCPT ); Mon, 19 Nov 2018 21:35:15 -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=4q1q6TDAOradDXdQb+BFgNkc1CnqQXdypEek81cRXEw=; b=IyuyFr59FYGnpQ3dgX0jUA1wr8awjntqw6GrllQAmRD5hVzMh31VwARekRlr1KvD8/aAK70RI+SAcALqQViVmlnnzRfoZ8kwtGYgU//Gvg4RUt/hF4EWWDIoVxNatnOz8QF8eXVjpD6ICJFy7yn+Z23GeUY5VHSlyk8aQCq97Xg= Received: from AM0PR05MB4978.eurprd05.prod.outlook.com (20.177.42.95) by AM0PR05MB6225.eurprd05.prod.outlook.com (20.178.115.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.30; Mon, 19 Nov 2018 16:11:06 +0000 Received: from AM0PR05MB4978.eurprd05.prod.outlook.com ([fe80::f953:cde4:ff8d:501a]) by AM0PR05MB4978.eurprd05.prod.outlook.com ([fe80::f953:cde4:ff8d:501a%4]) with mapi id 15.20.1339.026; Mon, 19 Nov 2018 16:11:06 +0000 From: Ido Schimmel To: "netdev@vger.kernel.org" , "linux-kselftest@vger.kernel.org" CC: "davem@davemloft.net" , "shuah@kernel.org" , Jiri Pirko , Petr Machata , "roopa@cumulusnetworks.com" , mlxsw , Ido Schimmel Subject: [PATCH net-next 00/18] selftests: Add tests for VXLAN at an 802.1d bridge Thread-Topic: [PATCH net-next 00/18] selftests: Add tests for VXLAN at an 802.1d bridge Thread-Index: AQHUgCJ5byX8jrIOX0SSzA8PD/q/jg== Date: Mon, 19 Nov 2018 16:11:06 +0000 Message-ID: <20181119161006.5405-1-idosch@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM5PR0601CA0031.eurprd06.prod.outlook.com (2603:10a6:203:68::17) To AM0PR05MB4978.eurprd05.prod.outlook.com (2603:10a6:208:d0::31) authentication-results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM0PR05MB6225;6:wdpPWVSfcXZbUF9s10P9zouQum2XdMxUhNlmV1QnbU35z2sMFfmc8oIWS4E/9y31M/+OFOvyp5yubOnpxA5UBjtrcophLyWyniAx7BovJQHmu2nPedoNSwNHQg8fr6qRXzTK8zdlmRVk1A5cqXUdSQeA+cUULt7tD7xINXhtjhbmtKp0jhBjmajEYuM5C3A5ab9X3UQPC09ZgtXkOcggHAsHFsXj6TB83YCcayhabvfE+q+gaAft6h7Mn1O7ELuSoP3oBkPF+KP2finNmGAMIUqKuK+RBWXCLhfwpQoXqfXAwBvBYnaRCtl+ALPKbq9/wKEPAr1dMiVPV+D63LzAFzlV9giyh4KIFuMzi7qV1r8aZ5+3/xMGQJwA9WyrnjIthEiWLWh3LHFNTygQpwJLTuY/+5EGjTGDf+GYmEN1AT0k6UrRc4Pm9G4ErYC3c4kBZk2E2bbEpB8MaTxRzNbNOA==;5:+e0pRWmyk/u/BsKiWi3Tn9Mafc0bVuFXDkgN92c3DCuMiVCF7ywqMYm7tHT17PaxyHqxfnUKEovqwVuqXxwdKKsprnxcu4/o3lUcvIIZTJEiBpLkAN6lBkqwM+qdvAcK8MhsPQSWeggJv2kcpE/InVK4ztM1g6MC1dwdfO6kTvc=;7:uTG3JptmVCqlVNtYE1dDFAlKeDGvWIDpdodjselzPtcS8Yg6lVC1+48tK+OmAzL1aKPvFzxE5oqpU5SPypzhRfV9K8+odqIJgS7t4iqInkiT6mUb6F950foV0q4rz++TUQEyY18ATkSiUazm8VPjDQ== x-ms-office365-filtering-correlation-id: 976d93b1-739d-4436-e242-08d64e399c20 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:AM0PR05MB6225; x-ms-traffictypediagnostic: AM0PR05MB6225: 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)(3231415)(944501410)(52105112)(6055026)(148016)(149066)(150057)(6041310)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:AM0PR05MB6225;BCL:0;PCL:0;RULEID:;SRVR:AM0PR05MB6225; x-forefront-prvs: 08617F610C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(136003)(39860400002)(366004)(376002)(396003)(189003)(199004)(85644002)(71200400001)(71190400001)(478600001)(110136005)(54906003)(316002)(386003)(102836004)(14454004)(2906002)(2501003)(107886003)(26005)(97736004)(5024004)(25786009)(256004)(4326008)(53936002)(6512007)(105586002)(68736007)(106356001)(1076002)(8676002)(186003)(3846002)(2900100001)(6116002)(6486002)(7736002)(6436002)(486006)(305945005)(52116002)(2616005)(6506007)(36756003)(99286004)(66066001)(81156014)(81166006)(86362001)(8936002)(5660300001)(476003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR05MB6225;H:AM0PR05MB4978.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-microsoft-antispam-message-info: nA7EXD2wvZ2ZSWyPRB+n+RTavj5rFIM6o2mPZA4BWFoGK5r2XyK+09BPEI6Uhpi/p3/REHFHLErhQhr5qYBg0tMRvy8ctPNPeLOeXJKnm97l3nquojkCkkfOSPUEJfllSv79m4WSlPeJyH3YsnN2ltwVKru76nEa11Ic9p2dh7OBP6u9peKDjPeQNROqeeAq1aC5Ark4pAt+FE9Q5c4fHcsSJY7Y1aMFi8v/DDgZRpDYzirSRXk5gG+j3GSNEmwQMdkubsSqjVdOFTXS0hUn9m8SPGX6pp+hm7dwWJYGXjfqEvufW7/2hf96lDDx9jprVBGaeZtsb48H3ACM+n7IBFWN/nVChez7fzCZ/Vu75m4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 976d93b1-739d-4436-e242-08d64e399c20 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Nov 2018 16:11:06.5451 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6225 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 Petr says: This patchset adds several tests for VXLAN attached to an 802.1d bridge and fixes a related bug. First patch #1 fixes a bug in propagating SKB already-forwarded marks over veth to bridges, where they are irrelevant. This bug causes the vxlan_bridge_1d test suite from this patchset to fail as the packets aren't forwarded by br2. In patches #2 and #3, lib.sh is extended to support network namespaces. The use of namespaces is necessitated by VXLAN, which allows only one VXLAN device with a given VNI per namespace. Thus to host full topology on a single box for selftests, the "remote" endpoints need to be in namespaces. In patches #4-#6, lib.sh is extended in other ways to facilitate the following patches. In patches #7-#15, first the skeleton, and later the generic tests themselves are added. Patch #16 then adds another test that serves as a wrapper around the previous one, and runs it with a non-default port number. Patches #17 and #18 add mlxsw-specific tests. About those, Ido writes: The first test creates various configurations with regards to the VxLAN and bridge devices and makes sure the driver correctly forbids unsupported configuration and permits supported ones. It also verifies that the driver correctly sets the offload indication on FDB entries and the local route used for VxLAN decapsulation. The second test verifies that the driver correctly configures the singly linked list used to flood BUM traffic and that traffic is flooded as expected. Ido Schimmel (2): selftests: mlxsw: Add a test for VxLAN configuration selftests: mlxsw: Add a test for VxLAN flooding Petr Machata (16): net: skb_scrub_packet(): Scrub offload_fwd_mark selftests: forwarding: lib: Support NUM_NETIFS of 0 selftests: forwarding: lib: Add in_ns() selftests: forwarding: ping{6,}_test(): Add description argument selftests: forwarding: ping{6,}_do(): Allow passing ping arguments selftests: forwarding: lib: Add link_stats_rx_errors_get() selftests: forwarding: Add a skeleton of vxlan_bridge_1d selftests: forwarding: vxlan_bridge_1d: Add ping test selftests: forwarding: vxlan_bridge_1d: Add flood test selftests: forwarding: vxlan_bridge_1d: Add unicast test selftests: forwarding: vxlan_bridge_1d: Reconfigure & rerun tests selftests: forwarding: vxlan_bridge_1d: Add a TTL test selftests: forwarding: vxlan_bridge_1d: Add a TOS test selftests: forwarding: vxlan_bridge_1d: Add an ECN encap test selftests: forwarding: vxlan_bridge_1d: Add an ECN decap test selftests: forwarding: vxlan_bridge_1d_port_8472: New test net/core/skbuff.c | 5 + .../selftests/drivers/net/mlxsw/vxlan.sh | 664 +++++++++++++++++ .../drivers/net/mlxsw/vxlan_flooding.sh | 309 ++++++++ tools/testing/selftests/net/forwarding/lib.sh | 42 +- .../net/forwarding/vxlan_bridge_1d.sh | 678 ++++++++++++++++++ .../forwarding/vxlan_bridge_1d_port_8472.sh | 10 + 6 files changed, 1700 insertions(+), 8 deletions(-) create mode 100755 tools/testing/selftests/drivers/net/mlxsw/vxlan.sh create mode 100755 tools/testing/selftests/drivers/net/mlxsw/vxlan_flooding.sh create mode 100755 tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh create mode 100755 tools/testing/selftests/net/forwarding/vxlan_bridge_1d_port_8472.sh