Network Packet QoS Processing with Dynamic eBPF ToS Caching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for setting and updating the Type of Service (ToS) field in network data packets result in high overhead and inflexibility, requiring re-compilation and increasing network burden.
Innovation Solution
Implementing a data packet filtering module in kernel mode using eBPF to cache the ToS field value in socket metadata, allowing dynamic updates without modifying the kernel, and performing packaging based on this value.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If the Type of Service (ToS) field is updated through traditional methods (iptables Mangle table or socket setting function), then the ToS field can be set, but the overhead is high and the system becomes inflexible requiring re-compilation
Solution Approach 1:
The patent introduces an eBPF data packet filtering module as an intermediary between the user mode and kernel mode. This module acts as a mediator that enables dynamic ToS field updates without requiring kernel re-compilation or traditional iptables methods, thus improving flexibility while maintaining system stability
Solution Approach 2:
The patent separates the ToS field update functionality into a distinct eBPF module that operates independently from the kernel core. This segmentation allows the filtering module to be updated and configured separately without affecting the entire kernel system, reducing complexity and improving adaptability
2Productivity
If the ToS field value is updated dynamically for each network data packet, then the QoS can be adjusted in real-time, but the network overhead and interaction pressure increase
Solution Approach 1:
The patent applies preliminary action by caching the ToS field value in the socket metadata before network data packet transmission. This pre-caching mechanism avoids the need to retrieve and process ToS values during packet transmission, thereby reducing network overhead and interaction pressure while maintaining real-time QoS adjustment capability
Solution Approach 2:
The patent creates a copy of the ToS field value and stores it in the socket metadata structure. This copying approach allows the system to use the cached value for subsequent packet processing without repeatedly accessing the original ToS configuration, reducing interaction pressure and improving efficiency
Data Source
AI summary
A method for quality of service processing of a network data packet, including: invoking a data packet filtering module to obtain a type of service field value corresponding to a socket; caching the type of service field value into metadata of the socket; and performing a packaging processing on the network data packet after routing based on the cached type of service field value. (FIG. 2)


