A network packet processing method for load balancing between multiple CPU cores

A CPU core and network message technology, which is applied in the field of network message processing for load balancing between multiple CPU cores, can solve problems such as message fetching, CPU core idleness, and ineffective use of processing capabilities, so as to achieve no waste of CPU resources, Realize the effect of automatic equalization

Active Publication Date: 2018-04-13
上海寰创通信科技股份有限公司
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] In the prior art, for a network card chip with a single receiving queue, the processing of received messages often adopts the method of polling and receiving messages triggered by hard interrupts. Due to the limitation of the characteristics of a single queue, messages are generally sent to one CPU core, so that other CPU cores cannot and together fetch messages from a single receiving queue in parallel. When the network card receiving message load is greater than the CPU processing capacity, one CPU core is busy and all other CPU cores are idle.
Single receiving queue network card chip, when receiving a message, it will only be sent to one core of the CPU for processing, resulting in problems such as the inability to effectively utilize the processing capacity

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 network packet processing method for load balancing between multiple CPU cores

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0022] Such as figure 1 As shown, a network message processing method for load balancing between multiple CPU cores, the method can generally be described as: first designate a CPU core to receive messages from the network card receiving queue, and distribute them to the message receiving queues of other CPU cores , until the message receiving queue reaches its maximum threshold, other CPU cores receive messages from their corresponding message receiving queues, and then process the messages with the protocol stack. Wherein, each CPU core is provided with a corresponding ID, and the value range of the ID is an integer between [0, CPU_CORE_NUMBERS-1], wherein, CPU_CORE_NUMBERS is the total number of CPU cores.

[0023] Define a static unsigned integer variable: recv_packet_count, used to indicate the number of received packets; define a static unsigned integer variable: hash_cpu, used to indicate the ID of the CPU core to be distributed.

[0024] The described network packet p...

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 relates to a network message processing method for load balancing among multiple CPU cores. The method firstly specifies a CPU core to receive messages from a network card receiving queue, and distributes them to the message receiving queues of other CPU cores until the message is received. When the queue reaches its maximum threshold, other CPU cores receive messages from their corresponding message receiving queues, and then process the messages with the protocol stack. Compared with the prior art, the present invention has the advantages of making full use of CPU resources, realizing automatic balance, and the like.

Description

technical field [0001] The invention relates to a network data processing method, in particular to a network message processing method for load balancing among multiple CPU cores. Background technique [0002] In the prior art, for a network card chip with a single receiving queue, the processing of received messages often adopts the method of polling and receiving messages triggered by hard interrupts. Due to the limitation of the characteristics of a single queue, messages are generally sent to one CPU core, so that other CPU cores cannot and together fetch messages from a single receiving queue in parallel. When the network card receiving message load is greater than the CPU processing capacity, one CPU core is busy and all other CPU cores are idle. A network card chip with a single receiving queue will only send a message to one core of the CPU for processing when receiving a message, resulting in problems such as the inability to effectively utilize the processing capac...

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/803
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