Packet Forwarding Buffer Recycling via DMA Management
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing packet forwarding technologies in routers consume significant CPU resources for SKB allocation and freeing, leading to bottlenecks in throughput performance.
Innovation Solution
A packet forwarding apparatus with buffer recycling, utilizing direct memory access (DMA) management to recycle and reuse buffers for packet buffering, thereby reducing the load on the Linux kernel and improving throughput.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the Linux kernel performs software-based packet forwarding with SKB allocation and freeing, then packet forwarding functionality is achieved, but CPU resources are significantly consumed
Solution Approach 1:
The patent extracts the buffer management functionality from the Linux kernel software layer and implements it in the hardware DMA controller. The DMA controller now independently handles buffer allocation and recycling without requiring kernel intervention, thereby extracting the CPU processing burden from the packet forwarding path while maintaining the necessary buffer management functionality.
Solution Approach 2:
The DMA controller is enhanced to perform self-service buffer management by automatically recycling buffers that have been processed. The controller monitors packet transmission status and autonomously reallocates freed buffers for new packets without external control, enabling the system to serve itself and eliminate the need for continuous CPU involvement in buffer management.
2Productivity
If SKB allocation and freeing operations are performed frequently during packet forwarding, then packet processing is completed, but throughput performance is bottlenecked
Solution Approach 1:
The patent implements preliminary buffer allocation where the DMA controller pre-allocates a pool of buffers in advance. When packets arrive, the controller can immediately assign pre-prepared buffers without performing allocation operations during the critical packet forwarding path, thereby eliminating time loss associated with dynamic memory management operations.
Solution Approach 2:
The buffer recycling mechanism ensures continuous utilization of buffer memory resources. As soon as a buffer is freed from a completed transmission, it is immediately made available for the next packet without interruption or idle time. This continuous action eliminates the start-stop nature of buffer management and maintains steady-state throughput performance.
Data Source
AI summary
A packet forwarding apparatus includes a first storage device and a processor. The first storage device has a plurality of buffers allocated therein, and at least one buffer included in the plurality of buffers is arranged to buffer at least one packet. The processor is arranged to execute a Linux kernel to perform software-based packet forwarding associated with the at least one packet. The at least one buffer allocated in the first storage device is recycled through direct memory access (DMA) management, and is reused for buffering at least one other packet.


