Packet Processing Method Using Dynamic Storage Pool Allocation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing network devices with single packet processing methods face inefficiencies due to long operation times for large or small packets, and frequent memory requests and releases, which decrease system operational efficiency.
Innovation Solution
A packet processing method that allocates a storage pool with multiple first storage blocks, dynamically requests more blocks from the kernel based on data size and memory availability, and efficiently manages memory to optimize packet processing.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a single packet processing method is used, then the device complexity is reduced, but the packet processing efficiency deteriorates for large or small packets
Solution Approach 1:
The patent implements dynamic packet processing method selection based on packet size. The system automatically chooses between first packet processing method (for packets ≤ threshold size) and second packet processing method (for packets > threshold size), making the processing approach adaptive rather than fixed, thereby optimizing efficiency without requiring multiple manually configured methods
2Productivity
If frequent memory requests and releases are made, then the memory management flexibility is improved, but the system operational efficiency deteriorates
Solution Approach 1:
The patent allocates a dedicated storage pool with multiple storage blocks in advance before packet processing begins. This pre-allocation eliminates the need for frequent dynamic memory requests and releases during packet processing, as the storage pool is ready to accommodate packets of varying sizes without requiring repeated memory allocation operations
Solution Approach 2:
The storage pool acts as an intermediary between the packet processing system and the kernel memory management system. By using the storage pool as a buffer, the system reduces direct frequent interactions with the kernel for memory allocation, thereby improving operational efficiency while maintaining memory management flexibility
3Adaptability or versatility
If the storage pool uses fixed number of storage blocks, then the memory management simplicity is improved, but the adaptability to different packet sizes deteriorates
Solution Approach 1:
The patent segments the storage pool into multiple storage blocks of varying sizes, where each block can independently accommodate packets of different sizes. This segmentation allows the system to efficiently store both small and large packets without requiring the entire storage pool to be reallocated or expanded, thereby improving adaptability while maintaining manageable complexity through modular block structure
Data Source
AI summary
A packet processing method includes: allocating a portion of storage space in a memory circuit as a storage pool including first storage blocks; storing a packet in one of the first storage blocks when a data size of the packet is less than or equal to a predetermined value, and releasing the one of the first storage blocks to the storage pool after the packet is processed; requesting an increase in a number of the first storage blocks from a kernel when a number of remaining storage blocks in the first storage blocks that do not store data is less than a threshold value; and requesting second storage block from the kernel to increase a data capacity of the storage pool to store the packet when the data size is greater than the predetermined value, and releasing the second storage block to the kernel after the packet is processed.


