From patchwork Thu Oct 17 06:55:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 1178328 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 (no SPF record) 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=none (p=none dis=none) header.from=idosch.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="VlcB3dmD"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46v0Lm5NXKz9sPF for ; Thu, 17 Oct 2019 17:56:16 +1100 (AEDT) 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 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 +}