On Tuesday 14 January 2003 13:50, Catalin BOIE wrote: > > Hello, > > Hello! > > > I need to implement a system which acts somewhat like a router, i.e. it > > grabs udp packets from the internet, processess them and then sends them > > on an ethernet via broadcast. Following the indications I got on a > > linux-kernel list thread, 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 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. > > It's a userspace program or a kernel module? Right now it's userspace, but if sendto() won't do, I suppose I would need to write a kernel module to do that DMA stuff... - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html