Supercharge Your Innovation With Domain-Expert AI Agents!

Method and device for transmitting and receiving zero-copy network message

A technology of network message and sending method, which is applied in the field of receiving and zero-copy network message sending, and can solve the problems of data message length, page size limitation, CPU resource occupation, etc.

Active Publication Date: 2012-04-25
DAWNING INFORMATION IND BEIJING +1
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Aiming at the problem that the memory address needs to be converted during the sending and receiving process of the zero-copy network message in the prior art, the length of the data message is limited by the page size and CPU resources are occupied when the network card hardware performs DMA operation, the purpose of the present invention is to provide A method and device for sending and receiving zero-copy network packets to solve at least one of the above-mentioned problems

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for transmitting and receiving zero-copy network message
  • Method and device for transmitting and receiving zero-copy network message
  • Method and device for transmitting and receiving zero-copy network message

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0021] see figure 1 As shown, a method for sending a zero-copy network message in this embodiment specifically includes the following steps: S110, use the memory allocation function to continuously apply for continuous memory of a specific size in the network card driver until the free memory in the network card driver Space is not enough to apply; S120, determine a continuous memory address space from the applied continuous memory; and S130, use the continuous memory address space to send network messages.

[0022] In step S110, the specific size refers to the value of the maximum continuous memory that the memory allocation function can apply for. For example, in some Linux operating systems, the maximum continuous memory that can be applied for by the memory allocation function is 4M bytes. The memory allocation function continues to apply in the network card driver until the free memory space in the network card driver is less than the maximum continuous memory to be appli...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method and a device for transmitting and receiving zero-copy network messages, and the transmitting method comprises the following steps: using a memory allocation function to continuously apply continuous memories with a special size in a network card driving program until insufficient memory space is left in the network card driving program for application; determining a continuous memory address space from the applied continuous memories; and using the continuous memory address space to transmit network messages. In the transmitting method of the invention, the transmitted data messages are stored in message DMA buffer areas continuously by applying memories in the network card driving program, so network card hardware is not limited by pagesize in performing DMA operation, the network card does not need to adopt an interrupted mode to notify the completion condition of the data message transmitting to the network card driving program, and occupies no CPU resource.

Description

technical field [0001] The present invention relates to the field of sending and receiving zero-copy network messages, in particular to a zero-copy network message sending and receiving method in which the kernel space applies for a continuous memory space that can be mapped to user space as a DMA buffer for sending and receiving messages and device. Background technique [0002] Zero-copy (zero-copy) means that there will be no copy between the memory during the sending and receiving process of a node's network message. When sending, the data packet is sent directly from the user buffer of the application to the external network through the network interface. Chinese patent document CN101150487A discloses a zero-copy network message sending method, including the following steps: A. The application program calls the function provided by the interface library to open the device interface; B. The function to open the device interface applies for a continuous The memory acts a...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04L12/56G06F13/28H04L12/861
Inventor 邵宗有聂华历军李永成
Owner DAWNING INFORMATION IND BEIJING
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More