Zero copy message reception method and system

A technology of receiving messages and zero copy, applied in transmission systems, memory systems, digital transmission systems, etc., can solve problems such as buffer shortage, inability to read buffer data, packet loss, etc., to improve processing capacity and reduce transformation costs zero effect

Active Publication Date: 2012-04-04
BEIJING TOPSEC TECH
View PDF0 Cites 37 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The present invention provides a method and system for receiving messages with zero copy, which is used to solve the problem that the zero copy technology adopted in

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
  • Zero copy message reception method and system
  • Zero copy message reception method and system
  • Zero copy message reception method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0049] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0050] In order to solve the problems that the zero-copy technology adopted in the prior art cannot read the changed data in the buffer, and the problem of packet loss due to insufficient buffer during the peak period of the network, the present invention provides a zero-copy receiving message method and system.

[0051] Such as figure 2 As shown, the zero-copy method for receiving messages provided by the present invention includes:

[0052] Step S201, the u...

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 discloses a zero-copy message reception method and system, the method comprises: opening a previously created virtual character device under user mode process, calling the MMAP method; when the kernel process in the MMAP method is called, mapping all kernel low-end space to the user space, setting NOPAGE method for the structure of VM--struct; when the network equipment receives data packets under kernel process, delivering the offset address of data packets at the lower end of the memory space to the user mode process; the user mode process visiting the calculated virtual address, triggering CPU page exception, so that the operating system calls the nopage method to get access to the page directory and the page table of the physical address; the user mode process reading the data packet stored in the lower end of the kernel address space. The invention solves the problems of insufficient buffer of prior zero copy technology and unable to arbitrarily amend or move the message in the process of zero copy.

Description

technical field [0001] The invention relates to the field of high-speed network packet reception, in particular to a method and system for zero-copy packet reception. Background technique [0002] In the Linux operating system, the user state program captures the data packets received by the network card generally through socket-related system calls: the network card receives the network data packets into the kernel space through the DMA (Direct Memory Access) mechanism, A process copies data from kernel space to user space by reading the socket. In this mode, the user process needs a data copy from the kernel to the user space to receive the data. In a high-speed network, a large amount of data copying greatly consumes CPU resources, and system calls will cause operating system context switching and reduce system performance. [0003] In order to solve this problem, there is currently a zero-copy technology. The idea of ​​the zero-copy is: when the data packet reaches the...

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
IPC IPC(8): G06F12/08H04L12/56G06F12/0871H04L12/861
Inventor 刘彤
Owner BEIJING TOPSEC TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products