On Fri, 2007-11-09 at 10:17 +0800, Tang Rui wrote: [...] > I want to develop a TCP/UDP daemon in LINUX kernel-space, I use > this demon to receive data from specified ip port, and then injector > the data to another driver or device. > > Most of cases, we can use user-space socket interface to receive > TCP/UDP packet , then send data to driver by driver’s user-space file > control interface , > > Why not we do such thing in kernel space? Dose any one have It buys much less performance then you think/believe if you implement it sanely in user-space - e.g. learn about the sendfile() and splice() system-calls. If you need almost-realtime, learn about POSIX real-time priorities. And there are other means to solve other potential problems good enough for almost all applications. If you need real hard real-time, learn about RTAI. And you have to cope with all the kernel-internal programming restrictions, non-existing debug features, risk of killing/booting/freezing the system just because your daemon has a silly bug. > experience about this? No, because in almost all cases the network traffic is slow enough for user-space. So perhaps you can describe what's the primary reason you want to so it in the kernel? Bernd -- Firmix Software GmbH http://www.firmix.at/ mobil: +43 664 4416156 fax: +43 1 7890849-55 Embedded Linux Development and Services -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ