tools/testing/selftests/net/forwarding/bridge_port_isolation.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/net/forwarding/bridge_port_isolation.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/net/forwarding/bridge_port_isolation.sh- Extension
.sh- Size
- 2378 bytes
- Lines
- 152
- 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
ALL_TESTS="ping_ipv4 ping_ipv6 flooding"
NUM_NETIFS=6
CHECK_TC="yes"
source lib.sh
h1_create()
{
simple_if_init $h1 192.0.2.1/24 2001:db8:1::1/64
}
h1_destroy()
{
simple_if_fini $h1 192.0.2.1/24 2001:db8:1::1/64
}
h2_create()
{
simple_if_init $h2 192.0.2.2/24 2001:db8:1::2/64
}
h2_destroy()
{
simple_if_fini $h2 192.0.2.2/24 2001:db8:1::2/64
}
h3_create()
{
simple_if_init $h3 192.0.2.3/24 2001:db8:1::3/64
}
h3_destroy()
{
simple_if_fini $h3 192.0.2.3/24 2001:db8:1::3/64
}
switch_create()
{
ip link add dev br0 type bridge
ip link set dev $swp1 master br0
ip link set dev $swp2 master br0
ip link set dev $swp3 master br0
ip link set dev $swp1 type bridge_slave isolated on
check_err $? "Can't set isolation on port $swp1"
ip link set dev $swp2 type bridge_slave isolated on
check_err $? "Can't set isolation on port $swp2"
ip link set dev $swp3 type bridge_slave isolated off
check_err $? "Can't disable isolation on port $swp3"
ip link set dev br0 up
ip link set dev $swp1 up
ip link set dev $swp2 up
ip link set dev $swp3 up
}
switch_destroy()
{
ip link set dev $swp3 down
ip link set dev $swp2 down
ip link set dev $swp1 down
ip link del dev br0
}
setup_prepare()
{
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.