svn commit: r360430 - in head/sys: net netinet netinet6

Alexander V. Chernikov melifaro at FreeBSD.org
Tue Apr 28 07:25:36 UTC 2020


Author: melifaro
Date: Tue Apr 28 07:25:34 2020
New Revision: 360430
URL: https://svnweb.freebsd.org/changeset/base/360430

Log:
  Eliminate now-unused parts of old routing KPI.
  
  r360292 switched most of the remaining routing customers to a new KPI,
   leaving a bunch of wrappers for old routing lookup functions unused.
  
  Remove them from the tree as a part of routing cleanup.
  
  Differential Revision:	https://reviews.freebsd.org/D24569

Modified:
  head/sys/net/route.c
  head/sys/net/route.h
  head/sys/netinet/in_rmx.c
  head/sys/netinet/in_var.h
  head/sys/netinet6/in6_rmx.c
  head/sys/netinet6/in6_var.h

Modified: head/sys/net/route.c
==============================================================================
--- head/sys/net/route.c	Tue Apr 28 07:23:41 2020	(r360429)
+++ head/sys/net/route.c	Tue Apr 28 07:25:34 2020	(r360430)
@@ -434,28 +434,6 @@ sys_setfib(struct thread *td, struct setfib_args *uap)
 }
 
 /*
- * Packet routing routines.
- */
-void
-rtalloc_ign_fib(struct route *ro, u_long ignore, u_int fibnum)
-{
-	struct rtentry *rt;
-
-	if (ro->ro_nh != NULL) {
-		if (NH_IS_VALID(ro->ro_nh))
-			return;
-		NH_FREE(ro->ro_nh);
-		ro->ro_nh = NULL;
-	}
-	rt = rtalloc1_fib(&ro->ro_dst, 1, ignore, fibnum);
-	if (rt != NULL) {
-		ro->ro_nh = rt->rt_nhop;
-		nhop_ref_object(rt->rt_nhop);
-		RT_UNLOCK(rt);
-	}
-}
-
-/*
  * Look up the route that matches the address given
  * Or, at least try.. Create a cloned route if needed.
  *

Modified: head/sys/net/route.h
==============================================================================
--- head/sys/net/route.h	Tue Apr 28 07:23:41 2020	(r360429)
+++ head/sys/net/route.h	Tue Apr 28 07:25:34 2020	(r360430)
@@ -503,7 +503,6 @@ int	 rtinit(struct ifaddr *, int, int);
  * For now the protocol indepedent versions are the same as the AF_INET ones
  * but this will change.. 
  */
-void	 rtalloc_ign_fib(struct route *ro, u_long ignflags, u_int fibnum);
 struct rtentry *rtalloc1_fib(struct sockaddr *, int, u_long, u_int);
 int	 rtioctl_fib(u_long, caddr_t, u_int);
 int	 rtrequest_fib(int, struct sockaddr *,

Modified: head/sys/netinet/in_rmx.c
==============================================================================
--- head/sys/netinet/in_rmx.c	Tue Apr 28 07:23:41 2020	(r360429)
+++ head/sys/netinet/in_rmx.c	Tue Apr 28 07:25:34 2020	(r360430)
@@ -257,14 +257,3 @@ in_ifadown(struct ifaddr *ifa, int delete)
 	ifa->ifa_flags &= ~IFA_ROUTE;		/* XXXlocking? */
 }
 
-/*
- * inet versions of rt functions. These have fib extensions and
- * for now will just reference the _fib variants.
- * eventually this order will be reversed,
- */
-void
-in_rtalloc_ign(struct route *ro, u_long ignflags, u_int fibnum)
-{
-	rtalloc_ign_fib(ro, ignflags, fibnum);
-}
-

Modified: head/sys/netinet/in_var.h
==============================================================================
--- head/sys/netinet/in_var.h	Tue Apr 28 07:23:41 2020	(r360429)
+++ head/sys/netinet/in_var.h	Tue Apr 28 07:25:34 2020	(r360430)
@@ -471,9 +471,6 @@ struct	mbuf	*ip_tryforward(struct mbuf *);
 void	*in_domifattach(struct ifnet *);
 void	in_domifdetach(struct ifnet *, void *);
 
-
-/* XXX */
-void	 in_rtalloc_ign(struct route *ro, u_long ignflags, u_int fibnum);
 #endif /* _KERNEL */
 
 /* INET6 stuff */

Modified: head/sys/netinet6/in6_rmx.c
==============================================================================
--- head/sys/netinet6/in6_rmx.c	Tue Apr 28 07:23:41 2020	(r360429)
+++ head/sys/netinet6/in6_rmx.c	Tue Apr 28 07:25:34 2020	(r360430)
@@ -239,23 +239,3 @@ in6_rtrequest(int req, struct sockaddr *dst, struct so
 	return (rtrequest_fib(req, dst, gw, mask, flags, ret_nrt, fibnum));
 }
 
-void
-in6_rtalloc(struct route_in6 *ro, u_int fibnum)
-{
-
-	rtalloc_ign_fib((struct route *)ro, 0ul, fibnum);
-}
-
-void
-in6_rtalloc_ign(struct route_in6 *ro, u_long ignflags, u_int fibnum)
-{
-
-	rtalloc_ign_fib((struct route *)ro, ignflags, fibnum);
-}
-
-struct rtentry *
-in6_rtalloc1(struct sockaddr *dst, int report, u_long ignflags, u_int fibnum)
-{
-
-	return (rtalloc1_fib(dst, report, ignflags, fibnum));
-}

Modified: head/sys/netinet6/in6_var.h
==============================================================================
--- head/sys/netinet6/in6_var.h	Tue Apr 28 07:23:41 2020	(r360429)
+++ head/sys/netinet6/in6_var.h	Tue Apr 28 07:25:34 2020	(r360430)
@@ -917,9 +917,6 @@ void	in6_newaddrmsg(struct in6_ifaddr *, int);
 struct mbuf *ip6_tryforward(struct mbuf *);
 int	in6_rtrequest(int, struct sockaddr *, struct sockaddr *,
 	    struct sockaddr *, int, struct rtentry **, u_int);
-void	in6_rtalloc(struct route_in6 *, u_int);
-void	in6_rtalloc_ign(struct route_in6 *, u_long, u_int);
-struct rtentry *in6_rtalloc1(struct sockaddr *, int, u_long, u_int);
 #endif /* _KERNEL */
 
 #endif /* _NETINET6_IN6_VAR_H_ */


More information about the svn-src-head mailing list