-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! I'm building an ad-hoc network driver that consists of a user-space daemon, and a kernel module to provide access for the daemon. I'm trying to decide whether to continue with my prior plan to use a bunch of mmap()'d memory to pass packets around, through a character device, or whether to instead use read/write operations on the character device. Using mmap()'d memory is presumably more efficient, because no memory copying has to be done, but in order to implement it, I'd imagine I have to write my own 'memory management' system, to allocate memory to packet buffers within the shared memory area, and I have to implement a shared kernel/userspace mutex (which is the cause of my current headache). That sounds like a lot of work. Using just read/write operations means I don't have to muck around with all that messy synchronisation/memory management/signalling, and can just pass data in the same was that tun/tap does. So, my question is this: How well does tun/tap perform, generally? Is it indeed the bottleneck I've previously been led to believe? Does anyone know what kind of throughput I can expect from a character device through read/write operations? If it's likely to be a bottleneck, I may just continue with the mmap() idea, but if there's good reason to believe it won't degrade performance, then I might just give up this folly and use read/write ops =) Cheers, Mike - -- Mike Tyson <mike@xxxxxxxxxxxxx> M: (+61) 0407 754 124 W: http://tzidesign.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFCsUEp/eih+gEb7pQRAoDTAKDLGU8aNHeg9d9oaCQKVVe+Lm1coQCfbRg3 JL5vxoW9K1kEjovO7k+Hd+Q= =qV0y -----END PGP SIGNATURE----- -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/