A transmission method for zero copy network packet
A technology of network message and sending method, which is applied in the direction of data exchange network, store-and-forward exchange system, instrument, etc. It can solve the problems of low sending speed, waste of system resources, and inability to meet the speed requirements of high-speed network applications, and achieve a wide range of development environments. , save system resources, facilitate the effect of data transmission mechanism
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0019] Fig. 1 is a schematic diagram of the operation steps of the present invention. In the linux operating environment, as shown in Figure 1, the present invention performs the following steps:
[0020] A. The application program calls the open device function provided by the interface library. In this step, first open the network card device, determine the DMA buffer size and the percentage allocated to the sending queue, and set the receiving mode and sending mode; if the above operations are successful, the network card device ID will be returned.
[0021] B. Open the device interface function program to apply for a piece of continuous memory in the user space memory as a message buffer. And pass the first address of the buffer to the kernel driver.
[0022] In this step, check the maximum shared memory value initially set by the system. If the requested memory value is greater than the system default shared memory value, modify the system default memory value. Allocat...
Embodiment 2
[0031] The difference between this embodiment and Embodiment 1 is that the length of the message receiving buffer queue in step B of the present invention can be specified by a parameter, and the size of each buffer is 2KB. The buffer is located on a continuous memory page, and the memory requested by the interface library function is a shared memory, because in the Linux operating system, the shared memory is located on a continuous physical page. The specific operation steps are shown in Figure 2, as follows:
[0032] B1. The interface library function applies for a shared buffer and connects to the shared buffer.
[0033] B2. The interface library function transmits the first address of the shared buffer to the driver through the ioctl system call.
Embodiment 3
[0035] The difference between this embodiment and Embodiment 2 is that the specific operation steps of step C of the present invention are as shown in Figure 3, which are:
[0036] C1. The kernel driver calculates the size of the required buffer control structure according to the size of the entire buffer queue.
[0037] C2. The kernel driver applies for continuous pages to construct a buffer queue control structure.
[0038] C3. The kernel driver calculates the physical address of each buffer in the queue and stores it in a physical address table for DMA use.
[0039] C4. The kernel driver calculates the physical address of the buffer queue control structure and passes it to the application interface library function.
PUM

Abstract
Description
Claims
Application Information

- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com