summaryrefslogtreecommitdiff
path: root/sys/netinet
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/netinet
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/netinet')
-rw-r--r--sys/netinet/ip_input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index bb6940a7a07..238ab79df32 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.330 2017/11/08 16:29:20 visa Exp $ */
+/* $OpenBSD: ip_input.c,v 1.331 2017/11/10 08:55:49 mpi Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -1818,11 +1818,11 @@ ip_send_dispatch(void *xmq)
if (ml_empty(&ml))
return;
- NET_LOCK();
+ NET_RLOCK();
while ((m = ml_dequeue(&ml)) != NULL) {
ip_output(m, NULL, NULL, 0, NULL, NULL, 0);
}
- NET_UNLOCK();
+ NET_RUNLOCK();
}
void