diff options
author | glebius <glebius@FreeBSD.org> | 2005-05-14 09:25:18 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-05-14 09:25:18 +0000 |
commit | 853d25c736225988510ce8477a44da1c4be2f509 (patch) | |
tree | a4de2056f1fe0c2e2ef1e782b8b87351902d3bc7 /sys/netgraph/netgraph.h | |
parent | 99f1b222339d6eee1c65e04ad1def3c866f155b0 (diff) | |
download | FreeBSD-src-853d25c736225988510ce8477a44da1c4be2f509.zip FreeBSD-src-853d25c736225988510ce8477a44da1c4be2f509.tar.gz |
Use uma(9) for allocating netgraph items:
- ng_getqblk() simply runs uma_zalloc().
- ng_free_item() simply frees.
- ngq_mtx is pushed down under NETGRAPH_DEBUG.
- NGQF_FREE is removed.
Increase default maxalloc to 512.
Reviewed by: julian
Diffstat (limited to 'sys/netgraph/netgraph.h')
-rw-r--r-- | sys/netgraph/netgraph.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/netgraph/netgraph.h b/sys/netgraph/netgraph.h index c2d580f..61b575a 100644 --- a/sys/netgraph/netgraph.h +++ b/sys/netgraph/netgraph.h @@ -54,7 +54,7 @@ #include <sys/module.h> #include <sys/mutex.h> /* debugging options */ -#define NETGRAPH_DEBUG +#define NETGRAPH_DEBUG #define NG_SEPARATE_MALLOC /* make modules use their own malloc types */ /* @@ -612,8 +612,6 @@ struct ng_item { #define NGQF_READER 0x04 /* queued as a reader */ #define NGQF_WRITER 0x00 /* queued as a writer */ -#define NGQF_FREE 0x08 - /* * Get the mbuf (etc) out of an item. * Sets the value in the item to NULL in case we need to call NG_FREE_ITEM() @@ -664,10 +662,6 @@ static __inline hook_p _ngi_hook(item_p item, char *file, int line); static __inline void _ngi_check(item_p item, char *file, int line) { - if (item->el_flags & NGQF_FREE) { - dumpitem(item, file, line); - panic ("free item!"); - } (item)->lastline = line; (item)->lastfile = file; } |