摘要: 为突破高速软件路由器转发路径中存储访问方面的性能瓶颈,分析PacketShader和Netmap 2个软件路由器的转发结构和存在的问题,设计一个基于多核处理器的零拷贝包转发框架MapRouter。采用零拷贝技术去除包转发路径中的包拷贝,并借助并发无锁队列设计一个适合多端口间数据包零拷贝转发的包缓冲区管理方案。将高度优化的包I/O驱动、包缓冲区回收机制、无锁队列实现等一系列优化措施相结合,以提高转发速度。实验结果表明,对于不包括IP路由表查找的最小转发,MapRouter在模拟的两端口路由器上可以达到10 Gb/s的转发速度,与PacketShader和Netmap相比,其转发速度更高、CPU利用率更低。
关键词:
多核处理器,
数据包转发,
零拷贝,
包缓冲区管理,
并发无锁队列
Abstract: To work out performance bottleneck relating to memory accessing in forwarding path of high-speed software router, after introducing the forwarding frameworks of two software routers——PacketShader and Netmap, and analyzing their problems, this paper presents MapRouter, a zero-copy forwarding framework based on multi-core processors. MapRouter eliminates packet copying using zero-copy technology, and solves the problem of packet buffer management among multiple ports based on currently lock-free First In First Out(FIFO). By exploiting a series of optimization techniques including highly-optimized packet I/O driver, efficient packet buffer recycling mechanism, and high-efficient lock-free FIFO queue implementation, MapRouter achieves 10 Gb/s minimal forwarding(without IP address lookup) throughput on a two-port software router, which is higher than that of PacketShader and Netmap, meanwhile it has much lower CPU utilization ratio.
Key words:
multi-core processor,
packet forwarding,
zero-copy,
packet buffer management,
concurrent lock-free queue
中图分类号:
肖月振,华蓓. 基于多核处理器的无锁零拷贝数据包转发框架[J]. 计算机工程.
XIAO Yue-zhen, HUA Bei. Lock-free and Zero-copy Framework for Packet Forwarding Based on Multi-core Processor[J]. Computer Engineering.