Support for zero copy sockets

Adrian Chadd adrian at freebsd.org
Mon Aug 11 18:04:20 UTC 2014


On 11 August 2014 01:26, Victor Balada Diaz <victor at bsdes.net> wrote:
> On Mon, Aug 04, 2014 at 10:00:16AM -0700, Sushanth Rai via freebsd-hackers wrote:
>> Hello,
>>
>> FreeBSD 10 release sources doesn't seem to have zero copy socket code anymore. What's is alternative to do zero_copy ?
>>
>> Thanks,
>> Sushanth
>
> You need to use sendfile(2). In the man page is stated that the implementation in FreeBSD
> is zero copy.
>
> You can also check:
>
> http://svnweb.freebsd.org/base?view=revision&revision=255608
>

I'd like to reintroduce a zero copy socket IO method for at least
write that doesn't rely on sendfile.

The zero-copy socket page flipping thing was interesting because IIRC
tried to work for both sending and receiving socket data. Doing that
via an API would be nicer.

So, if people have an idea for how it could be done / what the API
looks like then I'm all ears.



-a


More information about the freebsd-hackers mailing list