[comp.sys.sgi] How can I allocate big mbufs in a device driver?

jack@cwi.nl (Jack Jansen) (10/11/90)

I need help from some kernel guru.

I'm writing a device driver for Irix 3.3 (on a personal Iris) and
I have to allocate an mbuf with a cluster. However, neither MCLALLOC
nor MCLGET are available, and there is a comment in mbuf.h that you
should use m_vget() in stead. (Unfortunately the device driver guide
doesn't handle berkeleyisms at all).

Would anyone out there know the arguments to m_vget()?

Thanks,
--
--
Een volk dat voor tirannen zwicht	| Oral:     Jack Jansen
zal meer dan lijf en goed verliezen	| Internet: jack@cwi.nl
dan dooft het licht			| Uucp:     hp4nl!cwi.nl!jack

schuman@sgi.com (Aaron Schuman) (10/13/90)

Jack Jansen asked for the calling sequence for m_vget.  I hope this
brief code excerpt helps:


/* get a variable-sized cluster
 *      If you ask for a full page of CLBYTES bytes, you will get a full
 *      page in a different format.
 *
 *      In any case, the length field will be set to the requested size.
 */
struct mbuf *                           /* 0 or little-mbuf-header */
m_vget(canwait, size, type)
int canwait;                            /* 1=ok to sleep */
int size;                               /* desired data size in bytes */
int type;