From owner-svn-src-all@freebsd.org Fri Aug 28 22:50:23 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 DB3F83C4AE0; Fri, 28 Aug 2020 22:50:23 +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 4BdZYq5X4Gz4Yx0; Fri, 28 Aug 2020 22:50:23 +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 9CF2D1C40A; Fri, 28 Aug 2020 22:50:23 +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 07SMoNPe095765; Fri, 28 Aug 2020 22:50:23 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SMoL7I095754; Fri, 28 Aug 2020 22:50:21 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202008282250.07SMoL7I095754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 28 Aug 2020 22:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364941 - in head/sys: net net/route netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: net net/route netinet netinet6 X-SVN-Commit-Revision: 364941 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.33 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: Fri, 28 Aug 2020 22:50:23 -0000 Author: melifaro Date: Fri Aug 28 22:50:20 2020 New Revision: 364941 URL: https://svnweb.freebsd.org/changeset/base/364941 Log: Move net/route/shared.h definitions to net/route/route_var.h. No functional changes. net/route/shared.h was created in the inital phases of nexthop conversion. It was intended to serve the same purpose as route_var.h - share definitions of functions and structures between the routing subsystem components. At that time route_var.h was included by many files external to the routing subsystem, which largerly defeats its purpose. As currently this is not the case anymore and amount of route_var.h includes is roughly the same as shared.h, retire the latter in favour of the former. Deleted: head/sys/net/route/shared.h Modified: head/sys/net/radix_mpath.c head/sys/net/route.c head/sys/net/route/nhop.c head/sys/net/route/nhop_ctl.c head/sys/net/route/route_ctl.c head/sys/net/route/route_helpers.c head/sys/net/route/route_var.h head/sys/net/rtsock.c head/sys/netinet/in_fib.c head/sys/netinet/in_rmx.c head/sys/netinet6/in6_fib.c head/sys/netinet6/in6_rmx.c Modified: head/sys/net/radix_mpath.c ============================================================================== --- head/sys/net/radix_mpath.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/radix_mpath.c Fri Aug 28 22:50:20 2020 (r364941) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/route.c Fri Aug 28 22:50:20 2020 (r364941) @@ -64,7 +64,6 @@ #include #include #include -#include #include #ifdef RADIX_MPATH Modified: head/sys/net/route/nhop.c ============================================================================== --- head/sys/net/route/nhop.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/route/nhop.c Fri Aug 28 22:50:20 2020 (r364941) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* Modified: head/sys/net/route/nhop_ctl.c ============================================================================== --- head/sys/net/route/nhop_ctl.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/route/nhop_ctl.c Fri Aug 28 22:50:20 2020 (r364941) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* Modified: head/sys/net/route/route_ctl.c ============================================================================== --- head/sys/net/route/route_ctl.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/route/route_ctl.c Fri Aug 28 22:50:20 2020 (r364941) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifdef RADIX_MPATH Modified: head/sys/net/route/route_helpers.c ============================================================================== --- head/sys/net/route/route_helpers.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/route/route_helpers.c Fri Aug 28 22:50:20 2020 (r364941) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #ifdef INET #include #endif Modified: head/sys/net/route/route_var.h ============================================================================== --- head/sys/net/route/route_var.h Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/route/route_var.h Fri Aug 28 22:50:20 2020 (r364941) @@ -39,7 +39,14 @@ #include #include /* struct sockaddr_in */ #include +#include +#ifdef RTDEBUG +#define DPRINTF(_fmt, ...) printf("%s: " _fmt "\n", __func__ , ## __VA_ARGS__) +#else +#define DPRINTF(_fmt, ...) +#endif + struct nh_control; typedef int rnh_preadd_entry_f_t(u_int fibnum, const struct sockaddr *addr, const struct sockaddr *mask, struct nhop_object *nh); @@ -221,6 +228,7 @@ fib_rte_to_nh_flags(int rt_flags) return (res); } +/* route_temporal.c */ void tmproutes_update(struct rib_head *rnh, struct rtentry *rt); void tmproutes_init(struct rib_head *rh); void tmproutes_destroy(struct rib_head *rh); @@ -236,5 +244,33 @@ int change_route_conditional(struct rib_head *rnh, str void vnet_rtzone_init(void); void vnet_rtzone_destroy(void); + +/* subscriptions */ +void rib_init_subscriptions(struct rib_head *rnh); +void rib_destroy_subscriptions(struct rib_head *rnh); + +/* Nexhops */ +void nhops_init(void); +int nhops_init_rib(struct rib_head *rh); +void nhops_destroy_rib(struct rib_head *rh); +void nhop_ref_object(struct nhop_object *nh); +int nhop_try_ref_object(struct nhop_object *nh); +int nhop_ref_any(struct nhop_object *nh); +void nhop_free_any(struct nhop_object *nh); + +void nhop_set_type(struct nhop_object *nh, enum nhop_type nh_type); +void nhop_set_rtflags(struct nhop_object *nh, int rt_flags); + +int nhop_create_from_info(struct rib_head *rnh, struct rt_addrinfo *info, + struct nhop_object **nh_ret); +int nhop_create_from_nhop(struct rib_head *rnh, const struct nhop_object *nh_orig, + struct rt_addrinfo *info, struct nhop_object **pnh_priv); + +void nhops_update_ifmtu(struct rib_head *rh, struct ifnet *ifp, uint32_t mtu); +int nhops_dump_sysctl(struct rib_head *rh, struct sysctl_req *w); + +/* route */ +struct rtentry *rt_unlinkrte(struct rib_head *rnh, struct rt_addrinfo *info, + int *perror); #endif Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/rtsock.c Fri Aug 28 22:50:20 2020 (r364941) @@ -77,7 +77,6 @@ #include #endif #include -#include #ifdef COMPAT_FREEBSD32 #include Modified: head/sys/netinet/in_fib.c ============================================================================== --- head/sys/netinet/in_fib.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/netinet/in_fib.c Fri Aug 28 22:50:20 2020 (r364941) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifdef RADIX_MPATH Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/netinet/in_rmx.c Fri Aug 28 22:50:20 2020 (r364941) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/netinet6/in6_fib.c ============================================================================== --- head/sys/netinet6/in6_fib.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/netinet6/in6_fib.c Fri Aug 28 22:50:20 2020 (r364941) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifdef RADIX_MPATH Modified: head/sys/netinet6/in6_rmx.c ============================================================================== --- head/sys/netinet6/in6_rmx.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/netinet6/in6_rmx.c Fri Aug 28 22:50:20 2020 (r364941) @@ -84,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include