From owner-freebsd-hackers Thu May 9 10:29:21 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from pintail.mail.pas.earthlink.net (pintail.mail.pas.earthlink.net [207.217.120.122]) by hub.freebsd.org (Postfix) with ESMTP id 1E59537B407 for ; Thu, 9 May 2002 10:29:18 -0700 (PDT) Received: from pool0470.cvx22-bradley.dialup.earthlink.net ([209.179.199.215] helo=mindspring.com) by pintail.mail.pas.earthlink.net with esmtp (Exim 3.33 #2) id 175rj9-0003d9-00; Thu, 09 May 2002 10:29:16 -0700 Message-ID: <3CDAB1CD.B62BDA28@mindspring.com> Date: Thu, 09 May 2002 10:28:45 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: mark tinguely Cc: freebsd-hackers@FreeBSD.ORG, les@safety.net Subject: Re: Mbuf questions References: <200205091323.g49DN8H00652@web.cs.ndsu.nodak.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG mark tinguely wrote: > why don't you place the buffer pointer into an external mbuf. > this requires you to set several fields but you can use the macro > MCLGET as a reference. > > You will also need to use the ext_free() pointer to a routine to correctly > free the buffer when the mbuf is released. There is only one ext_free() > per mbuf, if a stack layer also uses this function, then we lose the > earlier function unless saved/restored as part of the mbuf setup/freeing. And if this doesn't make sense to the original poster... look at the "sendfile" source code, which uses external mbufs that point to buffer cache entries. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message