Skip to content

Commit

Permalink
selftests: mlxsw: hw_stats_l3: Add a new test
Browse files Browse the repository at this point in the history
Add a test that verifies that UAPI notifications are emitted, as mlxsw
installs and deinstalls HW counters for the L3 offload xstats.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Petr Machata authored and Paolo Abeni committed Mar 15, 2022
1 parent 9b18942 commit ed2ae69
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tools/testing/selftests/drivers/net/mlxsw/hw_stats_l3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0

lib_dir=$(dirname $0)/../../../net/forwarding

ALL_TESTS="
l3_monitor_test
"
NUM_NETIFS=0
source $lib_dir/lib.sh

swp=$NETIF_NO_CABLE

cleanup()
{
pre_cleanup
}

l3_monitor_test()
{
hw_stats_monitor_test $swp l3 \
"ip addr add dev $swp 192.0.2.1/28" \
"ip addr del dev $swp 192.0.2.1/28"
}

trap cleanup EXIT

setup_wait
tests_run

exit $EXIT_STATUS

0 comments on commit ed2ae69

Please sign in to comment.