From 5e20f43d31ed44a5b770dc4757a1517aa62fa244 Mon Sep 17 00:00:00 2001 From: Andre Oppermann Date: Thu, 2 Nov 2006 17:37:22 +0000 Subject: Rename m_getm() to m_getm2() and rewrite it to allocate up to page sized mbuf clusters. Add a flags parameter to accept M_PKTHDR and M_EOR mbuf chain flags. Provide compatibility macro for m_getm() calling m_getm2() with M_PKTHDR set. Rewrite m_uiotombuf() to use m_getm2() for mbuf allocation and do the uiomove() in a tight loop over the mbuf chain. Add a flags parameter to accept mbuf flags to be passed to m_getm2(). Adjust all callers for the extra parameter. Sponsored by: TCP/IP Optimization Fundraise 2005 MFC after: 3 month --- sys/netgraph/ng_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/netgraph/ng_device.c') diff --git a/sys/netgraph/ng_device.c b/sys/netgraph/ng_device.c index 9439a574f209..d8ba67650ed1 100644 --- a/sys/netgraph/ng_device.c +++ b/sys/netgraph/ng_device.c @@ -466,7 +466,7 @@ ngdwrite(struct cdev *dev, struct uio *uio, int flag) if (uio->uio_resid < 0 || uio->uio_resid > IP_MAXPACKET) return (EIO); - if ((m = m_uiotombuf(uio, M_DONTWAIT, 0, 0)) == NULL) + if ((m = m_uiotombuf(uio, M_DONTWAIT, 0, 0, M_PKTHDR)) == NULL) return (ENOBUFS); NG_SEND_DATA_ONLY(error, priv->hook, m); -- cgit v1.3