针对传统的数据分组捕获技术在IPv6高速网络环境下表现出的严重分组丢失问题,采用"零拷贝"的思想设计并实现了一个适用于IPv6高速网络环境的数据分组捕获平台(HSPCP)。以Intel82541GI吉比特网卡驱动程序e1000为基础,对网络数据分组的接收流程进行改进,在内核中注册一个杂项设备,实现了其mmap和ioctl方法,并编写了与改进后零拷贝驱动相对应的用户空间报文捕获程序。通过实验将HSPCP与Libpcap进行了分组捕获效率对比测试,实验证明HSPCP相对于传统的Libpcap分组捕获方式在性能上有较明显的提高。
This paper designs a high speed packets capture platform(HSPCP) for IPv6 high speed environment using the idea of zero copy.It is mainly aimed at solving the serious packets dropping problems in tradition packets capture technology.The platform is based on Intel82541GI's gigabit ethernet driver e1000 to improve the network packets reception process.Through registered a miscellaneous equipment in kernel,it achieves mmap and ioctl methods and we rewrite a user space packets capture program according to the improved zero copy driver.The experiments show that HSPCP in packet capture rate,CPU utilization,the system context switch times have significantly improved than the libpcap capture manner.