Lines Matching refs:vmultip
298 * vmultip -- A pointer to vio_multi_pool_t structure.
308 vio_init_multipools(vio_multi_pool_t *vmultip, int num_pools, ...)
322 vmultip->tbsz = (sizeof (uint32_t) * num_pools) +
325 tbuf = kmem_zalloc(vmultip->tbsz, KM_SLEEP);
326 vmultip->bufsz_tbl = (uint32_t *)tbuf;
327 vmultip->nbuf_tbl = (uint32_t *)(tbuf +
329 vmultip->vmpp = (vio_mblk_pool_t **)(tbuf +
331 vmultip->num_pools = num_pools;
336 vmultip->bufsz_tbl[i] = va_arg(vap, uint32_t);
339 vmultip->nbuf_tbl[i] = va_arg(vap, uint32_t);
343 for (i = 0; i < vmultip->num_pools; i++) {
344 status = vio_create_mblks(vmultip->nbuf_tbl[i],
345 vmultip->bufsz_tbl[i], NULL, &vmultip->vmpp[i]);
347 vio_destroy_multipools(vmultip, &fvmp);
366 * vmultip -- A pointer to vio_multi_pool_t structure.
371 vio_destroy_multipools(vio_multi_pool_t *vmultip, vio_mblk_pool_t **fvmp)
376 for (i = 0; i < vmultip->num_pools; i++) {
377 if ((vmp = vmultip->vmpp[i]) != NULL) {
389 if (vmultip->tbsz != 0)
390 kmem_free(vmultip->bufsz_tbl, vmultip->tbsz);
391 vmultip->bufsz_tbl = NULL;
392 vmultip->nbuf_tbl = NULL;
393 vmultip->vmpp = NULL;
394 vmultip->num_pools = 0;
395 vmultip->tbsz = 0;
404 vio_multipool_allocb(vio_multi_pool_t *vmultip, size_t size)
410 for (i = 0; i < vmultip->num_pools; i++) {
411 if (size > vmultip->bufsz_tbl[i]) {
414 vmp = vio_allocb(vmultip->vmpp[i]);