> > > Well, what's a pipe? Essentially the same as what we're doing, but > > > I > > > don't know if it's implemented (or can be implement) as efficient > > > as we > > > can do it - we'd just have to pass area_id's + offsets around for > > > memory access, no memcpy()s involved (only in the backend for the > > > BSD > > > sockets - or the other way around in the net_server). > > > > If we can make it better then bring it on! I'll bow to your superior > > knowledge on this and await the code that'll be awesome (as normal > > from > > you)! > > Hehe :-)) > I just think that it's not possible to have zero-copy pipes (since they > rely on the standard read/write functions and a local buffer), but we > could easily share our buffer-areas between the server and the client. OK. Excellent! > Since we have to copy the buffers for recv()/send() anyway, we could > use them, but then there is the question how the backend handles pipes > - and I just don't know how it's done, but AFAICT there has to be at > least two copies with pipes, but only one when we directly use our > buffers. Guess I follow this. Now, how about we start by using the same mechanism as the BSD sockets? Basically each module gets a userreq function that takes a set of arguments, basically 3 pointers cast as struct mbuf* and then sorted out as required and we use the PRU_ codes to tell it what action is requested. This is known code that can be found and looked at in a lot of places and atleast gets us started. Once we have it working we can always rip it out and start again with something better :) david