[PATCH libnl 00/11] Add support for MPLS routes and encapsulations

David Ahern dsahern at gmail.com
Tue Jul 25 11:17:17 PDT 2017


Hi Thomas:

Any thoughts on this implementation?

David

On 6/30/17 10:48 AM, David Ahern wrote:
> This patch set adds support for the MPLS address family (LSP and egress)
> and MPLS encapsulations (ingress to LSP).
> 
> Patches 1, 2 and 8 update or import header files from the kernel tree.
> 
> Patch 3 imports mpls_ntop and mpls_pton from iproute2. These are known
> working implementations so no since re-inventing those wheels.
> 
> Patch 4 adds support to addr.c for MPLS labels as an nl_addr.
> 
> Patch 5 adds support for routes in the MPLS address family. MPLS uses
> 2 new address attributes - RTA_NEWDST and RTA_VIA - per nexthop.
> RTA_NEWDST is the label stack to be applied on a forward and RTA_VIA
> is the nexthop for the packet (e.g., an IPv4 or IPv6 address).
> 
> Patch 6 adds support for TTL propagation attribute per route. This
> attribute sets whether the TTL is propagated on tunnel egress.
> 
> Patch 7 adds support for MPLS labels to the commands under src. The
> 'as' keyword is added as a nexthop option where the value is one or
> more labels (NEWDST to attribute). The via keyword is updated to use
> RTA_VIA if the route is added or deleted to the MPLS family.
> 
> Patch 9 adds support for lwtunnel encapsulation as a generic framework
> with Patch 10 adding MPLS encapsulation support.
> 
> Patch 11 adds support for MPLS encap to the commands under src
> 
> David Ahern (11):
>   Update rtnetlink.h from kernel tree
>   Import mpls header from kernel tree
>   addr: Add implementations for mpls_ntop and mpls_pton
>   addr: Add support for AF_MPLS
>   route: Add support for MPLS address family
>   route: Add support for ttl propagation in MPLS routes
>   Add support for label stack in nl-route commands
>   Import lwtunnel encap files from kernel
>   route: Add support for lwtunnel encapsulations
>   route: Add support for MPLS encap
>   Add support for mpls encap to libnl commands
> 
>  Makefile.am                                   |   5 +-
>  include/linux-private/linux/lwtunnel.h        |  69 ++++++++++
>  include/linux-private/linux/mpls.h            |  76 +++++++++++
>  include/linux-private/linux/mpls_iptunnel.h   |  30 +++++
>  include/linux-private/linux/rtnetlink.h       |  18 ++-
>  include/netlink-private/route/nexthop-encap.h |  35 +++++
>  include/netlink-private/types.h               |  11 ++
>  include/netlink/route/mpls.h                  |  15 +++
>  include/netlink/route/nexthop.h               |  12 ++
>  include/netlink/route/route.h                 |   2 +
>  lib/addr.c                                    |  56 ++++++--
>  lib/mpls.c                                    | 108 +++++++++++++++
>  lib/route/nexthop.c                           | 130 ++++++++++++++++++
>  lib/route/nexthop_encap.c                     |  99 ++++++++++++++
>  lib/route/nh_encap_mpls.c                     | 134 +++++++++++++++++++
>  lib/route/route.c                             |   1 +
>  lib/route/route_obj.c                         | 181 ++++++++++++++++++++++++--
>  libnl-route-3.sym                             |   6 +
>  src/lib/route.c                               |  26 +++-
>  19 files changed, 985 insertions(+), 29 deletions(-)
>  create mode 100644 include/linux-private/linux/lwtunnel.h
>  create mode 100644 include/linux-private/linux/mpls.h
>  create mode 100644 include/linux-private/linux/mpls_iptunnel.h
>  create mode 100644 include/netlink-private/route/nexthop-encap.h
>  create mode 100644 include/netlink/route/mpls.h
>  create mode 100644 lib/mpls.c
>  create mode 100644 lib/route/nexthop_encap.c
>  create mode 100644 lib/route/nh_encap_mpls.c
> 



More information about the libnl mailing list