PlanB: Efficient Software IPv6 Lookup with Linearized B+-Tree

Zhihao Zhang (Alibaba Cloud, NICE Lab, XMU, and Tsinghua University), Lanzheng Liu (Alibaba Cloud), Chen Chen (Alibaba Cloud), Huiba Li (Alibaba Cloud), Jiwu Shu (Tsinghua University), Windsor Hsu (Alibaba Cloud), Yiming Zhang (NICE Lab, SJTU, and NICE Lab, XMU)

23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26) · Day 2 · From Silicon to Networked Systems

Overview

The global transition from IPv4 to IPv6 is accelerating, driven by address exhaustion and shifting network traffic patterns. According to Google statistics, IPv6 adoption has grown from 20% in 2019 to 50% by 2026. However, this transition imposes severe operational bottlenecks on internet routers. While traditional hardware-based forwarding information base (FIB) lookups using TCAMs (Ternary Content-Addressable Memories), ASICs, or FPGAs offer high throughput, they are expensive, power-hungry, and lack the flexibility required by software-defined networking (SDN) and network function virtualization (NFV). Conversely, commodity software processing on general-purpose CPUs offers flexibility and lower cost, but suffers from a critical performance degradation when handling IPv6 packets.

Watch on YouTube · Slides

Visual summary for PlanB: Efficient Software IPv6 Lookup with Linearized B+-Tree by Zhihao Zhang, Lanzheng Liu, Chen Chen, Huiba Li, Jiwu Shu, Windsor Hsu, Yiming Zhang
Visual summary for PlanB: Efficient Software IPv6 Lookup with Linearized B+-Tree by Zhihao Zhang, Lanzheng Liu, Chen Chen, Huiba Li, Jiwu Shu, Windsor Hsu, Yiming Zhang

Key moments

  1. 0:00 Introduction and background on IPv6 lookup challenges
  2. 2:00 Limitations of hardware vs. software IP routing lookup
  3. 4:00 Overview of PlanB system design components
  4. 5:30 Range conversion and one-dimensional interval partitioning
  5. 7:00 Linearized B+ tree layout and pointerless array design
  6. 8:00 SIMD vectorization, branch-free traversal, and loop unrolling
  7. 10:00 Dynamic FIB updates and DPDK network environment integration
  8. 12:00 Evaluation, throughput benchmarks, and multi-core scalability
  9. 14:00 Ablation study and performance gains breakdown

PlanB: Efficient Software IPv6 Lookup with Linearized B+-Tree

Speakers: Zhihao Zhang (Alibaba Cloud, NICE Lab, XMU, and Tsinghua University); Lanzheng Liu (Alibaba Cloud); Chen Chen (Alibaba Cloud); Huiba Li (Alibaba Cloud); Jiwu Shu (Tsinghua University); Windsor Hsu (Alibaba Cloud); Yiming Zhang (NICE Lab, SJTU, and NICE Lab, XMU)

Conference: USENIX NSDI

YouTube: https://www.youtube.com/watch?v=fHGHCXqhkTM

Overview

The global transition from IPv4 to IPv6 is accelerating, driven by address exhaustion and shifting network traffic patterns. According to Google statistics, IPv6 adoption has grown from 20% in 2019 to 50% by 2026. However, this transition imposes severe operational bottlenecks on internet routers. While traditional hardware-based forwarding information base (FIB) lookups using TCAMs (Ternary Content-Addressable Memories), ASICs, or FPGAs offer high throughput, they are expensive, power-hungry, and lack the flexibility required by software-defined networking (SDN) and network function virtualization (NFV). Conversely, commodity software processing on general-purpose CPUs offers flexibility and lower cost, but suffers from a critical performance degradation when handling IPv6 packets.

This talk presents PlanB, an efficient software IPv6 lookup engine designed by researchers from Alibaba Cloud, Tsinghua University, Shanghai Jiao Tong University, and Xiamen University. The core problem PlanB solves is the massive expansion of memory footprints and cache misses caused by 128-bit IPv6 addresses, which are 10 to 50 times larger than their 32-bit IPv4 counterparts. By transforming the inherently two-dimensional longest prefix match (LPM) problem into a one-dimensional interval search, and pairing this with a linearized B+-tree optimized via AVX-512 vectorization, batching, branch-free logic, and loop unrolling, PlanB achieves unprecedented lookup speeds on commodity hardware.

PlanB delivers dramatic improvements across both throughput and latency. Integrated within the DPDK (Data Plane Development Kit) framework, PlanB achieves L3 forwarding throughputs 1.7 to 5.8 times faster than baseline algorithms on Intel servers. On a 12-core AMD Ryzen 9 processor, a single core reaches a peak speed of 390 million lookups per second (MLPS), outperforming existing trie-based and hash-based methods by 1.6x to 12.5x. Furthermore, PlanB reduces FIB memory overhead by 56% to 92%, allowing entire routing tables containing up to 1 million prefixes to fit comfortably within standard L3 CPU caches.

Background

▶ Watch: Introduction and background on IPv6 lookup challenges (0:00)

As network traffic shifts from IPv4 to IPv6, the FIB tables in global routers are expanding rapidly. Data from RIPE root collectors documents continuous growth in aggregate prefix counts over recent years. Moreover, the distribution of prefix lengths is heavily skewed: a small group of specific prefix lengths—such as /48, /32, and /40—dominate routing tables, accounting for up to 80% of routing entries. IP lookup determines the next-hop forwarding path by finding the longest prefix match for an incoming packet's destination address.

Network system developers must choose between hardware and software LPM processing. Hardware implementations (TCAMs, ASICs, FPGAs) provide line-rate throughput but fail to scale economically or adapt dynamically to modern SDN architectures. Software packet processing on commodity CPUs provides the necessary flexibility, but executing LPM operations for IPv6 creates a severe CPU bottleneck.

The root cause of this bottleneck is a fundamental mismatch between the lookup problem dimension and the execution algorithm. IPv6 addresses are 128 bits long instead of 32 bits. When applying legacy trie-based or hash-based algorithms to 128-bit spaces, memory footprints expand by 10 to 50 times. The expanded data structures can no longer fit within the limited capacity of fast on-chip CPU caches, forcing data to spill over into slower main memory. Deeper trie structures and scattered memory accesses result in catastrophic L3 cache misses, making IPv6 lookups 3 to 10 times more computationally expensive than IPv4 lookups.

Inherently, LPM is a two-dimensional search process requiring a system to match a prefix value and subsequently determine the maximum prefix length. Existing algorithms treat LPM as two separate one-dimensional search phases:

  1. Trie-based methods traverse the address space bit-by-bit. This creates deep data structures that enforce frequent memory indirections and cache thrashing.
  2. Hash-based methods probe multiple hash tables sorted by prefix length. This approach is highly susceptible to table collisions and lacks bounded worst-case execution times.

Key Findings

▶ Watch: Overview of PlanB system design components (4:00)

PlanB resolves these architectural challenges through a systematic restructuring of the IPv6 lookup pipeline. The system's main discoveries and contributions can be summarized across algorithmic design, hardware acceleration, and memory footprint reduction:

  • Dimensionality Reduction: By converting overlapping prefixes into non-overlapping elementary intervals, PlanB successfully reduces the two-dimensional LPM search to a one-dimensional array predecessor search.
  • Cache-Optimized Layout: The linearized B+-tree completely eliminates interior node pointers. Child node positions are calculated dynamically using lightweight arithmetic on array indices, and node sizes are aligned precisely to 64-byte CPU cache lines.
  • SIMD-Accelerated Vectorization: Utilizing AVX-512 (alongside support for AVX2 and ARM NEON), PlanB compares eight tree keys simultaneously against a broadcasted target IP address in a single instruction cycle without stalling the CPU pipeline.
  • Branch-Free Execution: By translating vector comparison outputs into an 8-bit mask and applying a population count (popcount) instruction, PlanB determines the next child branch index without executing a single if/else conditional jump.
  • Scalable Performance: PlanB achieves a peak single-core lookup rate of 390 MLPS on an AMD Ryzen 9 processor and exhibits near-linear multi-core scalability, reaching an aggregate throughput of 4.6 billion lookups per second (BLPS) across a 24-core Intel server.
  • Memory Compression: PlanB reduces FIB memory overhead by 56% to 92%, shrinking a 1-million prefix routing table down to approximately 36 megabytes, which fits entirely within L3 cache.

Technical Deep Dive

▶ Watch: Linearized B+ tree layout and pointerless array design (7:00)

The architecture of PlanB is divided into three primary components: dimensionality reduction, a linearized B+-tree data structure, and hardware-symbiotic search logic.

1. Range Conversion and Interval Partitioning

PlanB flattens the two-dimensional prefix space into a set of deterministic boundaries. Every routing rule, defined by a prefix and a length, is mathematically converted into a closed IP address interval containing a start address and an end address. In this model, prefixes act as overlapping rectangles where the prefix length acts as a priority metric.

Following conversion, the system performs one-dimensional interval partitioning. It collects and sorts all start and end boundaries. These sorted boundaries partition the entire 128-bit IPv6 address space into a complete array of non-overlapping elementary intervals. PlanB assigns a definitive next hop to each interval based on the highest-priority prefix. Consequently, the two-dimensional search problem is transformed into a one-dimensional array predecessor search over this interval set.

2. Linearized B+-Tree Layout

Navigating this one-dimensional array efficiently requires a specialized memory layout. A standard flat array B-tree organizes search nodes in a continuous array, but requires the processor to verify whether the search target is found at every internal node during traversal. These checks introduce conditional branches in control flow, lowering CPU pipeline efficiency and rendering SIMD (Single Instruction, Multiple Data) instructions difficult to implement.

To overcome this, PlanB utilizes a modified layout called a linearized B+-tree:

  • Separation of Concerns: Internal nodes serve solely to guide the search, while the actual interval keys reside entirely in leaf nodes.
  • Pointerless Design: The array is pointerless. The positions of child nodes are calculated via explicit arithmetic on array indices (specifically adding child offsets to level start positions).
  • Cache-Line Alignment: Parameters are tuned so that each node aligns perfectly with a 64-byte CPU cache line. For instance, in the 64-bit case, the system constructs a node block where each node occupies exactly one cache line.

3. Hardware-Symbiotic Search Logic

Standard scalar searches execute sequential comparisons for each element in a node. PlanB replaces this with data-level vectorization using AVX-512 instructions. The algorithm broadcasts an incoming target IP address into all lanes of a 512-bit register, loads eight node keys from a cache line into a second register, and compares all eight keys against the target address simultaneously.

To prevent CPU branch mispredictions—which flush pipelines and cost dozens of clock cycles—PlanB implements a completely branch-free traversal:

  1. The vectorized comparison step outputs an 8-bit mask instead of a boolean value.
  2. The algorithm runs a population count (popcount) instruction on that bit mask.
  3. The numerical result of the popcount accurately produces the integer index of the next child branch to fetch.

Processor utilization is further maximized through batching and loop unrolling. By performing independent lookups in batches, PlanB pipelines operations to hide the microarchitectural latency of SIMD comparison instructions. Furthermore, because the linearized B+-tree guarantees a bounded depth (e.g., 1 million intervals require a maximum of 6 to 7 tree levels), the compiler fully unrolls search traversal loops at compile time, eliminating loop control tracking overhead.

4. Dynamic FIB Updates and DPDK Integration

Network environments demand dynamic FIB updates. PlanB handles modifications using a background rebuild and atomic swap mechanism:

  • Secondary CPU cores process new rule lists to construct a fresh one-dimensional interval structure and linearized B+-tree in a separate memory region.
  • Upon completion, a single atomic pointer swap updates the system to direct new lookup traffic to the updated tree.
  • This ensures a zero-lock condition on active search paths, guaranteeing deterministic update times. The old tree is subsequently deallocated.

PlanB integrates directly with the DPDK environment to handle packet input and output. The system configures RX, LPM, and TX pipelines in DPDK, pinning lookup modules to a single CPU cache group (such as an isolated core complex on AMD hardware). This decouples general packet threads from memory-intensive IP routing threads, ensuring that the linearized B+-tree data remains resident in L3 cache without eviction from other system tasks.

Experimental Setup & Results

▶ Watch: Dynamic FIB updates and DPDK network environment integration (10:00)

PlanB was evaluated systematically on two hardware platforms:

  • Intel Server: A 24-core Intel Xeon processor.
  • AMD Platform: A 12-core AMD Ryzen 9 processor.

The evaluation datasets consisted of 14 real-world FIB data sizes collected from the RIPE and RouteViews projects, alongside synthetic FIB scaling up to 1 million prefixes. PlanB was benchmarked against state-of-the-art software methods, including trie-based and hash-based algorithms.

Headline Results

  • L3 Forwarding Throughput: In DPDK tests, PlanB achieved processing rates 1.7 to 5.8 times faster than baseline algorithms on the Intel server.
  • Single-Core Lookup Speed: On the AMD CPU, PlanB reached a peak speed of 390 million lookups per second (MLPS) per core, outperforming other tested algorithms by 1.6 to 12.5 times.
  • Multi-Core Scalability: PlanB achieved near-linear scalability across both processors. Aggregate speeds reached 3.4 billion lookups per second (BLPS) across 12 cores on the AMD platform, and scaled up to 4.6 BLPS on the 24-core Intel platform.
  • Memory Footprint Reduction: PlanB reduced FIB memory overhead by 56% to 92%. The entire searchable array for 1 million prefixes occupies approximately 36 megabytes, allowing the routing table to fit entirely within standard L3 CPU caches.

Ablation Study

An ablation study isolates the individual performance contributions of PlanB's core components:

  1. Baseline: A sequential search using standard binary search yields 10 MLPS.
  2. Linearized B+-Tree: Adding the linearized B+-tree structure generates a 3.8x to 4.6x gain.
  3. SIMD Vectorization: Incorporating AVX-512 SIMD comparisons provides an additional 2x to 2.7x multiplier.
  4. Batching & Unrolling: Adding batching and loop unrolling delivers a final 3x to 4.5x boost, culminating in the headline 390 MLPS processing rate.

Practical Implications

▶ Watch: Ablation study and performance gains breakdown (14:00)

For infrastructure teams, network operators, and systems architects, PlanB demonstrates that software-based IPv6 routing can achieve performance levels traditionally reserved for expensive, inflexible hardware ASICs. By compressing the routing table footprint to fit within L3 cache and eliminating CPU branch misses, PlanB removes the software penalty associated with 128-bit IPv6 address spaces.

However, deployers must consider specific hardware and systems tradeoffs:

  • Hardware Dependencies: While PlanB functions efficiently without advanced SIMD, achieving peak performance (390 MLPS) requires processors supporting AVX-512 or equivalent wide vector instruction sets (such as ARM SVE).
  • Control Plane Integration: Dynamic updates rely on background rebuilding cores and atomic pointer swaps. While this ensures zero data-plane lock contention, operators must ensure sufficient multi-core headroom on the control plane to absorb the CPU cost of tree reconstruction during high churn events.
  • Deployment Flexibility: Because PlanB is adaptable to diverse hardware platforms—including FPGAs and ASICs utilizing on-chip SRAM—it bridges the gap between traditional networking hardware and modern software-defined networking (SDN) pipelines.

Key Takeaways

  • Dimensionality Reduction: Unifies the inherently two-dimensional longest prefix match problem into a one-dimensional interval search over non-overlapping address boundaries.
  • Pointerless Cache Alignment: Utilizes a linearized B+-tree where interior nodes guide searches without pointers, perfectly aligned to 64-byte CPU cache lines.
  • Branch-Free SIMD Execution: Employs AVX-512 vector comparisons paired with population count (popcount) instructions to eliminate CPU pipeline-flushing conditional branches entirely.
  • Massive Performance Gains: Achieves single-core speeds up to 390 MLPS and multi-core aggregate throughput up to 4.6 BLPS, outperforming baseline methods by up to 12.5x.
  • Cache-Resident Footprint: Reduces FIB memory usage by 56% to 92% (approx. 36 MB for 1 million prefixes), ensuring complete residency within L3 CPU caches.
  • Zero-Lock Dynamic Updates: Implements background tree reconstruction paired with atomic pointer swaps to maintain deterministic update times without stalling the active data plane.

About the Speaker(s)

Zhihao Zhang presented the work on behalf of a collaborative research team from Tsinghua University, Alibaba Cloud, Shanghai Jiao Tong University (NICE Lab), and Xiamen University. The research combines systems engineering, high-performance packet processing, and algorithmic optimization for next-generation cloud networks.

Reviews

  • Simon Wisk (Open Source Developer & AI Tooling Expert) — MUST SEE ★★★★★

→ Top-rated talks at 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)

All talks from 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)