From nobody Sun Dec 05 22:19:51 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 309E618D039B for ; Sun, 5 Dec 2021 22:20:03 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward501o.mail.yandex.net (forward501o.mail.yandex.net [37.140.190.203]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4J6gwf72L7z3mmH; Sun, 5 Dec 2021 22:20:02 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from vla1-03e570378591.qloud-c.yandex.net (vla1-03e570378591.qloud-c.yandex.net [IPv6:2a02:6b8:c0d:b8c:0:640:3e5:7037]) by forward501o.mail.yandex.net (Yandex) with ESMTP id 1852C45C4342; Mon, 6 Dec 2021 01:19:54 +0300 (MSK) Received: from vla1-ef285479e348.qloud-c.yandex.net (vla1-ef285479e348.qloud-c.yandex.net [2a02:6b8:c0d:35a1:0:640:ef28:5479]) by vla1-03e570378591.qloud-c.yandex.net (mxback/Yandex) with ESMTP id UqZ9kO1sLd-JraGaXKb; Mon, 06 Dec 2021 01:19:54 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1638742794; bh=b4EhbIRI2JaH+SpHLyXAJCjwJd+1jjUokTJznGP/zQw=; h=Subject:Cc:From:To:Message-Id:In-Reply-To:References:Date; b=ZcGoHzkqV7KunKfNzY60AM24rxm2AsyFa69rE9saPVgMZT3aQMHZ+8RQypayBnrvP L6HMlHplx+HJ6XmiugOTSp7Wdb6w0iwP6F1osYyWrMBV2taSIOx7O6xVzTxFwgSJsD YgoeMwq9NhqIRZwGUOoLNtXCFRmHZRVrgour36q8= Received: by vla1-ef285479e348.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id Ev2Wk6YeJL-JrQODhXc; Mon, 06 Dec 2021 01:19:53 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Fwd: 2 Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: Porting OpenBSD MPLS to FreeBSD From: "Alexander V. Chernikov" In-Reply-To: Date: Sun, 5 Dec 2021 22:19:51 +0000 Cc: freebsd-net@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <4C782604-F80D-4FCA-B41A-EEAC40FB6362@ipfw.ru> References: <7de5f4bf0fdec027b5ae5d844a7cb0f5@FreeBSD.org> <3A76E553-BB42-4C38-A589-872BBB64301F@ipfw.ru> To: Neel Chauhan X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4J6gwf72L7z3mmH X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N > On 5 Dec 2021, at 03:49, Neel Chauhan wrote: >=20 > Hi Alexander, >=20 > 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. >=20 > 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. >=20 > I wasn't too keen on using netgraph anyways, I felt it was unnecessary = complexity. >=20 > If I were to work on this, would I be better off starting with the = dataplane or control plane? I=E2=80=99d start with dataplane first - it=E2=80=99ll allow to get = something simple actually working and establish the basic = datastructures. With these in place it=E2=80=99ll be easier to do = iterate w/ control plane implementation.=20 >=20 >>> * Would some of the other committers here be willing to mentor/help = me if needed? >> I=E2=80=99d 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. >=20 > Thanks! >=20 > -Neel (nc@)