CN102480430A - Method and device for realizing message order preservation - Google Patents

Method and device for realizing message order preservation Download PDF

Info

Publication number
CN102480430A
CN102480430A CN2010105702214A CN201010570221A CN102480430A CN 102480430 A CN102480430 A CN 102480430A CN 2010105702214 A CN2010105702214 A CN 2010105702214A CN 201010570221 A CN201010570221 A CN 201010570221A CN 102480430 A CN102480430 A CN 102480430A
Authority
CN
China
Prior art keywords
message
district
queue
forwarding
shared queue
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.)
Granted
Application number
CN2010105702214A
Other languages
Chinese (zh)
Other versions
CN102480430B (en
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.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
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 Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201010570221.4A priority Critical patent/CN102480430B/en
Publication of CN102480430A publication Critical patent/CN102480430A/en
Application granted granted Critical
Publication of CN102480430B publication Critical patent/CN102480430B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method and a device for realizing message order preservation. The method comprises the following steps that: A, a queue region control unit on network communication equipment stores received messages into a share queue region input queue, and supplies the share queue region input queue to a first forwarding core for performing forwarding processing at the first time on the network communication equipment, and the first forwarding core polls the share queue region input queue, sequentially acquires each share queue region in the share queue region input queue and processes the acquired share queue regions; B, after finishing processing all messages in corresponding message queues in the current share queue region, the first forwarding core judges whether the first forwarding core is the last forwarding core which performs the forwarding processing, if the first forwarding core is not the last forwarding core which performs the forwarding processing, the first forwarding core supplies the processed share queue region to the next forwarding core performing the forwarding processing and the step C is performed, otherwise, the first forwarding core supplies the processed share queue region to an order preservation processing unit on the network communication equipment and the step D is performed; C, the next forwarding core which performs the forwarding processing performs the operation performed by the first forwarding core; and D, the order preservation processing unit acquires the messages in the share queue region and performs serialization processing according to a receiving order so as to send the messages. By the method and the device, problems of caching, regular aging and the like can be solved during message order preservation.

Description

Realize the method and apparatus of packet order preserving
Technical field
The present invention relates to data communication technology, particularly realize the method and apparatus of packet order preserving.
Background technology
Along with the continuous lifting of physical interface speed, the forwarding of CPU nuclear (core) number also increases thereupon in the network communication equipment.At present, adopt the concurrent working mode to make each forwarding nuclear parallel processing message flow among the CPU usually, in the hope of improving forwarding performance, specifically can be as shown in Figure 1.
Though the concurrent working mode has made full use of the multi-core parallel concurrent transfer capability; And in most of the cases also improved forwarding performance really; But; To some forwarding nuclear, when the flow of a message flow (it is essentially the message set with same protocol keyword) is examined current load greater than this forwarding, be dropped for avoiding the message in the message flow; Need some messages in the message flow be distributed to other forwardings and examine the processing of getting on, the message that has promptly occurred belonging to same message flow is by the situation of difference forwarding nuclear processing.So; If the different times of transmitting nuclear processing message do not match; Will cause same the message in the message flow not send in proper order according to reception; And data communication system requirement message sending order and reception order must be consistent, and based on this, network communication equipment just need carry out the order-preserving operation to the message in same the message flow before message sends.
In the prior art, when it come to arrive packet order preserving, will correspondingly relate to buffer memory, problem such as regularly aging.Because only when the flow of a message flow is examined current load greater than certain forwarding; Just can message be distributed to different forwarding nuclear; Promptly can not know the distribution of same the message in the message flow between difference forwarding nuclear in advance; And the processing delay on difference forwarding nuclear, therefore, the needed buffer memory capacity of packet order preserving just can't be confirmed.If buffer memory capacity is big or small, can cause the message in the message flow to abandon too early, too conference causes consuming excessively of cache resources, and then causes system response (can't obtain packet buffer like receiving terminal).As for the timing problem of aging; It also can be owing to not knowing the distribution of same the message in the message flow between difference forwarding nuclear in advance; And transmit the processing delay on the nuclear and cause to confirm needed ageing time in difference; If the too little meeting of ageing time setting causes abandoning too early, too conference increases the buffer memory burden.
Can find out that to sum up a kind of can to avoid the message order-preserving method of buffer memory and problem such as regularly aging be the current technical problem that needs to be resolved hurrily.
Summary of the invention
The invention provides the method and apparatus of realizing packet order preserving, so that to packet order preserving the time, avoid buffer memory and problem such as regularly aging.
A kind of method that realizes packet order preserving comprises:
A; The message that formation region control unit on the network communication equipment will receive deposits shared queue's district's input rank successively in; And with shared queue's district's input rank offer at first carry out transmit handle first transmit nuclear; Said first transmits the district's input rank of nuclear poll shared queue, obtains each shared queue district and processing in shared queue's district's input rank successively;
B after the said first forwarding nuclear is handled all messages of corresponding message queue in the current shared formation region, judges whether self is that the forwarding that last execution forwarding is handled is examined; If not; Provide shared queue district after the processing to carry out and transmit the forwarding nuclear of handling and handle to the next one, and execution in step C, if; Provide shared queue district after the processing to the order-preserving processing unit on the said network communication equipment, and execution in step D;
C, first transmits the operation of examining execution described in the forwarding nuclear execution in step B that said next execution forwarding is handled;
D, said order-preserving processing unit obtains the message in the shared queue district, and carries out the serialization processing in proper order according to reception and send for message.
A kind of device that is used to realize packet order preserving comprises forwarding nuclear that at least one participation forwarding is handled, and message receives formation and message transmit queue, and its key is that this device also comprises: formation region control unit and order-preserving processing unit; Wherein,
Said formation region control unit is used for depositing the message that has received in shared queue district's input rank, and provides this shared queue's district's input rank to transmit the first forwarding nuclear of handling at first carrying out on the said device;
First transmits the district's input rank of nuclear poll shared queue; Obtain shared queue district and processing in shared queue's district's input rank successively; After the said first forwarding nuclear is whenever handled all messages of corresponding message queue in the shared queue district, judge whether self is that the forwarding that last execution forwarding is handled is examined, if not; Provide shared queue district after the processing to carry out and transmit the forwarding nuclear of handling to the next one; The forwarding nuclear of carry out to transmit being handled by the next one is carried out said first and is transmitted the operation that nuclear is carried out, if provide shared queue district after the processing to said order-preserving processing unit;
Said order-preserving processing unit is used to obtain the shared queue district, and the message in the shared queue district that obtains is carried out serialization in proper order according to reception handle, and sends for the message after handling.
Can find out by above technical scheme; Among the present invention; First transmitted nuclear and handle the shared queue district in shared queue's district's input rank earlier by what at first carry out to transmit handle, wherein, the shared queue district comprises that each participates in transmitting forwarding of handling and check the message queue of answering; Each is transmitted the shared queue district of examining after will handling and offers the forwarding nuclear processing that processing is transmitted in next adjacent execution; And the like, carry out the shared queue district that will transmit after the forwarding nuclear of handling will be handled until last and offer the order-preserving processing unit, so that carrying out serialization to the message in the shared queue district that obtains according to reception in proper order, handles the order-preserving processing unit; Realized sending in proper order the purpose of message, promptly realized packet order preserving according to the message reception.Packet order preserving provided by the invention; Being transmitted nuclear by each respectively in order for the shared queue district in shared queue's district's input rank handles; For same shared queue district, transmit serial process between the nuclear, the shared queue district after each is handled at last is again according to the order that gets into shared queue's district's input rank, reports preface to handle after entering into shared queue's district's output queue; Therefore do not relate to buffer memory, problem such as regularly aging.
Description of drawings
Fig. 1 is a concurrent working mode sketch map in the prior art;
The basic flow sheet that Fig. 2 provides for the embodiment of the invention;
The detail flowchart that Fig. 3 provides for the embodiment of the invention;
The structural representation in the shared queue district that Fig. 4 provides for the embodiment of the invention;
The realization flow figure of the step 312 that Fig. 5 provides for the embodiment of the invention;
The sketch map of flow process in the corresponding diagram 3 that Fig. 6 provides for the embodiment of the invention;
The structure drawing of device that Fig. 7 provides for the embodiment of the invention;
Fig. 8 is two adjacent access path sketch mapes of transmitting between the nuclear of the present invention.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer, describe the present invention below in conjunction with accompanying drawing and specific embodiment.
Problems such as method provided by the invention mainly is to avoid prior art related buffer memory when carrying out packet order preserving, and is regularly aging, Fig. 2 is described the method that the embodiment of the invention provides.
Referring to Fig. 2, the basic flow sheet that Fig. 2 provides for the embodiment of the invention.This flow process is mainly used on the network communication equipment, and wherein, this network communication equipment can be router when specifically realizing, also can be the equipment that other have routing function, and such as switch etc., the embodiment of the invention does not specifically limit.Based on this, as shown in Figure 2, this flow process can may further comprise the steps:
Step 201; The message that formation region control unit on the network communication equipment will receive deposits shared queue's district's input rank successively in; And provide this shared queue's district's input rank to transmit the first forwarding nuclear of handling at first carrying out on the said network communication equipment; First transmits the district's input rank of nuclear poll shared queue, obtains each shared queue district and processing in shared queue's district's input rank successively.
In this step 201, the message that the formation region control unit will receive deposits the operation of shared queue's district's input rank in specifically can be referring to the description in the step 302 among Fig. 3 to the step 305.
Step 202 after the first forwarding nuclear is handled all messages of corresponding message queue in the current shared formation region, judges whether self is that the forwarding that last execution forwarding is handled is examined; If not; Provide shared queue district after the processing to carry out and transmit the forwarding nuclear of handling to the next one, and execution in step 203, if; Provide shared queue district after the processing to the order-preserving processing unit on the said network communication equipment, and execution in step 204.
The operation that this step 202 is carried out specifically can be referring to the operation of step 306 to step 309 among Fig. 3.
In addition, in the present embodiment, first transmits nuclear for last situation of carrying out the forwarding nuclear of transmitting processing is: said network communication equipment only comprises a forwarding nuclear that is used to transmit processing.
Step 203, the next one are carried out the forwarding of transmitting processing and are examined the operation execution of carrying out according to the first forwarding nuclear in the step 202.
Can find out from step 202 to step 203; First transmits nuclear handles the shared queue district earlier; And the shared queue district after will handling offers the next nuclear processing of transmitting; And the like, the shared queue district after the forwarding nuclear that last execution forwarding is handled provides processing is to the order-preserving processing unit, so that order-preserving processing unit execution in step 204.
Step 204, the order-preserving processing unit obtains the message in the shared queue district, and carries out the serialization processing in proper order according to reception and send for message.
The description of this step 204 can be referring to the description of step 311 to step 312 among Fig. 3.
More than method that the embodiment of the invention is provided carried out simple description.
In above-mentioned flow process, can number in order all forwarding nuclears of participating in transmitting on the network communication equipment in advance.Based on this, first in the present embodiment transmitted and endorsed to numbering minimum forwarding nuclear, and the forwarding nuclear phase that last execution forwarding is handled should be the maximum forwarding of numbering and examines; Perhaps, first transmits nuclear for numbering maximum forwarding nuclear, and last is carried out the forwarding nuclear phase of transmitting processing and should be the minimum forwarding nuclear of numbering.Transmitting nuclear with first below serves as that the minimum forwarding of numbering is examined, and last is carried out and transmits the forwarding nuclear of handling is that the maximum forwarding nuclear of numbering is example, and other situation principles are similar, through Fig. 3 flow process shown in Figure 2 are described in detail.
Referring to Fig. 3, the detail flowchart that Fig. 3 provides for the embodiment of the invention.In the present embodiment, the forwarding kernel function that all participations are transmitted on the network communication equipment is identical, all is to be used for message forwarding to handle.If the numbering that all forwarding nuclears of participating in transmitting carry out in order on this network communication equipment; Be respectively core-1; Core-2 ... core-N, wherein; At first carry out to transmit handle first to transmit nuclear be core-1 for the minimum forwarding nuclear of numbering, carrying out at last and transmitting the forwarding nuclear of handling is core-N for the maximum forwarding nuclear of numbering.
Based on this, as shown in Figure 3, this flow process can may further comprise the steps:
Step 301, the message sink on the network communication equipment is deposited message to the message that receives according to first in first out (FIFO:First In First Out) order and is received in the formation.
Step 302, the formation region control unit on the network communication equipment are when setting-up time arrives, and the said message of poll receives formation, are empty if this message receives formation, then finish current flow process; Otherwise, execution in step 303.
In this step 302, the formation region control unit perhaps is that gap periods property ground carries out whether the said message reception of poll formation is empty operation in real time with the set time.
Step 303, formation region control unit receive the formation from message and obtain all messages.
Step 304, the formation region control unit is created the shared queue district, and the message queue of core-1 correspondence begins from the shared queue district, checks the message queue of answering to each forwarding successively in order and puts into message.
In the present embodiment, the shared queue district comprises that each forwarding of participate in to transmit handling checks the message queue of answering, and wherein, each forwarding is checked the message queue of answering and deposited in by the queue linked list head of examining establishment for this forwardings, and logging mode is FIFO.So, when implementing this step 304, on the network communication equipment each to participate in transmitting the forwarding nuclear of handling be core-1, core-2 ..., core-N has a queue linked list head that is used to deposit in self corresponding message queue.
And the shared queue district in the present embodiment can be when specifically realizing: will begin the message chain piece that parallel successively in order each message queue of depositing forms from the corresponding message queue of core-1 and confirm as the shared queue district.Specifically can be referring to shown in Figure 4.
In addition; In this step 304; The formation region control unit can be checked the message queue of answering to each forwarding according to each principle of transmitting nuclear mean allocation message and put into message, and be specially: the formation region control unit is confirmed to put into the message amount M of each message queue; Be that unit divides all messages that obtain in order afterwards with M, the message queue corresponding from core-1 begins to check to each forwarding successively in order to put into N message the message queue of answering.Such as, network communication equipment exists 3 to transmit nuclear, i.e. core-1 to core-3; If the formation region control unit is 12 from the quantity of all messages that message reception formation is obtained, be followed successively by message 1 to message 12, so; Just need each forwarding to check and deposit 4 messages in the message queue of answering; Be that message 1 to message 4 is deposited in the corresponding message queue of core-1, message 5 to message 8 is deposited in the message queue that core-2 is corresponding, and message 9 to message 12 is deposited in the message queue that core-3 is corresponding.
Certainly; Another kind of implementation as the embodiment of the invention; In this step 304; The formation region control unit also can be transmitted the current load of nuclear and the quantity of all messages of obtaining checked in the message queue of answering to each forwarding and puts into message according to each, is specially: step 1, formation region control unit with core-1 as working as pronucleus.Step 2, the formation region control unit is according to confirming to the current message amount X that puts in the message queue of answering that checks when the quantity of the present load of pronucleus and all messages of obtaining.Step 3, formation region control unit are put into X message to current checking in order in the message queue of answering; The next one that core-1 is set is afterwards transmitted nuclear for to work as pronucleus, returns step 2.Still exist 3 to transmit nuclear with network communication equipment, i.e. core-1 to core-3, the formation region control unit is 12 from the quantity that message receives all messages that formation obtains; Promptly be followed successively by message 1 to message 12 and be example; If the core-1 present load is more serious, only can carry 2 messages at present, the core-2 present load only can be carried 4 messages; The core-3 present load is lighter; Can carry at least 6 messages, then, can message 1 to message 2 be deposited to the corresponding message queue of core-1 based on the description of above-mentioned steps 1 to step 3; Message 3 to message 6 is deposited to the corresponding message queue of core-2, and message 7 to message 12 is deposited to the corresponding message queue of core-3.Certainly; If the core-2 present load is lighter; Can carry at least 10 messages, then can directly message 3 to message 12 be deposited to the corresponding message queue of core-2, not deposit message in the message queue of core-3 correspondence; The concrete condition concrete analysis, the embodiment of the invention does not specifically limit.
The shared queue district that step 305, formation region control unit will be deposited message puts into shared queue's district's input rank successively.
Shared queue's district's input rank in this step 305, the message transmissions passage that it is essentially between formation region control unit and the core-1 is used for depositing the shared queue district that puts into wherein in according to the FIFO mode.
Need to prove, in the present embodiment, before carrying out this step 305, need in each shared queue district, to carry out the forwarding nuclear of transmitting processing in advance and create corresponding message queue for each.
Step 306, each the shared queue district in shared queue's district's input rank is obtained in the district's input rank of core-1 poll shared queue successively.
Step 307, core-1 is to each shared queue district (being designated as the current shared formation region) of obtaining, judges in the current shared formation region whether self corresponding message queue is sky, if, execution in step 308; Otherwise, handle all messages in self corresponding message queue, execution in step 309 afterwards.
If in the step 304; The formation region control unit is checked in the message queue of answering to each forwarding according to each quantity of transmitting all messages of examining current load and obtaining and is put into message, and the duty ratio of core-1 is more serious when forming the current shared formation region; Bearing message is handled again; Based on this, when implementing this step 307, this current shared queue district the corresponding message queue of core-1 will occur and be empty situation; Consider the popularity of the embodiment of the invention, need to carry out the decision operation in this step 307.
In this step 307, the message of handling in the message queue can be carried out according to the needed processing operation of this message, does not limit here.
Step 308, core-1 judges whether self is the maximum forwarding nuclear of numbering, if, the current shared formation region is stored in shared queue's district's output queue of having created, and execution in step 311, otherwise, execution in step 309.
Why this step 308 judges by core-1 whether self is the maximum forwarding nuclear of numbering, is in order to confirm whether core-1 is that the forwarding nuclear of handling is transmitted in last execution.Wherein, core-1 for last situation of carrying out the forwarding nuclear of transmitting processing is: core-1 is the unique forwarding nuclear of network communication equipment.
Shared queue's district's output queue in this step 308 is carried out the forwarding nuclear of forwarding processing and the message transmissions passage between the order-preserving processing unit for last, and it deposits the shared queue district of depositing wherein in according to the FIFO mode.Since the message in shared queue district through last carry out transmit the forwarding nuclear of handling after; All finish dealing with; Join the team after shared queue's district's output queue through the shared queue district after will handling, the message after the order-preserving processing unit can will be handled carries out order-preserving.
Step 309, deposit to next one forwarding and check in the internuclear access path of answering in the shared queue district after core-1 will handle, and this internuclear access path can be organized into shared queue's district's input rank.
In the present embodiment; The next forwarding checked the internuclear access path of answering and transmitted adjacent last one of nuclear order for this next one and transmit nuclear and should transmit the message transmissions passage between examining by the next one; It can deposit the adjacent last shared queue district that transmits after nuclear is handled of order in according to the FIFO mode; Therefore, can be organized into shared queue's district's input rank, specifically can be referring to shown in Figure 8.With next forwarding nuclear in this step 309 is that core-2 is an example; Then this step 309 is specially: deposit to the corresponding internuclear access path of core-2 in the shared queue district after core-1 will handle; Wherein, The internuclear access path that core-2 is corresponding is the message transmissions passage between core-1 and the core-2, and it can deposit the shared queue district after core-1 handles in according to the FIFO mode, and can be organized into shared queue's district's input rank.
Step 310, the next nuclear of transmitting is carried out according to the operation that similar step 306 core-1 in 309 carries out.
Need to prove that the message number of checking the message queue of answering owing to each forwarding in each shared queue district has difference, so be not that each nuclear is handled the shared queue district according to identical sequencing; Therefore; Preferably, before the next one is transmitted the operation that core-1 carries out in the nuclear execution in step 306, can transmit by this next one and judge when examining whether self corresponding shared queue's district's input rank is empty; If; Continue to return this decision operation, otherwise, the operation that core-1 carries out in the execution in step 306.
Step 311, order-preserving processing unit poll shared queue district's output queue is obtained the shared queue district successively.
Need to prove, be not according to the regular time sequencing, therefore because the operation of the forwarding nuclear execution of handling is transmitted in order-preserving processing unit and last execution; Preferably; Before execution in step 311, can whether be empty by order-preserving processing unit real-time judge shared queue district's output queue, be then to continue to return decision operation; Otherwise, execution in step 311.
Step 312; The order-preserving processing unit is to each the shared queue district that obtains; From the shared queue district that obtains, visit each forwarding in order successively and check the message queue of answering, and the message in the message queue of in order this quilt being visited deposits in the message transmit queue of said network communication equipment successively.
During this step 312 concrete realizations multiple way of realization can be arranged, Fig. 5 shows wherein a kind of way of realization.
Referring to Fig. 5, the realization flow figure of the step 312 that Fig. 5 provides for the embodiment of the invention.As shown in Figure 5, this flow process can may further comprise the steps:
Step 501, creating initial value is empty message chain L.
When promptly implementing this step 501, message chain L does not deposit any message.
Step 502, order-preserving processing unit are visited the corresponding message queue Q of core-S from the shared queue district that obtains.
Because in the present embodiment, transmit nuclear from 1 open numbering, therefore, the S of starting stage is 1.
In the present embodiment, be to be deposited in by the queue linked list head that this forwarding is examined because the message queue of answering is checked in each forwarding, therefore, this step 502 can be based on the corresponding message queue Q of queue linked list head visit core-S of core-s.
Step 503, order-preserving processing unit judge whether this message queue Q that is visited is empty, if, execution in step 504; Otherwise, in order the message among the message queue Q is put into message chain L successively.
Step 504, order-preserving processing unit judge whether core-S is the maximum forwarding nuclear of numbering, if not, and execution in step 505, if, execution in step 506.
Step 505 makes S=S+1, returns execution in step 502.
Step 506, L puts into the message transmit queue with the message chain, sends the message chain L in the message transmit queue by the message transmitter on the network communication equipment.
So far, realized the operation of step 312 through flow process shown in Figure 5.
Description through step 301 to step 312; Can find out, in the present embodiment, be not to be to examine real parallel processing message by the forwarding on the network communication equipment; But handle the message in the shared queue district by core-1 earlier; And the shared queue district after will handling offers core-2 and handles, and the like, be that last is carried out the shared queue district that will transmit after the forwarding nuclear of handling will be handled and offers the order-preserving processing unit until core-N; Handle so that the order-preserving processing unit carries out serialization to the message in the shared queue district that obtains according to reception in proper order, promptly realized sending in proper order the purpose of message according to the message reception.And the same time, each is transmitted nuclear and is all handling different shared queue districts, thus on certain meaning, each is examined all in concurrent working.
In order to make flow process shown in Figure 3 clearer, the embodiment of the invention has provided the concrete sketch map of corresponding diagram 3 flow processs, and is specifically as shown in Figure 6.
More than method that the embodiment of the invention is provided be described, the equipment that provides in the face of the embodiment of the invention is down described.
Referring to Fig. 7, the structure drawing of device that Fig. 7 provides for the embodiment of the invention.Wherein, this device is concrete to can be router when realizing, also can be the equipment that other have routing function, and such as switch etc., the embodiment of the invention does not specifically limit.As shown in Figure 7; This device can comprise: at least one participates in transmitting the forwarding nuclear of handling 701; Message receives formation 702 and message transmit queue 703, and its key is that this device also comprises: formation region control unit 704, order-preserving processing unit 705 and shared queue's district's input rank 706.
Wherein, formation region control unit 704 is used for depositing the message that has received in shared queue's district's input rank 706, and provides this shared queue's district's input rank 706 to transmit the first forwarding nuclear of handling at first carrying out on the said device;
First transmits nuclear poll shared queue district's input rank 706; Obtain shared queue district and processing in shared queue's district's input rank successively; And after whenever handling all messages of corresponding message queue in the shared queue district, judge whether self is that last carries out the forwarding nuclear of transmitting processing, if not; Provide shared queue district after the processing to carry out and transmit the forwarding nuclear of handling to the next one; The forwarding nuclear of carry out to transmit being handled by the next one is carried out said first and is transmitted the operation that nuclear is carried out, if provide shared queue district after the processing to order-preserving processing unit 705.In the present embodiment, first transmits nuclear when handling the shared queue district, judges earlier in this current shared formation region that obtains whether self corresponding message queue is empty, if be empty, and the then operation in this current shared queue district of execution processing; And if be empty; Judge directly whether self is that last carries out the forwarding nuclear of transmitting processing; Be then to provide the current shared formation region to order-preserving processing unit 705; Otherwise provide the current shared formation region to carry out and transmit the forwarding nuclear of handling, transmit the forwarding nuclear of handling by next one execution and carry out the operation that the said first forwarding nuclear is carried out to the next one.
Order-preserving processing unit 705 is used to obtain the shared queue district, and the message in the shared queue district that obtains is carried out serialization in proper order according to reception handle, and sends for the message after handling.
In the present embodiment, all are participated in transmitting the forwarding of handling and examine quilt numbering in order on the said device; Based on this, said first transmits the forwarding nuclear of examining to the numbering minimum, and said last execution is transmitted the forwarding of handling and examined to numbering maximum forwarding nuclear; Perhaps, said first transmits the forwarding nuclear of examining to the numbering maximum, and said last execution is transmitted the forwarding of handling and examined to numbering minimum forwarding nuclear.
In the present embodiment, if exist at least one to participate in transmitting the forwarding nuclear of handling on the said device, then as shown in Figure 7, this device also comprises: at least one internuclear access path 707.
Be followed successively by first with the forwarding nuclear of participating in the forwarding processing on the said device and transmit nuclear, second forwarding is examined, and the 3rd transmits nuclear ... N transmits and examines is example, and then the relation between shared queue's district's input rank 706 and the internuclear access path is as shown in Figure 8.Wherein, each internuclear access path is used to deposit the adjacent last shared queue district that transmits after nuclear is handled of order, therefore, but its also respective sets be made into shared queue's district's input rank.
Based on this; First transmits nuclear transmits the forwarding of handling when examining judging self not carry out for last; Provide shared queue district after the processing to carry out and transmit the forwarding nuclear of handling and transmit such as second and check the internuclear access path of answering, carry out by this next one and transmit the forwarding nuclear handled and transmit the operation that nuclear carries out according to similar first and carry out to the next one.
Preferably, as shown in Figure 7, formation region control unit 704 can comprise:
Obtain subelement 7041, be used for polling message and receive formation,, then receive the formation and obtain all messages from said message in case find to have message in the said message reception formation;
Create subelement 7042, be used to create the shared queue district, said shared queue district comprises that each participates in transmitting forwarding of handling and check the message queue of answering;
Handle subelement 7043, be used for from the shared queue district first and transmit and check the message queue of answering and begin, check the message queue of answering to each forwarding successively in order and put into message;
Constructor unit 7044 is used for the shared queue district of depositing message is put into shared queue's district's input rank 706 successively.
Wherein, handling subelement 7043 can check the message queue of answering to each forwarding according to each principle of transmitting nuclear mean allocation message and put into message when checking the message queue of answering to each forwarding and put into message; Perhaps, transmit the current load of nuclear according to each and quantity of all messages of obtaining is checked in the message queue of answering to each forwarding and put into message.
Preferably, as shown in Figure 7, said device also comprises: shared queue's district's output queue 708.
Wherein, Shared queue's district's output queue 708 is carried out the forwarding nuclear of forwarding processing and the message transmissions passage between the order-preserving processing unit 705 for last; Be used to deposit last and carry out the shared queue district that transmits after the forwarding nuclear of handling is handled, for order-preserving processing unit 705 message after handling in the shared queue district is carried out order-preserving and handle.Based on this; Last forwarding of carry out to transmit handling nuclear provides the shared queue district after the processing to comprise to the order-preserving processing unit: provide shared queue district after the processing to said shared queue district's output queue, obtain the message after handling in the shared queue district by order-preserving processing unit 705 through the said shared queue of poll district's output queue.
In the embodiment of the invention, as shown in Figure 7, can comprise during order-preserving processing unit 705 concrete realizations:
Poll subelement 7051 is used for poll shared queue district's output queue 708, and gives message with the shared queue district in shared queue's district's output queue and handle subelement 7052;
Message is handled subelement 7052, be used for visiting each forwarding in order successively from the shared queue district that obtains and check the message queue of answering, and the message in the message queue of in order this quilt being visited deposits in the message transmit queue successively.
So far, the device that the embodiment of the invention is provided is described.
Can find out by above technical scheme; Among the present invention; First transmitted nuclear and handle the shared queue district in shared queue's district's input rank earlier by what at first carry out to transmit handle, wherein, the shared queue district comprises that each participates in transmitting forwarding of handling and check the message queue of answering; Each is transmitted the shared queue district of examining after will handling and offers the forwarding nuclear processing that processing is transmitted in next adjacent execution; And the like, carry out the shared queue district that will transmit after the forwarding nuclear of handling will be handled until last and offer the order-preserving processing unit, so that carrying out serialization to the message in the shared queue district that obtains according to reception in proper order, handles the order-preserving processing unit; Realized sending in proper order the purpose of message, promptly realized packet order preserving according to the message reception.Packet order preserving provided by the invention; Being transmitted nuclear by each respectively in order for the shared queue district in shared queue's district's input rank handles; For same shared queue district, transmit serial process between the nuclear, the shared queue district after each is handled at last is again according to the order that gets into shared queue's district's input rank, reports preface to handle after entering into shared queue's district's output queue; Therefore do not relate to buffer memory, problem such as regularly aging.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope that the present invention protects.

Claims (12)

1. a method that realizes packet order preserving is characterized in that, this method comprises:
A; The message that formation region control unit on the network communication equipment will receive deposits shared queue's district's input rank successively in; And with shared queue's district's input rank offer at first carry out transmit handle first transmit nuclear; Said first transmits the district's input rank of nuclear poll shared queue, obtains each shared queue district and processing in shared queue's district's input rank successively;
B after the said first forwarding nuclear is handled all messages of corresponding message queue in the current shared formation region, judges whether self is that the forwarding that last execution forwarding is handled is examined; If not; Provide shared queue district after the processing to carry out and transmit the forwarding nuclear of handling and handle to the next one, and execution in step C, if; Provide shared queue district after the processing to the order-preserving processing unit on the said network communication equipment, and execution in step D;
C, first transmits the operation of examining execution described in the forwarding nuclear execution in step B that said next execution forwarding is handled;
D, said order-preserving processing unit obtains the message in the shared queue district, and carries out the serialization processing in proper order according to reception and send for message.
2. based on the described method of claim 1, it is characterized in that, before said method is carried out, further comprise: the forwarding of handling is transmitted in all participations on the network communication equipment examine numbering in order;
Said first transmits the forwarding nuclear of examining to the numbering minimum, and said last execution is transmitted the forwarding of handling and examined to numbering maximum forwarding nuclear; Perhaps,
Said first transmits the forwarding nuclear of examining to the numbering maximum, and said last execution is transmitted the forwarding of handling and examined to numbering minimum forwarding nuclear.
3. method according to claim 1 and 2 is characterized in that, in the steps A, the message that the formation region control unit will receive successively deposits shared queue's district's input rank in and comprises:
A1 when control unit each polling message in formation region receives formation, obtains all messages from message reception formation, said message receives formation and is used to deposit the message that said network communication equipment receives;
A2; Said formation region control unit is created the shared queue district; Said shared queue district comprises that each forwarding of participate in to transmit handling checks the message queue of answering; And from the shared queue district, first transmit and to check the message queue of answering and begin, check the message queue of answering to each forwarding successively in order and put into message;
The shared queue district that A3, said formation region control unit will deposit message puts into shared queue's district's input rank successively.
4. method according to claim 3 is characterized in that, in the steps A 2, said formation region control unit is checked the message queue of answering according to each principle of transmitting nuclear mean allocation message to each forwarding and put into message; Perhaps,
Said formation region control unit is checked in the message queue of answering to each forwarding according to each quantity of transmitting all messages of examining current load and obtaining and is put into message.
5. method according to claim 3; It is characterized in that; Before execution in step B, further comprise: create shared queue's district's output queue; Said shared queue district's output queue is used to deposit last and carries out the shared queue district that transmits after the forwarding nuclear of handling is handled, and for the order-preserving processing unit message after handling in the shared queue district is carried out order-preserving and handles;
Among the step B; Provide the shared queue district after the processing to comprise: to provide shared queue district after the processing to said shared queue district's output queue, obtain the message after handling in the shared queue district through the said shared queue of poll district's output queue by said order-preserving processing unit to the order-preserving processing unit.
6. method according to claim 5 is characterized in that step D comprises:
D1, order-preserving processing unit poll shared queue district's output queue is obtained the shared queue district successively;
D2, order-preserving processing unit visit each forwarding in order successively and check the message queue of answering from the shared queue district that obtains, and the message in the message queue that will be visited in order deposits in the message transmit queue of said network communication equipment successively.
7. a device that is used to realize packet order preserving comprises forwarding nuclear that at least one participation forwarding is handled, and message receives formation and message transmit queue, it is characterized in that this device also comprises: formation region control unit and order-preserving processing unit; Wherein,
Said formation region control unit is used for depositing the message that has received in shared queue district's input rank, and provides this shared queue's district's input rank to transmit the first forwarding nuclear of handling at first carrying out on the said device;
First transmits the district's input rank of nuclear poll shared queue; Obtain shared queue district and processing in shared queue's district's input rank successively; And after whenever handling all messages of corresponding message queue in the shared queue district, judge whether self is that last carries out the forwarding nuclear of transmitting processing, if not; Provide shared queue district after the processing to carry out and transmit the forwarding nuclear of handling to the next one; The forwarding nuclear of carry out to transmit being handled by the next one is carried out said first and is transmitted the operation that nuclear is carried out, if provide shared queue district after the processing to said order-preserving processing unit;
Said order-preserving processing unit is used to obtain the shared queue district, and the message in the shared queue district that obtains is carried out serialization in proper order according to reception handle, and sends for the message after handling.
8. device according to claim 7 is characterized in that, all are participated in transmitting the forwarding of handling and examine quilt numbering in order on the said device;
Said first transmits the forwarding nuclear of examining to the numbering minimum, and said last execution is transmitted the forwarding of handling and examined to numbering maximum forwarding nuclear; Perhaps,
Said first transmits the forwarding nuclear of examining to the numbering maximum, and said last execution is transmitted the forwarding of handling and examined to numbering minimum forwarding nuclear.
9. according to claim 7 or 8 described devices, it is characterized in that said formation region control unit comprises:
Obtain subelement, be used for polling message and receive formation,, then receive the formation and obtain all messages from said message in case find to have message in the said message reception formation;
Create subelement, be used to create the shared queue district, said shared queue district comprises that each participates in transmitting forwarding of handling and check the message queue of answering;
Handle subelement; Be used for transmitting the principle of nuclear mean allocation message according to each; The quantity of all messages of perhaps transmitting the current load of nuclear and obtaining based on each, since first transmit check the message queue of answering in order successively in the shared queue district each forwarding check the message queue of answering and put into message;
The constructor unit is used for the shared queue district of depositing message is put into shared queue's district's input rank successively.
10. according to claim 7 or 8 described devices, it is characterized in that this device further comprises:
Shared queue's district's output queue, said shared queue district's output queue are used to deposit last and carry out the shared queue district that transmits after the forwarding nuclear of handling is handled, and for the order-preserving processing unit message after handling in the shared queue district are carried out order-preserving and handle;
Said last forwarding of carry out to transmit handling nuclear provides the shared queue district after the processing to comprise to the order-preserving processing unit: provide shared queue district after the processing to said shared queue district's output queue, obtain the message after handling in the shared queue district by said order-preserving processing unit through the said shared queue of poll district's output queue.
11. device according to claim 10 is characterized in that, said order-preserving processing unit comprises:
The poll subelement is used for poll shared queue district's output queue, and gives message with the shared queue district in shared queue's district's output queue and handle subelement;
Message is handled subelement, be used for visiting each forwarding in order successively from the shared queue district that obtains and check the message queue of answering, and the message in the message queue that will be visited in order deposits in the message transmit queue successively.
12., it is characterized in that this device further comprises based on the described device of claim 10: at least one internuclear access path, be used to deposit the adjacent last shared queue district that transmits after nuclear is handled of order, can be organized into shared queue's district's input rank.
CN201010570221.4A 2010-11-24 2010-11-24 Method and device for realizing message order preservation Active CN102480430B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010570221.4A CN102480430B (en) 2010-11-24 2010-11-24 Method and device for realizing message order preservation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010570221.4A CN102480430B (en) 2010-11-24 2010-11-24 Method and device for realizing message order preservation

Publications (2)

Publication Number Publication Date
CN102480430A true CN102480430A (en) 2012-05-30
CN102480430B CN102480430B (en) 2014-07-09

Family

ID=46092914

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010570221.4A Active CN102480430B (en) 2010-11-24 2010-11-24 Method and device for realizing message order preservation

Country Status (1)

Country Link
CN (1) CN102480430B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014173297A1 (en) * 2013-04-26 2014-10-30 Mediatek Inc. Output queue of multi-plane network device and related method of managing output queue having multiple packet linked lists
CN104994032A (en) * 2015-05-15 2015-10-21 京信通信技术(广州)有限公司 Information processing method and apparatus
CN105511954A (en) * 2014-09-23 2016-04-20 华为技术有限公司 Method and device for message processing
CN106685854A (en) * 2016-12-09 2017-05-17 浙江大华技术股份有限公司 Data transmission method and system
CN108259369A (en) * 2018-01-26 2018-07-06 迈普通信技术股份有限公司 The retransmission method and device of a kind of data message
CN108667730A (en) * 2018-04-17 2018-10-16 东软集团股份有限公司 Message forwarding method, device, storage medium based on load balancing and equipment
CN109218226A (en) * 2017-07-03 2019-01-15 迈普通信技术股份有限公司 Message processing method and the network equipment
CN109218119A (en) * 2017-06-30 2019-01-15 迈普通信技术股份有限公司 Network Packet Loss diagnostic method and the network equipment
CN109327405A (en) * 2017-07-31 2019-02-12 迈普通信技术股份有限公司 Message order-preserving method and the network equipment
US11012366B2 (en) 2016-12-09 2021-05-18 Zhejiang Dahua Technology Co., Ltd. Methods and systems for data transmission
CN113055403A (en) * 2021-04-02 2021-06-29 电信科学技术第五研究所有限公司 Linear speed order preserving method
CN115118686A (en) * 2022-06-23 2022-09-27 中国民航信息网络股份有限公司 System, method, equipment, medium and product for processing passenger message

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101013383A (en) * 2007-02-13 2007-08-08 杭州华为三康技术有限公司 System and method for implementing packet combined treatment by multi-core CPU
CN101217467A (en) * 2007-12-28 2008-07-09 杭州华三通信技术有限公司 An inter-core load dispensing device and method
US20080259797A1 (en) * 2007-04-18 2008-10-23 Aladdin Knowledge Systems Ltd. Load-Balancing Bridge Cluster For Network Nodes
CN101442513A (en) * 2007-11-20 2009-05-27 杭州华三通信技术有限公司 Method for implementing various service treatment function and multi-nuclear processor equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101013383A (en) * 2007-02-13 2007-08-08 杭州华为三康技术有限公司 System and method for implementing packet combined treatment by multi-core CPU
US20080259797A1 (en) * 2007-04-18 2008-10-23 Aladdin Knowledge Systems Ltd. Load-Balancing Bridge Cluster For Network Nodes
CN101442513A (en) * 2007-11-20 2009-05-27 杭州华三通信技术有限公司 Method for implementing various service treatment function and multi-nuclear processor equipment
CN101217467A (en) * 2007-12-28 2008-07-09 杭州华三通信技术有限公司 An inter-core load dispensing device and method

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014173297A1 (en) * 2013-04-26 2014-10-30 Mediatek Inc. Output queue of multi-plane network device and related method of managing output queue having multiple packet linked lists
CN105164983B (en) * 2013-04-26 2019-02-22 联发科技股份有限公司 The related management method of the output queue of the output queue and stage construction network equipment of stage construction network equipment
CN105164983A (en) * 2013-04-26 2015-12-16 联发科技股份有限公司 Output queue of multi-plane network device and related method of managing output queue having multiple packet linked lists
US9313148B2 (en) 2013-04-26 2016-04-12 Mediatek Inc. Output queue of multi-plane network device and related method of managing output queue having multiple packet linked lists
CN105511954A (en) * 2014-09-23 2016-04-20 华为技术有限公司 Method and device for message processing
CN105511954B (en) * 2014-09-23 2020-07-07 华为技术有限公司 Message processing method and device
CN104994032B (en) * 2015-05-15 2018-09-25 京信通信系统(中国)有限公司 A kind of method and apparatus of information processing
CN104994032A (en) * 2015-05-15 2015-10-21 京信通信技术(广州)有限公司 Information processing method and apparatus
CN106685854A (en) * 2016-12-09 2017-05-17 浙江大华技术股份有限公司 Data transmission method and system
US11012366B2 (en) 2016-12-09 2021-05-18 Zhejiang Dahua Technology Co., Ltd. Methods and systems for data transmission
US11570120B2 (en) 2016-12-09 2023-01-31 Zhejiang Dahua Technology Co., Ltd. Methods and systems for data transmission
CN106685854B (en) * 2016-12-09 2020-02-14 浙江大华技术股份有限公司 Data sending method and system
CN109218119A (en) * 2017-06-30 2019-01-15 迈普通信技术股份有限公司 Network Packet Loss diagnostic method and the network equipment
CN109218119B (en) * 2017-06-30 2020-11-27 迈普通信技术股份有限公司 Network packet loss diagnosis method and network equipment
CN109218226A (en) * 2017-07-03 2019-01-15 迈普通信技术股份有限公司 Message processing method and the network equipment
CN109327405A (en) * 2017-07-31 2019-02-12 迈普通信技术股份有限公司 Message order-preserving method and the network equipment
CN109327405B (en) * 2017-07-31 2022-08-12 迈普通信技术股份有限公司 Message order-preserving method and network equipment
CN108259369A (en) * 2018-01-26 2018-07-06 迈普通信技术股份有限公司 The retransmission method and device of a kind of data message
CN108259369B (en) * 2018-01-26 2022-04-05 迈普通信技术股份有限公司 Method and device for forwarding data message
CN108667730B (en) * 2018-04-17 2021-02-12 东软集团股份有限公司 Message forwarding method, device, storage medium and equipment based on load balancing
CN108667730A (en) * 2018-04-17 2018-10-16 东软集团股份有限公司 Message forwarding method, device, storage medium based on load balancing and equipment
CN113055403A (en) * 2021-04-02 2021-06-29 电信科学技术第五研究所有限公司 Linear speed order preserving method
CN113055403B (en) * 2021-04-02 2022-06-17 电信科学技术第五研究所有限公司 Line speed order preserving method
CN115118686A (en) * 2022-06-23 2022-09-27 中国民航信息网络股份有限公司 System, method, equipment, medium and product for processing passenger message

Also Published As

Publication number Publication date
CN102480430B (en) 2014-07-09

Similar Documents

Publication Publication Date Title
CN102480430B (en) Method and device for realizing message order preservation
CN100466629C (en) Network equipment and message transferring method based on multiple-core processor
Kliazovich et al. CA-DAG: Modeling communication-aware applications for scheduling in cloud computing
US8159961B1 (en) Load balancing utilizing adaptive thresholding
CN101014002A (en) Cluster message transmitting method and distributed cluster system
CN101217464A (en) UDP data package transmission method
CN103944691B (en) Data repeating method in a kind of transmission of cooperation service and connect network gateway
CN105991474A (en) Traffic scheduling method, traffic scheduling device and network device
CN104243323B (en) Switching network multi-broadcast routing method and system
Kliazovich et al. CA-DAG: Communication-aware directed acyclic graphs for modeling cloud computing applications
CN103873523A (en) Client cluster access method and device
CN104754640A (en) Network resource scheduling method and network resource management server
CN108111558A (en) A kind of high-speed packet disposal method, apparatus and system
CN106201739A (en) A kind of remote invocation method of Storm based on Redis
Shi et al. Traffic aware inter-layer contact selection for multi-layer satellite terrestrial network
KR20190012928A (en) Load balancing apparatus and method
Farhan et al. An energy efficient long hop (LH) first scheduling algorithm for scalable Internet of Things (IoT) networks
CN102761608A (en) UDP (User Datagram Protocol) conversation multiplexing method and load balancing equipment
CN101217475B (en) A route enquire and route failure reelection method
Marandi et al. Practical Bloom filter based epidemic forwarding and congestion control in DTNs: A comparative analysis
CN101662479A (en) Response concurrent request based on IPV6 protocol and method for broadcasting data carrying multi-address production line
CN103647622A (en) Method, apparatus and system for realizing computer room-spanning data transmission
CN107820218A (en) The establishing method and equipment of message transmissions mode
Farhan et al. Internet of things scalability: Communications and data management
Xing et al. Device-aware routing and scheduling in multi-hop Device-to-Device networks

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant