Skip to content

Commit 8cb3bf8

Browse files
IurmanJdavem330
authored andcommitted
ipv6: ioam: Add support for the ip6ip6 encapsulation
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>
1 parent 7b34e44 commit 8cb3bf8

File tree

3 files changed

+242
-54
lines changed

3 files changed

+242
-54
lines changed

include/uapi/linux/ioam6_iptunnel.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,38 @@
99
#ifndef _UAPI_LINUX_IOAM6_IPTUNNEL_H
1010
#define _UAPI_LINUX_IOAM6_IPTUNNEL_H
1111

12+
/* Encap modes:
13+
* - inline: direct insertion
14+
* - encap: ip6ip6 encapsulation
15+
* - auto: inline for local packets, encap for in-transit packets
16+
*/
17+
enum {
18+
__IOAM6_IPTUNNEL_MODE_MIN,
19+
20+
IOAM6_IPTUNNEL_MODE_INLINE,
21+
IOAM6_IPTUNNEL_MODE_ENCAP,
22+
IOAM6_IPTUNNEL_MODE_AUTO,
23+
24+
__IOAM6_IPTUNNEL_MODE_MAX,
25+
};
26+
27+
#define IOAM6_IPTUNNEL_MODE_MIN (__IOAM6_IPTUNNEL_MODE_MIN + 1)
28+
#define IOAM6_IPTUNNEL_MODE_MAX (__IOAM6_IPTUNNEL_MODE_MAX - 1)
29+
1230
enum {
1331
IOAM6_IPTUNNEL_UNSPEC,
32+
33+
/* Encap mode */
34+
IOAM6_IPTUNNEL_MODE, /* u8 */
35+
36+
/* Tunnel dst address.
37+
* For encap,auto modes.
38+
*/
39+
IOAM6_IPTUNNEL_DST, /* struct in6_addr */
40+
41+
/* IOAM Trace Header */
1442
IOAM6_IPTUNNEL_TRACE, /* struct ioam6_trace_hdr */
43+
1544
__IOAM6_IPTUNNEL_MAX,
1645
};
1746

net/ipv6/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,10 @@ config IPV6_IOAM6_LWTUNNEL
332332
bool "IPv6: IOAM Pre-allocated Trace insertion support"
333333
depends on IPV6
334334
select LWTUNNEL
335+
select DST_CACHE
335336
help
336-
Support for the inline insertion of IOAM Pre-allocated
337-
Trace Header (only on locally generated packets), using
338-
the lightweight tunnels mechanism.
337+
Support for the insertion of IOAM Pre-allocated Trace
338+
Header using the lightweight tunnels mechanism.
339339

340340
If unsure, say N.
341341

0 commit comments

Comments
 (0)