Network card drive-based zero copy Ethernet message capturing and transmitting implementation method under Linux

A network card driver and implementation method technology, applied in the field of zero-copy sending and receiving packets, zero-copy Ethernet packet capture and transmission, can solve problems such as difficulty in improving speed, reduce CPU consumption, improve capture and transmission performance, and satisfy Effects of high performance requirements

Active Publication Date: 2010-12-15
南京中新赛克科技有限责任公司
View PDF5 Cites 54 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The purpose of the present invention is to solve the problem that the existing message sending and receiving packets need to be copied repeatedly to complete the sending and receiving process, resulting in the problem that the speed is difficult to improve, and to invent a method for realizing the capture and sending of zero-copy Ethernet messages based on the network card driver under Linux

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
  • Network card drive-based zero copy Ethernet message capturing and transmitting implementation method under Linux
  • Network card drive-based zero copy Ethernet message capturing and transmitting implementation method under Linux
  • Network card drive-based zero copy Ethernet message capturing and transmitting implementation method under Linux

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0029] like Figure 1-7 shown.

[0030] A kind of implementation method of capturing and sending zero-copy ethernet message based on network card driver under Linux, it comprises the following steps:

[0031] A. Establish packet capture queue, message release queue, message buffer queue and sending queue in the kernel state message driver module to realize message management, and create corresponding message filling threads, message release threads and sending thread;

[0032] After the Linux system is started, the kernel message driver module is first loaded, which is responsible for directly transmitting the message between the user space and the network card driver, and omitting the complicated processing between the two. Its specific operation steps are as figure 2 shown.

[0033] B. When the corresponding network card driver is loaded and the...

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 network card drive-based zero copy Ethernet message capturing and transmitting implementation method under Linux. The method comprises the following steps of: 1, mapping the whole physical memory to a user process space by using a user process; 2, managing message received by a message driving module and message to be transmitted by the message driving module in a queue mode; 3, isolating the influence of discrimination of various network card drives on the user process by using the message driving module; and 4, after the various network card drives are loaded successfully, registering equipment and related operating methods to the message driving module. The method is implemented layer by layer so that the method can simultaneously support multiple types of network cards and is easy to add support for new network cards. The method can realize high-performance message capture and transmission without one-time copy in the message capture and transmission process, and is suitable for the situations with high requirement for transceiving of the message such as network traffic monitoring and analysis and the like.

Description

technical field [0001] The invention relates to a method for realizing high-speed sending and receiving packets in a Linux system, in particular to a method for sending and receiving packets with zero copy in the process of sending and receiving packets, specifically a zero-copy Ethernet message based on a network card driver under Linux The implementation method of capturing and sending. Background technique [0002] In applications such as network communication monitoring and traffic analysis, it is necessary to capture or send high-performance packets with large traffic volumes. Usually, the performance of capturing and sending packets using socket and libpcap is often not as good as the system. The required performance requirements become the performance bottleneck in the entire system. These general schemes will perform a large number of processing and multiple copy actions after the message arrives at the network card and the network card driver receives the message, ...

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 Applications(China)
IPC IPC(8): H04L12/56H04L12/26H04L12/70
Inventor 姚文顶
Owner 南京中新赛克科技有限责任公司
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