Intra-Stack Zero-Copy Transmit Path for Shared-Memory Networking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing network protocol stacks face inefficiencies in large-file transfers due to memory copying, which leads to LLC memory occupancy and performance degradation, especially in heavy traffic conditions.
Innovation Solution
A method for an intra-stack zero-copy transmit path in a shared-memory-based communication mode that eliminates memory copying by using data references instead of data duplication, leveraging scatter/gather list (SGL) capabilities of the NIC to transmit data without modifying the application layer.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If data is copied from shared memory to packet buffers in the network protocol stack, then data can be transmitted through the NIC, but LLC memory resources are occupied and performance degrades due to memory copying overhead
Solution Approach 1:
The patent extracts the data copying operation from the transmit path by implementing a zero-copy mechanism. Instead of copying data from shared memory to packet buffers within the protocol stack, the system uses scatter/gather lists to directly reference data in shared memory, eliminating the intermediate copy and freeing LLC memory resources.
Solution Approach 2:
The patent introduces scatter/gather lists as an intermediary data structure that bridges the application layer and the NIC. These lists contain references to data buffers without requiring physical data movement, allowing the NIC to directly access data in shared memory through DMA operations while the protocol stack maintains abstraction.
2Productivity
If data is copied multiple times through shared memory and packet buffers, then network communication can be achieved, but CPU cycles are consumed and performance bottlenecks occur
Solution Approach 1:
The patent enables continuous data flow by eliminating discrete copy operations. The zero-copy mechanism allows data to flow directly from application buffers through the NIC without interruption for copying, maintaining continuous transmission pipelines and avoiding CPU stalls associated with memory copy operations.
Solution Approach 2:
The patent replaces the mechanical data copying process with a reference-based system. Instead of physically moving data bytes through memory copies, the system uses pointers and descriptors in scatter/gather lists to reference data locations, substituting computational mechanics with simpler address manipulation.
3Adaptability or versatility
If a microkernel user-space protocol stack is used to eliminate context switches, then application flexibility improves, but inter-process communication through shared memory introduces multiple data copies
Solution Approach 1:
The patent creates a universal interface layer through scatter/gather lists that works with any application using shared memory. This multi-functional mechanism handles both the inter-process communication requirements of microkernel architecture and the zero-copy transmission requirements, serving multiple purposes simultaneously.
Data Source
AI summary
The present invention discloses a method for an intra-stack zero-copy Tx path in a shared-memory-based communication mode and pertains to the field of data communication technology, in which copying from shared memory to packet buffers is replaced with writing references to data in the shared memory into the packet buffers, eliminating creating a copy of the data in the packet buffers. An original Tx path in a network protocol stack is remodeled into a zero-copy Tx path without any modification to the application side while maintaining transparency and loose coupling of the network protocol stack to upper-layer applications. This eliminates data copying within the network protocol stack and data replication in LLC memory, thereby reducing unnecessary LLC occupancy and improving the network protocol stack's network performance in large-file transfers under heavy load conditions.


