作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• 体系结构与软件技术 • 上一篇    下一篇

基于多核处理器的无锁零拷贝数据包转发框架

肖月振,华 蓓   

  1. (中国科学技术大学计算机科学与技术学院,合肥 230026)
  • 收稿日期:2012-11-02 出版日期:2013-12-15 发布日期:2013-12-13
  • 作者简介:肖月振(1985-),男,硕士研究生,主研方向:多核计算;华 蓓,教授、博士生导师

Lock-free and Zero-copy Framework for Packet Forwarding Based on Multi-core Processor

XIAO Yue-zhen, HUA Bei   

  1. (School of Computer Science and Technology, University of Science and Technology of China, Hefei 230026, China)
  • Received:2012-11-02 Online:2013-12-15 Published:2013-12-13

摘要: 为突破高速软件路由器转发路径中存储访问方面的性能瓶颈,分析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

中图分类号: