From owner-freebsd-hackers Mon Jun 30 18:50:23 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id SAA29912 for hackers-outgoing; Mon, 30 Jun 1997 18:50:23 -0700 (PDT) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA29907 for ; Mon, 30 Jun 1997 18:50:20 -0700 (PDT) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id SAA06058; Mon, 30 Jun 1997 18:46:01 -0700 (PDT) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpd006055; Tue Jul 1 01:45:50 1997 Message-ID: <33B860FD.31DFF4F5@whistle.com> Date: Mon, 30 Jun 1997 18:44:29 -0700 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0Gold (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: Vivek Sadananda Pai CC: freebsd-hackers@FreeBSD.ORG Subject: Re: mbuf external storage References: <199706302242.RAA12342@cs.rice.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Vivek Sadananda Pai wrote: > I'm interested in mbufs with external storage, particularly when that > storage is not in the form of mbufs clusters. I've examined the mbuf.h > file, and the structure for external storage is: > > struct m_ext { > caddr_t ext_buf; /* start of buffer */ > void (*ext_free) /* free routine if not the usual */ > __P((caddr_t, u_int)); > u_int ext_size; /* size of buffer, for ext_free */ > void (*ext_ref) /* add a reference to the ext object */ > __P((caddr_t, u_int)); > }; Yes I added this to version 1.17 of mbuf.h this was inspired by code in the old BSD4.3 code that I needed for some applications. This was also in OSF1 which became Digital Unix. > > I also searched through old mail on this topic, and it seems that this > structure used to be a lot richer, with some form of "opaque" argument > (ext_arg) that could be used by whatever was allocating/freeing the > external memory. Having something like this would be extremely useful > in certain scenarios, and I've used it to good effect in Digital Unix. > We're examining FreeBSD as a platform for doing some I/O research, and > the package we want to port uses this "ext_arg" convention. The struct was actually not so rich. there was TALK of adding even more than I did. do a search in current and hackers using "mbuf AND external" I agree that the opaque argument would be useful. > > Does anyone know if there are any plans of (re)including this, or if > there's some reason why it was removed? It was never there. It might be useful to include it.. I just overload the 'ext_size' argument. (as nothing uses it). I wanted to do more, but was afraid of backlash :) julian