tools/testing/selftests/drivers/net/mlxsw/hw_stats_l3.sh

Source file repositories/reference/linux-study-clean/tools/testing/selftests/drivers/net/mlxsw/hw_stats_l3.sh

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/drivers/net/mlxsw/hw_stats_l3.sh
Extension
.sh
Size
410 bytes
Lines
32
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: tools
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

#!/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

Annotation

Implementation Notes