Skip to content

Commit

Permalink
ipv6: ioam: Add support for the ip6ip6 encapsulation
Browse files Browse the repository at this point in the history
This patch adds support for the ip6ip6 encapsulation by providing three encap
modes: inline, encap and auto.

Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Justin Iurman authored and David S. Miller committed Oct 4, 2021
1 parent 7b34e44 commit 8cb3bf8
Show file tree
Hide file tree
Showing 3 changed files with 242 additions and 54 deletions.
29 changes: 29 additions & 0 deletions include/uapi/linux/ioam6_iptunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,38 @@
#ifndef _UAPI_LINUX_IOAM6_IPTUNNEL_H
#define _UAPI_LINUX_IOAM6_IPTUNNEL_H

/* Encap modes:
* - inline: direct insertion
* - encap: ip6ip6 encapsulation
* - auto: inline for local packets, encap for in-transit packets
*/
enum {
__IOAM6_IPTUNNEL_MODE_MIN,

IOAM6_IPTUNNEL_MODE_INLINE,
IOAM6_IPTUNNEL_MODE_ENCAP,
IOAM6_IPTUNNEL_MODE_AUTO,

__IOAM6_IPTUNNEL_MODE_MAX,
};

#define IOAM6_IPTUNNEL_MODE_MIN (__IOAM6_IPTUNNEL_MODE_MIN + 1)
#define IOAM6_IPTUNNEL_MODE_MAX (__IOAM6_IPTUNNEL_MODE_MAX - 1)

enum {
IOAM6_IPTUNNEL_UNSPEC,

/* Encap mode */
IOAM6_IPTUNNEL_MODE, /* u8 */

/* Tunnel dst address.
* For encap,auto modes.
*/
IOAM6_IPTUNNEL_DST, /* struct in6_addr */

/* IOAM Trace Header */
IOAM6_IPTUNNEL_TRACE, /* struct ioam6_trace_hdr */

__IOAM6_IPTUNNEL_MAX,
};

Expand Down
6 changes: 3 additions & 3 deletions net/ipv6/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,10 @@ config IPV6_IOAM6_LWTUNNEL
bool "IPv6: IOAM Pre-allocated Trace insertion support"
depends on IPV6
select LWTUNNEL
select DST_CACHE
help
Support for the inline insertion of IOAM Pre-allocated
Trace Header (only on locally generated packets), using
the lightweight tunnels mechanism.
Support for the insertion of IOAM Pre-allocated Trace
Header using the lightweight tunnels mechanism.

If unsure, say N.

Expand Down
Loading

0 comments on commit 8cb3bf8

Please sign in to comment.