vmsplice & splice usage in user space
Hi,
I'm using vmsplice & splice to send memory buffers through a TCP
socket.
I have two issues using these methods:
1) According to the documentation, when using vmsplice with the flag
SPLICE_F_GIFT, you cannot modify the buffer you've "given" the kernel.
Currently, each time I want to send a buffer, I have to allocate a
page-aligned buffer (fill it with data) and send it using vmsplice-
splice. When can I deallocate this buffer? Is it possible to modify
this buffer after the buffer is sent through the socket?
2) The buffer should be page-aligned both in memory and in length, but
most of the time the sent messages (to the TCP socket) - are smaller
than a page size - is it possible to "clear" the pipe from the
remaining buffer?
Thanks!
Lenny.
|