Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Feb 2014 22:12:00 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r261641 - head/sys/net
Message-ID:  <201402082212.s18MC0H5014132@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Sat Feb  8 22:12:00 2014
New Revision: 261641
URL: http://svnweb.freebsd.org/changeset/base/261641

Log:
  Remove ft_rtalloc and choose rtalloc function at compile time.

Modified:
  head/sys/net/flowtable.c

Modified: head/sys/net/flowtable.c
==============================================================================
--- head/sys/net/flowtable.c	Sat Feb  8 22:10:53 2014	(r261640)
+++ head/sys/net/flowtable.c	Sat Feb  8 22:12:00 2014	(r261641)
@@ -132,7 +132,6 @@ struct flentry_v6 {
 
 
 typedef	void fl_lock_t(struct flowtable *, uint32_t);
-typedef void fl_rtalloc_t(struct route *, uint32_t, u_int);
 
 union flentryp {
 	struct flentry		**global;
@@ -148,7 +147,6 @@ struct flowtable {
 	uint32_t	ft_max_depth;
 	fl_lock_t	*ft_lock;
 	fl_lock_t 	*ft_unlock;
-	fl_rtalloc_t	*ft_rtalloc;
 	/*
 	 * XXX need to pad out
 	 */
@@ -235,15 +233,6 @@ SYSCTL_VNET_INT(_net_flowtable, OID_AUTO
     &VNET_NAME(flowtable_tcp_expire), 0,
     "seconds after which to remove flow allocated to a TCP connection.");
 
-#ifndef RADIX_MPATH
-static void
-rtalloc_ign_wrapper(struct route *ro, uint32_t hash, u_int fibnum)
-{
-
-	rtalloc_ign_fib(ro, 0, fibnum);
-}
-#endif
-
 static void
 flowtable_global_lock(struct flowtable *table, uint32_t hash)
 {
@@ -1029,7 +1018,12 @@ uncached:
 	 * receive the route locked
 	 */
 
-	ft->ft_rtalloc(ro, hash, fibnum);
+#ifdef RADIX_MPATH
+	rtalloc_mpath_fib(ro, hash, fibnum);
+#else
+	rtalloc_ign_fib(ro, 0, fibnum);
+#endif
+
 	if (ro->ro_rt == NULL)
 		return (NULL);
 
@@ -1100,11 +1094,6 @@ static void
 flowtable_alloc(struct flowtable *ft)
 {
 
-#ifdef RADIX_MPATH
-	ft->ft_rtalloc = rtalloc_mpath_fib;
-#else
-	ft->ft_rtalloc = rtalloc_ign_wrapper;
-#endif
 	if (ft->ft_flags & FL_PCPU) {
 		ft->ft_lock = flowtable_pcpu_lock;
 		ft->ft_unlock = flowtable_pcpu_unlock;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402082212.s18MC0H5014132>