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.
翻译:可编程数据平面使用户能够为网络设备设计数据平面算法,为网络定制提供了极大的灵活性。协议无关包处理器编程语言(P4)已成为数据平面编程中应用最广泛的抽象、编程语言和框架。然而,现有仿真平台缺乏对基于P4网络的高性能支持。本文介绍了P4sim,一个基于bmv2和NS4构建的高性能P4驱动仿真框架,并与ns-3无缝集成。该框架改进了队列建模、时间调度和P4架构支持,将兼容性扩展到V1model、PSA和PNA。P4sim能够实现高效的数据包处理、精确的时间跟踪,以及支持P4的主机与交换机之间的无缝交互。我们从性能和队列管理两方面评估P4sim,并通过两个典型用例(基础隧道和负载均衡)展示其功能。结果表明,P4sim是推动可编程网络研究与教育的强大工具。