From owner-cvs-all Tue Feb 13 21:13: 9 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6A99937B491; Tue, 13 Feb 2001 21:13:05 -0800 (PST) Received: (from bmilekic@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f1E5D5436941; Tue, 13 Feb 2001 21:13:05 -0800 (PST) (envelope-from bmilekic) Message-Id: <200102140513.f1E5D5436941@freefall.freebsd.org> From: Bosko Milekic Date: Tue, 13 Feb 2001 21:13:05 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern uipc_mbuf.c src/sys/netncp ncp_rq.c src/sys/sys mbuf.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG bmilekic 2001/02/13 21:13:05 PST Modified files: sys/kern uipc_mbuf.c sys/netncp ncp_rq.c sys/sys mbuf.h Log: Implement m_getm() which will perform an "all or nothing" mbuf + cluster allocation, as required. If m_getm() receives NULL as a first argument, then it allocates `len' (second argument) bytes worth of mbufs + clusters and returns the chain only if it was able to allocate everything. If the first argument is non-NULL, then it should be an existing mbuf chain (e.g. pre-allocated mbuf sitting on a ring, on some list, etc.) and so it will allocate `len' bytes worth of clusters and mbufs, as needed, and append them to the tail of the passed in chain, only if it was able to allocate everything requested. If allocation fails, only what was allocated by the routine will be freed, and NULL will be returned. Also, get rid of existing m_getm() in netncp code and replace calls to it to calls to this new generic code. Heavily Reviewed by: bp Revision Changes Path 1.67 +68 -2 src/sys/kern/uipc_mbuf.c 1.3 +3 -28 src/sys/netncp/ncp_rq.c 1.70 +2 -1 src/sys/sys/mbuf.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message