tools/testing/selftests/net/ioam6.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/net/ioam6.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/net/ioam6.sh- Extension
.sh- Size
- 51703 bytes
- Lines
- 1684
- 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+
#
# Author: Justin Iurman <justin.iurman@uliege.be>
#
# This script evaluates IOAM for IPv6 by checking local IOAM configurations and
# IOAM data inside packets. There are three categories of tests: LOCAL, OUTPUT,
# and INPUT. The former (LOCAL) checks all IOAM related configurations locally
# without sending packets. OUTPUT tests verify the processing of an IOAM
# encapsulating node, while INPUT tests verify the processing of an IOAM transit
# node. Both OUTPUT and INPUT tests send packets. Each test is documented inside
# its own handler.
#
# The topology used for OUTPUT and INPUT tests is made of three nodes:
# - Alpha (the IOAM encapsulating node)
# - Beta (the IOAM transit node)
# - Gamma (the receiver) **
#
# An IOAM domain is configured from Alpha to Beta, but not on the reverse path.
# Alpha adds an IOAM option (Pre-allocated Trace) inside a Hop-by-hop.
#
# ** Gamma is required because ioam6_parser.c uses a packet socket and we need
# to see IOAM data inserted by the very last node (Beta), which would happen
# _after_ we get a copy of the packet on Beta. Note that using an
# IPv6 raw socket with IPV6_RECVHOPOPTS on Beta would not be enough: we also
# need to access the IPv6 header to check some fields (e.g., source and
# destination addresses), which is not possible in that case. As a
# consequence, we need Gamma as a receiver to run ioam6_parser.c which uses a
# packet socket.
#
#
# +-----------------------+ +-----------------------+
# | | | |
# | Alpha netns | | Gamma netns |
# | | | |
# | +-------------------+ | | +-------------------+ |
# | | veth0 | | | | veth0 | |
# | | 2001:db8:1::2/64 | | | | 2001:db8:2::2/64 | |
# | +-------------------+ | | +-------------------+ |
# | . | | . |
# +-----------.-----------+ +-----------.-----------+
# . .
# . .
# . .
# +-----------.----------------------------------.-----------+
# | . . |
# | +-------------------+ +-------------------+ |
# | | veth0 | | veth1 | |
# | | 2001:db8:1::1/64 | ............ | 2001:db8:2::1/64 | |
# | +-------------------+ +-------------------+ |
# | |
# | Beta netns |
# | |
# +----------------------------------------------------------+
#
#
#
# +==========================================================+
# | Alpha - IOAM configuration |
# +=====================+====================================+
# | Node ID | 1 |
# +---------------------+------------------------------------+
# | Node Wide ID | 11111111 |
# +---------------------+------------------------------------+
# | Ingress ID | 0xffff (default value) |
# +---------------------+------------------------------------+
# | Ingress Wide ID | 0xffffffff (default value) |
# +---------------------+------------------------------------+
# | Egress ID | 101 |
# +---------------------+------------------------------------+
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.