summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2017-11-10 08:55:50 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2017-11-10 08:55:50 +0000
commita7e0f9f7479a745597fd997b19c765e50331e34c (patch)
tree00cb6afde8cc223a654e3e046fb1fbf2dfcd3b57 /sys/netinet6
parent5c2327cf27ca4fe7d184ee526ce95275b52304de (diff)
Introduce a reader version of the NET_LOCK().
This will be used to first allow read-only ioctl(2) to be executed while the softnet taskq is running. Then it will allows us to execute multiple softnet taskq in parallel. Tested by Hrvoje Popovski, ok kettenis@, sashan@, visa@, tb@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/ip6_input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index f106d0a3250..caf6dfeb23b 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_input.c,v 1.207 2017/11/01 06:35:38 mpi Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.208 2017/11/10 08:55:49 mpi Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -1459,7 +1459,7 @@ ip6_send_dispatch(void *xmq)
if (ml_empty(&ml))
return;
- NET_LOCK();
+ NET_RLOCK();
while ((m = ml_dequeue(&ml)) != NULL) {
/*
* To avoid a "too big" situation at an intermediate router and
@@ -1470,7 +1470,7 @@ ip6_send_dispatch(void *xmq)
*/
ip6_output(m, NULL, NULL, IPV6_MINMTU, NULL, NULL);
}
- NET_UNLOCK();
+ NET_RUNLOCK();
}
void