From owner-freebsd-net@freebsd.org Fri May 8 21:31:47 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 81C4E2E4DC7 for ; Fri, 8 May 2020 21:31:47 +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 49Jk6q0YDQz3JXf for ; Fri, 8 May 2020 21:31:47 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: by mailman.nyi.freebsd.org (Postfix) id 111642E4DC5; Fri, 8 May 2020 21:31:47 +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 0F7312E4DC3; Fri, 8 May 2020 21:31:47 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) (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 49Jk6n1chHz3JXM; Fri, 8 May 2020 21:31:44 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from mxback23g.mail.yandex.net (mxback23g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:323]) by forward106j.mail.yandex.net (Yandex) with ESMTP id D675211A0355; Sat, 9 May 2020 00:31:41 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback23g.mail.yandex.net (mxback/Yandex) with ESMTP id pvLKJehai4-VfSGh5fr; Sat, 09 May 2020 00:31:41 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1588973501; bh=fU4KKmxUJg0b3jNHeyLKHYjK55BcgDRMnOOU3mlJZt0=; h=Message-Id:Date:Subject:To:From; b=kNvHlrWGwzeCWsOUgcDHBRLiJu8H1CD2culRH+nsyaWQ79iCq7hKzO2aa1u4X149O SdVa+Ku98wVKGbcOCkPuj8iWBqCzLmLWDsUWjInqdIAhiwLk3R4dOuKWrNL9Sb3J+t 2bckgEe2sJjQgBSpMblCg+vXPPvlT8Z6Qwl8rN9k= Received: by iva1-3b1c0a1a240c.qloud-c.yandex.net with HTTP; Sat, 09 May 2020 00:31:41 +0300 From: Alexander V. Chernikov To: "current@FreeBSD.org" , "net@freebsd.org" Subject: Next-hop objects and scalable multipath routing project status update [May 8] MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Fri, 08 May 2020 22:31:41 +0100 Message-Id: <1573911588972910@mail.yandex.ru> Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Rspamd-Queue-Id: 49Jk6n1chHz3JXM X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ipfw.ru header.s=mail header.b=kNvHlrWG; dmarc=none; spf=pass (mx1.freebsd.org: domain of melifaro@ipfw.ru designates 5.45.198.249 as permitted sender) smtp.mailfrom=melifaro@ipfw.ru X-Spamd-Result: default: False [-6.20 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[ipfw.ru:s=mail]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:5.45.192.0/19]; 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)[3]; DKIM_TRACE(0.00)[ipfw.ru:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[249.198.45.5.list.dnswl.org : 127.0.5.0]; TO_DN_EQ_ADDR_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:13238, ipnet:5.45.192.0/18, country:RU]; IP_SCORE(-3.70)[ip: (-9.78), ipnet: 5.45.192.0/18(-4.86), asn: 13238(-3.86), country: RU(0.01)] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.32 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2020 21:31:47 -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 . All changes[*] from the stage1 (nexthop objects introduction) has landed. Currently the focus is on upgrading various route change notification mechanisms to allow transparent multipath introduction. After that the focus will switch on landing the actual multipath implementation. [*] D24776 is pending commit tomorrow. 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 [DONE] 1.2.1 Conversion of route caching to nexthop caching [DONE: r360292] 1.3 Conversion of struct `rtentry` field access to nhop field access [DONE] 1.4 Eliminating old lookup KPI and hiding struct rtentry. [95% complete, rtentry: rS360824, kpi: D24776 (pending), ] 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