summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2017-02-07 06:51:59 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2017-02-07 06:51:59 +0000
commit67396f9c1961fb55f2dcaee56adf1b58257f7a04 (patch)
tree600a7f969025601b5d9a8d13673f2c17f6459300 /sys/dev
parent3def434406dd35e516b3403fdf0a4b10e0f1d6a1 (diff)
move the mbuf pools to m_pool_init and a single global memory limit
this replaces individual calls to pool_init, pool_set_constraints, and pool_sethardlimit with calls to m_pool_init. m_pool_init inits the mbuf pools with the mbuf pool allocator, and because of that doesnt set per pool limits. ok bluhm@ as part of a larger diff
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_myx.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/pci/if_myx.c b/sys/dev/pci/if_myx.c
index 24a3c75e29d..b069e983dac 100644
--- a/sys/dev/pci/if_myx.c
+++ b/sys/dev/pci/if_myx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_myx.c,v 1.101 2017/01/24 03:57:35 dlg Exp $ */
+/* $OpenBSD: if_myx.c,v 1.102 2017/02/07 06:51:58 dlg Exp $ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org>
@@ -294,8 +294,6 @@ myx_attach(struct device *parent, struct device *self, void *aux)
/* this is sort of racy */
if (myx_mcl_pool == NULL) {
- extern struct kmem_pa_mode kp_dma_contig;
-
myx_mcl_pool = malloc(sizeof(*myx_mcl_pool), M_DEVBUF,
M_WAITOK);
if (myx_mcl_pool == NULL) {
@@ -303,9 +301,9 @@ myx_attach(struct device *parent, struct device *self, void *aux)
DEVNAME(sc));
goto unmap;
}
- pool_init(myx_mcl_pool, MYX_RXBIG_SIZE, MYX_BOUNDARY, IPL_NET,
- 0, "myxmcl", NULL);
- pool_set_constraints(myx_mcl_pool, &kp_dma_contig);
+
+ m_pool_init(myx_mcl_pool, MYX_RXBIG_SIZE, MYX_BOUNDARY,
+ "myxmcl");
}
if (myx_pcie_dc(sc, pa) != 0)