From owner-svn-src-user@FreeBSD.ORG Wed Dec 31 05:22:31 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE8081065672; Wed, 31 Dec 2008 05:22:31 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE4D48FC19; Wed, 31 Dec 2008 05:22:31 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBV5MVkU015790; Wed, 31 Dec 2008 05:22:31 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBV5MVv3015789; Wed, 31 Dec 2008 05:22:31 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812310522.mBV5MVv3015789@svn.freebsd.org> From: Kip Macy Date: Wed, 31 Dec 2008 05:22:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186631 - user/kmacy/HEAD_fast_net/sys/netinet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 05:22:32 -0000 Author: kmacy Date: Wed Dec 31 05:22:31 2008 New Revision: 186631 URL: http://svn.freebsd.org/changeset/base/186631 Log: use flowtable_lookup in in_pcbladdr to avoid contending in calls to in_pcbconnect_setup when the laddr is not bound Modified: user/kmacy/HEAD_fast_net/sys/netinet/in_pcb.c Modified: user/kmacy/HEAD_fast_net/sys/netinet/in_pcb.c ============================================================================== --- user/kmacy/HEAD_fast_net/sys/netinet/in_pcb.c Wed Dec 31 05:09:53 2008 (r186630) +++ user/kmacy/HEAD_fast_net/sys/netinet/in_pcb.c Wed Dec 31 05:22:31 2008 (r186631) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -87,6 +88,7 @@ __FBSDID("$FreeBSD$"); #include +extern struct flowtable *ipv4_ft; #ifdef VIMAGE_GLOBALS /* * These configure the range of local port addresses assigned to @@ -636,11 +638,14 @@ in_pcbladdr(struct inpcb *inp, struct in * If route is known our src addr is taken from the i/f, * else punt. * + * XXX need to account for fibnum * Find out route to destination. */ if ((inp->inp_socket->so_options & SO_DONTROUTE) == 0) + flowtable_lookup(ipv4_ft, NULL, &sro); +#if 0 in_rtalloc_ign(&sro, 0, inp->inp_inc.inc_fibnum); - +#endif /* * If we found a route, use the address corresponding to * the outgoing interface. @@ -806,8 +811,6 @@ in_pcbladdr(struct inpcb *inp, struct in } done: - if (sro.ro_rt != NULL) - RTFREE(sro.ro_rt); return (error); }