Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0D66FA372B for ; Thu, 17 Oct 2019 06:56:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA3F1214E0 for ; Thu, 17 Oct 2019 06:56:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="VlcB3dmD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407855AbfJQG4Q (ORCPT ); Thu, 17 Oct 2019 02:56:16 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:33897 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407840AbfJQG4O (ORCPT ); Thu, 17 Oct 2019 02:56:14 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 1728721E29; Thu, 17 Oct 2019 02:56:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 17 Oct 2019 02:56:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=uDVl0436XZC/s20UySMrcqlEzp9F/jiNL5Ss+11krKA=; b=VlcB3dmD GTmEqg11OnfhrexRffhCi1gjn9E9np3ohF1PcHhLHtxvRMJiPTnHusF71UnMxWu0 Ak2cDuJXxsOAl+RL69u1jaYuArgKKyhh3Sn4UsWSZvw9nF/TH4lDPubjrGLgWkZ3 x5klXgFdCWnwXnIuPUJGvjGe+bLpgwclDe4n/MY4MxIBVXJ4363SlGiaemZQTSw6 fcBRQRQwcjcWIdsPWhz7RSqf+cSjNYwQ8BijM1iXi0Fe8V0ItL80IeZbSONZkcOC XgHcJ8kKi+m4GbzP9g4OFGygzbLLWrbWR4cTQKFrkAMU4W8dYN/pVJpXrrwD7Wr3 Tkd0CIVYrP6lEQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrjeeigdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiugho shgthhdrohhrgheqnecukfhppeduleefrdegjedrudeihedrvdehudenucfrrghrrghmpe hmrghilhhfrhhomhepihguohhstghhsehiughoshgthhdrohhrghenucevlhhushhtvghr ufhiiigvpedt X-ME-Proxy: Received: from splinter.mtl.com (unknown [193.47.165.251]) by mail.messagingengine.com (Postfix) with ESMTPA id C537AD6005B; Thu, 17 Oct 2019 02:56:12 -0400 (EDT) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, jiri@mellanox.com, danieller@mellanox.com, mlxsw@mellanox.com, Ido Schimmel Subject: [PATCH net-next 3/5] selftests: mlxsw: Add Spectrum-2 mirror-to-gretap target scale test Date: Thu, 17 Oct 2019 09:55:16 +0300 Message-Id: <20191017065518.27008-4-idosch@idosch.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191017065518.27008-1-idosch@idosch.org> References: <20191017065518.27008-1-idosch@idosch.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Danielle Ratson Like in Spectrum, use the number of analyzers taken from the devlink command. Signed-off-by: Danielle Ratson Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/mlxsw/spectrum-2/mirror_gre_scale.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tools/testing/selftests/drivers/net/mlxsw/spectrum-2/mirror_gre_scale.sh diff --git a/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/mirror_gre_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/mirror_gre_scale.sh new file mode 100644 index 000000000000..f7c168decd1e --- /dev/null +++ b/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/mirror_gre_scale.sh @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0 +source ../mirror_gre_scale.sh + +mirror_gre_get_target() +{ + local should_fail=$1; shift + local target + + target=$(devlink_resource_size_get span_agents) + + if ((! should_fail)); then + echo $target + else + echo $((target + 1)) + fi +} -- 2.21.0