CN102202041A - Data receiving method applied to server - Google Patents

Data receiving method applied to server Download PDF

Info

Publication number
CN102202041A
CN102202041A CN2010101398554A CN201010139855A CN102202041A CN 102202041 A CN102202041 A CN 102202041A CN 2010101398554 A CN2010101398554 A CN 2010101398554A CN 201010139855 A CN201010139855 A CN 201010139855A CN 102202041 A CN102202041 A CN 102202041A
Authority
CN
China
Prior art keywords
network
packet
data
interruption
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
CN2010101398554A
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 CN2010101398554A priority Critical patent/CN102202041A/en
Publication of CN102202041A publication Critical patent/CN102202041A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a data receiving method applied to a server. The server comprises a management board and at least one mainboard, wherein the management board and the mainboard are electrically connected with each other, and perform data communication by an inter-integrated circuit (I<2>C) protocol. The method comprises the following steps of: initializing a work queue; initializing a network interrupt; when a network card of the mainboard receives data, transmitting the interrupt of the management board by using the mainboard; judging whether the interrupt is the network interrupt; and when the interrupt is the network interrupt, scheduling the work queue to receive a data packet. By the data receiving method provided by the invention, during the network interrupt, only the work queue for receiving the data packet is required to be scheduled in an interrupt function, the interrupt function may return after scheduling the work queue, and the work queue for receiving the data packet may be called at a proper time.

Description

Be applicable to the data in server method of reseptance
Technical field
The present invention relates to a kind of transmission method, relate in particular to a kind of data receive method.
Background technology
In recent years because industrial and commercial flourishing, social progress, the product that provides relatively also is primarily aimed at facility, certain, economical and practically is purport, and therefore, the product of current exploitation is also than more progressive in the past, and contribute social.
In baseboard management controller (BMC) lining, network interface is a very important interface of communicating by letter with baseboard management controller, and it can realize user's telemanagement and control basal plate Management Controller.Generally all moving an operating system in the baseboard management controller, such as Linux.If will make the network interface of baseboard management controller to use, at first must in baseboard management controller, realize network-driven.The Linux network-driven mainly comprises transmission and receives the packet function, when network interrupts temporarily, just directly uses hardware to remove to receive packet.
In sideband (sideband) lining, we can use I 2C interface removes the receiving network data bag, and is calling I 2During C interface function i2c_transfer (), can be because when obtaining semaphore, and the process that makes enters sleep state, and in interrupt function be do not allow to enter dormant.
This shows that above-mentioned existing data receive mode obviously still exists contradiction and defective, and remains further to be improved.In order to address the above problem, association area is there's no one who doesn't or isn't sought solution painstakingly, but does not see always that for a long time suitable mode finished by development.Therefore, how can interrupt the interim data that receive really at network, real one of the current important research and development problem that belongs to also becomes current association area and needs improved target badly.
Summary of the invention
Therefore, one of this disclosure aspect is that a kind of data in server method of reseptance that is applicable to is being provided, and this server comprises a management board and at least one motherboard, and this management board and the electric connection of this motherboard are also passed through I 2The C agreement is carried out data communication, and this data receive method can interrupt the interim data that receive really at network.
According to this disclosure one embodiment, a kind of data receive method comprises the following steps:
(a) initialization one work queue (work queue);
(b) initialization one network interrupts;
(c) have a network card when this motherboard, when this network card received data, this motherboard sent this management board one interruption;
(d) judge whether this interruption is this network interruption;
(e) when this interrupts for this network interruption, dispatch this work queue to receive packet.
In addition, this data receive method also can comprise step (f): when this interruption or not for this network, judge that this interruption is invalid.
In step (a), use the operating system of this server can set up one and receive related between formation and the corresponding reception data processing function.
On the practice, this management board has a baseboard management controller.In step (d), when this packet sent to this network card, this network card can be passed to this interruption this baseboard management controller, judged that in this baseboard management controller this interruption that this network card passes is this network interruption.
In step (e),, call pairing this reception data processing function of this reception formation to receive this packet and this packet is sent to upper-layer protocol in the free time (Idle time) of the operating system of this server.
In present embodiment, about receiving this packet and this packet being sent to upper-layer protocol, it can comprise following substep in regular turn:
(e1) cancel the ability of this network interruption;
(e2) use a hardware to remove to receive this packet from network;
This packet that (e3) will receive sends to this upper-layer protocol; And
(e4) enable the ability of this network interruption.
In step (e2), can use the I of this network card 2C interface sees through sideband (sideband) transmission and goes to receive this packet, wherein I from network 2C interface is this hardware.
In sum, the technical scheme of this disclosure compared with prior art has tangible advantage and beneficial effect.By technique scheme, can reach suitable technological progress, and have the extensive value on the industry, it has following advantage at least:
1. this programme is that the work queue mechanism that adopts linux kernel to provide solves top contradiction, and in the initialization function of Linux network-driven module, work queue of initialization is used for receiving network data; And
2. when network interrupts, only need in interrupt function, dispatch the work queue that receives packet.Interrupt function can be after the traffic control formation return at once like this, and the work queue meeting that receives packet one appropriate in by system call.
Description of drawings
The reader will become apparent various aspects of the present invention after the reference accompanying drawing has been read the specific embodiment of the present invention.Wherein,
Fig. 1 is the flow chart according to a kind of data receive method of this disclosure one embodiment; And
Fig. 2 is the flow chart of the step 150 of Fig. 1.
[primary clustering symbol description]
100: data receive method
110~170: step
151~154: substep
Embodiment
For the narration that makes this disclosure more detailed and complete, can be with reference to the appended various embodiment of graphic and the following stated, graphic in the identical same or similar assembly of number representative.On the other hand, well-known assembly and step are not described among the embodiment, to avoid that the present invention is caused unnecessary restriction.
In server, because motherboard and management board pass through I 2The communication of C agreement is so can there be the contradiction of interrupting with dormancy in sideband (sideband) the network receiving remote network information.In view of this, the present invention's technology aspect is a kind of data receive method, and it is applicable to server, or is used in relevant sport technique segment widely.What deserves to be mentioned is that utilization notebook data method of reseptance can interrupt the interim data that receive really at network.The Fig. 1 that below will arrange in pairs or groups illustrates the embodiment of this data receive method.
Fig. 1 is the flow chart according to a kind of data receive method 100 of this disclosure one embodiment.In present embodiment, data receive method 100 is applicable to server, and server comprises a management board and at least one motherboard, and management board and motherboard electric connection are also passed through I 2The C agreement is carried out data communication.As shown in the figure, data receive method comprises step 110~170 (should be appreciated that mentioned in the present embodiment step except that chatting bright its order person especially, all can be adjusted its front and back order according to actual needs, even can carry out simultaneously simultaneously or partly).
But in step 110 initialization one work queue, be named as one and receive formation (receive_queue), and this work queue and the corresponding data processing function that receives bound, to set up related between this reception formation and corresponding this reception data processing function, INIT_WORK (﹠amp just; Receive_queue, receive_handler, NULL).
But interrupt in step 120 initialization one network.In step 130 is to work as this motherboard to have a network card, and when this network card received data, this motherboard sent this management board one interruption, then judges in step 140 whether this interruption is that this network interrupts; In present embodiment, when packet sent to the network card of network card, network card can be passed to this interruption the baseboard management controller of this management board, judged that in baseboard management controller this interruption that this network card passes is this network interruption.
When this interrupts for this network interruption, can dispatch this work queue to receive packet in step 150; In present embodiment, in the free time of the operating system of this server, this reception data processing function that calls this reception formation correspondence wherein in the network interrupt function, uses schedule_work (﹠amp to receive this packet and this packet is sent to upper-layer protocol; Receive_queue) scheduling receives the execution of the work queue of packet.Then, judge that in step 160 this interrupts successfully.
In present embodiment, the operating system of server is Linux or based on the operating system of Linux platform development, upper-layer protocol can be an application layer procotol (Application layerprotocols).Referring to about this free time does not have other preferential program to carry out in this time in this operating system, so can carry out this work queue.
In addition, when this interrupts or not for this network, judge that in step 170 this interrupts losing efficacy.
In order to do more detailed the elaboration to receiving packet and this packet being sent to upper-layer protocol, please refer to Fig. 2, Fig. 2 is the flow chart of the step 150 of Fig. 1.As shown in the figure, step 150 can comprise substep 151,152,153,154.
In the ability of this network interruption of substep 151 cancellation earlier, use a hardware to remove to receive this packet in substep 152 from network, this packet that will receive in substep 1531 sends to this upper-layer protocol, enables the ability that this network interrupts in substep 154.By this, can conveniently receive packet.
It is the layer 7 of seven layers of osi model that upper-layer protocol can be application layer (Application layer).Application layer directly and application programming interfaces and common network application service is provided.In addition, application layer is also sent request to presentation layer.
On the practice, this motherboard and this management board pass through I 2The communication of C agreement in substep 151, can be used the I of this network card 2C interface sees through sideband (sideband) transmission and goes to receive this packet, wherein I from network 2C interface is this hardware.
I 2C is the address of internal integration circuit (Inter-Integrated Circuit), it is a kind of serial communication bus, use many client/servers, by PHILIPS Co. the 1980's in order to allow motherboard, embedded system or mobile phone develop in order to connect the low speed peripheral unit.
In Linux, I 2C has listed the support of nucleus module in.In addition, OpenBSD has then added I in nearest renewal 2Main control end controller and the inductor of the framework of C (framework) to support that some are common.
In sum, use aforesaid data receive method, can interrupt the next interim data that receive really, pass through I to solve because of motherboard and management board at network 2The communication of C agreement is so just can there be the contradiction of interrupting with dormancy in sideband (sideband) the network receiving remote network information.This data receive method can be done in fact via a computer, aforesaid server etc. for example, also can partial function is real in a software program, and be stored in the recording medium of an embodied on computer readable, and make its operating system carry out this data receive method after making computer read this recording medium.
Above, describe the specific embodiment of the present invention with reference to the accompanying drawings.But those skilled in the art can understand, and under situation without departing from the spirit and scope of the present invention, can also do various changes and replacement to the specific embodiment of the present invention.These changes and replace all drop in claims of the present invention institute restricted portion.

Claims (7)

1. one kind is applicable to a data in server method of reseptance, and this server comprises a management board and at least one motherboard, and this management board and the electric connection of this motherboard are also passed through I 2The C agreement is carried out data communication, it is characterized in that, this data receive method comprises the following steps:
Initialization one work queue;
Initialization one network interrupts;
When this motherboard has a network card, when this network card received data, this motherboard sent this management board one interruption;
Judge whether this interruption is this network interruption; And
When this interrupts for this network interruption, dispatch this work queue to receive packet.
2. data receive method as claimed in claim 1 is characterized in that, the step of this work queue of initialization comprises:
Use the operating system of this server to set up one and receive related between formation and the corresponding reception data processing function.
3. data receive method as claimed in claim 2 is characterized in that this management board has a baseboard management controller, and judges that the step whether this interruption is interrupted for this network comprises:
When this packet sent to this network card, this network card can be passed to this interruption this baseboard management controller, judged that in this baseboard management controller this interruption that this network card passes is this network interruption.
4. data receive method as claimed in claim 3 is characterized in that, dispatches this work queue and comprises with the step that receives packet:
In the free time of the operating system of this server, call pairing this reception data processing function of this reception formation to receive this packet and this packet is sent to upper-layer protocol.
5. data receive method as claimed in claim 4 is characterized in that, receives this packet and the step that this packet sends to upper-layer protocol is comprised in regular turn:
Cancel the ability that this network interrupts;
Use a hardware to remove to receive this packet from network;
This packet that receives is sent to this upper-layer protocol; And
Enable the ability that this network interrupts.
6. data receive method as claimed in claim 5 is characterized in that, uses this hardware to comprise from the step that network goes to receive this packet:
Use the I of this network card 2C interface sees through the sideband transmission and goes to receive this packet from this network, wherein this I 2C interface is this hardware.
7. data receive method as claimed in claim 1 is characterized in that, this data receive method also comprises:
When this interrupts or not for this network, judge that this interruption is invalid.
CN2010101398554A 2010-03-23 2010-03-23 Data receiving method applied to server Pending CN102202041A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101398554A CN102202041A (en) 2010-03-23 2010-03-23 Data receiving method applied to server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101398554A CN102202041A (en) 2010-03-23 2010-03-23 Data receiving method applied to server

Publications (1)

Publication Number Publication Date
CN102202041A true CN102202041A (en) 2011-09-28

Family

ID=44662440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101398554A Pending CN102202041A (en) 2010-03-23 2010-03-23 Data receiving method applied to server

Country Status (1)

Country Link
CN (1) CN102202041A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113014535A (en) * 2019-12-20 2021-06-22 瞻博网络公司 Information processing method, computing device, and computer-readable medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113014535A (en) * 2019-12-20 2021-06-22 瞻博网络公司 Information processing method, computing device, and computer-readable medium
CN113014535B (en) * 2019-12-20 2023-08-22 瞻博网络公司 Information processing method, computing device, and computer-readable medium

Similar Documents

Publication Publication Date Title
CN107018175B (en) Scheduling method and device of mobile cloud computing platform
CN101102305B (en) Method and system for managing network information processing
CN101159765B (en) Network interface method, device and system
CN102053871B (en) Application program image display method and device
CN102546920B (en) Method, system and device of running process
CN103532823A (en) Message processing method, device and system for Internet of Things
CN102006241B (en) Method for receiving message through buffer area shared by multiple applications
CN101702688B (en) Data package transmit-receive method
CN103019788A (en) Remote online upgrading method based on CAN (Controller Area Network) bus
EP2717533A1 (en) Method, network card and hard disk card for accessing to shut-down hard disk
CN102301360A (en) Selectively Communicating Data Of A Peripheral Device To Plural Sending Computers
CN104123265A (en) Method and system for communication among multiple kernels
CN103207965A (en) Method and device for License authentication in virtual environment
CN101448027B (en) System of a pipeline Web server and operating method thereof
CN103634388A (en) Method for processing restarting of controllers in storage server, related equipment and communication system
CN106489137A (en) USB (universal serial bus) (USB) communication system and method
CN104123173A (en) Method and device for achieving communication between virtual machines
CN114489989A (en) Method and system for parallel scheduling based on proxy client
CN102202041A (en) Data receiving method applied to server
CN103209255A (en) Mobile terminal online game system
CN102301361A (en) Communicating Data In Flows Between First And Second Computers Connected Over A Network
CN101014049B (en) Method for managing timer of terminal wireless communication protocol stack software
CN105210022A (en) Providing a hybrid touchpad in a computing device
US9491132B2 (en) System and method for providing push service for reducing network loads
CN112702146A (en) Data processing method and device

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: 20110928