Subject: Re: zero-copy tcp
To: Dublet <dublet@dublet.org>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-net
Date: 11/11/2002 09:48:05
On Mon, Nov 11, 2002 at 06:34:44PM +0100, Dublet wrote:

 > I'm programming my own HTTP daemon, and I'd like it to take advantage of the NetBSD zero-copy tcp.
 > I've already made it to mmap() the file, and then write() it, but does this mean it automatically takes advantage of zero-copy?
 > The original post (http://mail-index.netbsd.org/current-users/2002/05/02/0016.html) does mention that writes have to be big enough, when exactly is big enough? 4096? 8192? It would be convenient to know how to implement it, and what the limits are for it to be activated, etc.

Right now, "big enough" is 4K.  mmap+write should do precisely what you
want.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>