Skip site navigation (1)Skip section navigation (2)
Date:      17 Mar 2001 16:50:16 +0100
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        Maxime Henrion <mux@qualys.com>
Cc:        arch@FreeBSD.ORG
Subject:   Re: Proposal for a new syscall
Message-ID:  <xzpzoekcs3r.fsf@flood.ping.uio.no>
In-Reply-To: Maxime Henrion's message of "Sat, 17 Mar 2001 16:44:11 %2B0100"
References:  <20010317164411.A420@nebula.cybercable.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
Maxime Henrion <mux@qualys.com> writes:
> While I was writing a network application, I was thinking that it would
> be nice to have a syscall that could "bind" two file descriptors, of any
> type (socket, file...), a bit like funopen() does in the libc.

You don't seem to understand what funopen() really does...

>                                                                Having
> such a syscall in the kernel would allow to implement "zero-copy"
> wherever it is feasible.

No. It would save you two copies and a bunch of syscalls, but it
wouldn't be real zero-copy, just "n-2 copy" instead of "n copy".

> Then, sendfile() would just be a particular case of this syscall, where
> the input fd is a file and the output fd is a socket, and it could be
> rewritten using it.

No. Have you looked at the sendfile() code?

DES
-- 
Dag-Erling Smorgrav - des@ofug.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpzoekcs3r.fsf>