Subject: Re: sendfile support in NetBSD
To: None <tls@rek.tjls.com>
From: Perry E. Metzger <perry@piermont.com>
List: netbsd-users
Date: 02/27/2007 18:38:58
Thor Lancelot Simon <tls@rek.tjls.com> writes:
> On Tue, Feb 27, 2007 at 02:27:44PM +0200, Shadi Ammouri wrote:
>> Hi,
>>
>> Is there any equivalent for Linux's sendfile()/splice() system call.
>
> Because sendfile() blocks the calling process until the send is complete,
> it offers no more benefit that the zero-copy TCP send that NetBSD already
> has.
I think the question was "is there an equivalent of the Linux
sendfile machinery". The answer is, no, NetBSD doesn't have it (though
FreeBSD does).
In re Thor's comment:, let me note that if only for compatibility
reasons, it is nice to support widely used APIs. Solaris, FreeBSD,
Linux and others have sendfile(2), so rather than being defensive
about it I think it would be better to admit that it would be better
if NetBSD had it so we could be API compatible, but it is not
currently supported.
Perry