netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2-next 0/2] Support for IOAM encap modes
@ 2021-10-04 13:06 Justin Iurman
  2021-10-04 13:06 ` [PATCH iproute2-next 1/2] Add support " Justin Iurman
  2021-10-04 13:06 ` [PATCH iproute2-next 2/2] Update documentation Justin Iurman
  0 siblings, 2 replies; 8+ messages in thread
From: Justin Iurman @ 2021-10-04 13:06 UTC (permalink / raw)
  To: netdev; +Cc: davem, dsahern, stephen, justin.iurman

Following the series applied to net-next (see [1]), here are the corresponding
changes to iproute2.

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 (RFC8200 compliant). Therefore, three ioam6 encap modes
are defined:

 - inline: directly inserts IOAM inside packets (by default).

 - 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 [...]

The old syntax does not change (for backwards compatibility) and implicitly uses
the inline mode. With the new syntax, an encap mode can be specified:

(inline mode)
$ ip -6 r [...] encap ioam6 mode inline trace prealloc [...]

(encap mode)
$ ip -6 r [...] encap ioam6 mode encap tundst fc00::2 trace prealloc [...]

(auto mode)
$ ip -6 r [...] 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.

  [1] https://lore.kernel.org/netdev/163335001045.30570.12527451523558030753.git-patchwork-notify@kernel.org/T/#m3b428d4142ee3a414ec803466c211dfdec6e0c09

Justin Iurman (2):
  Add support for IOAM encap modes
  Update documentation

 include/uapi/linux/ioam6_iptunnel.h |  29 ++++++
 ip/iproute_lwtunnel.c               | 142 ++++++++++++++++++++--------
 man/man8/ip-route.8.in              |  39 ++++++--
 3 files changed, 161 insertions(+), 49 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH iproute2-next 0/2] Support for the IOAM insertion frequency
@ 2022-02-05 15:52 Justin Iurman
  2022-02-05 15:52 ` [PATCH iproute2-next 2/2] Update documentation Justin Iurman
  0 siblings, 1 reply; 8+ messages in thread
From: Justin Iurman @ 2022-02-05 15:52 UTC (permalink / raw)
  To: netdev; +Cc: dsahern, stephen, justin.iurman

This patchset requires an update of kernel headers:

diff --git a/include/uapi/linux/ioam6_iptunnel.h b/include/uapi/linux/ioam6_iptunnel.h
index 829ffdfcacca8..38f6a8fdfd343 100644
--- a/include/uapi/linux/ioam6_iptunnel.h
+++ b/include/uapi/linux/ioam6_iptunnel.h
@@ -41,6 +41,15 @@ enum {
 	/* IOAM Trace Header */
 	IOAM6_IPTUNNEL_TRACE,		/* struct ioam6_trace_hdr */
 
+	/* Insertion frequency:
+	 * "k over n" packets (0 < k <= n)
+	 * [0.0001% ... 100%]
+	 */
+#define IOAM6_IPTUNNEL_FREQ_MIN 1
+#define IOAM6_IPTUNNEL_FREQ_MAX 1000000
+	IOAM6_IPTUNNEL_FREQ_K,		/* u32 */
+	IOAM6_IPTUNNEL_FREQ_N,		/* u32 */
+
 	__IOAM6_IPTUNNEL_MAX,
 };

The insertion frequency is represented as "k/n", meaning IOAM will be
added to "k" packets over "n" packets, with 0 < k <= n <= 1000000.
Therefore, it provides the following range of insertion frequencies:
[0.0001% ... 100%].

Default frequency is "1/1" (i.e., applied to all packets) for backward
compatibility.

Previous command:
ip -6 ro ad fc00::1/128 encap ioam6 mode ...
    
New command:
ip -6 ro ad fc00::1/128 encap ioam6 [ freq k/n ] mode ...

Justin Iurman (2):
  Add support for the IOAM insertion frequency
  Update documentation

 ip/iproute_lwtunnel.c  | 69 ++++++++++++++++++++++++++++++++++++++++--
 man/man8/ip-route.8.in | 11 +++++--
 2 files changed, 75 insertions(+), 5 deletions(-)

-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-02-05 15:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-04 13:06 [PATCH iproute2-next 0/2] Support for IOAM encap modes Justin Iurman
2021-10-04 13:06 ` [PATCH iproute2-next 1/2] Add support " Justin Iurman
2021-10-05 14:12   ` David Ahern
2021-10-05 14:45     ` Justin Iurman
2021-10-05 14:49       ` David Ahern
2021-10-05 14:56         ` Justin Iurman
2021-10-04 13:06 ` [PATCH iproute2-next 2/2] Update documentation Justin Iurman
  -- strict thread matches above, loose matches on Subject: below --
2022-02-05 15:52 [PATCH iproute2-next 0/2] Support for the IOAM insertion frequency Justin Iurman
2022-02-05 15:52 ` [PATCH iproute2-next 2/2] Update documentation Justin Iurman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).