tools/testing/selftests/net/forwarding/bridge_mdb.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/net/forwarding/bridge_mdb.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/net/forwarding/bridge_mdb.sh- Extension
.sh- Size
- 48576 bytes
- Lines
- 1468
- 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
# +-----------------------+ +------------------------+
# | H1 (vrf) | | H2 (vrf) |
# | + $h1.10 | | + $h2.10 |
# | | 192.0.2.1/28 | | | 192.0.2.2/28 |
# | | 2001:db8:1::1/64 | | | 2001:db8:1::2/64 |
# | | | | | |
# | | + $h1.20 | | | + $h2.20 |
# | \ | 198.51.100.1/24 | | \ | 198.51.100.2/24 |
# | \ | 2001:db8:2::1/64 | | \ | 2001:db8:2::2/64 |
# | \| | | \| |
# | + $h1 | | + $h2 |
# +----|------------------+ +----|-------------------+
# | |
# +----|--------------------------------------------------|-------------------+
# | SW | | |
# | +--|--------------------------------------------------|-----------------+ |
# | | + $swp1 BR0 (802.1q) + $swp2 | |
# | | vid 10 vid 10 | |
# | | vid 20 vid 20 | |
# | | | |
# | +-----------------------------------------------------------------------+ |
# +---------------------------------------------------------------------------+
ALL_TESTS="
cfg_test
fwd_test
ctrl_test
disable_test
"
NUM_NETIFS=4
source lib.sh
source tc_common.sh
h1_create()
{
simple_if_init $h1
vlan_create $h1 10 v$h1 192.0.2.1/28 2001:db8:1::1/64
vlan_create $h1 20 v$h1 198.51.100.1/24 2001:db8:2::1/64
}
h1_destroy()
{
vlan_destroy $h1 20
vlan_destroy $h1 10
simple_if_fini $h1
}
h2_create()
{
simple_if_init $h2
vlan_create $h2 10 v$h2 192.0.2.2/28
vlan_create $h2 20 v$h2 198.51.100.2/24
}
h2_destroy()
{
vlan_destroy $h2 20
vlan_destroy $h2 10
simple_if_fini $h2
}
switch_create()
{
local vlan_filtering=$1; shift
ip link add name br0 type bridge \
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.