summaryrefslogtreecommitdiffstats
path: root/sys/netatm/spans/spans_if.c
diff options
context:
space:
mode:
authorarr <arr@FreeBSD.org>2002-05-24 00:39:58 +0000
committerarr <arr@FreeBSD.org>2002-05-24 00:39:58 +0000
commit0239286d2c509dd5fb5136bf070206cb641023f1 (patch)
tree04d4572458bd827a7bd3300d9f1628f4733762c9 /sys/netatm/spans/spans_if.c
parentd756e3ff88238ac6a0deb498bda602333d20ddb3 (diff)
downloadFreeBSD-src-0239286d2c509dd5fb5136bf070206cb641023f1.zip
FreeBSD-src-0239286d2c509dd5fb5136bf070206cb641023f1.tar.gz
- Remove a few storage pools and replace them with UMA zones. The spans
code is now storage pool free, so I believe this only leaves the uni base not cleaned.
Diffstat (limited to 'sys/netatm/spans/spans_if.c')
-rw-r--r--sys/netatm/spans/spans_if.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/sys/netatm/spans/spans_if.c b/sys/netatm/spans/spans_if.c
index c9c8531..f4c1bf1 100644
--- a/sys/netatm/spans/spans_if.c
+++ b/sys/netatm/spans/spans_if.c
@@ -76,19 +76,8 @@ __RCSID("@(#) $FreeBSD$");
/*
* Global variables
*/
-struct sp_info spans_vcpool = {
- "spans vcc pool", /* si_name */
- sizeof(struct spans_vccb), /* si_blksiz */
- 10, /* si_blkcnt */
- 50 /* si_maxallow */
-};
-
-struct sp_info spans_msgpool = {
- "spans message pool", /* si_name */
- sizeof(spans_msg), /* si_blksiz */
- 10, /* si_blkcnt */
- 50 /* si_maxallow */
-};
+uma_zone_t spans_vc_zone;
+uma_zone_t spans_msg_zone;
/*
* Local functions
@@ -141,6 +130,14 @@ spans_start()
return (EINVAL);
}
+ spans_vc_zone = uma_zcreate("spans vc", sizeof(struct spans_vccb),
+ NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
+ uma_zone_set_max(spans_vc_zone, 50);
+
+ spans_msg_zone = uma_zcreate("spans msg", sizeof(spans_msg), NULL,
+ NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
+ uma_zone_set_max(spans_msg_zone, 50);
+
/*
* Allocate protocol definition structure
*/
@@ -171,6 +168,11 @@ spans_start()
goto done;
/*
+ * Start the arp service
+ */
+ spansarp_start();
+
+ /*
* Start up Connectionless Service
*/
err = spanscls_start();
@@ -237,8 +239,8 @@ spans_stop()
/*
* Free up our storage pools
*/
- atm_release_pool(&spans_vcpool);
- atm_release_pool(&spans_msgpool);
+ uma_zdestroy(spans_vc_zone);
+ uma_zdestroy(spans_msg_zone);
} else
err = ENXIO;
@@ -860,7 +862,7 @@ spans_free(vcp)
*/
vcp->vc_ustate = VCCU_NULL;
vcp->vc_sstate = SPANS_VC_NULL;
- atm_free((caddr_t)vcp);
+ uma_zfree(spans_vc_zone, vcp);
/*
* If we're detaching and this was the last VCC queued,
OpenPOWER on IntegriCloud