Commit 7c804e91 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'ipv6-ioam'

Justin Iurman says:

====================
Support for the IOAM Pre-allocated Trace with IPv6

v5:
 - Refine types, min/max and default values for new sysctls
 - Introduce a "_wide" sysctl for each "ioam6_id" sysctl
 - Add more validation on headers before processing data
 - RCU for sc <> ns pointers + appropriate accessors
 - Generic Netlink policies are now per op, not per family anymore
 - Address other comments/remarks from Jakub (thanks again)
 - Revert "__packed" to "__attribute__((packed))" for uapi headers
 - Add tests to cover the functionality added, as requested by David Ahern

v4:
 - Address warnings from checkpatch (ignore errors related to unnamed bitfields
   in the first patch)
 - Use of hweight32 (thanks Jakub)
 - Remove inline keyword from static functions in C files and let the compiler
   decide what to do (thanks Jakub)

v3:
 - Fix warning "unused label 'out_unregister_genl'" by adding conditional macro
 - Fix lwtunnel output redirect bug: dst cache useless in this case, use
   orig_output instead

v2:
 - Fix warning with static for __ioam6_fill_trace_data
 - Fix sparse warning with __force when casting __be64 to __be32
 - Fix unchecked dereference when removing IOAM namespaces or schemas
 - exthdrs.c: Don't drop by default (now: ignore) to match the act bits "00"
 - Add control plane support for the inline insertion (lwtunnel)
 - Provide uapi structures
 - Use __net_timestamp if skb->tstamp is empty
 - Add note about the temporary IANA allocation
 - Remove support for "removable" TLVs
 - Remove support for virtual/anonymous tunnel decapsulation

In-situ Operations, Administration, and Maintenance (IOAM) records
operational and telemetry information in a packet while it traverses
a path between two points in an IOAM domain. It is defined in
draft-ietf-ippm-ioam-data [1]. IOAM data fields can be encapsulated
into a variety of protocols. The IPv6 encapsulation is defined in
draft-ietf-ippm-ioam-ipv6-options [2], via extension headers. IOAM
can be used to complement OAM mechanisms based on e.g. ICMP or other
types of probe packets.

This patchset implements support for the Pre-allocated Trace, carried
by a Hop-by-Hop. Therefore, a new IPv6 Hop-by-Hop TLV option is
introduced, see IANA [3]. The three other IOAM options are not included
in this patchset (Incremental Trace, Proof-of-Transit and Edge-to-Edge).
The main idea behind the IOAM Pre-allocated Trace is that a node
pre-allocates some room in packets for IOAM data. Then, each IOAM node
on the path will insert its data. There exist several interesting use-
cases, e.g. Fast failure detection/isolation or Smart service selection.
Another killer use-case is what we have called Cross-Layer Telemetry,
see the demo video on its repository [4], that aims to make the entire
stack (L2/L3 -> L7) visible for distributed tracing tools (e.g. Jaeger),
instead of the current L5 -> L7 limited view. So, basically, this is a
nice feature for the Linux Kernel.

This patchset also provides support for the control plane part, but only for the
inline insertion (host-to-host use case), through lightweight tunnels. Indeed,
for in-transit traffic, the solution is to have an IPv6-in-IPv6 encapsulation,
which brings some difficulties and still requires a little bit of work and
discussion (ie anonymous tunnel decapsulation and multi egress resolution).

- Patch 1: IPv6 IOAM headers definition
- Patch 2: Data plane support for Pre-allocated Trace
- Patch 3: IOAM Generic Netlink API
- Patch 4: Support for IOAM injection with lwtunnels
- Patch 5: Documentation for new IOAM sysctls
- Patch 6: Test for the IOAM insertion with IPv6

  [1] https://tools.ietf.org/html/draft-ietf-ippm-ioam-data
  [2] https://tools.ietf.org/html/draft-ietf-ippm-ioam-ipv6-options
  [3] https://www.iana.org/assignments/ipv6-parameters/ipv6-parameters.xhtml#ipv6-parameters-2
  [4] https://github.com/iurmanj/cross-layer-telemetry


====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 71f4f89a 968691c7
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0

=====================
IOAM6 Sysfs variables
=====================


/proc/sys/net/conf/<iface>/ioam6_* variables:
=============================================

ioam6_enabled - BOOL
        Accept (= enabled) or ignore (= disabled) IPv6 IOAM options on ingress
        for this interface.

        * 0 - disabled (default)
        * 1 - enabled

ioam6_id - SHORT INTEGER
        Define the IOAM id of this interface.

        Default is ~0.

ioam6_id_wide - INTEGER
        Define the wide IOAM id of this interface.

        Default is ~0.
+17 −0
Original line number Diff line number Diff line
@@ -1926,6 +1926,23 @@ fib_notify_on_flag_change - INTEGER
        - 1 - Emit notifications.
        - 2 - Emit notifications only for RTM_F_OFFLOAD_FAILED flag change.

ioam6_id - INTEGER
        Define the IOAM id of this node. Uses only 24 bits out of 32 in total.

        Min: 0
        Max: 0xFFFFFF

        Default: 0xFFFFFF

ioam6_id_wide - LONG INTEGER
        Define the wide IOAM id of this node. Uses only 56 bits out of 64 in
        total. Can be different from ioam6_id.

        Min: 0
        Max: 0xFFFFFFFFFFFFFF

        Default: 0xFFFFFFFFFFFFFF

IPv6 Fragmentation:

ip6frag_high_thresh - INTEGER

include/linux/ioam6.h

0 → 100644
+13 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 *  IPv6 IOAM
 *
 *  Author:
 *  Justin Iurman <justin.iurman@uliege.be>
 */
#ifndef _LINUX_IOAM6_H
#define _LINUX_IOAM6_H

#include <uapi/linux/ioam6.h>

#endif /* _LINUX_IOAM6_H */
+13 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 *  IPv6 IOAM Generic Netlink API
 *
 *  Author:
 *  Justin Iurman <justin.iurman@uliege.be>
 */
#ifndef _LINUX_IOAM6_GENL_H
#define _LINUX_IOAM6_GENL_H

#include <uapi/linux/ioam6_genl.h>

#endif /* _LINUX_IOAM6_GENL_H */
+13 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 *  IPv6 IOAM Lightweight Tunnel API
 *
 *  Author:
 *  Justin Iurman <justin.iurman@uliege.be>
 */
#ifndef _LINUX_IOAM6_IPTUNNEL_H
#define _LINUX_IOAM6_IPTUNNEL_H

#include <uapi/linux/ioam6_iptunnel.h>

#endif /* _LINUX_IOAM6_IPTUNNEL_H */
Loading