How sonic-net/dash works
Main Components
• API and Object Model Layer: Representing the network APIs defined and implemented via SAI (located in the “dash-pipeline/SAI” directory) and the API generation tools.
• P4 and Data Plane Components: Capture the P4 programs in “dash-pipeline/bmv2” and related templates and utilities that define the behavior of the data plane through BMv2 and DPDK.
• Data Plane Application (dpapp): Represents the compiled and executable logic (located in “dash-pipeline/dpapp”) that interacts with API/SAI calls and may be responsible for bridging data plane operations.
• CI/CD & Build Infrastructure: Include the GitHub workflows (.github/workflows) that build Docker images (for BMv2, P4 compiler, dpapp, saithrift, etc.), execute spell checks, and run tests.
• Testing Framework: Encompass the “test” directory, which contains both functional test cases (PTF tests, saithrift based tests, scale tests) and testing environments.
• Documentation: Show the Documentation (in “documentation”) that supports design, requirements, and user guides.
• DevOps/Deployment Tools: Indicate container build scripts (Dockerfiles under “dash-pipeline/dockerfiles”) and Makefiles used for integration and deployment.
Relationships and Interactions
• Flow of data from the control API (SAI layer) to the underlying data plane (P4 programs in BMv2) and the role of dpapp in managing network traffic.
• Integration of testing suites with both unit and functional tests that validate the behavior of the SAI and P4 pipelines.
• External interaction points (for instance, the testing frameworks interfacing with the hardware or software simulation services and external contributions by community users).
Architectural Patterns and Technologies
• Separation of concerns across layers, with clear boundaries between API/SAI processing, data-plane P4 processing, and testing/CI systems.
• Use of infrastructure as code elements (Dockerfiles and Makefiles) that facilitate reproducible builds and containerized deployments.
• Recognize that this is a hybrid system that mixes high-performance, stateful network data processing (via programming frameworks such as P4 and PNA) with robust development practices (CI/CD pipelines, extensive testing, and documentation).