A reference software switch that interprets P4 programs for developing, testing, and debugging P4 data planes.
Behavioral Model (bmv2) is a reference P4 software switch that interprets JSON files generated from P4 programs to implement specified packet-processing behavior. It serves as a development and testing tool for P4 data planes and control plane software, enabling rapid prototyping and debugging of network protocols.
Network engineers, researchers, and developers working with P4 programming to design, test, and debug data plane behaviors and control plane integrations.
bmv2 provides a flexible, target-independent reference implementation that accelerates P4 development with comprehensive debugging tools, multiple architecture support, and a focus on community-driven extensibility, unlike production-grade switches.
The reference P4 software switch
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Executes packet-processing logic from P4 programs via JSON files, enabling rapid testing and iteration without recompiling the core switch, as highlighted by the workflow with p4c.
Includes targets like simple_switch and psa_switch to accommodate different P4 architectures, facilitating development across various switch models as described in the targets directory.
Provides a CLI for table population, an event logger for packet tracing, and a debugger for step-by-step execution, essential for debugging P4 logic, with tools like runtime_CLI.py and p4dbg.py.
Allows loading shared libraries at runtime on supported systems via --load-modules, enabling extensibility without modifying core code, though it depends on dlopen availability.
Explicitly not production-grade; throughput and latency are significantly lower than switches like Open vSwitch, as admitted in the README and performance.md document.
Installation from source requires manual dependency management, including building thrift and nanomsg from source, which can be cumbersome and error-prone, especially on non-Ubuntu systems.
Some P4_14 features, such as direct registers, are unsupported, limiting the testing of certain P4 programs and requiring workarounds or community contributions.