tools/testing/selftests/net/forwarding/tc_vlan_modify.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/net/forwarding/tc_vlan_modify.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/net/forwarding/tc_vlan_modify.sh- Extension
.sh- Size
- 3246 bytes
- Lines
- 165
- 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="
vlan_modify_ingress
vlan_modify_egress
"
NUM_NETIFS=4
CHECK_TC="yes"
source lib.sh
h1_create()
{
simple_if_init $h1 192.0.2.1/28 2001:db8:1::1/64
vlan_create $h1 85 v$h1 192.0.2.17/28 2001:db8:2::1/64
}
h1_destroy()
{
vlan_destroy $h1 85
simple_if_fini $h1 192.0.2.1/28 2001:db8:1::1/64
}
h2_create()
{
simple_if_init $h2 192.0.2.2/28 2001:db8:1::2/64
vlan_create $h2 65 v$h2 192.0.2.18/28 2001:db8:2::2/64
}
h2_destroy()
{
vlan_destroy $h2 65
simple_if_fini $h2 192.0.2.2/28 2001:db8:1::2/64
}
switch_create()
{
ip link add dev br0 type bridge vlan_filtering 1 mcast_snooping 0
ip link set dev $swp1 master br0
ip link set dev $swp2 master br0
ip link set dev br0 up
ip link set dev $swp1 up
ip link set dev $swp2 up
bridge vlan add dev $swp1 vid 85
bridge vlan add dev $swp2 vid 65
bridge vlan add dev $swp2 vid 85
bridge vlan add dev $swp1 vid 65
tc qdisc add dev $swp1 clsact
tc qdisc add dev $swp2 clsact
}
switch_destroy()
{
tc qdisc del dev $swp2 clsact
tc qdisc del dev $swp1 clsact
bridge vlan del vid 65 dev $swp1
bridge vlan del vid 85 dev $swp2
bridge vlan del vid 65 dev $swp2
bridge vlan del vid 85 dev $swp1
ip link set dev $swp2 down
ip link set dev $swp1 down
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.