summaryrefslogtreecommitdiff
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2024-07-12 19:50:36 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2024-07-12 19:50:36 +0000
commit23a17cb20f1c2260cc43692fb5adc867d6042c6e (patch)
tree7deb1d3015b44a0ce22e08ad7b1ce4be5a77cce7 /sys/netinet/raw_ip.c
parent28d93e83f3cdda369bf69a27386e0adc54ee1267 (diff)
Remove internet PCB mutex.
All incpb locking has been converted to socket receive buffer mutex. Per PCB mutex inp_mtx is not needed anymore. Also delete PRU related locking functions. A flag PR_MPSOCKET indicates whether protocol functions support parallel access with per socket rw-lock. TCP is the only protocol that is not MP capable from the socket layer and needs exclusive netlock. OK mvs@
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 73fd2fd7dd7..4358462db21 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip.c,v 1.159 2024/04/17 20:48:51 bluhm Exp $ */
+/* $OpenBSD: raw_ip.c,v 1.160 2024/07/12 19:50:35 bluhm Exp $ */
/* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */
/*
@@ -106,9 +106,6 @@ struct inpcbtable rawcbtable;
const struct pr_usrreqs rip_usrreqs = {
.pru_attach = rip_attach,
.pru_detach = rip_detach,
- .pru_lock = rip_lock,
- .pru_unlock = rip_unlock,
- .pru_locked = rip_locked,
.pru_bind = rip_bind,
.pru_connect = rip_connect,
.pru_disconnect = rip_disconnect,
@@ -514,32 +511,6 @@ rip_detach(struct socket *so)
return (0);
}
-void
-rip_lock(struct socket *so)
-{
- struct inpcb *inp = sotoinpcb(so);
-
- NET_ASSERT_LOCKED();
- mtx_enter(&inp->inp_mtx);
-}
-
-void
-rip_unlock(struct socket *so)
-{
- struct inpcb *inp = sotoinpcb(so);
-
- NET_ASSERT_LOCKED();
- mtx_leave(&inp->inp_mtx);
-}
-
-int
-rip_locked(struct socket *so)
-{
- struct inpcb *inp = sotoinpcb(so);
-
- return mtx_owned(&inp->inp_mtx);
-}
-
int
rip_bind(struct socket *so, struct mbuf *nam, struct proc *p)
{