Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Software-Defined Networking
  3. bmv2

bmv2

NOASSERTIONC++1.15.6

A reference software switch that interprets P4 programs for developing, testing, and debugging P4 data planes.

GitHubGitHub
652 stars399 forks0 contributors

What is bmv2?

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.

Target Audience

Network engineers, researchers, and developers working with P4 programming to design, test, and debug data plane behaviors and control plane integrations.

Value Proposition

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.

Overview

The reference P4 software switch

Use Cases

Best For

  • Developing and testing new P4 data plane programs
  • Debugging packet-processing logic in P4-based networks
  • Prototyping custom switch architectures with P4
  • Educational purposes for learning P4 programming
  • Integrating P4 programs with control plane software
  • Simulating network behavior in research environments

Not Ideal For

  • Production networks requiring high-throughput packet switching
  • Real-time applications with strict latency constraints
  • Projects relying on unsupported P4_14 features like direct registers
  • Environments needing quick, out-of-the-box deployment without dependency management

Pros & Cons

Pros

P4 Interpretation Flexibility

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.

Multiple Architecture Support

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.

Comprehensive Debugging Tools

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.

Dynamic Module Loading

Allows loading shared libraries at runtime on supported systems via --load-modules, enabling extensibility without modifying core code, though it depends on dlopen availability.

Cons

Performance Limitations

Explicitly not production-grade; throughput and latency are significantly lower than switches like Open vSwitch, as admitted in the README and performance.md document.

Complex Setup Process

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.

Incomplete Feature Support

Some P4_14 features, such as direct registers, are unsupported, limiting the testing of certain P4 programs and requiring workarounds or community contributions.

Frequently Asked Questions

Quick Stats

Stars652
Forks399
Contributors0
Open Issues50
Last commit6 days ago
CreatedSince 2015

Tags

#packet-processing#sdn#network-testing#data-plane#c-plus-plus

Built With

a
autoconf
D
Doxygen
n
nanomsg
T
Thrift
C
CMake
P
Python
C
C++17

Included in

Software-Defined Networking1.6k
Auto-fetched 10 hours ago

Related Projects

ZeroTierZeroTier

A Smart Ethernet Switch for Earth

Stars17,083
Forks1,974
Last commit4 days ago
f-stackf-stack

F-Stack is an user space network development kit with high performance based on DPDK, FreeBSD TCP/IP stack and coroutine API.

Stars4,256
Forks964
Last commit1 day ago
gobgpgobgp

BGP implemented in the Go Programming Language

Stars4,105
Forks822
Last commit6 days ago
snabbswitchsnabbswitch

Snabb: Simple and fast packet networking

Stars3,032
Forks297
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub