1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00
freebsd/sys/netinet6
Jonathan T. Looney 7fb2986ff6 If the INP lock is uncontested, avoid taking a reference and jumping
through the lock-switching hoops.

A few of the INP lookup operations that lock INPs after the lookup do
so using this mechanism (to maintain lock ordering):

1. Lock lookup structure.
2. Find INP.
3. Acquire reference on INP.
4. Drop lock on lookup structure.
5. Acquire INP lock.
6. Drop reference on INP.

This change provides a slightly shorter path for cases where the INP
lock is uncontested:

1. Lock lookup structure.
2. Find INP.
3. Try to acquire the INP lock.
4. If successful, drop lock on lookup structure.

Of course, if the INP lock is contested, the functions will need to
revert to the previous way of switching locks safely.

This saves a few atomic operations when the INP lock is uncontested.

Discussed with:	gallatin, rrs, rwatson
MFC after:	2 weeks
Sponsored by:	Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D12911
2018-03-21 15:54:46 +00:00
..
dest6.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
frag6.c Modify ip6_get_prevhdr() to be able use it safely. 2018-02-05 09:22:07 +00:00
icmp6.c Fix ICMPv6 redirects 2018-02-09 00:13:05 +00:00
icmp6.h
in6_cksum.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
in6_fib.c
in6_fib.h
in6_gif.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
in6_ifattach.c Assign IPv6 link-local address to loopback interfaces whith unit > 0. 2018-01-29 10:33:55 +00:00
in6_ifattach.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
in6_jail.c Revert r327828, r327949, r327953, r328016-r328026, r328041: 2018-01-21 15:42:36 +00:00
in6_mcast.c Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
in6_pcb.c If the INP lock is uncontested, avoid taking a reference and jumping 2018-03-21 15:54:46 +00:00
in6_pcb.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
in6_pcbgroup.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
in6_proto.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
in6_rmx.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
in6_rss.c
in6_rss.h
in6_src.c Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
in6_var.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
in6.c Fix outgoing TCP/UDP packet drop on arp/ndp entry expiration. 2018-03-17 17:05:48 +00:00
in6.h Follow the RFC6980 and silently ignore following IPv6 NDP messages 2017-12-15 12:37:32 +00:00
ip6_ecn.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ip6_fastfwd.c Evaluate packet size after the firewall had its chance in the ip6 fast path 2017-10-25 19:21:48 +00:00
ip6_forward.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ip6_gre.c
ip6_id.c Fix some typos. 2017-12-28 20:40:56 +00:00
ip6_input.c Modify ip6_get_prevhdr() to be able use it safely. 2018-02-05 09:22:07 +00:00
ip6_mroute.c Merge r1.120 from NetBSD: 2018-02-02 07:39:34 +00:00
ip6_mroute.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ip6_output.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ip6_var.h Modify ip6_get_prevhdr() to be able use it safely. 2018-02-05 09:22:07 +00:00
ip6.h
ip6protosw.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ip_fw_nat64.h
ip_fw_nptv6.h
mld6_var.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
mld6.c Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
mld6.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nd6_nbr.c Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
nd6_rtr.c Update the MTU in affected routes when IPv6 RA changes the MTU 2018-02-12 19:49:20 +00:00
nd6.c ND6: Set the correct state for new neighbor cache entries 2018-01-29 16:12:26 +00:00
nd6.h Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
pim6_var.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
pim6.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
raw_ip6.c Modify ip6_get_prevhdr() to be able use it safely. 2018-02-05 09:22:07 +00:00
raw_ip6.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
route6.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
scope6_var.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
scope6.c sys/netinet6: fix typos in comments. No functional change. 2018-01-23 19:40:05 +00:00
sctp6_usrreq.c Retire SCTP_WITH_NO_CSUM option. 2017-12-07 22:19:08 +00:00
sctp6_var.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
send.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
send.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
tcp6_var.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
udp6_usrreq.c Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
udp6_var.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00