tools/testing/selftests/drivers/net/mlxsw/extack.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/drivers/net/mlxsw/extack.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/drivers/net/mlxsw/extack.sh- Extension
.sh- Size
- 3825 bytes
- Lines
- 183
- 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 operations that we expect to report extended ack.
lib_dir=$(dirname $0)/../../../net/forwarding
ALL_TESTS="
netdev_pre_up_test
vxlan_vlan_add_test
vxlan_bridge_create_test
bridge_create_test
"
NUM_NETIFS=2
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
}
netdev_pre_up_test()
{
RET=0
ip link add name br1 type bridge vlan_filtering 0 mcast_snooping 0
ip link set dev br1 addrgenmode none
ip link set dev br1 up
ip link add name vx1 up type vxlan id 1000 \
local 192.0.2.17 remote 192.0.2.18 \
dstport 4789 nolearning noudpcsum tos inherit ttl 100
ip link set dev vx1 master br1
check_err $?
ip link set dev $swp1 master br1
check_err $?
ip link add name br2 type bridge vlan_filtering 0 mcast_snooping 0
ip link set dev br2 addrgenmode none
ip link set dev br2 up
ip link add name vx2 up type vxlan id 2000 \
local 192.0.2.17 remote 192.0.2.18 \
dstport 4789 nolearning noudpcsum tos inherit ttl 100
ip link set dev vx2 master br2
check_err $?
ip link set dev $swp2 master br2
check_err $?
# Unsupported configuration: mlxsw demands that all offloaded VXLAN
# devices have the same TTL.
ip link set dev vx2 down
ip link set dev vx2 type vxlan ttl 200
ip link set dev vx2 up &>/dev/null
check_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.