diff options
author | rwatson <rwatson@FreeBSD.org> | 2008-04-17 21:38:18 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2008-04-17 21:38:18 +0000 |
commit | ca47fccd6b260693108c5ee5634bd0e011c67f5e (patch) | |
tree | fd64d5b5062ffc1979994100cac82014c5ed48b6 /sys/netinet6/icmp6.c | |
parent | 3e83d6e7db0e2c7d805fd36da3475e635fbb4b3e (diff) | |
download | FreeBSD-src-ca47fccd6b260693108c5ee5634bd0e011c67f5e.zip FreeBSD-src-ca47fccd6b260693108c5ee5634bd0e011c67f5e.tar.gz |
Convert pcbinfo and inpcb mutexes to rwlocks, and modify macros to
explicitly select write locking for all use of the inpcb mutex.
Update some pcbinfo lock assertions to assert locked rather than
write-locked, although in practice almost all uses of the pcbinfo
rwlock main exclusive, and all instances of inpcb lock acquisition
are exclusive.
This change should introduce (ideally) little functional change.
However, it lays the groundwork for significantly increased
parallelism in the TCP/IP code.
MFC after: 3 months
Tested by: kris (superset of committered patch)
Diffstat (limited to 'sys/netinet6/icmp6.c')
-rw-r--r-- | sys/netinet6/icmp6.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index ea5a646..7039edd 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1891,10 +1891,10 @@ icmp6_rip6_input(struct mbuf **mp, int off) INP_INFO_RLOCK(&ripcbinfo); LIST_FOREACH(in6p, &ripcb, inp_list) { - INP_LOCK(in6p); + INP_WLOCK(in6p); if ((in6p->inp_vflag & INP_IPV6) == 0) { docontinue: - INP_UNLOCK(in6p); + INP_WUNLOCK(in6p); continue; } if (in6p->in6p_ip6_nxt != IPPROTO_ICMPV6) @@ -1965,7 +1965,7 @@ icmp6_rip6_input(struct mbuf **mp, int off) sorwakeup_locked(last->in6p_socket); opts = NULL; } - INP_UNLOCK(last); + INP_WUNLOCK(last); } last = in6p; } @@ -2003,7 +2003,7 @@ icmp6_rip6_input(struct mbuf **mp, int off) SOCKBUF_UNLOCK(&last->in6p_socket->so_rcv); } else sorwakeup_locked(last->in6p_socket); - INP_UNLOCK(last); + INP_WUNLOCK(last); } else { m_freem(m); ip6stat.ip6s_delivered--; |