PlanB: 高效的软件IPv6查找与线性化B+树
PlanB: Efficient Software IPv6 Lookup with Linearized $B^+$-Tree
AI总结:
PlanB通过将二维LPM问题转换为一维搜索问题,结合线性化B+树和CPU并行优化,实现高效IPv6查找,单核性能达390MLPS,12核达34BLPS,优于现有方案。
摘要:
IP查找通过最长前缀匹配(LPM)对数据包转发至关重要。然而,传统查找算法在IPv6转发信息基(FIB)中效率低下,因为FIB由长前缀集合组成,具有多样的长度。我们发现LPM本质上是基于前缀值和前缀长度的二维搜索问题,但现有算法通常将其视为两个独立的一维搜索层次,导致查找性能差和内存开销大。本文提出PlanB,一种高速IPv6查找的新方案。我们将二维LPM转换为等效的一维搜索问题,从而在前缀值和长度上统一搜索。然后,我们适应一种基于扁平数组的B树结构以满足LPM的需求,提出线性化B+树,基于此引入一种针对转换空间特性的高效搜索算法。为最大化性能,我们将PlanB与向量化、批处理、无分支逻辑和循环展开结合,以充分利用CPU并行性。广泛评估显示,PlanB在AMD处理器上使用实际IPv6 FIB时,单核性能达到390百万次查找每秒(MLPS),并可扩展到12核的340亿次查找每秒(BLPS)。这比现有最先进的软件方案(PopTrie、CP-Trie、Neurotrie和HBS)高1.6$\times$$\sim$14$\times$。
英文摘要:
IP lookup via Longest Prefix Match (LPM) is critical for packet forwarding. Unfortunately, conventional lookup algorithms are inefficient for IPv6 Forwarding Information Bases (FIBs), which are characterized by a set of long prefixes with diverse lengths. We observe that LPM inherently represents a two-dimensional (2D) search problem over both prefix values and prefix lengths, but existing algorithms mostly treat LPM as two separate levels of one-dimensional (1D) searches, causing poor lookup performance and high memory overhead. This paper presents PlanB, a novel scheme for high-speed IPv6 lookup. We transform the 2D LPM into an equivalent 1D search problem over elementary intervals, thereby unifying the search across prefix value and lengths. We then adapt a flat-array-based B-tree structure to the needs of LPM to propose the linearized $B^+$-tree, based on which we introduce an efficient search algorithm tailored to the properties of the transformed space. To maximize performance, we integrate PlanB with vectorization, batching, branch-free logic, and loop unrolling to fully exploit CPU parallelism. Extensive evaluation shows that PlanB achieves single-core performance of 390 Million Lookups Per Sec (MLPS) with real-world IPv6 FIBs on AMD processor, and scales to full-12-core performance of 3.4 Billion Lookups Per Sec (BLPS). This is 1.6$\times$$\sim$14$\times$ higher than state-of-the-art software-based schemes (PopTrie, CP-Trie, Neurotrie and HBS).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。