Message ID | 8729470ff63bc4c4f546d3ca445f83743aeaef91.1530319109.git.petrm@mellanox.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <linux-kselftest-owner@kernel.org> 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 B802D602CC for <patchwork-linux-kselftest@patchwork.kernel.org>; Sat, 30 Jun 2018 00:51:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9935628B30 for <patchwork-linux-kselftest@patchwork.kernel.org>; Sat, 30 Jun 2018 00:51:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D355295B0; Sat, 30 Jun 2018 00:51:09 +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 232E228B30 for <patchwork-linux-kselftest@patchwork.kernel.org>; Sat, 30 Jun 2018 00:51:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934996AbeF3AvI (ORCPT <rfc822;patchwork-linux-kselftest@patchwork.kernel.org>); Fri, 29 Jun 2018 20:51:08 -0400 Received: from mail-db5eur01on0063.outbound.protection.outlook.com ([104.47.2.63]:18292 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933750AbeF3AvH (ORCPT <rfc822; linux-kselftest@vger.kernel.org>); Fri, 29 Jun 2018 20:51:07 -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=Y3sK0VTJF9WUiXP0TToOorp7PYLXPv6prMeUOwNsnAM=; b=IExfC9+GZLUFHZQEM11v/mEqQGQc1awXlHjr90EgSsS178ec8OMZSg2u8FEQKO589lg6w/o+wBjcekW/N1g2a01CioMTE3jLH1G9jSpRvKydq98pfjC2UDGul10m8lnWJygqvTphT6mTbhTrz275o9zmx/rm1fb15KyTDBXe3dw= 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:51:04 +0000 From: Petr Machata <petrm@mellanox.com> 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 08/13] selftests: mlxsw: Add target for router test on spectrum In-Reply-To: <cover.1530319109.git.petrm@mellanox.com> References: <cover.1530319109.git.petrm@mellanox.com> Message-Id: <8729470ff63bc4c4f546d3ca445f83743aeaef91.1530319109.git.petrm@mellanox.com> Date: Sat, 30 Jun 2018 02:50:28 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [89.176.83.59] X-ClientProxiedBy: AM5PR0102CA0024.eurprd01.prod.exchangelabs.com (2603:10a6:206::37) 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: 19e7a916-b9a0-4ffa-f64d-08d5de238f49 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:2joeHXmNP2H0+GaOsyned59Tx/58/jU//3oAw0uKvdruREOrn4F2krdXzo1d/TMPkr3XeY8oSOSax4smWGRzSbq79VrhKiSmnylZs9kzPPLgynDuBO96nQoUjow1Ws5d1NJdC9XBzEFg1u8JrL+Tjmokya3RQqgDdELo8uFD8mWPEaVUlH1j04sLd+3I9VzY5tNRjfiBASqDnvAr11+oPQbF/ADYbgG6Z2Jf5++J0xzY8k0IdA8SVSK+gZRsuU5r; 25:DrztVBPfc4NvU/w6SCKDdyereE3LSQQ9gtJ/YrThhc7V2zme52ksyq+DrwTe5SjntFRnJYnGRhBmmWUWGqrZbJqXeQ0CNy2MCfjfI05ZB6OOqz0WgYKyu0Re4kNqUYCNxetu11ToXKNwJzdRPsry65u91C00H9JqtjEF1ts1+LzMRKEdQOfRulYzXzi7mXxI8W8oBT1J7WQWG8H6QKOZDb+kVoY8JggoDqaFcRiyx+dvp9+STzAyOWqMLFSCSPgeyqEJs9Tu08X9qm+VCfaKuhRhCQsyh8tf+TFrDicCgSA320H3MiKNCjsAJWMRA9U3qJAVrhQCZuGtuYiPOsaEkQ==; 31:csvGKDK70D32w+zqIhZ5OyLNxlaycnEE5XLFT4MUbVkM/pDgQ/QgKgwOD+no65aOoueFFwDL3w2n54FiS/Rj3zsZpbLX8DSyg03X/0vGQvfKsAO7jnm8gZPw10MBCxv2kgRSSr0XUeYJrac+9CDAs/pXhv6d+A0EoBCiRMkm4rBb31rpIpsoCot6MeHlsY+nVgcPPFyklDJ+An6J9zbFeMadbJ+DXTl2suVVdRFSMHg= X-MS-TrafficTypeDiagnostic: VI1PR05MB4191: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4191; 20:PV4iHh/3sW0a1YZwH1SRccMXRjTiPb3lf/LjwaKeULZHO9Ils59EFyMVSa3+/KG3G4pjurL7Q/Fenl43dVrtWTMP8dcS8mO4DtEWtdNyWn3+qbxzQdDgq0K54S8fWEiOtadQbCoNYsowOC7wjOiksDqwoX+VLtW2bDdvt+hrvo1s55H0tTwklcGfBAk7L8YVUjtQR0fIq1Z/NTWRWiPNF1jhHXZiCTzd/wJbaX9W9/5VM4Rcal43xSCiPthyOY2gds3axpg4G2TZHCsa6wubgPfAqzEHZgfA88Mh6XqGC1GPq2go2aLHcR6t8pYJrdM4JBmk7R3iBem/jI5yOQaMY44a6QeLlfSP5PQcsEjO9gNFX34dBL5kFcUHq3ewk8oy8nQuPfpkaM5TFC9sNf5lgeYKwvtTKRS6ZTglUmh1QuARHLK7MTzRCTkn5yGcLTTG4kLYN41MTbTeQVx2QyHhujH49MiQK9XRquBOb8Nr0NLKJWmf/JOjYen9BtudQ3do; 4:C+LD9qbhEhMy9K0nbdc/XxrKlRTp/xbIk0DF4iPw0Ux+LDXgcfZoezYKB9uxevmqHzZdwwruDGuCaEJk+MlJghrNy/k3/gAafXWk6LvMfeokcN2LrqextnKlFMUk7DfSOdGFbqLgiEH852YXAWYculNpm3NDeCaKdtuzVnb+GEurehROzsqxq0V+foeMm78AGaopRwLUMwiEFcBWuc5phZGqzUamdLVhth8hmK0hQ4SkiiwxNCMeebNCefGKWrU90ZUl55Kz91v309SEV1xilw== X-Microsoft-Antispam-PRVS: <VI1PR05MB4191C06671A55B141EA3C1BCDB4D0@VI1PR05MB4191.eurprd05.prod.outlook.com> 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)(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:oVdD9DM5UBm670qM2PyLy0tZOSALhJIlFk6zpJgSP?= =?us-ascii?Q?kmGPVYs5++gtSgPZS4ZALVBpp8WdDk3BRNfj/fyJtRb0ymzJGZFsmEL48r4Z?= =?us-ascii?Q?ah8HNKbjRPW9DWoUtf9mbxxtA6F7pUKDzcGFF3bXkEPOVaMPbiB6+f1gIJfw?= =?us-ascii?Q?YKx2amX61/8KcmLSBR7szZtmuEVqx9DSVB0yYM6pCg+OqfI4friw10D0h3pg?= =?us-ascii?Q?y6Z9r+qPMtzxUa98SLfHAfsCDnpj1YLyKD+R7T+2Ww4c7x40083AWZdDX4EB?= =?us-ascii?Q?gVI8dtVnQNjXNPKV+u7nKQLozNul22D9lYxJtQSimmvPM1PRloU2/Ph4pmR8?= =?us-ascii?Q?nyVK7lKN6S2ULEtRxNauGcrjBoFlI+GKU0e/MnuSbjZL8T8lBUzDCvwYWC0q?= =?us-ascii?Q?xcR93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ft-Exchange-Diagnostics: 1; VI1PR05MB4191; 7:MQGtxpIwdvcyUhixmkGExeoePsJJqYc+J40gnQEYnFasrDtW8wG+BToYhIKohP4yX5zWmN0sWvQ87p3hDUR2/+Q7e5SstCXxwVuQpRW+mLQqNMX/mEmmo6XX3Lv65TfykiuAYq+GLshuM1mR2L6MdQtelWWYmhn7NtJ8iiRfmbkRgjwP78s968OjPs51vIG+iHnvicEUG5psOw3U9P0mcpa2YXxp0tMbg0RB4lKjMNzwncnv7T00dPMBqXkDjJvX X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2018 00:51:04.6880 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 19e7a916-b9a0-4ffa-f64d-08d5de238f49 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: <linux-kselftest.vger.kernel.org> X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/tools/testing/selftests/drivers/net/mlxsw/spectrum/router_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/spectrum/router_scale.sh new file mode 100644 index 000000000000..21c4697d5bab --- /dev/null +++ b/tools/testing/selftests/drivers/net/mlxsw/spectrum/router_scale.sh @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0 +source ../router_scale.sh + +router_get_target() +{ + local should_fail=$1 + local target + + target=$(devlink_resource_size_get kvd hash_single) + + if [[ $should_fail -eq 0 ]]; then + target=$((target * 85 / 100)) + else + target=$((target + 1)) + fi + + echo $target +}