🤖 AI Summary
Existing P4 network simulation platforms struggle to simultaneously achieve high fidelity and high performance, hindering the design and customization of programmable data-plane algorithms. This paper introduces the first ns-3-native, high-performance P4 simulation framework, featuring a novel deep integration architecture between the Behavioral Model v2 (bmv2) and ns-3. It supports multiple P4 target architectures—including V1Model, PSA, and PNA—and enables microsecond-level time synchronization, fine-grained queue modeling (e.g., PIFO and ECN-aware queues), and P4Runtime-driven host-switch co-simulation. Evaluated on Basic Tunneling and Load Balancing benchmarks, the framework achieves an equivalent throughput exceeding 100 Gbps—over one order of magnitude higher than prior solutions—while maintaining queue delay error below 1.2%. These advances significantly enhance both simulation fidelity and execution efficiency for programmable data-plane research and development.
📝 Abstract
Programmable data planes enable users to design data plane algorithms for network devices, providing extensive flexibility for network customization. Programming Protocol-Independent Packet Processors (P4) has become the most widely adopted abstraction, programming language, and framework for data plane programming. However, existing simulation platforms lack high-performance support for P4-based networks. This paper introduces P4sim, a high-performance P4-driven simulation framework built on bmv2 and NS4, seamlessly integrated with ns-3. It improves queue modeling, time scheduling, and P4 architecture support, extending compatibility to V1model, PSA, and PNA. P4sim enables efficient packet processing, accurate time tracking, and seamless interaction between P4-enabled hosts and switches. We evaluate the P4sim in terms of performance and queue management and demonstrate its capabilities using two common use cases: Basic Tunneling and Load Balancing. The results highlight the P4sim as a powerful tool for advancing research and education in programmable networks.