Re: Kernel hooks just to get rid of copy_[to/from]_user() and syscall overhead?

From: Mihnea Balta (dark_lkml@mymail.ro)
Date: Tue Jan 14 2003 - 06:47:16 EST


On Friday 10 January 2003 16:45, Mihnea Balta wrote:
> Hi,
>
> I have to implement a system which grabs udp packets off a gigabit
> connection, take some basic action based on what they contain, repack their
> data with a custom protocol header and send them through a gigabit ethernet
> interface on broadcast.

Following the indications I got here, I did the packet recieving stuff using a
mmaped packet socket. From what I understand, that is a recieve-only
interface, so it seems that I'm stuck with old sendto() for putting the
packets back on the wire. I'd like to know if sendto() can do 20000 (small)
packets/second on a fast x86 MP machine (dual or maybe quad) which doesn't do
much besides this routing process. If it can't, please tell me if there's any
feasible way of implementing a kind of buffer, i.e. keeping recieved packets
in a local buffer and sending them alltoghether when the buffer fills or
after a timer expires (I'm thinking DMA to the NIC or something simmilar, as
the buffer will contain the complete packets, with all the required packets).

Thanks,
Mihnea

PS: feasible == not spending 1 month development time for a 1
microsecond/packet improvement.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jan 15 2003 - 22:00:50 EST