[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kernel to user transactions
On Fri, May 11, 2001 at 10:05:37PM -0700, mohan kumar wrote:
> we are developing a protocol analyser. our application
> needs to capture 100 mbps full duplex traffic. we have
> the application in windows which does the same. we are
> now trying to port it to linux. we came up with a
> basic application that captures traffic. iam very
> happy to say that linux was able to capture 100 mbps
> full duplex traffic more ( a lot of mores :-) to be
> correct) efficiantly than windows.
Heh, why doesn't that surprise me :)
> now that we are
> ready to port the application to linux, we are trying
> to find the best way to transfer data to the user
> space from kernel space. we tried normal blocking read
> and it works fine. but we dont want to waste cycle on
> transfering data to and fro kernel and user land. so
> we tried some other techniques like remaping the
> kernel land buffers to userland via mmap. that also
> works fine.
>
> now we have a doubt that, like maping kernal space
> buffers to user space, weather we will be able to map
> user space buffers to kernel space(so that we can
> write data directly from packet capture
> function(registered via dev_add_pack))
>
> so can u guys point out weather that kind of approach
> will work and if so where do i start looking?.
I'm not a networking guru, but I think what you are looking for is the
new "zerocopy networking" in linux 2.4. Not all network drivers support
it, but it looks very promising. Here is an explanation of the basic
idea behind it:
http://kt.zork.net/kernel-traffic/kt20010209_106.html#1
I don't know about the exact current state of zerocopy networking, I
think you should ask on the netdev mailing list (netdev@oss.sgi.com).
Erik
--
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands
Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/