A method and system for receiving network driver layer data packets based on dynamic prediction

A network driving and receiving method technology, applied in the network field, can solve the problems of applying for data packet buffering and copying data taking up a lot of processing time, affecting server performance, occupying CPU time, etc., so as to improve the pre-allocation method, reduce CPU time, reduce The effect of wasting memory

Inactive Publication Date: 2016-09-07
HUAZHONG UNIV OF SCI & TECH
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The traditional interrupt I / O method only processes one data packet during each network device interruption process. The advantage is that when the data traffic is not very large, the response is timely and the system resources are saved; Interrupt calls will take up too much CPU time and affect server performance
[0004] NAPI (NEW API) is a data packet receiving method adopted in the Linux system that is different from the traditional method. The NAPI method combines interrupt triggering and active polling to receive data, reducing the frequency of data packet receiving interruptions and high-frequency interrupt scheduling. System overhead; it has high efficiency when the data flow is high and the data packet is small; but it still has some disadvantages: due to the software interrupt method, there will be a certain delay. When the data flow is low, the NAPI method is more The traditional interrupt I / O method is less efficient, and when the data packet is large, applying for data packet cache and copying data will take a lot of processing time

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
  • A method and system for receiving network driver layer data packets based on dynamic prediction
  • A method and system for receiving network driver layer data packets based on dynamic prediction
  • A method and system for receiving network driver layer data packets based on dynamic prediction

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0057] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not constitute a conflict with each other.

[0058] like Figure 4 As shown, the present invention is based on the dynamic prediction network driver layer packet receiving method comprising the following steps:

[0059] (1) Create a blank linked list and a circular queue, and create a kernel thread and a kernel timer. Wherein the blank linked list is used to save the data packet cache allocated by the kernel thread (in the present invent...

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 dynamic prediction-based network driver layer data packet receiving method, which comprises the following steps of establishing a blank chain table and a circulation sequence, and creating a kernel thread and a kernel timer; receiving network equipment interruption, executing an interruption processing program, and stopping receiving network equipment interruption immediately after entering the interruption processing program; judging whether a network equipment interruption instruction is a receiving instruction or a wrong instruction; if the instruction is a receiving instruction, judging whether a data arriving bit in a receiving descriptor of the receiving instruction is zero or not, if not, judging whether the number of data packet caches in the blank chain table is lower than a threshold or not, if not, obtaining a new data packet cache from the blank chain table and judging whether obtaining is successful or not, if not, counting the length of effective data in the data packet cache corresponding to the current receiving descriptor, and discarding the effective data. By the method, the number of the pre-distributed data packet caches can be calculated to adapt to the change of the network flow, and the phenomenon of consuming too much memory when the data flow is lower is avoided.

Description

technical field [0001] The invention belongs to the field of network technology, and more specifically relates to a method and system for receiving network driver layer data packets based on dynamic prediction. Background technique [0002] The network driver adopts two methods in the process of receiving data packets, the traditional interrupt I / O method and the NAPI (New API) method. [0003] The traditional interrupt I / O method only processes one data packet during each network device interruption process. The advantage is that when the data traffic is not very large, the response is timely and the system resources are saved; Interrupt calls will occupy too much CPU time and affect the performance of the server. [0004] NAPI (NEW API) is a data packet receiving method adopted in the Linux system that is different from the traditional method. The NAPI method combines interrupt triggering and active polling to receive data, reducing the frequency of data packet receiving ...

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/861G06F9/50
CPCY02D30/50
Inventor 陈进才刘玉虎周功业周可张英男余乐陈涛
Owner HUAZHONG UNIV OF SCI & 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