From owner-svn-src-head@FreeBSD.ORG Sat Feb 8 22:12:00 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB43AF07; Sat, 8 Feb 2014 22:12:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 957B013B6; Sat, 8 Feb 2014 22:12:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s18MC0B1014134; Sat, 8 Feb 2014 22:12:00 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s18MC0H5014132; Sat, 8 Feb 2014 22:12:00 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402082212.s18MC0H5014132@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 8 Feb 2014 22:12:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261641 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Feb 2014 22:12:00 -0000 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;