diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-07-12 19:50:36 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-07-12 19:50:36 +0000 |
commit | 23a17cb20f1c2260cc43692fb5adc867d6042c6e (patch) | |
tree | 7deb1d3015b44a0ce22e08ad7b1ce4be5a77cce7 /sys/netinet/ip_divert.c | |
parent | 28d93e83f3cdda369bf69a27386e0adc54ee1267 (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/ip_divert.c')
-rw-r--r-- | sys/netinet/ip_divert.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 9c050bb12cc..260d23c8f9f 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_divert.c,v 1.95 2024/03/05 09:45:13 bluhm Exp $ */ +/* $OpenBSD: ip_divert.c,v 1.96 2024/07/12 19:50:35 bluhm Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -65,9 +65,6 @@ const struct sysctl_bounded_args divertctl_vars[] = { const struct pr_usrreqs divert_usrreqs = { .pru_attach = divert_attach, .pru_detach = divert_detach, - .pru_lock = divert_lock, - .pru_unlock = divert_unlock, - .pru_locked = divert_locked, .pru_bind = divert_bind, .pru_shutdown = divert_shutdown, .pru_send = divert_send, @@ -296,32 +293,6 @@ divert_detach(struct socket *so) return (0); } -void -divert_lock(struct socket *so) -{ - struct inpcb *inp = sotoinpcb(so); - - NET_ASSERT_LOCKED(); - mtx_enter(&inp->inp_mtx); -} - -void -divert_unlock(struct socket *so) -{ - struct inpcb *inp = sotoinpcb(so); - - NET_ASSERT_LOCKED(); - mtx_leave(&inp->inp_mtx); -} - -int -divert_locked(struct socket *so) -{ - struct inpcb *inp = sotoinpcb(so); - - return mtx_owned(&inp->inp_mtx); -} - int divert_bind(struct socket *so, struct mbuf *addr, struct proc *p) { |