Re: Porting OpenBSD MPLS to FreeBSD

From: Alexander V. Chernikov <melifaro_at_ipfw.ru>
Date: Sat, 04 Dec 2021 18:42:56 UTC

> On 19 Nov 2021, at 19:17, Neel Chauhan <nc@FreeBSD.org> wrote:
> 
> Hi freebsd-net@,
> 
> Long time no see. I've gotten a (Ports) commit bit since then.
> 
> I haven't been very active in TCP/IP hacking as of late, as more recently I've been more focused on GNOME packages and some GPU drivers.
> 
> Going back, I'm thinking about porting OpenBSD's MPLS to FreeBSD.
> 
> I have a two questions:
> 
> * Is porting OpenBSD MPLS to FreeBSD feasible, or are we better off doing a from-scratch implementation based on netgraph?
It depends. MPLS implementaiton can be splitted into multiple logical parts - dataplane (input, control, output, forward) and control plane (programming ip routes+mpls and mpls-only fowarding state). Some parts of the former can indeed be imported from OpenBSD. However, most of the control plane part have to be written from scratch. Finally, it may be desired to maintain an programming interface close to the one already implemented in major routing SW (frr, bird) - I guess that would be simpler to achieve with native, non-netgraph implementation.
> 
> * Would some of the other committers here be willing to mentor/help me if needed?
I’d love to. Most of my the routing-related stack changes (modular lookup framework, nexthops, rtsock cleanups) were done to enable efficient kernel-based MPLS implementation.
> 
> Unlike my old IPFW patches which got nowhere (plus I no longer use IPFW), I feel this is more something that could be useful when running FreeBSD as a router, but hasn't really been done.
> 
> -Neel (nc@)
>