Re: Linux Zero Copy

From: David S. Miller (davem@redhat.com)
Date: Thu Aug 14 2003 - 21:08:39 EST


On Thu, 14 Aug 2003 17:52:51 +0100
Jamie Lokier <jamie@xxxxxxxxxxxxx> wrote:

> Nagendra Singh Tomar wrote:
> > Thanx for ur reply. So this means that this Zero Copy can only be
> > used by senders who have to send data from a "file" that supports mmap. I
> > just can't fill a buffer in userland and expect it to be sent via Zero
> > Copy.
>
> You can fill a buffer in userland and send it with zerocopy. To do
> this, mmap() a file using PROT_READ|PROT_WRITE and MAP_FILE|MAP_SHARED.
>
> Then you can write directly to the file's pages in memory, and use
> sendfile() to send that data.

Exactly, get creative people :-)
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html