History

ipv6: ioam: Data plane support for Pre-allocated Trace

Implement support for processing the IOAM Pre-allocated Trace with IPv6, see [1] and [2]. Introduce a new IPv6 Hop-by-Hop TLV option, see IANA [3]. A new per-interface sysctl is introduced. The value is a boolean to accept (=1) or ignore (=0, by default) IPv6 IOAM options on ingress for an interface: - net.ipv6.conf.XXX.ioam6_enabled Two other sysctls are introduced to define IOAM IDs, represented by an integer. They are respectively per-namespace and per-interface: - net.ipv6.ioam6_id - net.ipv6.conf.XXX.ioam6_id The value of the first one represents the IOAM ID of the node itself (u32; max and default value = U32_MAX>>8, due to hop limit concatenation) while the other represents the IOAM ID of an interface (u16; max and default value = U16_MAX). Each "ioam6_id" sysctl has a "_wide" equivalent: - net.ipv6.ioam6_id_wide - net.ipv6.conf.XXX.ioam6_id_wide The value of the first one represents the wide IOAM ID of the node itself (u64; max and default value = U64_MAX>>8, due to hop limit concatenation) while the other represents the wide IOAM ID of an interface (u32; max and default value = U32_MAX). The use of short and wide equivalents is not exclusive, a deployment could choose to leverage both. For example, net.ipv6.conf.XXX.ioam6_id (short format) could be an identifier for a physical interface, whereas net.ipv6.conf.XXX.ioam6_id_wide (wide format) could be an identifier for a logical sub-interface. Documentation about new sysctls is provided at the end of this patchset. Two relativistic hash tables are used: one for IOAM namespaces, the other for IOAM schemas. A namespace can only have a single active schema and a schema can only be attached to a single namespace (1:1 relationship). [1] https://tools.ietf.org/html/draft-ietf-ippm-ioam-ipv6-options [2] https://tools.ietf.org/html/draft-ietf-ippm-ioam-data [3] https://www.iana.org/assignments/ipv6-parameters/ipv6-parameters.xhtml#ipv6-parameters-2

Justin Iurman committed 5 years ago

Commit 9ee11f01 parent db67f2113 files · +557 −1Browse files

Showing the changes to include/uapi (3 of 13 files). Show all

Unified · Split

3 files
  1. include/uapi/linux/in6.h +1 −0
  2. include/uapi/linux/ioam6.h +9 −0
  3. include/uapi/linux/ipv6.h +3 −0
include/uapi/linux/in6.h+1−0
@@ -145,6 +145,7 @@ struct in6_flowlabel_req { · 144 unmodified lines
145#define IPV6_TLV_PADN 1145#define IPV6_TLV_PADN 1
146#define IPV6_TLV_ROUTERALERT 5146#define IPV6_TLV_ROUTERALERT 5
147#define IPV6_TLV_CALIPSO 7 /* RFC 5570 */147#define IPV6_TLV_CALIPSO 7 /* RFC 5570 */
148#define IPV6_TLV_IOAM 49 /* TEMPORARY IANA allocation for IOAM */
148#define IPV6_TLV_JUMBO 194149#define IPV6_TLV_JUMBO 194
149#define IPV6_TLV_HAO 201 /* home address option */150#define IPV6_TLV_HAO 201 /* home address option */
150 151
include/uapi/linux/ioam6.h+9−0
@@ -12,6 +12,15 @@ · 11 unmodified lines
12#include <asm/byteorder.h>12#include <asm/byteorder.h>
13#include <linux/types.h>13#include <linux/types.h>
14 14
15#define IOAM6_U16_UNAVAILABLE U16_MAX
16#define IOAM6_U32_UNAVAILABLE U32_MAX
17#define IOAM6_U64_UNAVAILABLE U64_MAX
18
19#define IOAM6_DEFAULT_ID (IOAM6_U32_UNAVAILABLE >> 8)
20#define IOAM6_DEFAULT_ID_WIDE (IOAM6_U64_UNAVAILABLE >> 8)
21#define IOAM6_DEFAULT_IF_ID IOAM6_U16_UNAVAILABLE
22#define IOAM6_DEFAULT_IF_ID_WIDE IOAM6_U32_UNAVAILABLE
23
15/*24/*
16 * IPv6 IOAM Option Header25 * IPv6 IOAM Option Header
17 */26 */
include/uapi/linux/ipv6.h+3−0
@@ -190,6 +190,9 @@ enum { · 189 unmodified lines
190 DEVCONF_NDISC_TCLASS,190 DEVCONF_NDISC_TCLASS,
191 DEVCONF_RPL_SEG_ENABLED,191 DEVCONF_RPL_SEG_ENABLED,
192 DEVCONF_RA_DEFRTR_METRIC,192 DEVCONF_RA_DEFRTR_METRIC,
193 DEVCONF_IOAM6_ENABLED,
194 DEVCONF_IOAM6_ID,
195 DEVCONF_IOAM6_ID_WIDE,
193 DEVCONF_MAX196 DEVCONF_MAX
194};197};
195 198