summaryrefslogtreecommitdiffstats
path: root/sys/netatm
diff options
context:
space:
mode:
authorarr <arr@FreeBSD.org>2002-04-22 18:26:05 +0000
committerarr <arr@FreeBSD.org>2002-04-22 18:26:05 +0000
commitb148c4db98c8b291ba273f56aa0c4ac11b36b851 (patch)
tree38e757f645cd8d4f629fcc4b0d24affc916155e4 /sys/netatm
parentad5ada62efbd9982dd87b7904f2ee6231f0eade5 (diff)
downloadFreeBSD-src-b148c4db98c8b291ba273f56aa0c4ac11b36b851.zip
FreeBSD-src-b148c4db98c8b291ba273f56aa0c4ac11b36b851.tar.gz
- Revert previous change of atm storage pools -> uma_zones until a solution
to atm_free() is written.
Diffstat (limited to 'sys/netatm')
-rw-r--r--sys/netatm/atm_cm.c2
-rw-r--r--sys/netatm/atm_subr.c29
-rw-r--r--sys/netatm/atm_var.h5
3 files changed, 17 insertions, 19 deletions
diff --git a/sys/netatm/atm_cm.c b/sys/netatm/atm_cm.c
index d83bf9c..f509f38 100644
--- a/sys/netatm/atm_cm.c
+++ b/sys/netatm/atm_cm.c
@@ -709,7 +709,7 @@ atm_cm_listen(epp, token, ap, copp)
/*
* Get an attribute block and save listening attributes
*/
- cop->co_lattr = uma_zalloc(atm_attributes_zone, 0);
+ cop->co_lattr = (Atm_attributes *)atm_allocate(&atm_attributes_pool);
if (cop->co_lattr == NULL) {
err = ENOMEM;
goto done;
diff --git a/sys/netatm/atm_subr.c b/sys/netatm/atm_subr.c
index c7436cf..0581725 100644
--- a/sys/netatm/atm_subr.c
+++ b/sys/netatm/atm_subr.c
@@ -79,7 +79,13 @@ int atm_print_data = 0;
int atm_version = ATM_VERSION;
struct timeval atm_debugtime = {0, 0};
-uma_zone_t atm_attributes_zone;
+struct sp_info atm_attributes_pool = {
+ "atm attributes pool", /* si_name */
+ sizeof(Atm_attributes), /* si_blksiz */
+ 10, /* si_blkcnt */
+ 100 /* si_maxallow */
+};
+
/*
* Local functions
@@ -93,7 +99,13 @@ static KTimeout_ret atm_timexp(void *);
static struct atm_time *atm_timeq = NULL;
static struct atm_time atm_compactimer = {0, 0};
-static uma_zone_t atm_stackq_zone;
+static struct sp_info atm_stackq_pool = {
+ "Service stack queue pool", /* si_name */
+ sizeof(struct stackq_entry), /* si_blksiz */
+ 10, /* si_blkcnt */
+ 10 /* si_maxallow */
+};
+
/*
* Initialize ATM kernel
@@ -123,17 +135,6 @@ atm_initialize()
mtx_init(&atm_intrq.ifq_mtx, "atm_inq", NULL, MTX_DEF);
atmintrq_present = 1;
- atm_attributes_zone = uma_zcreate("atm_attributes",
- sizeof(Atm_attributes), (uma_ctor)&atm_uma_ctor, NULL, NULL, NULL,
- UMA_ALIGN_PTR, 0);
- uma_zone_set_max(atm_attributes_zone, 100);
-
- atm_stackq_zone = uma_zcreate("atm_stackq",
- sizeof(struct stackq_entry), (uma_ctor)&atm_uma_ctor, NULL, NULL,
- NULL,
- UMA_ALIGN_PTR, 0);
- uma_zone_set_max(atm_stackq_zone, 10);
-
register_netisr(NETISR_ATM, atm_intr);
/*
@@ -745,7 +746,7 @@ atm_stack_enq(cmd, func, token, cvp, arg1, arg2)
/*
* Get a new queue entry for this call
*/
- sqp = uma_zalloc(atm_stackq_zone, 0);
+ sqp = (struct stackq_entry *)atm_allocate(&atm_stackq_pool);
if (sqp == NULL) {
(void) splx(s);
return (ENOMEM);
diff --git a/sys/netatm/atm_var.h b/sys/netatm/atm_var.h
index eb7ee35..bacee49 100644
--- a/sys/netatm/atm_var.h
+++ b/sys/netatm/atm_var.h
@@ -40,9 +40,6 @@
#ifdef _KERNEL
-
-#include <vm/uma.h>
-
/*
* Global variable declarations
*/
@@ -66,7 +63,7 @@ extern int atm_debug;
extern struct timeval atm_debugtime;
extern int atm_dev_print;
extern int atm_print_data;
-extern uma_zone_t atm_attributes_zone;
+extern struct sp_info atm_attributes_pool;
extern struct pr_usrreqs atm_dgram_usrreqs;
OpenPOWER on IntegriCloud