本文已被:浏览 2059次 下载 4117次
Received:July 22, 2011 Revised:September 05, 2011
Received:July 22, 2011 Revised:September 05, 2011
中文摘要: 针对目前网络分析工具的报文捕获机制及优缺点,实现了一种新的专用于报文捕获的网络协议簇—PF_ZEROCOPY。该协议簇基于零拷贝思想,借助内存共享技术,将网络报文直接DMA传输到用户空间的缓存区,绕开Linux网络协议栈、减少了内存拷贝次数;使用DMA缓存描述符环,实现了网卡和用户程序无冲突访问共享缓冲区;通过封装成内核网络协议簇,PF_ZEROCOPY具有易于应用和移植的特点。实验结果分析表明,该方法对随机长度的报文捕获速率可达900Mb/s以上,与libpcap相比较为明显地改善了报文捕获的能力。
中文关键词: PF_ZEROCOPY 零拷贝 DMA 内存共享 描述符环
Abstract:Aiming at the performance of packet capture, this paper realizes a new protocol family dedicated to packet capture called PF_ZEROCOPY. Based on Zero-Copy and memory sharing, PF_ZEROCOPY transfers the packet from network card to the memory that user program can access directly by DMA, so that bypasses network protocols, and reduces the times of data copy. By using the descriptor ring of DMA buffer, network card and user program can work without collision to access the shared memory. PF_ZEROCOPY is easy to use and transplant by packaged into protocol family. Experimental results indicate that the throughput of PF_ZEROCOPY for random size messages is above 900Mb/s, and PF_ZEROCOPY surpasses libpcap's in performance.
keywords: PF_ZEROCOPY zero-copy DMA memory sharing descriptor ring
文章编号: 中图分类号: 文献标志码:
基金项目:重庆市自然科学基金(CSTC)(2008BB2307)
引用文本:
刘小威,陈蜀宇,卢尧,林铭炜.零拷贝技术在网络分析工具中的应用.计算机系统应用,2012,21(4):169-173
LIU Xiao-Wei,CHEN Shu-Yu,LU Yao,LIN Ming-Wei.Application of Zero-Copy Technology to Network Analysis System.COMPUTER SYSTEMS APPLICATIONS,2012,21(4):169-173
刘小威,陈蜀宇,卢尧,林铭炜.零拷贝技术在网络分析工具中的应用.计算机系统应用,2012,21(4):169-173
LIU Xiao-Wei,CHEN Shu-Yu,LU Yao,LIN Ming-Wei.Application of Zero-Copy Technology to Network Analysis System.COMPUTER SYSTEMS APPLICATIONS,2012,21(4):169-173