> one disadvantage of the library approach in the unix environment is that
> you're once again back having to know which `access method' to use,
> to pass the file descriptor or handle to the right library.
> i might easily have misunderstood something though.

They already have the file descriptor (i.e. socket descr) in
order to get at the data.  All they have to do is to mmap
some memory and have the network controller copy incoming tcp
packets for this connection directly into this memory.  By
using this memory as a circular buffer one can avoid all
locking (memory in the range [read ptr .. write ptr) is owned
by the app, [write ptr .. read ptr) is owned by the driver).
The driver will have to checksum the pkt and be able to
map seq. # to a memory address within the buffer but one can
do all the grotty protocol processing in the user code.  A
similar buffer can be used for outgoing data.  I bet they do
something along these lines.

Hasn't this idea been used in various forms over the years?

Reply via email to