From: Giuseppe C. <pep...@gm...> - 2008-02-01 10:46:11
|
Hi, > I have to read UDP packets from sk_buff to my module in kernel space and > the udp stack uses copy_to_user() to do my task. I'm wondering if using > dma for mem-to-mem copy can improve data transfer performance instead of > using copy_to_user()??? Often to take the best performance by using a DMA engine, e.g. in a network driver, the zero-copy mechanism is used because It essentially avoids memcpy. Abut how to implement the zero-copy mechanism you ought to start looking at the network device drivers within the kernel source tree. >If yes, could someone gives me some hints to go with it. I'm currently >working on ST7109 and stlinux 2.6.17.14 <http://2.6.17.14><http://2.6.17.14/>. I have tried >the guide at > http://www.stlinux.com/docs/manual/distribution/fdma_legacy.php<http://www.stlinux.com/docs/manual/distribution/fdma_legacy.php>but not >succeeded, kernel crashed with the following error: Concerning the 7109; it has an embedded MAC (core by Synopsys) with a own DMA (no FDMA). You could directly browse the driver source (called stmmac within the STLinux kernels) where zero-copy is fully implemented. For more information also visit: http://stlinux.com/docs/manual/distribution/distribution_guide5.php and STLinux Bugzilla. |