svn commit: r368164 - in head/sys: conf net net/route netinet netinet6
Alexander V. Chernikov
melifaro at FreeBSD.org
Sun Nov 29 19:43:35 UTC 2020
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 <net/route/nhop.h>
#include <net/vnet.h>
-#ifdef RADIX_MPATH
-#include <net/radix_mpath.h>
-#endif
-
#include <netinet/in.h>
#include <netinet/ip_mroute.h>
@@ -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 <net/route/nhop_var.h>
#include <netinet/in.h>
-#ifdef RADIX_MPATH
-#include <net/radix_mpath.h>
-#endif
-
#include <vm/uma.h>
/*
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 <sys/param.h>
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 <net/route.h>
#include <net/route/route_ctl.h>
#include <net/route/route_var.h>
-#ifdef RADIX_MPATH
-#include <net/radix_mpath.h>
-#endif
#include <net/vnet.h>
#include <netinet/in.h>
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))
More information about the svn-src-all
mailing list