Isolation Mechanisms for High-Speed Packet-Processing Pipelines

Tao Wang, Xiangrui Yang, Gianni Antichi, Anirudh Sivaraman, Aurojit Panda

TL;DR

This paper introduces Menshen, a novel system that enables multiple independent packet-processing modules to run concurrently on a single high-speed network device without interfering with each other. Menshen achieves this by extending existing programmable pipeline architectures with lightweight hardware primitives and compiler modifications, paving the way for more flexible and efficient network infrastructure.

What Problem Does This Paper Address?

Modern network devices, like programmable switches and SmartNICs, are increasingly capable of performing complex packet processing tasks beyond simple forwarding. This programmability allows for a wide range of services, from congestion control to machine learning. As these devices become more powerful, there's a growing need to run multiple, independently developed packet-processing modules on the same hardware. These modules might come from different teams within an organization or even different tenants in a cloud environment. The critical challenge is ensuring that these modules, each with its own logic and resource requirements, do not negatively impact each other's performance, behavior, or access to shared resources. Existing solutions for high-speed pipelines offer limited isolation, often only allowing state sharing but not full resource partitioning.

Methods

Menshen tackles the isolation problem by combining two key techniques:

  • Space Partitioning: This involves dividing the pipeline's resources (like match-action table entries and stateful memory) among different modules. This is straightforward for resources that can be granularly allocated.
  • Overlays: For resources that are difficult to partition (e.g., key extractors, ALUs), Menshen uses "overlays." This involves adding small, per-module configuration lookup tables. When a packet arrives, its module ID is used to index these tables, retrieving the specific configuration for that module to use the shared resource. This allows modules to have exclusive access to shared hardware units like ALUs or Packet Header Vector (PHV) containers within a stage when processing their packets.

Menshen also introduces several hardware primitives:

  • Packet Filter: Filters out reconfiguration packets from data packets.
  • Programmable Parser/Deparser: Extracts and reconstructs packet headers based on module-specific configurations.
  • Key Extractor and Key Mask Tables: Construct lookup keys for match-action tables, allowing for module-specific key formation.
  • Segment Table: Manages module-specific access to stateful memory.

On the software side, Menshen modifies the P4-16 compiler to support multiple modules and includes a system-level module that provides common services (like IP address translation and routing) to other modules, abstracting away underlying physical details.

Datasets

Not discussed in the paper. The paper uses tutorial P4 programs and simplified versions of existing projects (NetCache, NetChain) for evaluation.

Key Insights and Ideas

  • Overlays are Key for Shared Resources: The most significant insight is the use of overlays to provide isolation for shared hardware resources that are difficult to physically partition. This is a clever way to avoid sacrificing performance or resource availability by naively splitting these units.
  • Module ID as the Central Identifier: The VLAN ID (or similar fields) is repurposed as a module identifier, acting as a crucial index for all isolation mechanisms.
  • Preserving the RMT Invariant: Menshen's design prioritizes maintaining the RMT pipeline's invariant of not stalling, ensuring that isolation doesn't come at the cost of performance.
  • Hardware Primitives for Isolation: The paper demonstrates that adding a small set of dedicated hardware primitives can effectively enforce isolation in high-speed pipelines.
  • Rapid and Disruption-Free Reconfiguration: A key goal achieved is the ability to reconfigure individual modules without affecting others, which is crucial for dynamic network environments.

Key Results

  • Isolation Achieved: Menshen successfully isolates modules, preventing interference in behavior and throughput. Spot checks with concurrent module execution confirmed correct isolation.
  • Rapid Reconfiguration: Menshen's reconfiguration time is comparable to commercial solutions like Tofino, with compilation taking seconds and hardware configuration taking milliseconds.
  • Lightweight Overhead: Menshen adds a modest overhead in terms of hardware resources. On FPGAs, it uses an additional 0.65% (NetFPGA) to 0.15% (Corundum) of LUTs. For ASICs, it incurs approximately 11.4% additional chip area compared to a baseline RMT design, which is considered moderate.
  • Performance: Optimized Menshen on Corundum achieves up to 100 Gbit/s throughput. Latency is in the order of microseconds.
  • Disruption-Free Updates: Experiments showed that reconfiguring one module had no impact on the throughput of other concurrently running modules.

Limitations and Future Work

  • Policy Design: The paper acknowledges that it has not designed policies for deciding how much of each resource a module should be allocated.
  • FPGA Limitations: The FPGA implementation lacks some features found in commercial RMT implementations.
  • Compiler Optimizations: Menshen's compiler does not currently perform advanced optimizations for code generation or memory allocation.
  • Output Bandwidth Management: Menshen focuses on pipeline isolation and does not address the orthogonal problem of managing output link bandwidth contention between modules. The authors suggest solutions like PIFO for this.
  • Ternary Matching: While the paper discusses how isolation could be extended to ternary match tables using Xilinx CAM IP, the current implementation only supports exact matching.
  • Scalability of Entries: The current prototype has limitations on the number of entries in certain tables, affecting the maximum number of modules that can be supported. Future work could explore hash tables for exact matching to improve scalability.

Summary updated

BibTeX
@inproceedings{wang2022isolation,
  author = {Tao Wang and Xiangrui Yang and Gianni Antichi and Anirudh Sivaraman and Aurojit Panda},
  title = {{Isolation Mechanisms for High-Speed Packet-Processing Pipelines}},
  booktitle = {NSDI},
  year = {2022},
  url = {https://openreview.net/forum?id=jFfK9RHR_p},
}
Figure