Selective Zero Copy Transmission for Network Devices
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing zero copy transmission mechanisms are limited by requiring applications to request kernel buffers for each data transmission, leading to increased system calls and overhead, and cannot selectively apply zero copy transmission to only some data packets or network devices that do not support checksum calculations.
Innovation Solution
A method and system that determine whether to use zero copy transmission based on network device capabilities, allowing selective application to specific data packets and supporting both devices with and without zero copy capabilities, while facilitating checksum calculations at the application level.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of energy
If zero copy transmission is applied to all data packets, then data copying overhead is reduced, but system complexity increases due to inability to selectively apply to specific packets or devices
Solution Approach 1:
The patent applies zero copy transmission selectively to specific data packets or packet portions based on local characteristics rather than uniformly to all packets. The system determines on a per-packet basis whether zero copy transmission is applicable, allowing different quality treatments for different parts of the data stream.
Solution Approach 2:
The patent segments the data transmission process into individual packet evaluations, where each packet is independently assessed for zero copy transmission eligibility. This segmentation allows the system to apply zero copy transmission only where appropriate without compromising the entire transmission pipeline.
2Productivity
If kernel buffers are requested for each data transmission, then data transmission can be performed, but system call overhead increases
Solution Approach 1:
The patent extracts the kernel buffer allocation step from the mandatory transmission path by implementing an alternative zero copy path that bypasses buffer allocation. Applications can directly pass data from user space to the network device when zero copy transmission is enabled, removing the unnecessary buffer allocation and copy operations.
Solution Approach 2:
The system performs preliminary checks to determine if zero copy transmission can be used before initiating the transmission process. By evaluating packet characteristics and device capabilities in advance, the system可以避免 unnecessary system calls and buffer allocations for packets that qualify for zero copy transmission.
3Productivity
If kernel buffers are reused after system call returns, then buffer availability is improved, but transmission correctness may be compromised due to application modifications
Solution Approach 1:
The patent introduces a descriptor structure as an intermediary that carries metadata about the data packet including its location, size, and transmission status. This descriptor acts as a mediator between the application and the network stack, allowing the system to track packet state without requiring the application to release buffers prematurely, thus maintaining both buffer availability and transmission correctness.
4Productivity
If zero copy transmission is used with devices that support checksum calculations, then transmission efficiency is improved, but compatibility is reduced with devices that cannot calculate checksums
Solution Approach 1:
The patent implements a universal zero copy transmission mechanism that can work with both network devices that support checksum calculations and those that do not. The system adapts its behavior based on device capabilities, using zero copy transmission with checksum offloading when available and falling back to standard transmission paths when not available, thus maintaining broad device compatibility.
Data Source
AI summary
A system for providing a zero copy transmission with raw packets includes an operating system that receives an application request pertaining to a data packet to be transmitted over a network, where the data packet has already gone through networking stack processing invoked by the application. The operating system queries a driver of a network device on whether the network device has a zero copy capability. Based on the query response of the driver, the operating system determines whether a zero copy transmission should be used for the data packet. If not, the operating system copies the data packet from the application memory to a kernel buffer, and notifies the driver about the data packet in the kernel buffer. If so, the operating system refrains from copying the data packet to the kernel buffer, and notifies the driver about the data packet in the application memory.


