mbox series

[net-next,0/2] Support for the ip6ip6 encapsulation of IOAM

Message ID 20210928190328.24097-1-justin.iurman@uliege.be (mailing list archive)
Headers show
Series Support for the ip6ip6 encapsulation of IOAM | expand

Message

Justin Iurman Sept. 28, 2021, 7:03 p.m. UTC
In the current implementation, IOAM can only be inserted directly (i.e., only
inside packets generated locally) by default, to be compliant with RFC8200.

This patch adds support for in-transit packets and provides the ip6ip6
encapsulation of IOAM. Therefore, three explicit encap modes are defined:

 - inline: directly inserts IOAM inside packets.

 - encap:  ip6ip6 encapsulation of IOAM inside packets.

 - auto:   either inline mode for packets generated locally or encap mode for
           in-transit packets.

With current iproute2 implementation, it is configured this way:

$ ip -6 r [...] encap ioam6 trace prealloc type 0x800000 ns 1 size 12 [...]

Now, an encap mode must be specified:

(inline mode)
$ [...] encap ioam6 mode inline trace prealloc [...]

(encap mode)
$ [...] encap ioam6 mode encap tundst fc00::2 trace prealloc [...]

(auto mode)
$ [...] encap ioam6 mode auto tundst fc00::2 trace prealloc [...]

A tunnel destination address must be configured when using the encap mode or the
auto mode.

Justin Iurman (2):
  ipv6: ioam: Add support for the ip6ip6 encapsulation
  selftests: net: Test for the IOAM encapsulation with IPv6

 include/net/ioam6.h                  |   3 +-
 include/uapi/linux/ioam6_iptunnel.h  |  19 +-
 net/ipv6/Kconfig                     |   6 +-
 net/ipv6/exthdrs.c                   |   2 +-
 net/ipv6/ioam6.c                     |  11 +-
 net/ipv6/ioam6_iptunnel.c            | 299 ++++++++++++++++++++-------
 tools/testing/selftests/net/ioam6.sh | 209 ++++++++++++++-----
 7 files changed, 409 insertions(+), 140 deletions(-)

Comments

David Ahern Sept. 30, 2021, 3:20 a.m. UTC | #1
On 9/28/21 1:03 PM, Justin Iurman wrote:
> In the current implementation, IOAM can only be inserted directly (i.e., only
> inside packets generated locally) by default, to be compliant with RFC8200.
> 
> This patch adds support for in-transit packets and provides the ip6ip6
> encapsulation of IOAM. Therefore, three explicit encap modes are defined:
> 
>  - inline: directly inserts IOAM inside packets.
> 
>  - encap:  ip6ip6 encapsulation of IOAM inside packets.
> 
>  - auto:   either inline mode for packets generated locally or encap mode for
>            in-transit packets.
> 
> With current iproute2 implementation, it is configured this way:
> 
> $ ip -6 r [...] encap ioam6 trace prealloc type 0x800000 ns 1 size 12 [...]
> 
> Now, an encap mode must be specified:
> 
> (inline mode)
> $ [...] encap ioam6 mode inline trace prealloc [...]

I take this to mean you want to change the CLI for ioam6? If so, that
does not happen once an iproute2 version has shipped with some previous
command line; it needs to be backwards compatible.

> 
> (encap mode)
> $ [...] encap ioam6 mode encap tundst fc00::2 trace prealloc [...]
> 
> (auto mode)
> $ [...] encap ioam6 mode auto tundst fc00::2 trace prealloc [...]
> 
> A tunnel destination address must be configured when using the encap mode or the
> auto mode.
>
Justin Iurman Sept. 30, 2021, 12:32 p.m. UTC | #2
>> With current iproute2 implementation, it is configured this way:
>> 
>> $ ip -6 r [...] encap ioam6 trace prealloc type 0x800000 ns 1 size 12 [...]
>> 
>> Now, an encap mode must be specified:
>> 
>> (inline mode)
>> $ [...] encap ioam6 mode inline trace prealloc [...]
> 
> I take this to mean you want to change the CLI for ioam6? If so, that
> does not happen once an iproute2 version has shipped with some previous
> command line; it needs to be backwards compatible.

Sure. The inline mode would be the default one when using the old syntax (i.e., without specifying a mode).