From owner-svn-src-all@freebsd.org Sun Nov 8 18:27:50 2020 Return-Path: Delivered-To: svn-src-all@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 EE2BE2D1F8A; Sun, 8 Nov 2020 18:27:50 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CTjKf6T9vz4jQp; Sun, 8 Nov 2020 18:27:50 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CCA9B240D2; Sun, 8 Nov 2020 18:27:50 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A8IRopB055225; Sun, 8 Nov 2020 18:27:50 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A8IRoo6055223; Sun, 8 Nov 2020 18:27:50 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202011081827.0A8IRoo6055223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 8 Nov 2020 18:27:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367491 - in head: . sys/net/route X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head: . sys/net/route X-SVN-Commit-Revision: 367491 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2020 18:27:51 -0000 Author: melifaro Date: Sun Nov 8 18:27:49 2020 New Revision: 367491 URL: https://svnweb.freebsd.org/changeset/base/367491 Log: Switch net.add_addr_allfibs default to 0. The goal of the fib support is to provide multiple independent routing tables, isolated from each other. net.add_addr_allfibs default tries to shift gears in the opposite direction, unconditionally inserting all addresses to all of the fibs. There are use cases when this is necessary, however this is not a default expected behaviour, especially compared to other implementations. Provide WARNING message for the setups with multiple fibs to notify potential users of the feature. Differential Revision: https://reviews.freebsd.org/D26076 Modified: head/UPDATING head/sys/net/route/route_ifaddrs.c head/sys/net/route/route_tables.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Nov 8 18:11:12 2020 (r367490) +++ head/UPDATING Sun Nov 8 18:27:49 2020 (r367491) @@ -26,6 +26,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20201108: + Default value of net.add_addr_allfibs has been changed to 0. + If you have multi-fib configuration and rely on existence of all + interface routes in every fib, you need to set the above sysctl to 1. 20201030: The internal pre-processor in the calendar(1) program has been extended to support more C pre-processor commands (e.g. #ifdef, #else, Modified: head/sys/net/route/route_ifaddrs.c ============================================================================== --- head/sys/net/route/route_ifaddrs.c Sun Nov 8 18:11:12 2020 (r367490) +++ head/sys/net/route/route_ifaddrs.c Sun Nov 8 18:27:49 2020 (r367491) @@ -61,7 +61,7 @@ * By default, interface address routes are added to the fib of the interface. * Once set to non-zero, adds interface address route to all fibs. */ -VNET_DEFINE(u_int, rt_add_addr_allfibs) = 1; +VNET_DEFINE(u_int, rt_add_addr_allfibs) = 0; SYSCTL_UINT(_net, OID_AUTO, add_addr_allfibs, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(rt_add_addr_allfibs), 0, ""); Modified: head/sys/net/route/route_tables.c ============================================================================== --- head/sys/net/route/route_tables.c Sun Nov 8 18:11:12 2020 (r367490) +++ head/sys/net/route/route_tables.c Sun Nov 8 18:27:49 2020 (r367491) @@ -183,6 +183,11 @@ grow_rtables(uint32_t num_tables) new_rt_tables = mallocarray(num_tables * (AF_MAX + 1), sizeof(void *), M_RTABLE, M_WAITOK | M_ZERO); + if ((num_tables > 1) && (V_rt_add_addr_allfibs == 0)) + printf("WARNING: Adding ifaddrs to all fibs has been turned off " + "by default. Consider tuning %s if needed\n", + "net.add_addr_allfibs"); + /* * Current rt_tables layout: * fib0[af0, af1, af2, .., AF_MAX]fib1[af0, af1, af2, .., Af_MAX]..