mbox series

[iproute2-next,v3,0/3] Provide support for IOAM

Message ID 20210801124552.15728-1-justin.iurman@uliege.be
Headers show
Series Provide support for IOAM | expand

Message

Justin Iurman Aug. 1, 2021, 12:45 p.m. UTC
v3:
 - Use strcmp instead of matches
 - Use genl_init_handle instead of rtnl_open_byproto/genl_resolve_family
 - Refine the output of schemas data
 - distinguish trace options by adding another keyword, in this case "prealloc":
   "encap ioam6 trace **prealloc** type ...." (anticipate future implems)

v2:
 - Use print_{hex,0xhex} instead of print_string when possible (patch #1)


The IOAM patchset was merged recently (see net-next commits [1,2,3,4,5,6]).
Therefore, this patchset provides support for IOAM inside iproute2, as well as
manpage documentation. Here is a summary of added features inside iproute2.

(1) configure IOAM namespaces and schemas:

$ ip ioam
Usage:	ip ioam { COMMAND | help }
	ip ioam namespace show
	ip ioam namespace add ID [ data DATA32 ] [ wide DATA64 ]
	ip ioam namespace del ID
	ip ioam schema show
	ip ioam schema add ID DATA
	ip ioam schema del ID
	ip ioam namespace set ID schema { ID | none }
	
(2) provide a new encap type to insert the IOAM pre-allocated trace:

$ ip -6 ro ad fc00::1/128 encap ioam6 trace prealloc type 0x800000 ns 1 size 12 dev eth0

  [1] db67f219fc9365a0c456666ed7c134d43ab0be8a
  [2] 9ee11f0fff205b4b3df9750bff5e94f97c71b6a0
  [3] 8c6f6fa6772696be0c047a711858084b38763728
  [4] 3edede08ff37c6a9370510508d5eeb54890baf47
  [5] de8e80a54c96d2b75377e0e5319a64d32c88c690
  [6] 968691c777af78d2daa2ee87cfaeeae825255a58

Justin Iurman (3):
  Add, show, link, remove IOAM namespaces and schemas
  New IOAM6 encap type for routes
  IOAM man8

 include/uapi/linux/ioam6.h          | 133 +++++++++++
 include/uapi/linux/ioam6_genl.h     |  52 +++++
 include/uapi/linux/ioam6_iptunnel.h |  20 ++
 include/uapi/linux/lwtunnel.h       |   1 +
 ip/Makefile                         |   2 +-
 ip/ip.c                             |   3 +-
 ip/ip_common.h                      |   1 +
 ip/ipioam6.c                        | 340 ++++++++++++++++++++++++++++
 ip/iproute.c                        |   5 +-
 ip/iproute_lwtunnel.c               | 127 +++++++++++
 man/man8/ip-ioam.8                  |  72 ++++++
 man/man8/ip-route.8.in              |  36 ++-
 man/man8/ip.8                       |   7 +-
 13 files changed, 793 insertions(+), 6 deletions(-)
 create mode 100644 include/uapi/linux/ioam6.h
 create mode 100644 include/uapi/linux/ioam6_genl.h
 create mode 100644 include/uapi/linux/ioam6_iptunnel.h
 create mode 100644 ip/ipioam6.c
 create mode 100644 man/man8/ip-ioam.8

Comments

David Ahern Aug. 2, 2021, 4:37 p.m. UTC | #1
On 8/1/21 6:45 AM, Justin Iurman wrote:
> +/*

> + * ioam6.c "ip ioam"

> + *

> + *	  This program is free software; you can redistribute it and/or

> + *	  modify it under the terms of the GNU General Public License

> + *	  version 2 as published by the Free Software Foundation;

> + *

> + * Author: Justin Iurman <justin.iurman@uliege.be>

> + */


This boiler plate is no longer needed; just add:

// SPDX-License-Identifier: GPL-2.0

as the first line. I can do the replace before applying.
Justin Iurman Aug. 2, 2021, 5:32 p.m. UTC | #2
>> +/*

>> + * ioam6.c "ip ioam"

>> + *

>> + *	  This program is free software; you can redistribute it and/or

>> + *	  modify it under the terms of the GNU General Public License

>> + *	  version 2 as published by the Free Software Foundation;

>> + *

>> + * Author: Justin Iurman <justin.iurman@uliege.be>

>> + */

> 

> This boiler plate is no longer needed; just add:

> 

> // SPDX-License-Identifier: GPL-2.0

> 

> as the first line. I can do the replace before applying.


Thanks for the info. OK, I'll let you replace it then.
David Ahern Aug. 2, 2021, 5:37 p.m. UTC | #3
On 8/1/21 6:45 AM, Justin Iurman wrote:
> v3:

>  - Use strcmp instead of matches

>  - Use genl_init_handle instead of rtnl_open_byproto/genl_resolve_family

>  - Refine the output of schemas data

>  - distinguish trace options by adding another keyword, in this case "prealloc":

>    "encap ioam6 trace **prealloc** type ...." (anticipate future implems)

> 

> v2:

>  - Use print_{hex,0xhex} instead of print_string when possible (patch #1)

> 

> 

> The IOAM patchset was merged recently (see net-next commits [1,2,3,4,5,6]).

> Therefore, this patchset provides support for IOAM inside iproute2, as well as

> manpage documentation. Here is a summary of added features inside iproute2.

> 

> (1) configure IOAM namespaces and schemas:

> 

> $ ip ioam

> Usage:	ip ioam { COMMAND | help }

> 	ip ioam namespace show

> 	ip ioam namespace add ID [ data DATA32 ] [ wide DATA64 ]

> 	ip ioam namespace del ID

> 	ip ioam schema show

> 	ip ioam schema add ID DATA

> 	ip ioam schema del ID

> 	ip ioam namespace set ID schema { ID | none }

> 	

> (2) provide a new encap type to insert the IOAM pre-allocated trace:

> 

> $ ip -6 ro ad fc00::1/128 encap ioam6 trace prealloc type 0x800000 ns 1 size 12 dev eth0

> 

>   [1] db67f219fc9365a0c456666ed7c134d43ab0be8a

>   [2] 9ee11f0fff205b4b3df9750bff5e94f97c71b6a0

>   [3] 8c6f6fa6772696be0c047a711858084b38763728

>   [4] 3edede08ff37c6a9370510508d5eeb54890baf47

>   [5] de8e80a54c96d2b75377e0e5319a64d32c88c690

>   [6] 968691c777af78d2daa2ee87cfaeeae825255a58

> 

> Justin Iurman (3):

>   Add, show, link, remove IOAM namespaces and schemas

>   New IOAM6 encap type for routes

>   IOAM man8

> 

>  include/uapi/linux/ioam6.h          | 133 +++++++++++

>  include/uapi/linux/ioam6_genl.h     |  52 +++++

>  include/uapi/linux/ioam6_iptunnel.h |  20 ++

>  include/uapi/linux/lwtunnel.h       |   1 +

>  ip/Makefile                         |   2 +-

>  ip/ip.c                             |   3 +-

>  ip/ip_common.h                      |   1 +

>  ip/ipioam6.c                        | 340 ++++++++++++++++++++++++++++

>  ip/iproute.c                        |   5 +-

>  ip/iproute_lwtunnel.c               | 127 +++++++++++

>  man/man8/ip-ioam.8                  |  72 ++++++

>  man/man8/ip-route.8.in              |  36 ++-

>  man/man8/ip.8                       |   7 +-

>  13 files changed, 793 insertions(+), 6 deletions(-)

>  create mode 100644 include/uapi/linux/ioam6.h

>  create mode 100644 include/uapi/linux/ioam6_genl.h

>  create mode 100644 include/uapi/linux/ioam6_iptunnel.h

>  create mode 100644 ip/ipioam6.c

>  create mode 100644 man/man8/ip-ioam.8

> 


applied to iproute2-next.