tools/testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh- Extension
.sh- Size
- 3118 bytes
- Lines
- 175
- 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 ipv6 stats on the incoming if when forwarding with VRF
ALL_TESTS="
ipv6_ping
ipv6_in_too_big_err
ipv6_in_hdr_err
ipv6_in_addr_err
ipv6_in_discard
"
NUM_NETIFS=4
source lib.sh
require_command $TROUTE6
h1_create()
{
simple_if_init $h1 2001:1:1::2/64
ip -6 route add vrf v$h1 2001:1:2::/64 via 2001:1:1::1
}
h1_destroy()
{
ip -6 route del vrf v$h1 2001:1:2::/64 via 2001:1:1::1
simple_if_fini $h1 2001:1:1::2/64
}
router_create()
{
vrf_create router
__simple_if_init $rtr1 router 2001:1:1::1/64
__simple_if_init $rtr2 router 2001:1:2::1/64
mtu_set $rtr2 1280
}
router_destroy()
{
mtu_restore $rtr2
__simple_if_fini $rtr2 2001:1:2::1/64
__simple_if_fini $rtr1 2001:1:1::1/64
vrf_destroy router
}
h2_create()
{
simple_if_init $h2 2001:1:2::2/64
ip -6 route add vrf v$h2 2001:1:1::/64 via 2001:1:2::1
mtu_set $h2 1280
}
h2_destroy()
{
mtu_restore $h2
ip -6 route del vrf v$h2 2001:1:1::/64 via 2001:1:2::1
simple_if_fini $h2 2001:1:2::2/64
}
setup_prepare()
{
h1=${NETIFS[p1]}
rtr1=${NETIFS[p2]}
rtr2=${NETIFS[p3]}
h2=${NETIFS[p4]}
vrf_prepare
h1_create
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.