All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
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 <idosch@nvidia.com>
Subject: [PATCH net-next 2/8] selftests: router_scale: Do not count failed routes
Date: Tue,  8 Jun 2021 15:44:08 +0300	[thread overview]
Message-ID: <20210608124414.1664294-3-idosch@idosch.org> (raw)
In-Reply-To: <20210608124414.1664294-1-idosch@idosch.org>

From: Amit Cohen <amcohen@nvidia.com>

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 <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
 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 ]]
-- 
2.31.1


  parent reply	other threads:[~2021-06-08 12:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 12:44 [PATCH net-next 0/8] mlxsw: Various updates Ido Schimmel
2021-06-08 12:44 ` [PATCH net-next 1/8] mlxsw: spectrum_router: Remove abort mechanism Ido Schimmel
2021-06-08 12:44 ` Ido Schimmel [this message]
2021-06-08 12:44 ` [PATCH net-next 3/8] selftests: Clean forgotten resources as part of cleanup() Ido Schimmel
2021-06-08 12:44 ` [PATCH net-next 4/8] selftests: devlink_lib: Fix bouncing of netdevsim DEVLINK_DEV Ido Schimmel
2021-06-08 12:44 ` [PATCH net-next 5/8] mlxsw: reg: Extend MTMP register with new threshold field Ido Schimmel
2021-06-08 12:44 ` [PATCH net-next 6/8] mlxsw: core_env: Read module temperature thresholds using MTMP register Ido Schimmel
2021-06-08 12:44 ` [PATCH net-next 7/8] mlxsw: thermal: Add function for reading module temperature and thresholds Ido Schimmel
2021-06-08 12:44 ` [PATCH net-next 8/8] mlxsw: thermal: Read module temperature thresholds using MTMP register Ido Schimmel
2021-06-08 21:50 ` [PATCH net-next 0/8] mlxsw: Various updates patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210608124414.1664294-3-idosch@idosch.org \
    --to=idosch@idosch.org \
    --cc=amcohen@nvidia.com \
    --cc=c_mykolak@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=idosch@nvidia.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@nvidia.com \
    --cc=vadimp@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.