Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Data message processing method from user mode to kernel mode

A technology for data packets and processing methods, applied in data exchange networks, digital transmission systems, electrical components, etc., can solve problems such as CPU performance consumption, system performance loss, and no network interface, and achieve the effect of eliminating performance loss.

Inactive Publication Date: 2013-09-18
OPZOON TECH
View PDF3 Cites 24 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The disadvantage of the first method is that: the kernel loads the network card driver to send and receive messages, which will cause a large number of interruptions under the impact of the large traffic of the 10 Gigabit network card, which will consume a certain amount of CPU performance (especially the X86 architecture). At the same time, the kernel of the Linux operating system The data copy from the user state to the user state will also cause the loss of system performance;
[0006] The disadvantage of the second method is that: the user mode loads the network card driver to send and receive packets, although the performance loss is reduced, but for some host packet business processing (such as PPPoE, DHCP, etc. of the Linux kernel), it is necessary to perceive the actual physical network and network interface. state, and the kernel does not have a network interface to perceive the operation, then there will be a problem, and it also involves the conversion of the user mode message PKB and the kernel SKB format

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
  • Data message processing method from user mode to kernel mode
  • Data message processing method from user mode to kernel mode
  • Data message processing method from user mode to kernel mode

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] The specific implementation manners of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments.

[0039] The present invention proposes a data packet processing method from the user state to the kernel state, such as figure 1 As shown, the method includes the following steps:

[0040] S1. Create a virtual network card in the kernel state through the TUN / TAP driver;

[0041] S2. Load the network card driver in the user state, and send the network interface information in the user state to the virtual network card;

[0042] S3. The virtual network card creates a virtual interface according to the network interface information in the user state, and the number and state of the virtual interface are consistent with the network interface in the user state;

[0043] S4. When receiving a message that needs to be processed in the kernel state, the network interface in the user state sends the message that n...

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 data message processing method from a user mode to a kernel mode. The method comprises the steps that S1, a virtual network card is created in the kernel mode through a TUN / TAP driving manner; S2, a network card drive is loaded in the user mode, and network interface information in the user mode is sent to the virtual network card; S3, the virtual network card creates virtual interfaces according to the network interface information in the user mode, wherein the number and the state of the virtual interfaces are kept consistent with those of a network interface in the user mode; S4, when receiving a message needing to be processed by the kernel mode, the network interface in the user mode sends the message needing to be processed by the kernel mode to the virtual network card, and the virtual network card sends the message needing to be processed by the kernel mode to the kernel mode for processing. The method can be used for eliminating performance loss caused by loading a kernel network card drive and enabling the kernel mode to perceive the states of an actual physical network and a network interface.

Description

technical field [0001] The invention relates to the technical field of message processing, in particular to a data message processing method from a user state to a kernel state. Background technique [0002] When a host sends, receives, and processes network packets, it usually adopts two methods: [0003] One is to load the network card driver by the kernel to send and receive messages, and copy the data to the user mode process for business processing; [0004] The other is to load the network card driver in the user mode to send and receive messages. For the host messages that need to be forwarded to the kernel for processing, create a special socket through the socket or create a file through the proc file system to realize data interaction with the kernel. [0005] The disadvantage of the first method is that: the kernel loads the network card driver to send and receive messages, which will cause a large number of interruptions under the impact of the large traffic of ...

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/70
Inventor 高福亮
Owner OPZOON TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products