From owner-freebsd-net@freebsd.org Wed Apr 29 22:32:56 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D8662C4DA3 for ; Wed, 29 Apr 2020 22:32:56 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 49CCvW55pbz3QM8 for ; Wed, 29 Apr 2020 22:32:55 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: by mailman.nyi.freebsd.org (Postfix) id AEF082C4D91; Wed, 29 Apr 2020 22:32:55 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AEA742C4D90; Wed, 29 Apr 2020 22:32:55 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward103p.mail.yandex.net (forward103p.mail.yandex.net [77.88.28.106]) (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 49CCvT54C0z3QM5; Wed, 29 Apr 2020 22:32:52 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from mxback18g.mail.yandex.net (mxback18g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:318]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 7164718C08F7; Thu, 30 Apr 2020 01:32:50 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback18g.mail.yandex.net (mxback/Yandex) with ESMTP id XbtWBZugQZ-WnC4KbPj; Thu, 30 Apr 2020 01:32:49 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1588199569; bh=v4vXrRhGJKKr+WefKIKimqef8XJWiFv7Z1MxTpXpTw0=; h=Message-Id:Date:Subject:To:From; b=pxAuddDneGCrtj5UEZuOaQbA+7Wmb80bdQImD+vGQ0KSeGJ7Z6K7wKadgmg97cKug mGAkPHXre0djrBF4TnTQzbZoXti/mvyYZR1TpQFo6Teemn40++8USAgbiROhrRgjwm nk1zIlLpewZCSNpsoy6CbHMw8SkR6aUjUNZyYwnk= Received: by myt6-09be74140f25.qloud-c.yandex.net with HTTP; Thu, 30 Apr 2020 01:32:49 +0300 From: Alexander V. Chernikov To: "current@FreeBSD.org" , net Subject: Next-hop objects and scalable multipath routing project status update MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Wed, 29 Apr 2020 23:32:49 +0100 Message-Id: <182641588198008@mail.yandex.ru> Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Rspamd-Queue-Id: 49CCvT54C0z3QM5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ipfw.ru header.s=mail header.b=pxAuddDn; dmarc=none; spf=pass (mx1.freebsd.org: domain of melifaro@ipfw.ru designates 77.88.28.106 as permitted sender) smtp.mailfrom=melifaro@ipfw.ru X-Spamd-Result: default: False [-6.31 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[ipfw.ru:s=mail]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:77.88.0.0/18]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[ipfw.ru]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; IP_SCORE(-3.71)[ip: (-9.84), ipnet: 77.88.0.0/18(-4.85), asn: 13238(-3.85), country: RU(0.01)]; DKIM_TRACE(0.00)[ipfw.ru:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_LOW(-0.10)[106.28.88.77.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13238, ipnet:77.88.0.0/18, country:RU]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2020 22:32:56 -0000 Hi, I would like to share the current state and the next steps for the nhops/multipath project. To recap: project is about modernising the current routing stack and implementing scalable multipath routing. Most changes are based on introduction of the concept of nexthops. Nexthops, which are separate datastructures, containing all necessary information to perform packet forwarding such as gateway, interface and mtu. They are shared among the routes, providing more pre-computed cache-efficient data while requiring less memory. Interested reader can find more detailed description in https://reviews.freebsd.org/D24141 . Notable progress has been done since the initial announce. Most of the changes required to fully switch to use nexthop objects instead of routing entries has been landed. If everything goes as expected, conversion will be completed in a couple of weeks. After that the focus will switch on the actual multipath implementation. More detailed plan: 1 Nexthop objects [In progress] 1.1 Introduction of nexthop objects [DONE: r359823] 1.2 Conversion of old KPI users to the new one [95% complete] 1.2.1 Conversion of route caching to nexthop caching [DONE: r360292] 1.3 Conversion of struct `rtentry` field access to nhop field access [90% complete] 1.4 Eliminating old lookup KPI and hiding struct rtentry. [50% complete] 2 Multipath [In progress] 2.1 Switch control plane customers to use (rtentry, nhop) pair instead of rtentry to allow multipath changes happen transparently. [10% complete] 2.2 Introduce nexthop group objects 2.3 Add mutipath support for the rib manipulation functions 2.4 Add flowid generation for outbound traffic to enable load balancing -- [No timeline] 3 Rtsock/netlink nhops support 3.1 Implement index lookup for nhops/nhop groups 3.2 Design rtsock messages for nhop/nhgrp operations& prefix binding 3.3 Implement kernel part 3.4 Implement frr or bird support 4 Modular longest-prefix-match lookup algorithm 4.1 Design control plane framework for attaching algos. 4.2 Implement one (IPv6?) lookup algorithm /Alexander