From owner-svn-src-all@freebsd.org Sun Nov 29 19:43:35 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 CE7154AB778; Sun, 29 Nov 2020 19:43:35 +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 4Ckf1M5Qtvz3LGy; Sun, 29 Nov 2020 19:43:35 +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 AD3221701E; Sun, 29 Nov 2020 19:43:35 +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 0ATJhZXS086930; Sun, 29 Nov 2020 19:43:35 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0ATJhYWu086923; Sun, 29 Nov 2020 19:43:34 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202011291943.0ATJhYWu086923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 29 Nov 2020 19:43:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368164 - in head/sys: conf net net/route netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: conf net net/route netinet netinet6 X-SVN-Commit-Revision: 368164 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, 29 Nov 2020 19:43:35 -0000 Author: melifaro Date: Sun Nov 29 19:43:33 2020 New Revision: 368164 URL: https://svnweb.freebsd.org/changeset/base/368164 Log: Remove RADIX_MPATH config option. ROUTE_MPATH is the new config option controlling new multipath routing implementation. Remove the last pieces of RADIX_MPATH-related code and the config option. Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D27244 Deleted: head/sys/net/radix_mpath.c head/sys/net/radix_mpath.h Modified: head/sys/conf/options head/sys/net/route.c head/sys/net/route/route_ctl.c head/sys/net/route/route_ifaddrs.c head/sys/net/rtsock.c head/sys/netinet/ip_input.c head/sys/netinet6/nd6.c Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sun Nov 29 19:38:03 2020 (r368163) +++ head/sys/conf/options Sun Nov 29 19:43:33 2020 (r368164) @@ -452,7 +452,6 @@ MROUTING opt_mrouting.h NFSLOCKD PCBGROUP opt_pcbgroup.h PF_DEFAULT_TO_DROP opt_pf.h -RADIX_MPATH opt_mpath.h ROUTE_MPATH opt_route.h ROUTETABLES opt_route.h RSS opt_rss.h Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Sun Nov 29 19:38:03 2020 (r368163) +++ head/sys/net/route.c Sun Nov 29 19:43:33 2020 (r368164) @@ -65,10 +65,6 @@ #include #include -#ifdef RADIX_MPATH -#include -#endif - #include #include @@ -674,87 +670,6 @@ rt_print(char *buf, int buflen, struct rtentry *rt) } return (i); -} -#endif - -#ifdef RADIX_MPATH -/* - * Deletes key for single-path routes, unlinks rtentry with - * gateway specified in @info from multi-path routes. - * - * Returnes unlinked entry. In case of failure, returns NULL - * and sets @perror to ESRCH. - */ -struct radix_node * -rt_mpath_unlink(struct rib_head *rnh, struct rt_addrinfo *info, - struct rtentry *rto, int *perror) -{ - /* - * if we got multipath routes, we require users to specify - * a matching RTAX_GATEWAY. - */ - struct rtentry *rt; // *rto = NULL; - struct radix_node *rn; - struct sockaddr *gw; - - gw = info->rti_info[RTAX_GATEWAY]; - rt = rt_mpath_matchgate(rto, gw); - if (rt == NULL) { - *perror = ESRCH; - return (NULL); - } - - /* - * this is the first entry in the chain - */ - if (rto == rt) { - rn = rn_mpath_next((struct radix_node *)rt); - /* - * there is another entry, now it's active - */ - if (rn) { - rto = RNTORT(rn); - rto->rte_flags |= RTF_UP; - } else if (rt->rte_flags & RTF_GATEWAY) { - /* - * For gateway routes, we need to - * make sure that we we are deleting - * the correct gateway. - * rt_mpath_matchgate() does not - * check the case when there is only - * one route in the chain. - */ - if (gw && - (rt->rt_nhop->gw_sa.sa_len != gw->sa_len || - memcmp(&rt->rt_nhop->gw_sa, gw, gw->sa_len))) { - *perror = ESRCH; - return (NULL); - } - } - - /* - * use the normal delete code to remove - * the first entry - */ - rn = rnh->rnh_deladdr(info->rti_info[RTAX_DST], - info->rti_info[RTAX_NETMASK], - &rnh->head); - if (rn != NULL) { - *perror = 0; - } else { - *perror = ESRCH; - } - return (rn); - } - - /* - * if the entry is 2nd and on up - */ - if (rt_mpath_deldup(rto, rt) == 0) - panic ("rtrequest1: rt_mpath_deldup"); - *perror = 0; - rn = (struct radix_node *)rt; - return (rn); } #endif Modified: head/sys/net/route/route_ctl.c ============================================================================== --- head/sys/net/route/route_ctl.c Sun Nov 29 19:38:03 2020 (r368163) +++ head/sys/net/route/route_ctl.c Sun Nov 29 19:43:33 2020 (r368164) @@ -54,10 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef RADIX_MPATH -#include -#endif - #include /* Modified: head/sys/net/route/route_ifaddrs.c ============================================================================== --- head/sys/net/route/route_ifaddrs.c Sun Nov 29 19:38:03 2020 (r368163) +++ head/sys/net/route/route_ifaddrs.c Sun Nov 29 19:43:33 2020 (r368164) @@ -32,7 +32,6 @@ * $FreeBSD$ */ -#include "opt_mpath.h" #include "opt_route.h" #include Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Sun Nov 29 19:38:03 2020 (r368163) +++ head/sys/net/rtsock.c Sun Nov 29 19:43:33 2020 (r368164) @@ -64,9 +64,6 @@ #include #include #include -#ifdef RADIX_MPATH -#include -#endif #include #include Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Sun Nov 29 19:38:03 2020 (r368163) +++ head/sys/netinet/ip_input.c Sun Nov 29 19:43:33 2020 (r368164) @@ -981,11 +981,7 @@ ip_forward(struct mbuf *m, int srcrt) sin->sin_family = AF_INET; sin->sin_len = sizeof(*sin); sin->sin_addr = ip->ip_dst; -#ifdef RADIX_MPATH - flowid = ntohl(ip->ip_src.s_addr ^ ip->ip_dst.s_addr); -#else flowid = m->m_pkthdr.flowid; -#endif ro.ro_nh = fib4_lookup(M_GETFIB(m), ip->ip_dst, 0, NHR_REF, flowid); if (ro.ro_nh != NULL) { ia = ifatoia(ro.ro_nh->nh_ifa); Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sun Nov 29 19:38:03 2020 (r368163) +++ head/sys/netinet6/nd6.c Sun Nov 29 19:43:33 2020 (r368164) @@ -1316,11 +1316,7 @@ restart: * This is the case where multiple interfaces * have the same prefix, but only one is installed * into the routing table and that prefix entry - * is not the one being examined here. In the case - * where RADIX_MPATH is enabled, multiple route - * entries (of the same rt_key value) will be - * installed because the interface addresses all - * differ. + * is not the one being examined here. */ if (!IN6_ARE_ADDR_EQUAL(&pr->ndpr_prefix.sin6_addr, &rt_key.sin6_addr))