BPF JIT Compilation for Application-Specific Packet Steering
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional server load balancing (SLB) functions in communications networks are resource-intensive and inefficient due to the need for developing new forwarding path code for each application type, leading to complications in porting applications and optimizing forwarding plane resources.
Innovation Solution
The use of Berkeley Packet Filter (BPF) language and a Just-In-Time (JIT) compiler to generate application-specific steering rules, which are compiled into native code for packet forwarding entities (PFEs), allowing applications to control packet steering and balance traffic load efficiently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If conventional SLB functions use application-specific forwarding code for each application type, then packet steering accuracy is improved, but device complexity and resource usage increase
Solution Approach 1:
The patent implements a universal BPF-based packet classification mechanism that can handle multiple application types through a single unified codebase. The BPF language provides a domain-specific language for packet filtering that is application-agnostic, allowing the same forwarding plane to efficiently steer packets for different applications (GTP, HTTP, etc.) without requiring separate application-specific code for each protocol type.
Solution Approach 2:
The patent introduces BPF bytecode as an intermediary layer between the control plane and the forwarding plane. Instead of directly implementing application-specific forwarding logic in the forwarding plane, the system compiles BPF programs into bytecode that runs on a virtual machine in the forwarding plane. This intermediary bytecode layer abstracts the complexity of different application protocols while maintaining precise packet steering capabilities.
2Adaptability or versatility
If new application-specific forwarding code is developed for each application type, then support for new applications is improved, but ease of manufacture and deployment deteriorates
Solution Approach 1:
The patent implements a just-in-time (JIT) compilation approach where BPF programs are compiled to native code at runtime rather than requiring pre-compilation for each application. The control plane compiles BPF source code into bytecode and downloads it to the forwarding plane when needed. This preliminary compilation action enables rapid deployment of new applications without requiring complex build processes or platform-specific code development.
Solution Approach 2:
The patent uses bytecode copying as a mechanism to deploy application-specific forwarding logic. Instead of copying and adapting complex native code for each application, the system compiles BPF programs into portable bytecode that can be copied and executed on any forwarding plane running the BPF virtual machine. This bytecode copying approach simplifies application porting and deployment across different platforms.
3Adaptability or versatility
If forwarding plane resources are allocated for multiple application types, then service coverage is improved, but resource efficiency deteriorates
Solution Approach 1:
The patent implements dynamic resource allocation in the forwarding plane through the BPF virtual machine architecture. Instead of statically allocating resources for each application type, the system dynamically loads and executes BPF bytecode programs only when needed. The forwarding plane can dynamically adjust its behavior based on the current traffic mix, loading only the necessary BPF programs for active applications and卸载ing unused ones, thereby optimizing resource utilization while maintaining support for multiple service types.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Each application executing on an application server uses an extended version of the Berkeley Packet Filter (BPF) language to define an application-specific rule set. The application server also includes a Just-In-Time compiler to compile the BPF rule set. The compiled rule set is downloaded to a Packet Forwarding Entity (PFE) in the network, and used to control how the PFE steers data packets generated by the application through a communications network.