freebsd-skq/sys/netinet6
Gleb Smirnoff 56a5f52e80 New way to manage reference counting of mbuf external storage.
The m_ext.ext_cnt pointer becomes a union. It can now hold the refcount
value itself. To tell that m_ext.ext_flags flag EXT_FLAG_EMBREF is used.
The first mbuf to attach a cluster stores the refcount. The further mbufs
to reference the cluster point at refcount in the first mbuf. The first
mbuf is freed only when the last reference is freed.

The benefit over refcounts stored in separate slabs is that now refcounts
of different, unrelated mbufs do not share a cache line.

For EXT_EXTREF mbufs the zone_ext_refcnt is no longer needed, and m_extadd()
becomes void, making widely used M_EXTADD macro safe.

For EXT_SFBUF mbufs the sf_ext_ref() is removed, which was an optimization
exactly against the cache aliasing problem with regular refcounting.

Discussed with:		rrs, rwatson, gnn, hiren, sbruno, np
Reviewed by:		rrs
Differential Revision:	https://reviews.freebsd.org/D5396
Sponsored by:		Netflix
2016-03-01 00:17:14 +00:00
..
dest6.c
frag6.c
icmp6.c
icmp6.h
in6_cksum.c
in6_fib.c
in6_fib.h
in6_gif.c
in6_ifattach.c
in6_ifattach.h
in6_mcast.c
in6_pcb.c
in6_pcb.h
in6_pcbgroup.c
in6_proto.c
in6_rmx.c
in6_rss.c
in6_rss.h
in6_src.c
in6_var.h
in6.c Ternary operator has lower priority than OR. 2016-02-17 21:17:14 +00:00
in6.h
ip6_ecn.h
ip6_forward.c
ip6_gre.c
ip6_id.c
ip6_input.c
ip6_ipsec.c
ip6_ipsec.h
ip6_mroute.c
ip6_mroute.h
ip6_output.c New way to manage reference counting of mbuf external storage. 2016-03-01 00:17:14 +00:00
ip6_var.h New way to manage reference counting of mbuf external storage. 2016-03-01 00:17:14 +00:00
ip6.h
ip6protosw.h
mld6_var.h
mld6.c
mld6.h
nd6_nbr.c Lock the NDP default router list and count defrouter references. 2016-02-25 20:12:05 +00:00
nd6_rtr.c Lock the NDP default router list and count defrouter references. 2016-02-25 20:12:05 +00:00
nd6.c Lock the NDP default router list and count defrouter references. 2016-02-25 20:12:05 +00:00
nd6.h Lock the NDP default router list and count defrouter references. 2016-02-25 20:12:05 +00:00
pim6_var.h
pim6.h
raw_ip6.c
raw_ip6.h
route6.c
scope6_var.h
scope6.c Add a missing newline to a log message. 2016-02-12 21:17:00 +00:00
sctp6_usrreq.c Don't leak an address in an error path. 2016-02-23 18:50:34 +00:00
sctp6_var.h
send.c
send.h
tcp6_var.h
udp6_usrreq.c
udp6_var.h