From patchwork Sat Jun 30 00:53:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 10497795 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 404F1602CC for ; Sat, 30 Jun 2018 00:54:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23E1E295BE for ; Sat, 30 Jun 2018 00:54:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18239295C0; Sat, 30 Jun 2018 00:54:29 +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 56BB4295BE for ; Sat, 30 Jun 2018 00:54:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753267AbeF3Ay0 (ORCPT ); Fri, 29 Jun 2018 20:54:26 -0400 Received: from mail-db5eur01on0042.outbound.protection.outlook.com ([104.47.2.42]:9248 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752633AbeF3AyY (ORCPT ); Fri, 29 Jun 2018 20:54:24 -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=kUvOqVJPdYAYmPtqqpnsE/4m5QClam0YDonuRZd9JhI=; b=QW/73mAWUdRGMfiSC+dSHfd7q0hNs79tzJs5pbg5metA1cldpl6xXdgQuU2w0ny6ueT1bEJm5b+UN2+OyYOoBhnpHwCz2EigFNn8pbnFyi8IQ5OY5W1cU64+OIXELH7eroDE9nSDihsRJb6vLw9B6RWAnzgI7YBsdJtIX/c4dus= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (89.176.83.59) by VI1PR05MB4191.eurprd05.prod.outlook.com (2603:10a6:803:4e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.25; Sat, 30 Jun 2018 00:54:21 +0000 From: Petr Machata To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: jiri@mellanox.com, idosch@mellanox.com, shuah@kernel.org, davem@davemloft.net Subject: [PATCH net-next 13/13] selftests: mlxsw: Add scale test for resources In-Reply-To: References: Message-Id: <260b40d9a60f3d316c54b270f005353a3e64f394.1530319109.git.petrm@mellanox.com> Date: Sat, 30 Jun 2018 02:53:52 +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: HE1PR0701CA0063.eurprd07.prod.outlook.com (2603:10a6:3:9e::31) To VI1PR05MB4191.eurprd05.prod.outlook.com (2603:10a6:803:4e::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5bc6164f-b4fe-49d5-49b0-08d5de240500 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(48565401081)(5600052)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:VI1PR05MB4191; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4191; 3:3W3gl3fy6AqM9zuWZ61Io1u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uMbncpGI1V4rclCbkikzznimz6OOcMWsWiA1P/yecTDqNj5ndtW9huAsExh9Or2tbDFGLMNN9ORKddiwxRuAe+A0OZQ06Qpg3iHs9tDc9O88COM1Q2CjtB7PZ9eMdApBRW0qjvUgmJBmOBUypfA2/H5h2MpCCUqLvFBG/D8w7umdzngXKjUKJmzJRLtkVtweIuCWW5p1PXGT3qObklNW7HqgpOno16upTQVUNyFWr8PUCQGmzGr9S1mWSLmGQYHSYIV+ss6ekOjrRUJzHSWc6wv5vyk/6UB4W+keOiA8T2LPiH0u8qEw+vlSdYYFcaXhItOSqcaeRELaW8T; 4:RiltMXx6DI8bfscGSVm1gq3vQcfbMerVSVslSUJ6cVwNTubjkvB1n8+7eJFyJ1B96RdisVZtClX2DZEuwjJuSfqFMOxBymsONeJ30EP68EwycPvwns5s6XU89Tq6gommP1IKpudG7LVn0H+T6q4W4djt02iKAqRLU/p/ba8WEslCsVt35HC6PZeiYXiMZxa3UiLKMjW5B7z90GdXq8fMmche5c6t8stcSGkOl5BwJatUBlv0H5BKJnQtPUXX8vbTNjcH9Eugit/J4IMpCfKEVw== 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)(3231254)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:VI1PR05MB4191; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB4191; X-Forefront-PRVS: 0719EC6A9A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(366004)(39860400002)(396003)(136003)(189003)(199004)(86362001)(478600001)(476003)(486006)(68736007)(956004)(2616005)(6116002)(6496006)(2906002)(66066001)(52116002)(3846002)(47776003)(76176011)(53936002)(5660300001)(4326008)(446003)(11346002)(51416003)(6486002)(36756003)(48376002)(118296001)(386003)(50466002)(16526019)(105586002)(186003)(26005)(106356001)(97736004)(575784001)(25786009)(8936002)(316002)(6666003)(81166006)(7736002)(16586007)(8676002)(305945005)(58126008)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB4191; 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; VI1PR05MB4191; 23:nun68ckBOwod6f/gIBp7jS6AKAEMDli3oP25gdCZR?= =?us-ascii?Q?e1xK2q5VA0RVbEzzFbDrA/iekk/DqI76F2e5NLPwdWTmJ29t7KgbFYXDl5Yj?= =?us-ascii?Q?IEL5NfcB5T/lEHiLOJYsx3h2d0RRG0lCyLw2/1KwlkaJcSvlPU/yGgRD52dy?= =?us-ascii?Q?kP3475DIXWn56ACxLql3CLFDKjJtfHSMQca5560da5cG7ClWVRUj8Mcvw9+0?= =?us-ascii?Q?noXKWBjQxHT1JER2cknBSMg99bHP6W5eqyJ7y0Xb7/D9c2RSQOtRb4f/aZwB?= =?us-ascii?Q?bjAnDedeiWChh+Xxm8n5lGv+ZIv7Mzj9Hvzs6LOyrWEqtlR7uMFLDX0hE/xh?= =?us-ascii?Q?8UOhecmcha7m0uP5w5XyqvjVFcEUHB9jZQComJbbP7dLBCnVvZNRjKk+uEn3?= =?us-ascii?Q?VJY2d08ov4y2DCzOkcyCrlL44g+KpjgJ7+C2XfQsD6Ott7N1OuqwDlW8taTu?= =?us-ascii?Q?VlmMzIsTphsj92nfUh0raGxVnk3kDaHSXRfzLLxDnjI3AUL4SenL3zludNCu?= =?us-ascii?Q?CAbZSfn8uDM4mD/PcfW7fYsdraUGWBQphO+MjHbYpxnvXA3nCb3nAAM7My4x?= =?us-ascii?Q?hDqZV4z201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BXZThqYXAJu0Dly/Qc8B126+oFe8k0yZqOjrbD0RVA8K1dInScYRnxMgq8= X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4191; 6:aHJLXPwbzYbiOp/NnVHqzl8kZfQy19Z1yrGvJqw+WdPd/1/XBONIsaS9AYQQ9PxrGLjZ5ofoYHixyraXgs8GhurPW5H7ViiW9ThJ6Or3u2A5f4kUnq9K6gP0qVmUotrUNLMbLBVLoTtZWtV8OzI+A9XTWWO5MxiQk++hzaHdj0+iagZ9RJuMdCErdr61OGEuxrIR6bC88BeGTl1zlMI/d9RKdRHwa16/mFta+Fuy4BLMtFV1OHi0HjskSXml88KMhV3AWQFTzG2Vsx/Ixle2A5jzB2MdBj7kxLFiJEkHCNPbnIWGt57V6CkY1SSkKBkwDDj83+yAEo40msF7RsEHaBnthyGijLtw0M/bfA1poCVE2ZW2Q5epX+PhivvivNnGZF3tEEn3cgnYe5lASYpnW0EfnleXZMi1ZtOe3HLlLIcPGhpZRd6dyZB2UDTdb8XehdW31Uq2CAwvZZBEBY6VQQ==; 5:5DuOwddFbOhj1hmuqWwz91pSTDeGEyxa/GRoLghX8PvUls4tNI6eLqIDQ2amS3wsCRri/Co/LVClhWFus6wPzmbkgVcpmepKPoWePhYvZgYot4TXbqEoIjsS4bha7LQqiQ4GWATLdyzO/nhn+Zf/qATqJMcxiRc13miJKNwzWk8=; 24:veA2ijTTp74Pc8WMRrFQWihYYqKb+KmEYbMSinXAKXeJaK7kIicPOFhgTaybXmZrKzdzcM7HLPpt+W31TeuJnZmKBnRU8j2RWw1esEpPvnM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4191; 7:SW5evqXLhOnjp3qwUikHMXkULK/XgQf5x30m8LVSsOaZh2KsgDxGxYKStIOKWTgS0EgjEUxcs6hND891zGGBc0WqcIaFBnCFSYABagiKcAV6OMrS5yo6ywg/DSzzO+ITIfNZ3ID971fpEJO0azijdgWw+uwe/N9Dvlu8HjTxi6sa7e7HYGazq+M0YehldktmsrvOfgnG1xj+g5LMiYFj+9sq7nuznL1Y8s4iR2y+8tSgpI80bQrgfkX9DbVm9gKX X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2018 00:54:21.6169 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5bc6164f-b4fe-49d5-49b0-08d5de240500 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4191 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 From: Yuval Mintz Add a scale test capable of validating that offloaded network functionality is indeed functional at scale when configured to the different KVD profiles available. Start by testing offloaded routes are functional at scale by passing traffic on each one of them in turn. Signed-off-by: Yuval Mintz Signed-off-by: Petr Machata --- .../drivers/net/mlxsw/spectrum/resource_scale.sh | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh diff --git a/tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh new file mode 100755 index 000000000000..a0a80e1a69e8 --- /dev/null +++ b/tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +NUM_NETIFS=6 +source ../../../../net/forwarding/lib.sh +source ../../../../net/forwarding/tc_common.sh +source devlink_lib_spectrum.sh + +current_test="" + +cleanup() +{ + pre_cleanup + if [ ! -z $current_test ]; then + ${current_test}_cleanup + fi + devlink_sp_size_kvd_to_default +} + +devlink_sp_read_kvd_defaults +trap cleanup EXIT + +ALL_TESTS="router tc_flower mirror_gre" +for current_test in ${TESTS:-$ALL_TESTS}; do + source ${current_test}_scale.sh + + num_netifs_var=${current_test^^}_NUM_NETIFS + num_netifs=${!num_netifs_var:-$NUM_NETIFS} + + for profile in $KVD_PROFILES; do + RET=0 + devlink_sp_resource_kvd_profile_set $profile + if [[ $RET -gt 0 ]]; then + log_test "'$current_test' [$profile] setting" + continue + fi + + for should_fail in 0 1; do + RET=0 + target=$(${current_test}_get_target "$should_fail") + ${current_test}_setup_prepare + setup_wait $num_netifs + ${current_test}_test "$target" "$should_fail" + ${current_test}_cleanup + if [[ "$should_fail" -eq 0 ]]; then + log_test "'$current_test' [$profile] $target" + else + log_test "'$current_test' [$profile] overflow $target" + fi + done + done +done +current_test="" + +exit "$RET"