tools/testing/selftests/drivers/net/mlxsw/vxlan.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/drivers/net/mlxsw/vxlan.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/drivers/net/mlxsw/vxlan.sh- Extension
.sh- Size
- 30918 bytes
- Lines
- 1186
- 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.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
#
# Test various aspects of VxLAN offloading which are specific to mlxsw, such
# as sanitization of invalid configurations and offload indication.
: ${ADDR_FAMILY:=ipv4}
export ADDR_FAMILY
: ${LOCAL_IP_1:=198.51.100.1}
export LOCAL_IP_1
: ${LOCAL_IP_2:=198.51.100.2}
export LOCAL_IP_2
: ${PREFIX_LEN:=32}
export PREFIX_LEN
: ${UDPCSUM_FLAFS:=noudpcsum}
export UDPCSUM_FLAFS
: ${MC_IP:=239.0.0.1}
export MC_IP
: ${IP_FLAG:=""}
export IP_FLAG
: ${ALL_TESTS:="
sanitization_test
offload_indication_test
sanitization_vlan_aware_test
offload_indication_vlan_aware_test
"}
lib_dir=$(dirname $0)/../../../net/forwarding
NUM_NETIFS=2
: ${TIMEOUT:=20000} # ms
source $lib_dir/lib.sh
setup_prepare()
{
swp1=${NETIFS[p1]}
swp2=${NETIFS[p2]}
ip link set dev $swp1 up
ip link set dev $swp2 up
}
cleanup()
{
pre_cleanup
ip link set dev $swp2 down
ip link set dev $swp1 down
}
sanitization_single_dev_test_pass()
{
ip link set dev $swp1 master br0
check_err $?
ip link set dev vxlan0 master br0
check_err $?
ip link set dev $swp1 nomaster
ip link set dev $swp1 master br0
check_err $?
}
sanitization_single_dev_test_fail()
Annotation
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.