Date: Tue, 13 Feb 2001 21:13:05 -0800 (PST) From: Bosko Milekic <bmilekic@FreeBSD.org> 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 Message-ID: <200102140513.f1E5D5436941@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102140513.f1E5D5436941>