svn commit: r186631 - user/kmacy/HEAD_fast_net/sys/netinet
Kip Macy
kmacy at FreeBSD.org
Wed Dec 31 05:22:32 UTC 2008
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 <vm/uma.h>
+#include <net/flowtable.h>
#include <net/if.h>
#include <net/if_types.h>
#include <net/if_llatbl.h>
@@ -87,6 +88,7 @@ __FBSDID("$FreeBSD$");
#include <security/mac/mac_framework.h>
+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);
}
More information about the svn-src-user
mailing list