summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6.c
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2014-01-10 09:45:28 +0000
committerae <ae@FreeBSD.org>2014-01-10 09:45:28 +0000
commit65169ca8a03275870336017f91b02d8d16abdd24 (patch)
tree1b222e329b82d5dfb9aa7f1cc170ef19b4e704c4 /sys/netinet6/in6.c
parent2865f87f4a69c49f910445fb5c56eca59e1790ee (diff)
downloadFreeBSD-src-65169ca8a03275870336017f91b02d8d16abdd24.zip
FreeBSD-src-65169ca8a03275870336017f91b02d8d16abdd24.tar.gz
MFC r260151 (by adrian):
Use an RLOCK here instead of an RWLOCK - matching all the other calls to lla_lookup(). This drastically reduces the very high lock contention when doing parallel TCP throughput tests (> 1024 sockets) with IPv6. MFC r260187: lla_lookup() does modification only when LLE_CREATE is specified. Thus we can use IF_AFDATA_RLOCK() instead of IF_AFDATA_LOCK() when doing lla_lookup() without LLE_CREATE flag. MFC r260217: Add IF_AFDATA_WLOCK_ASSERT() in case lla_lookup() is called with LLE_CREATE flag.
Diffstat (limited to 'sys/netinet6/in6.c')
-rw-r--r--sys/netinet6/in6.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index e5c62df..37a41bd 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -2627,6 +2627,7 @@ in6_lltable_lookup(struct lltable *llt, u_int flags,
if (lle == NULL) {
if (!(flags & LLE_CREATE))
return (NULL);
+ IF_AFDATA_WLOCK_ASSERT(ifp);
/*
* A route that covers the given address must have
* been installed 1st because we are doing a resolution,
OpenPOWER on IntegriCloud