Stage 1/many: mbuf/cluster accounting rewrite and mbuf allocator rewrite.
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 29 Jul 2004 08:46:23 +0000 (08:46 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 29 Jul 2004 08:46:23 +0000 (08:46 +0000)
commit7eccf2450dec4bb3ea00537ebf8771ec7d140f36
tree576abba03b6a56130cdeec0cc4f80c256e641324
parentb148a8c8f16b99a38bb759b68ffccefa48fbc8f0
Stage 1/many: mbuf/cluster accounting rewrite and mbuf allocator rewrite.

Implement 'new' style mbuf m_ext buffers where the callbacks are called with
a custom argument instead of with (buf, size).  Old style m_ext buffers have
to jump through loops to properly track reference counters in a manner that
is tightly integrated with the old mbuf/cluster KVA allocation array.

The old clustering methodology is going to have to be converted to the new
methodology before we can rip out the old mbuf allocator, plus we want to
use the new mechanism anyway because it is a whole lot cleaner and because
it's easier to import driver code (aka NDIS) from FreeBSD-5 with the new
mechanism.

This commit still supports the old mechanism via M_EXT_OLD, and all
existing function-based M_EXT's have been converted to use M_EXT_OLD.  The
old mechanism (and M_EXT_OLD) will be removed in later stages.
15 files changed:
sys/dev/atm/en/midway.c
sys/dev/netif/bge/if_bge.c
sys/dev/netif/lge/if_lge.c
sys/dev/netif/lnc/if_lnc.c
sys/dev/netif/nge/if_nge.c
sys/dev/netif/sk/if_sk.c
sys/dev/netif/ti/if_ti.c
sys/dev/netif/wb/if_wb.c
sys/kern/uipc_mbuf.c
sys/kern/uipc_mbuf2.c
sys/kern/uipc_syscalls.c
sys/netinet6/ipsec.c
sys/netproto/ipsec/key_debug.c
sys/netproto/key/key_debug.c
sys/sys/mbuf.h