Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: mlxsw: hw_stats_l3: Add a new test

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>

authored by

Petr Machata and committed by
Paolo Abeni
ed2ae69c 9b18942e

+31
+31
tools/testing/selftests/drivers/net/mlxsw/hw_stats_l3.sh
··· 1 + #!/bin/bash 2 + # SPDX-License-Identifier: GPL-2.0 3 + 4 + lib_dir=$(dirname $0)/../../../net/forwarding 5 + 6 + ALL_TESTS=" 7 + l3_monitor_test 8 + " 9 + NUM_NETIFS=0 10 + source $lib_dir/lib.sh 11 + 12 + swp=$NETIF_NO_CABLE 13 + 14 + cleanup() 15 + { 16 + pre_cleanup 17 + } 18 + 19 + l3_monitor_test() 20 + { 21 + hw_stats_monitor_test $swp l3 \ 22 + "ip addr add dev $swp 192.0.2.1/28" \ 23 + "ip addr del dev $swp 192.0.2.1/28" 24 + } 25 + 26 + trap cleanup EXIT 27 + 28 + setup_wait 29 + tests_run 30 + 31 + exit $EXIT_STATUS