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

计算机工程

• 移动互联与通信技术 • 上一篇    下一篇

Trie树路由查找算法在网络处理器中的实现

张 琦,金胤丞,李 苗,章建雄   

  1. (中国电子科技集团公司第三十二研究所,上海 200233)
  • 收稿日期:2013-07-12 出版日期:2014-01-15 发布日期:2014-01-13
  • 作者简介:张 琦(1988-),男,硕士研究生,主研方向:网络处理器,数字系统设计;金胤丞,助理工程师;李 苗,高级工程师;章建雄,研究员

Implementation of Trie Tree Router Lookup Algorithm in Network Processor

ZHANG Qi, JIN Yin-cheng, LI Miao, ZHANG Jian-xiong   

  1. (The 32nd Research Institute of China Electronics Technology Group Corporation, Shanghai 200233, China)
  • Received:2013-07-12 Online:2014-01-15 Published:2014-01-13

摘要: Trie树数据结构的实现方法灵活,所需存储器空间小,是实现高速路由查找和分组转发的理想选择。为满足10 Gb/s线速度网络处理器中微引擎的设计要求,提出一种基于最优平衡、多层存储的Trie树路由查找算法。建立一种平衡的压缩树结构,将该树中相邻的多层节点压缩到一个存储节点中。通过构造特定的数据存储结构来减小树的搜索深度,以空间换取时间,从而提高路由查找速度和分组转发效率。在网络处理器的查找微引擎设计中实现Trie路由查找算法,实验结果表明,单个微引擎的查找速度为4.4 Mb/s,能达到节省存储空间、提高查找效率的效果。

关键词: 网络处理器, 路由查找, 最长前缀匹配, 路径压缩, Trie树, 算法实现

Abstract: Trie tree data structure is flexible to realize and require small storage space, and it is the preferred to realize high speed routing lookup and packet forwarding. In order to meet the design requirements of micro engine of 10 Gb/s line speed in Network Processor(NP), an optimal balance, multilayer storage routing lookup algorithm based on Trie tree is proposed. That is to establish a balanced compression tree structure, then the adjacent multi nodes are compressed to a storage node. It constructs a specific tree structure to reduce the tree search depth, exchanging space for time, improving the efficiency of lookup and packet forwarding. Router lookup algorithm based on Trie tree is implemented in NP design, and the algorithm performance is analyzed. A single micro engine lookup speed is up to 4.4 Mb/s, and it has an advantage of small storage and high update speed.

Key words: Network Processor(NP), router lookup, the longest prefix matching, path compression, Trie tree, algorithm implementation

中图分类号: