Add support for the IOAM inline insertion (only for the host-to-host use case) which is per-route configured with lightweight tunnels. The target is iproute2 and the patch is ready. It will be posted as soon as this patchset is merged. Here is an overview: $ ip -6 ro ad fc00::1/128 encap ioam6 trace type 0x800000 ns 1 size 12 dev eth0 This example configures an IOAM Pre-allocated Trace option attached to the fc00::1/128 prefix. The IOAM namespace (ns) is 1, the size of the pre-allocated trace data block is 12 octets (size) and only the first IOAM data (bit 0: hop_limit + node id) is included in the trace (type) represented as a bitfield. The reason why the in-transit (IPv6-in-IPv6 encapsulation) use case is not implemented is explained on the patchset cover.
Showing the changes to include/uapi (3 of 10 files). Show all
Unified · Split
| @@ -126,6 +126,7 @@ struct ioam6_trace_hdr { · 125 unmodified lines | ||
| 126 | 126 | #error "Please fix <asm/byteorder.h>" |
| 127 | 127 | #endif |
| 128 | 128 | |
| 129 | +#define IOAM6_TRACE_DATA_SIZE_MAX 244 | |
| 129 | 130 | __u8 data[0]; |
| 130 | 131 | } __attribute__((packed)); |
| 131 | 132 | |
| @@ -0,0 +1,20 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | |
| 2 | +/* | |
| 3 | + * IPv6 IOAM Lightweight Tunnel API | |
| 4 | + * | |
| 5 | + * Author: | |
| 6 | + * Justin Iurman <justin.iurman@uliege.be> | |
| 7 | + */ | |
| 8 | + | |
| 9 | +#ifndef _UAPI_LINUX_IOAM6_IPTUNNEL_H | |
| 10 | +#define _UAPI_LINUX_IOAM6_IPTUNNEL_H | |
| 11 | + | |
| 12 | +enum { | |
| 13 | + IOAM6_IPTUNNEL_UNSPEC, | |
| 14 | + IOAM6_IPTUNNEL_TRACE, /* struct ioam6_trace_hdr */ | |
| 15 | + __IOAM6_IPTUNNEL_MAX, | |
| 16 | +}; | |
| 17 | + | |
| 18 | +#define IOAM6_IPTUNNEL_MAX (__IOAM6_IPTUNNEL_MAX - 1) | |
| 19 | + | |
| 20 | +#endif /* _UAPI_LINUX_IOAM6_IPTUNNEL_H */ | |
| @@ -14,6 +14,7 @@ enum lwtunnel_encap_types { · 13 unmodified lines | ||
| 14 | 14 | LWTUNNEL_ENCAP_BPF, |
| 15 | 15 | LWTUNNEL_ENCAP_SEG6_LOCAL, |
| 16 | 16 | LWTUNNEL_ENCAP_RPL, |
| 17 | + LWTUNNEL_ENCAP_IOAM6, | |
| 17 | 18 | __LWTUNNEL_ENCAP_MAX, |
| 18 | 19 | }; |
| 19 | 20 | |