From nobody Sun Dec 05 03:49:26 2021 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1C5431897E33 for ; Sun, 5 Dec 2021 03:49:37 +0000 (UTC) (envelope-from nc@FreeBSD.org) Received: from locks.neelc.org (rainy.neelc.org [192.184.90.213]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4J6CHP0120z3P53 for ; Sun, 5 Dec 2021 03:49:37 +0000 (UTC) (envelope-from nc@FreeBSD.org) Received: from mail.neelc.org (rainy.neelc.org [IPv6:2604:180:f2::ec]) by locks.neelc.org (Postfix) with ESMTPSA id BF5A31D7184; Sat, 4 Dec 2021 19:49:28 -0800 (PST) List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 Date: Sat, 04 Dec 2021 19:49:26 -0800 From: Neel Chauhan To: "Alexander V. Chernikov" Cc: freebsd-net@freebsd.org Subject: Re: Porting OpenBSD MPLS to FreeBSD In-Reply-To: <3A76E553-BB42-4C38-A589-872BBB64301F@ipfw.ru> References: <7de5f4bf0fdec027b5ae5d844a7cb0f5@FreeBSD.org> <3A76E553-BB42-4C38-A589-872BBB64301F@ipfw.ru> User-Agent: Roundcube Webmail/1.4.12 Message-ID: X-Sender: nc@FreeBSD.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4J6CHP0120z3P53 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi Alexander, On 2021-12-04 10:42, Alexander V. Chernikov wrote: >> * 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. Thanks for your description. I haven't started work yet, but I'd probably import the dataplane from OpenBSD where I can and do a new control plane, maybe that with a FRR/Bird-compatible API. I wasn't too keen on using netgraph anyways, I felt it was unnecessary complexity. If I were to work on this, would I be better off starting with the dataplane or control plane? >> * 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. Thanks! -Neel (nc@)