How netsys/bess works
Main Components
• Data Plane Core (Packet Processing):
– Represent the “core” directory which houses the main engine including modules, drivers, packet, port, scheduler, memory management, and dpdk integration.
– Highlight the multiple module implementations (files in core/modules) that operate as the building blocks for the packet processing pipeline.
• Control Plane and Configuration:
– Include the “bessctl” directory as the primary CLI tool for controlling and configuring the datapath. It contains the CLI interface (cli.py), commands (commands.py), and configuration scripts that allow external controllers or administrators to build and modify pipelines.
– The “pybess” directory also represents programmable interfaces for Python, which users can use to interact with BESS.
• Configuration Scripts and Samples:
– Show the “conf” directories under bessctl that include metadata (e.g., test*.bess) and sample configurations (samples, perftest, port, etc.).
– Don’t forget the “sample_plugin” directory, which illustrates how users can extend functionality via plugins and custom modules.
• Kernel Module and Lower-level Interfaces:
– Represent the “core/kmod” directory, which deals with the kernel module for handling high-performance I/O and connection with network interfaces.
• External Dependencies, Build, and Deployment:
– Mark the build scripts (build.py, container_build.py), CI configuration files (.travis.yml, codecov.yml), and Docker/Vagrant files in the “env” directory.
– Include the integration of DPDK and other driver-level components (core/drivers and related files).
Relationships and Data Flow
• Dependency of custom modules (from core/modules, sample_plugin) on the central packet processing engine.
• Interactions between user-supplied configurations (in conf/) and the instantiation of module objects in the core subsystems.
• Role of the Python interface (pybess) as a higher-level abstraction layer interfacing with the core.
Architectural Patterns and Design Principles
• Modular design – every packet processing element is a “module” (a concept similar to the Click modular router).
• Separation of concerns:
– Data Plane (core) is highly optimized for performance.
– Control Plane (bessctl, pybess) handles configuration and management.
• Extensibility via sample plugins and custom modules that allow users to plug in new functionality.
• Clear delineation between user-space and kernel-space components (e.g., “core/kmod” for kernel module, “core/drivers” for hardware interface).
Relevant Technologies and Frameworks
• Mention DPDK (as seen in dpdk.cc and dpdk.h) for fast packet I/O.
• Use of kernel modules and low-level C/C++ modules in the “core” directory.
• That the control plane uses Python (pybess, bessctl) and that configuration leverages protocol buffers (protobuf/ directory).
• This to a central Data Plane component (core) where packet processing occurs through a series of interconnected modules.
• Configuration & Plug-in area as a component that feeds into both the control and data planes, highlighting the “conf” and “sample_plugin” directories.