]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: router_scale: Do not count failed routes
authorAmit Cohen <amcohen@nvidia.com>
Tue, 8 Jun 2021 12:44:08 +0000 (15:44 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jun 2021 21:39:07 +0000 (14:39 -0700)
commitd1c7c3bbc5265e13c2c2b6e7c9009e6395728911
treeab1b49a8279ad0750da41b519b70144cbef64943
parent0f285df0330c93d94a7b4dfbc74fc78ac7efa011
selftests: router_scale: Do not count failed routes

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/drivers/net/mlxsw/router_scale.sh