lkml.org 
[lkml]   [2009]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subjectsplice between non-pipe (tcp socket) fds
From
I want splice() to work with two tcp sockets().I think to implement
this. Two questions:

1. Is any work in this direction?
2. Why this functionality does not implemented now? any difficulties?

I think API should consist of 2 main functions:
1. detach available buffers from fd1 (and save info in some struct)
2. attach buffers to fd2 (from this struct)
this functions should be called under some lock to guarantee
atomicity. if something happen, return buffers back to original file.

I mean, that, for example, skb_splice_bits should not splice into
pipe..... it should splice skb into list of kernel buffers independent
from the "type" of fd (socket, file, and so on...)


At now, I think that the most quick way to acheive my results, is to
create intermediate temporary pipe inside kernel and splice from
non-pipe fd to pipe, and than from pipe to second non-pipe fd.

Is this method appropriate, as you think ?


\
 
 \ /
  Last update: 2009-09-22 08:25    [W:0.032 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site