CN102281186A - Network data processing method - Google Patents

Network data processing method Download PDF

Info

Publication number
CN102281186A
CN102281186A CN2010102055621A CN201010205562A CN102281186A CN 102281186 A CN102281186 A CN 102281186A CN 2010102055621 A CN2010102055621 A CN 2010102055621A CN 201010205562 A CN201010205562 A CN 201010205562A CN 102281186 A CN102281186 A CN 102281186A
Authority
CN
China
Prior art keywords
network
package
controller
thread
receive
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2010102055621A
Other languages
Chinese (zh)
Inventor
余璘
陈志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inventec Corp
Original Assignee
Inventec Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inventec Corp filed Critical Inventec Corp
Priority to CN2010102055621A priority Critical patent/CN102281186A/en
Publication of CN102281186A publication Critical patent/CN102281186A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a network data processing method which is suitable for a controller with a plurality of network interfaces. Through creating three relatively independent threads of receiving, processing and sending, executing network package receiving, processing and sending processes of each network interface of the controller synchronously, thus the network interfaces can carry out network package data receiving and sending synchronously, disadvantages of a sending process of the network package is restricted to a receiving process and a receiving process of a subsequent network package is restricted to a sending process of a former network package in the prior art are avoided, network data transmission efficiency of multiple network interfaces is greatly improved.

Description

Network data processing method
Technical field
The present invention relates to a kind of network data processing technology, specifically, relate to a kind of network data processing technology at controller with multi-network interface.
Background technology
Existing firmware, for example in the controller of baseboard management controller (BMC) etc., processing aspect at network data, the process of its reception and process IP MI order mainly is divided into two threads, be receiving thread and main thread, as shown in Figure 1, wherein, the reception that this receiving thread mainly is responsible for not stopping is sent to the network package data (step S111) of this network interface, and received network package data are sent to main thread (step S113 is to step S121) by message queue (message queue); This main thread then is responsible for ceaselessly checking whether store network package data (step S121) in the message queue, if have, then this network package is unpacked order into IPMI, be sent to message processing module (message handler) then and carry out the reception processing (step S123) of network package, and the package of waiting for its passback receives response instruction (step S125), again this package received response instruction and sends go back (step S127) by identical network interface at last.
The process processing mode of above-mentioned this network interface is only applicable to have only in the controller of a network interface, and when being applied in the controller with a plurality of network interfaces, and under the not high again situation of the transmission rate of this each network interface, can be because this transmission process be limited by receiving process, and the back one network package receiving process be limited by last network package the transmission process (that is, the transmission process of response instruction can only be waited until after the current network package data processing that receives is finished and could carry out, and after need waiting until that this transmission process is complete, could carry out the reception treatment progress of next network package), and make the network interface performance of controller have a greatly reduced quality.
Summary of the invention
For solving the shortcoming of above-mentioned prior art, the object of the present invention is to provide a kind of network data processing method, have the network data transmission efficient of the controller of multi-network interface with lifting.
For reaching above-mentioned purpose and other relevant purpose, the invention provides a kind of network data processing method, it is applicable in the controller with a plurality of network interfaces, the method comprising the steps of: create receiving thread, processing threads, and the transmission thread, in the constructive process of this receiving thread, set up and receive formation, and send in the constructive process of thread in this, set up transmit queue; After the foundation step of this receiving thread is finished, setting this receiving thread detects each network interface of this controller in a looping fashion and whether receives network package, and, be about to this received network package and be stored in the reception formation when when the arbitrary network interface that detects this controller receives network package; After the foundation step of this processing threads is finished, set this processing threads and detect in this reception formation whether store the network package data in a looping fashion, and receive when storing the network package data in the formation when detecting, promptly produce network package and receive instruction, receive and unpack processing so that this network package is carried out, and produce corresponding package and receive response instruction and be sent to this transmit queue; After the foundation step of this transmission thread is finished, set this transmission thread and detect whether store package reception response instruction in this transmit queue in a looping fashion, and receive response instruction execution package transmission processing at this package.
Among another embodiment of network data processing method of the present invention, this method also comprises step: make this receiving thread discern the network interface that is used to receive this network package in this controller, thereby can send corresponding package reception response instruction by this network interface that identifies for this transmission thread is follow-up.
As mentioned above, network data processing method of the present invention receives, handles, sends three relatively independent threads by creating, receive formation and transmit queue to provide simultaneously, make reception, processing and the transmission of network package to carry out synchronously, realize the reception of network package data and the parallel processing of transmission, thereby promote the network interface transmission performance greatly.
Description of drawings
Fig. 1 is in order to show the network data processing flow chart of existing controller; And
Fig. 2 is in order to show network data processing flow chart of the present invention.
[simple declaration of assembly label]
S110~S127 step
S200~S233 step
Embodiment
Below by particular specific embodiment technology contents of the present invention is described, those skilled in the art can understand other advantage of the present invention and effect easily by the content that this specification disclosed.The present invention also can be implemented or be used by other different instantiation, and the every details in this specification also can be based on different viewpoints and application, carries out various modifications and change under the spirit of the present invention not deviating from.
See also Fig. 2, it is a network data processing flow chart of the present invention.Network data processing method of the present invention is to be applied to have in the controller of a plurality of network interfaces, and supports IPMI (Intelligent Platform Management Interface; IPMI) transfer of data standard, and the controller of present embodiment can be baseboard management controller (BMC).
As shown in the figure, execution in step S200 at first, create receiving thread, processing threads, and build the transmission thread, wherein, in the constructive process of receiving thread, set up and receive formation, and in the constructive process of this processing threads, set up message queue, and in the constructive process that sends thread, set up transmit queue.Moreover, finish then execution in step S211 of establishment back in receiving thread; Finish then execution in step S221 of establishment back in processing threads; Finish then execution in step S231 of establishment back in sending thread.
In step S211, make this receiving thread wait for and receive the network package data, in present embodiment, whether each network interface that this receiving thread is detected this controller in a looping fashion receives network package, then execution in step S213.
In step S213, make this receiving thread when the arbitrary network interface that detects this controller receives network package, these network package data that receive are transmitted the reception formation, in present embodiment, this receiving thread also comprises the network interface that is used to receive this network package in this controller of identification, then return abovementioned steps S211, with continuous reception network package data.
In step S221, make this processing threads check in a looping fashion in this reception formation whether the network package data are arranged, then execution in step S223.
In step S223, when making this processing threads in detecting the reception formation, store the network package data, promptly produce network package and receive instruction, the network package data are sent to message queue, so that being carried out, these network package data receive and unpack processing, in present embodiment, this processing threads is that these network package data are unpacked the instruction into IPMI.And make this processing threads after the reception of finishing the network package data is handled, produce corresponding package and receive response instruction, and be sent in the transmit queue, then return abovementioned steps S221, constantly the network package data that are stored in this reception formation are handled.
In step S231, make this transmission thread waits package receive response instruction, in present embodiment, this transmission thread is by detecting whether store package reception response instruction, then execution in step S233 in this transmit queue in a looping fashion.
In step S233, when making this transmission thread in detecting this transmit queue, store package reception response instruction, then, receive response instruction to send this package by this identical network interface according to the network interface that is used to receive this network package in the controller that aforementioned this receiving thread identified.
In sum, network data processing method of the present invention receives by creating, handle and send three independently threads, so that the network interface of controller can parallel processing network data package reception and sending handle, and then avoid in the prior art because the reception formation only is provided, cause sending thread and be limited by receiving thread, therefore, when a plurality of network interfaces in the controller successively receive the network package data, after the receiving thread of back one network package must wait until that last network package Data Receiving disposes and sent corresponding package and receive response instruction, just carried out and reduced the drawback of Network Transmission usefulness, so can significantly promote the network data transmission efficient of controller by network data processing method of the present invention with multi-network interface.
Above-mentioned described only be the preferred embodiment of network data processing method of the present invention, non-in order to limit the scope of essence technology contents of the present invention.Its essence technology contents of network data processing method of the present invention broadly is defined in claims; any technology entity or method that other people are finished; if it is defined identical with claims; or be the change of equivalence, all will be regarded as being covered by in the scope that claims of the present invention protect.

Claims (4)

1. network data processing method, it is applicable in the controller with a plurality of network interfaces that it is characterized in that, the method comprising the steps of:
Create receiving thread, processing threads, and send thread, in the constructive process of this receiving thread, set up and receive formation, and send in the constructive process of thread, set up transmit queue in this;
After the foundation step of this receiving thread is finished, setting this receiving thread detects each network interface of this controller in a looping fashion and whether receives network package, when when the arbitrary network interface that detects this controller receives network package, be about to this received network package and be stored to this reception formation;
After the foundation step of this processing threads is finished, set this processing threads and detect in this reception formation whether store the network package data in a looping fashion, and when in detecting this reception formation, storing the network package data, promptly produce network package and receive instruction and receive and unpack processing, and produce corresponding package and receive response instruction and be sent to this transmit queue so that this network package is carried out; And
After the foundation step of this transmission thread is finished, set this transmission thread and detect whether store package reception response instruction in this transmit queue in a looping fashion, and receive response instruction execution package transmission processing at this package.
2. network data processing method according to claim 1, it is characterized in that, also comprise step: make this receiving thread discern the network interface that is used to receive this network package in this controller, thereby can send corresponding package reception response instruction by this network interface that identifies for this transmission thread is follow-up.
3. network data processing method according to claim 1 is characterized in that, this controller is a baseboard management controller.
4. network data processing method according to claim 1 is characterized in that, this controller is for supporting the baseboard management controller of IPMI transfer of data standard.
CN2010102055621A 2010-06-10 2010-06-10 Network data processing method Pending CN102281186A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010102055621A CN102281186A (en) 2010-06-10 2010-06-10 Network data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102055621A CN102281186A (en) 2010-06-10 2010-06-10 Network data processing method

Publications (1)

Publication Number Publication Date
CN102281186A true CN102281186A (en) 2011-12-14

Family

ID=45106380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102055621A Pending CN102281186A (en) 2010-06-10 2010-06-10 Network data processing method

Country Status (1)

Country Link
CN (1) CN102281186A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105634984A (en) * 2015-12-29 2016-06-01 重庆安碧捷科技股份有限公司 Multithread many-to-many medical data transmission method based on TCP protocol

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105634984A (en) * 2015-12-29 2016-06-01 重庆安碧捷科技股份有限公司 Multithread many-to-many medical data transmission method based on TCP protocol

Similar Documents

Publication Publication Date Title
CN103139157B (en) A kind of based on the network communication method of socket, Apparatus and system
EP2853083A1 (en) System and method for persistent wireless docking
WO2017028022A1 (en) System and method for supporting data communication in heterogeneous environment
CN106155803B (en) A kind of thread pool sharing method and system based on semaphore
CN104601523B (en) A kind of method and device for transmitting data
WO2014127619A1 (en) Method and system for supporting access of different types of sensors
CN102223655A (en) Underlying multi-thread data transmission method of mobile communication
CN110457243A (en) A kind of expansible multi output interrupt control unit
JP2016524880A (en) NFC radio frequency communication control method, apparatus, and system
CN114564435A (en) Inter-core communication method, device and medium for heterogeneous multi-core chip
CN105474193A (en) Method to minimize the number of IRQ lines from peripherals to one wire
CN104597789A (en) Charging pile self-checking device, system and method
US10313450B2 (en) Method for transparently connecting augmented network socket operations
CN103440213A (en) Network card driving method applied to system with multiple CPUs (Central Processing Unit) and network cards
CN102281186A (en) Network data processing method
JP2014528611A5 (en)
CN108965403A (en) O&M monitors establishment of connection method and terminal device
CN104503853A (en) Session holding method of multi-process server program on Linux system
CN104486188A (en) Method and setting device for setting receiving and sending detached threads
CN102693434B (en) Communication apparatus and method for interface layer of radio frequency identification device
CN106856415B (en) The reconnection method that goes offline based on MOST fiber optic network
CN103096168A (en) Data communication parallel processing method based on internet protocol television (IPTV) set top box
CN110505609A (en) A kind of bluetooth exchange method, bluetooth interactive device and terminal device
US9256914B2 (en) Graphic card for collaborative computing through wireless technologies
US11042497B2 (en) Communication between field programmable gate arrays

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20111214