From patchwork Tue Jun 8 12:44:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 12306767 X-Patchwork-Delegate: kuba@kernel.org 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=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 A44C7C47082 for ; Tue, 8 Jun 2021 12:44:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8757F6127A for ; Tue, 8 Jun 2021 12:44:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232725AbhFHMqm (ORCPT ); Tue, 8 Jun 2021 08:46:42 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:43613 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232705AbhFHMqi (ORCPT ); Tue, 8 Jun 2021 08:46:38 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id F3CF85C0143; Tue, 8 Jun 2021 08:44:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 08 Jun 2021 08:44:44 -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= fm3; bh=Nu7J7pNvpqCFJZuLTkkTkmiCN1pIlz+BJJUdl4RN+cQ=; b=gR1wlwYn gY8P5p8GvYUOhrLbTU1sjYq+XnJZPRTIj/W69XZ5ej+xOfcdXJhyGAlMLnLqp9Bx 2S5l6sclSubTBMkw/RGMNJVTb1KN+13/RghJJWGjSMePgQxA4D9QaSlU6f0G5aV4 T29biQeOKY9wJiZU4J5ZoRfTYhqxvYAxXlx7nxAya2JGvRxeH8SMmU1egRfLNJuy V/Z/NL/KGZcjmWuX2TMZtwLWLjTabN+qjFWr08/2vbz0GAAQvBFF7yZavkbM45Fh X1hPpDgq7KMzfUDC8MYm1UMqi9NJSPhSQpQQ+zGcPeRxQlMREcoM5uCKDHxbZUrD W5nuzQ15V9BHYg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedtledgfeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiugho shgthhdrohhrgheqnecuggftrfgrthhtvghrnhepudetieevffffveelkeeljeffkefhke ehgfdtffethfelvdejgffghefgveejkefhnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepihguohhstghhsehiughoshgthhdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 8 Jun 2021 08:44:42 -0400 (EDT) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, jiri@nvidia.com, petrm@nvidia.com, amcohen@nvidia.com, vadimp@nvidia.com, c_mykolak@nvidia.com, mlxsw@nvidia.com, Ido Schimmel Subject: [PATCH net-next 2/8] selftests: router_scale: Do not count failed routes Date: Tue, 8 Jun 2021 15:44:08 +0300 Message-Id: <20210608124414.1664294-3-idosch@idosch.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210608124414.1664294-1-idosch@idosch.org> References: <20210608124414.1664294-1-idosch@idosch.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Amit Cohen To check how many routes are installed in hardware, the test runs "ip route" and greps for "offload", which includes routes with state "offload_failed". Till now, this wrong check was not found because after one failure in route insertion, the driver moved to "abort" mode, which means that user cannot try to add more routes. The previous patch removed the abort mechanism and now failed routes are counted as offloaded. Fix this by not considering routes with "offload_failed" flag as offloaded. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- tools/testing/selftests/drivers/net/mlxsw/router_scale.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh index e93878d42596..683759d29199 100644 --- a/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh @@ -68,7 +68,7 @@ wait_for_routes() local t0=$1; shift local route_count=$1; shift - local t1=$(ip route | grep -o 'offload' | wc -l) + local t1=$(ip route | grep 'offload' | grep -v 'offload_failed' | wc -l) local delta=$((t1 - t0)) echo $delta [[ $delta -ge $route_count ]]