WO2022226762A1 - Data forwarding and scheduling methods and apparatus - Google Patents

Data forwarding and scheduling methods and apparatus Download PDF

Info

Publication number
WO2022226762A1
WO2022226762A1 PCT/CN2021/090142 CN2021090142W WO2022226762A1 WO 2022226762 A1 WO2022226762 A1 WO 2022226762A1 CN 2021090142 W CN2021090142 W CN 2021090142W WO 2022226762 A1 WO2022226762 A1 WO 2022226762A1
Authority
WO
WIPO (PCT)
Prior art keywords
path
control information
output port
target output
saf
Prior art date
Application number
PCT/CN2021/090142
Other languages
French (fr)
Chinese (zh)
Inventor
董宝贵
唐国洋
韩新伟
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2021/090142 priority Critical patent/WO2022226762A1/en
Priority to CN202180089412.5A priority patent/CN116686259A/en
Publication of WO2022226762A1 publication Critical patent/WO2022226762A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/54Store-and-forward switching systems 

Definitions

  • the present application relates to communication technologies, and in particular, to a data forwarding and scheduling method and apparatus.
  • the delay requirements for communication equipment are getting higher and higher.
  • the data is first stored in the shared buffer, and the data is moved from one address of the shared buffer to another address during forwarding, thereby exchanging the data to the target output.
  • port (output) The process of data from the input port to the target output port may include one or more times of storage and forwarding. Each time the storage and forwarding is performed, a certain delay will occur. The more times the storage and forwarding are performed, the greater the delay.
  • the related art adopts the scheme including: when the traffic of the target output port is not congested, the data does not need to go through the process of storing and forwarding in the shared cache, and the data is directly written into the cache corresponding to the target output port. (buffer), thereby reducing the delay of data from the input port to the target output port; when the traffic of the target output port is congested, the data is switched to the target output port after store and forward in the shared buffer.
  • the present application provides a data forwarding and scheduling method and device to more accurately adapt to traffic congestion and ensure that control information is output in the correct order.
  • the present application provides a data scheduling method, which includes: obtaining control information to be forwarded and a target output port of the control information to be forwarded, judging whether the target output port is congested, and judging whether there is a transmission to The control information of the target output port, when the target output port is not congested, and there is no control information sent to the target output port on the LL path, copy the control information to be forwarded to obtain shadow control information, and send the pending control information to the target output port through the LL path. Forwarded control information, and send shadow control information to the target output port through the SAF path.
  • the present application can avoid the situation that the forwarding path is difficult to switch to the LL path again.
  • Congestion does not mean that there is no control information sent to the target output port on the SAF path, and there may be control information sent to the target output port on the SAF path.
  • the data forwarding device already has the conditions to send the control information through the LL path. According to the related art, the forwarding path of the control information cannot be switched from the SAF path to the LL path.
  • control information can be The forwarding path is switched from the SAF path to the LL path. Therefore, the present application can more accurately adapt to the traffic congestion situation, and switch the forwarding path of control information from the SAF path to the LL path, and the LL path can reduce the delay of data forwarding and meet the requirement of low delay.
  • the fact that the first control information is not shadow control information indicates that the first control information is not M', so the data forwarding device outputs the first control information, and does not need to switch the scheduled buffer queue, and will schedule and output SPKT from the SAF path buffer queue next time. In this way, even if the LPKT has been stored in the LL path cache queue, as long as the condition in step 306 is not satisfied (the first control information is shadow control information), the data forwarding device will not have a higher priority than the SAF path cache because the priority of the LL path cache queue is higher than that of the SAF path cache.
  • the LL path cache queue is switched to schedule the LL path cache queue, which prevents the order of SPKT from prior to the order of LPKT, but the LPKT sent through the LL path reaches the corresponding cache queue before the SPKT sent through the SAF path, and is scheduled ahead of schedule based on the priority Case.
  • the present application can realize more accurate adaptive traffic congestion situation by switching the forwarding path of the control information from the SAF path to the LL path by setting a new judgment standard.
  • By duplicating the first control information marked as LPKT and sending the control information on both the LL path and the SAF path it can be determined at the target output port whether to switch from the scheduling SAF path cache queue to the SAF path based on the control information. Scheduling the LL path cache queue ensures that control information is output in the correct order.
  • the method further includes: when the last scheduled and output control information comes from the LL path cache queue, judging whether the LL path cache queue is empty; when the LL path cache queue is empty When not empty, schedule and output the control information queued at the head of the queue from the LL path cache queue; when the LL path cache queue is empty, schedule and output the control information queued at the head of the SAF path cache queue control information.
  • the control information scheduled and outputted last time comes from the SAF path cache queue corresponding to the target output port means that the scheduling state machine corresponding to the target output port indicates the SAF path, wherein , the scheduling state machine indicating the SAF path refers to scheduling and outputting control information from the SAF path cache queue last time.
  • the method further includes: setting the scheduling state machine to indicate the For the LL path, the scheduling state machine indicating that the LL path refers to scheduling and outputting control information from the LL path buffer queue last time.
  • the method further includes: setting the scheduling state machine to indicate the SAF path.
  • the fact that the target output port is not congested means that the count value of the SAF path counter corresponding to the target output port is less than a set threshold.
  • control information not sent to the target output port on the LL path means that the count value of the LL path counter corresponding to the target output port is 0.
  • the method further includes: when the target output port is congested, sending the control information to be forwarded to the target output port through the SAF path.
  • the occurrence of congestion on the target output port means that the count value of the SAF path counter corresponding to the target output port is greater than or equal to a set threshold.
  • the method further includes: when sending a control information to the target output port through the SAF path, adding 1 to the count value of the SAF path counter corresponding to the target output port; or, When a control message is sent to the target output port through the LL path, the count value of the LL path counter corresponding to the target output port is incremented by one.
  • the method further includes: when scheduling and outputting a control information from the SAF path cache queue, decrementing the count value of the SAF path counter corresponding to the target output port by 1; or,
  • the count value of the LL path counter corresponding to the target output port is decremented by 1.
  • the present application provides a data forwarding device, comprising: an input module for obtaining control information to be forwarded and a target output port of the control information to be forwarded; judging whether the target output port is congested, And judge whether there is control information sent to the target output port on the low-latency LL path; when the target output port is not congested, and there is no control information sent to the target output port on the LL path, Copying the control information to be forwarded to obtain shadow control information; a forwarding module, configured to send the control information to be forwarded to the target output port through the LL path, and send the control information to the target output port through the store-and-forward SAF path Send the shadow control information; the output module is configured to schedule the queue head from the SAF path cache queue when the control information scheduled and output last time comes from the SAF path cache queue corresponding to the target output port first control information; when the first control information is the shadow control information, schedule and output the control information at the head of the queue from the LL path cache queue
  • the output module is further configured to judge whether the LL path cache queue is empty when the control information scheduled and output last time comes from the LL path cache queue; When the LL path cache queue is not empty, schedule and output the control information at the head of the queue from the LL path cache queue; when the LL path cache queue is empty, schedule and output from the SAF path cache queue. Output the control information at the head of the queue.
  • the control information scheduled and outputted last time comes from the SAF path cache queue corresponding to the target output port means that the scheduling state machine corresponding to the target output port indicates the SAF path, wherein , the scheduling state machine indicating the SAF path refers to scheduling and outputting control information from the SAF path cache queue last time.
  • the output module is further configured to set the scheduling state machine to indicate the LL path, and the scheduling state machine indicating that the LL path refers to the last cache queue from the LL path It schedules and outputs control information.
  • the output module is further configured to set the scheduling state machine to indicate the SAF path.
  • the fact that the target output port is not congested means that the count value of the SAF path counter corresponding to the target output port is less than a set threshold.
  • control information not sent to the target output port on the LL path means that the count value of the LL path counter corresponding to the target output port is 0.
  • the input module is further configured to send the control information to be forwarded to the target output port through the SAF path when the target output port is congested.
  • the occurrence of congestion on the target output port means that the count value of the SAF path counter corresponding to the target output port is greater than or equal to a set threshold.
  • the input module is further configured to convert the count value of the SAF path counter corresponding to the target output port when a control message is sent to the target output port through the SAF path Add 1; or, when sending a control message to the target output port through the LL path, add 1 to the count value of the LL path counter corresponding to the target output port.
  • the output module is further configured to decrement the count value of the SAF path counter corresponding to the target output port when scheduling and outputting a control information from the SAF path cache queue 1; or, when scheduling and outputting a control message from the LL path buffer queue, decrement the count value of the LL path counter corresponding to the target output port by 1.
  • the present application provides a data forwarding device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors Executing, causing the one or more processors to implement the method according to any one of the first to second aspects above.
  • the present application provides a computer-readable storage medium, comprising a computer program, which, when executed on a computer, causes the computer to execute the method according to any one of the first to second aspects above.
  • the present application provides a computer program, when the computer program is executed by a computer, for executing the method described in any one of the first to second aspects above.
  • 1 is an exemplary forwarding schematic diagram of a data forwarding device
  • FIG. 2 is an exemplary forwarding schematic diagram of a data forwarding device
  • FIG. 3 is an exemplary flowchart of a process 300 of the data forwarding and scheduling method of the present application
  • FIG. 4 is an exemplary flowchart of a process 400 of the data forwarding and scheduling method of the present application
  • FIG. 5 is an exemplary flowchart of a process 500 of the data forwarding and scheduling method of the present application
  • FIG. 6 is an exemplary schematic diagram of the data forwarding and scheduling method of the present application.
  • FIG. 7 is a schematic structural diagram of an exemplary data forwarding apparatus 700 of the present application.
  • At least one (item) refers to one or more, and "a plurality” refers to two or more.
  • “And/or” is used to describe the relationship between related objects, indicating that there can be three kinds of relationships, for example, “A and/or B” can mean: only A, only B, and both A and B exist , where A and B can be singular or plural.
  • the character “/” generally indicates that the associated objects are an “or” relationship.
  • At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • At least one (a) of a, b or c can mean: a, b, c, "a and b", “a and c", “b and c", or "a and b and c" ", where a, b, c can be single or multiple.
  • FIG. 1 is an exemplary forwarding schematic diagram of a data forwarding device.
  • the data forwarding device includes N+1 input ports (input0 ⁇ inputN) and N+1 output ports (output0 ⁇ outputN).
  • Multiple data slices (obtained from packet slices to be forwarded, each data slice can contain the number of bytes carried in cycles) enter an input port (such as input0), and then pass through the input crossbar , IXB) After the crossover, the data in the data slice is written into the Queue Manager in a balanced manner, and at the same time, the control information (control) containing the data cache address in the data slice is sent to the store and forward. (store and forward, SAF) module.
  • store and forward SAF
  • the output crossbar (OXB) in the SAF module retrieves the control information from the buffer for cross processing, and then exchanges the control information to the Reorder module.
  • the Reorder module stores the control information in the SAF buffer (SAF buffer), and then the scheduler (scheduler, SCH) reorders and schedules the SAF buffer, reads the queue manager to extract data according to the scheduled control information, and outputs the data to The destination output port (eg output1).
  • the destination output port eg output1
  • the control information in the data slice needs to go through multi-level SAF before data can be exchanged to the target output port.
  • control information of all data slices in this scheme needs to be forwarded by the SAF module, and the control information completes a series of operations such as grouping, quality of service (QoS) scheduling, and multicast cell replication in the SAF module.
  • QoS quality of service
  • a delay of several hundred clocks (SAF DLY in Figure 1) is introduced every time the store and forward are passed, and this delay cannot meet the performance requirements of low delay.
  • FIG. 2 is an exemplary forwarding schematic diagram of a data forwarding device.
  • a data forwarding device As shown in FIG. 2, in order to solve the delay problem in the technical solution of FIG. Path, that is, a low latency (LL) path.
  • LL low latency
  • the target output port for example, output1
  • the control information in the queue is cached at the target output port according to the order of the control information in the LL path.
  • control information In order to schedule and output the control information at the head of the queue one by one, it can not only ensure the QoS performance, but also reduce the delay of data forwarding and meet the requirements of low delay; when the traffic of the target output port is congested, in order to ensure the QoS performance, The control information is still forwarded to the buffer queue corresponding to the target output port (eg output1) through the SAF path.
  • This scheme may be referred to as low-latency store-and-forward.
  • the packet to be forwarded is sliced into 12 data slices into the same input port (for example, input0), and after IXB crossover, the data in the data slices are written into the queue manager in a balanced manner.
  • the control information including the data cache address in the data slice determines its forwarding path: when the traffic of the target output port is congested, the control information is forwarded to the target output port through the SAF path; when the traffic of the target output port is not congested, the control information passes through The LL path is forwarded to the destination output port. For example, among the above 12 control messages, the first 4 control messages are forwarded through the SAF path, the middle 4 control messages are forwarded through the LL path, and the last 4 control messages are forwarded through the SAF path.
  • the first four control messages forwarded through the SAF path are called SPKT1
  • the middle four control messages forwarded through the LL path are called LPKT
  • the last four control messages are forwarded through the LL path as LPKT.
  • the control information forwarded by the SAF path is called SPKT2.
  • LPKT may arrive before SPKT1 or LPKT and SPKT1 arrive at the same time.
  • the sorting logic of the Reorder module cannot distinguish the order of the control information. , eventually leading to out-of-order output of LPKT and SPKT1.
  • a possible solution is to ensure that there is no SPKT (control information forwarded via the SAF path) before the LPKT (control information forwarded via the LL path), that is, before the forwarding path is switched to the LL path, the Make sure that there is no forwarding control information on the SAF path.
  • This scheme can be called two-stage low-latency.
  • the two-stage low-latency does not support forwarding SPKT before LPKT. Therefore, when the traffic of the target output port is not congested, the LL path can effectively reduce the delay of data forwarding.
  • the traffic of the target output port is congested, forwarding When the path is switched to the SAF path, the QoS performance can be guaranteed.
  • the traffic on the target output port becomes uncongested again, based on the continuity of the service traffic, it is impossible to ensure that there is no SPKT on the SAF path, which makes it difficult to switch the forwarding path to LL again. path.
  • the present application provides a data forwarding and scheduling method.
  • FIG. 3 is an exemplary flowchart of a process 300 of the data forwarding and scheduling method of the present application.
  • the process 300 can be executed by a data forwarding device.
  • Process 300 is described as a series of steps or operations, and it should be understood that process 300 may be performed in various orders and/or concurrently, and is not limited to the order of execution shown in FIG. 3 .
  • a process 300 including the following steps is performed to forward the currently processed packet (ie, the current packet)
  • Step 301 Obtain the control information to be forwarded and the target output port of the control information to be forwarded.
  • the current packet refers to the packet currently being processed by the data forwarding device.
  • Multiple data slices obtained after the packet is sliced are forwarded from the input port of the data forwarding device to the target output port of the packet, wherein , the control information of the data slice may be sent to the target output port through the SAF path or the LL path, and the present application may use the following steps to determine the path of the control information.
  • Step 302 Determine whether the target output port is congested, and determine whether there is control information sent to the target output port on the LL path.
  • whether the target output port is congested may be reflected by the value of the SAF path counter corresponding to the target output port.
  • the present application sets multiple SAF path counters for the SAF path, and the multiple SAF path counters are in one-to-one correspondence with multiple output ports.
  • the count value of the SAF path counter corresponding to the target output port is incremented by 1;
  • a control message is output, and the count value of the SAF path counter corresponding to the target output port is decremented by 1.
  • the count value is added and subtracted according to the above counting rule of the SAF path counter corresponding to the target output port.
  • the count value of the SAF path counter is dynamically changed.
  • the data forwarding device can compare the count value of the SAF path counter corresponding to the target output port with the set threshold, and when the count value of the SAF path counter corresponding to the target output port is less than the set threshold
  • the threshold is set, it indicates that the number of control information to be scheduled and output in the SAF path cache queue of the target output port is less than the set threshold, and the number is not enough to cause traffic congestion on the target output port.
  • the target output port has not occurred Congestion; when the count value of the SAF path counter corresponding to the target output port is greater than or equal to the set threshold, it indicates that the quantity of control information to be scheduled and output in the SAF path buffer queue of the target output port is greater than or equal to the set threshold , this amount may cause traffic congestion on the target output port, in which case the target output port is considered to be congested.
  • the set threshold may be a basis for judging whether the traffic of the target output port is congested, and may be determined according to historical data or experience. It should be noted that the count value of the SAF path counter corresponding to the target output port is compared with the set threshold, and if they are equal, it may also indicate that the target output port is not congested, which is not specifically limited in this application.
  • whether there is control information sent to the target output port on the LL path may be reflected by the value of the LL path counter corresponding to the target output port.
  • the present application also sets multiple LL path counters for the LL path, and the multiple LL path counters are in one-to-one correspondence with multiple output ports.
  • the count value of the LL path counter corresponding to the target output port is incremented by 1;
  • a control message is output, and the count value of the LL path counter corresponding to the target output port is decremented by 1.
  • the count value is added and subtracted according to the above counting rule corresponding to the LL path counter of the target output port.
  • the count value of the LL path counter of the port changes dynamically.
  • the data forwarding device can compare the count value of the LL path counter corresponding to the target output port with 0.
  • the count value of the LL path counter corresponding to the target output port is 0, it means that There is no control information sent to the target output port on the LL path, that is, before the control information to be forwarded is sent, there is no control information sent to the target output port on the LL path.
  • the last control information refers to the control information sent only before the control information to be forwarded in the current packet, that is, the order of the last control information in the packet is only before the to-be-forwarded control information. control information.
  • control information sent to the target output port on the LL path does not mean that there is no control information on the LL path.
  • the port is output1, and there is no control information sent to output1 on the current LL path.
  • the count value of the LL path counter corresponding to output1 is 0, but the LL path has control information of other packets sent to output2 and output3, corresponding to The count values of the LL path counters of output2 and output3 are not 0.
  • Step 303 When the target output port is not congested and there is no control information sent to the target output port on the LL path, copy the control information to be forwarded to obtain shadow control information.
  • SPKT all control information forwarded through the SAF path
  • LPKT all control information forwarded through the LL path
  • the switching from sending through the SAF path to the above-mentioned control information to be forwarded sent through the LL path (the previous control information of the control information is SPKT, and the control information is LPKT, so it can be considered as the first switching from SPKT to LPKT A control information.
  • the first control information that will be switched from SPKT to LPKT is called the first LPKT.
  • the first LPKT is not divided into packets, that is, the first LPKT , it can be the control information that is not ranked first among the multiple control information of the message, or it can be the control information that is ranked first among the multiple control information of the message, which is not specifically limited) undertakes the function of order preservation, This is explained below.
  • M represents the control information to be forwarded (the first LPKT)
  • M' represents the shadow control information.
  • identification information can be filled in a field of M and M' (this application does not limit the position and length of this field), so that the aforementioned fields in the control information can be parsed at the target output port, so that according to this field The value in determines whether the control information is M or M', or neither M nor M', but not the first LPKT or SPKT.
  • Step 304 Send the control information to be forwarded to the target output port through the LL path, and send the shadow control information to the target output port through the SAF path.
  • the current control information is sent to the target output port through the LL path, and the shadow control information is sent to the target output port through the SAF path.
  • the shadow control information (M') can be obtained by copying the control information to be forwarded, and then the first LPKT(M) is sent to the
  • the target output port sends shadow control information (M') to the target output port through the SAF path, where M' is SPKT.
  • the LL path cache queue and the SAF path cache queue corresponding to the target output port have received a control message containing the same content, wherein the LL path cache queue received M, and the SAF path cache queue received M'.
  • the forwarding path of the control information cannot be switched from the SAF path to the LL path.
  • the present application can more accurately adapt to the traffic congestion situation, and switch the forwarding path of control information from the SAF path to the LL path, and the LL path can reduce the delay of data forwarding and satisfy the Low latency requirements.
  • control information sequence preservation At the target output port, the data forwarding device has an important function, that is, control information sequence preservation, to ensure that the sequence of multiple control information output through the target output port is consistent with the sequence of the multiple control information in the original message .
  • the most critical link in the control information order preservation is the first control information marked as LPKT, which will be described below.
  • the priority of the LL path cache queue has been preset in this application to be higher than that of the SAF path cache queue, that is, as long as there is control information (LPKT) to be scheduled in the LL path cache queue, and the data forwarding device has started to
  • LPKT control information
  • the LL path cache queue schedules and outputs control information
  • the control information (SPKT) will be scheduled and output from the SAF path cache queue.
  • scheduling control information from the cache queue can be understood as reading the control confidence at the head of the queue from the corresponding cache queue, and outputting control information from the cache queue can be understood as reading the control information from the corresponding cache queue.
  • the scheduled control information is output from the target output port of the data forwarding device. Scheduling and outputting the control information from the cache queue can be understood as reading the control confidence at the head of the queue from the corresponding cache queue. , and output from the target output port of the data forwarding device. It can be seen that if the data forwarding device scheduled and output LPKT from the LL path cache queue last time, as long as the LL path cache queue is not empty, it will not switch to schedule and output SPKT from the SAF path cache queue. If the queue is empty, the data forwarding device will automatically switch to schedule and output SPKT from the SAF path cache queue (the SAF path cache queue is not empty). In the case where the data forwarding device schedules and outputs the SPKT from the SAF path cache queue, the present application may perform the following steps to determine whether to switch to schedule and output the LPKT from the LL path cache queue.
  • Step 305 When the control information scheduled and output last time comes from the SAF path buffer queue corresponding to the target output port, schedule the first control information queued at the head of the queue from the SAF path buffer queue.
  • the target output port corresponds to a SAF path cache queue and an LL path cache queue.
  • the SAF path cache queue stores the control information (marked as SPKT) to the target output port transmitted through the SAF path
  • the LL path cache queue stores Incoming is the control information (labeled LPKT) to the target output port transmitted over the LL path.
  • the other output ports are similar and will not be repeated here.
  • the destination output port is the output port to which the current packet is destined.
  • the data forwarding device schedules the control information from the SAF path cache queue before determining to schedule the control information from the LL path cache queue (the SAF path cache queue is not empty),
  • the control information is the current control information)
  • the judgment condition that the last scheduled and output control information is from the SAF path cache queue is satisfied, it means that the data forwarding device scheduled and output SPKT from the SAF path cache queue last time, and has not switched to scheduling from the LL path cache queue. and output LPKT.
  • control information scheduled and output last time comes from the SAF path cache queue corresponding to the target output port means that the scheduling state machine corresponding to the target output port indicates the SAF path, wherein the scheduling state machine indicates the SAF path
  • the path refers to the last dispatch and output control information from the SAF path cache queue.
  • the target output port corresponds to a forwarding state machine and a scheduling state machine.
  • the forwarding state machine is used to indicate that the data forwarding device sent control information to the target output port through the LL path or the SAF path last time
  • the scheduling state machine is used to indicate that the data forwarding device Once is to schedule and output control information from the LL path buffer queue corresponding to the target output port or the SAF path buffer queue corresponding to the target output port.
  • the above-mentioned forwarding state machine indicates the LL path means that the data forwarding device sent LPKT to the target output port through the LL path last time, and the forwarding state machine indicates the SAF path means that the data forwarding device sent the LPKT to the target output port through the SAF path last time SPKT; the scheduling state machine indicates that the SAF path means that the data forwarding device dispatched and output SPKT from the SAF path cache queue corresponding to the target output port last time, and the scheduling state machine indicates the LL path means that the data forwarding device last time was from the SAF path cache queue corresponding to the target output port.
  • the LPKT is scheduled and output in the LL path buffer queue of the target output port.
  • the forwarding state machine Assuming that the forwarding state machine has two values, when it is the first value (eg 0), the forwarding state machine indicates the LL path, that is, the data forwarding device sent LPKT through the LL path last time; when it is the second value (eg 1) , the forwarding state machine indicates the SAF path, that is, the data forwarding device sent the SPKT through the SAF path last time.
  • the value of the forwarding state machine is globally visible in the data forwarding device. Therefore, by acquiring the value of the forwarding state machine, it can be determined which path the data forwarding device used last time to forward the control information.
  • the scheduling state machine Assuming that the scheduling state machine also has two values, when it is the first value (for example, 0), the scheduling state machine indicates the LL path, that is, the data forwarding device scheduled and output LPKT from the LL path cache queue last time; when it is the second value (eg 1), the scheduling state machine indicates the SAF path, that is, the data forwarding device scheduled and output the SPKT from the SAF path buffer queue last time.
  • the value of the scheduling state machine is also globally visible in the data forwarding device. Therefore, by obtaining the value of the scheduling state machine, the data forwarding device can determine which path cache queue the data forwarding device dispatched control information from last time.
  • the determination condition that the scheduling state machine corresponding to the target output port indicates the SAF path is satisfied, it can be determined that the data forwarding device scheduled and output the SPKT from the SAF path cache queue last time, and for the LPKT received in the LL path cache queue , scheduling has not yet started.
  • the data forwarding device schedules and outputs the SPKT from the SAF path buffer queue last time. At this time, the data forwarding device still schedules the control information (SPKT) at the head of the queue from the SAF path buffer queue, which is called the first control information.
  • SPKT control information
  • Step 306 When the first control information is shadow control information, schedule and output the control information queued at the head of the queue from the LL path cache queue corresponding to the target output port.
  • the data forwarding device will copy the first LPKT to obtain the shadow control information, where M represents the first LPKT, and M' represents the shadow control information, and M is sent to the target output port through the LL path, and M' is sent to the target output port through the LL path.
  • the SAF path is sent to the target output port.
  • the last control information of M is SPKT, which is also the handover control information from SPKT to LPKT.
  • the data forwarding device tries to find M' from the SAF path buffer queue, and uses this as an opportunity to switch to scheduling and outputting the LPKT from the LL path buffer queue.
  • the data forwarding device parses the first control information dispatched from the SAF path cache queue, and sees whether the relevant field (see the description of step 301) has written information for indicating M', if the information in this field indicates M ', it indicates that the first control information is shadow control information, if the information in this field does not indicate M', it indicates that the first control information is SPKT and there is no need to switch to scheduling and outputting LPKT from the LL path buffer queue.
  • the data forwarding device may switch from scheduling and outputting SPKT from the SAF path buffer queue to scheduling and outputting LPKT from the LL path buffer queue.
  • M is the first LPKT, which is based on the sending order, and the control information sent on the same path is not out of order. Therefore, the data forwarding device schedules from the LL path cache queue.
  • the outgoing control information at the head of the queue is M.
  • the data forwarding device may continuously send multiple LPKTs to the target output port through the LL path. Therefore, at the target output port, after identifying M', the data forwarding device starts to switch to schedule and output from the LL path buffer queue.
  • LPKT from M The sequence of scheduling and outputting LPKTs from the LL path cache queue is consistent with the sequence of sending LPKTs through the LL path, ensuring that the sequence of outputting multiple LPKTs is consistent with the sequence of the multiple LPKTs in the current packet.
  • Step 307 When the first control information is not shadow control information, output the first control information.
  • the fact that the first control information is not shadow control information indicates that the first control information is not M', so the data forwarding device outputs the first control information, and does not need to switch the scheduled buffer queue, and will schedule and output SPKT from the SAF path buffer queue next time. In this way, even if the LPKT has been stored in the LL path cache queue, as long as the condition in step 306 is not satisfied (the first control information is shadow control information), the data forwarding device will not have a higher priority than the SAF path cache because the priority of the LL path cache queue is higher than that of the SAF path cache.
  • the LL path cache queue is switched to schedule the LL path cache queue, which prevents the order of SPKT from prior to the order of LPKT, but the LPKT sent through the LL path reaches the corresponding cache queue before the SPKT sent through the SAF path, and is scheduled ahead of schedule based on the priority Case.
  • the present application can realize more accurate adaptive traffic congestion situation by switching the forwarding path of the control information from the SAF path to the LL path by setting a new judgment standard.
  • By duplicating the first control information marked as LPKT and sending the control information on both the LL path and the SAF path it can be determined at the target output port whether to switch from the scheduling SAF path cache queue to the SAF path based on the control information. Scheduling the LL path cache queue ensures that control information is output in the correct order.
  • FIG. 4 is an exemplary flow chart of a process 400 of the data forwarding and scheduling method of the present application.
  • the process 400 can be executed by a data forwarding device, specifically the input module (located at the input) and the data forwarding device in the data forwarding device.
  • the output module (located at output) executes.
  • Process 400 is described as a series of steps or operations, and it should be understood that process 400 may be performed in various orders and/or concurrently, and is not limited to the order of execution shown in FIG. 4 .
  • the process 400 including the following steps is executed to forward the currently processed packet (ie, the current packet) The control information in the data slice in .
  • Step 401 Determine whether the target output port is congested.
  • step 406 If no, go to step 402 ; if yes, go to step 406 .
  • step 401 reference may be made to the above-mentioned step 302, which will not be repeated here.
  • Step 402 Determine whether there is an LPKT sent to the target output port on the LL path.
  • step 403 If no, go to step 403 ; if yes, go to step 405 .
  • step 402 reference may be made to the above-mentioned step 302, which will not be repeated here.
  • Step 403 Copy the control information to be forwarded to obtain shadow control information.
  • step 403 reference may be made to the above-mentioned step 303, which will not be repeated here.
  • Step 404 Send the control information to be forwarded to the target output port through the LL path, and send the shadow control information to the target output port through the SAF path.
  • step 404 reference may be made to the above-mentioned step 304, which will not be repeated here.
  • Step 405 Send the control information to be forwarded to the target output port through the LL path.
  • the data forwarding device can send the control information to be forwarded to the target output port through the LL path.
  • Step 406 Send the control information to be forwarded to the target output port through the SAF path.
  • the data forwarding device can send the control information to be forwarded to the target output port through the SAF path.
  • Step 407 Determine whether the control information scheduled and output last time comes from the SAF path buffer queue corresponding to the target output port.
  • step 408 If yes, go to step 408 ; if no, go to step 412 .
  • step 407 reference may be made to the above-mentioned step 305, which will not be repeated here.
  • Step 408 Schedule the first control information queued at the head of the queue from the SAF path cache queue.
  • step 408 reference may be made to the above-mentioned step 305, which will not be repeated here.
  • Step 409 Determine whether the first control information is shadow control information.
  • step 410 If yes, go to step 410 ; if no, go to step 411 .
  • Step 410 Schedule and output the LPKT queued at the head of the queue from the LL path cache queue.
  • step 410 reference may be made to the above-mentioned step 306, which will not be repeated here.
  • Step 411 output the first control information.
  • step 411 reference may be made to the above-mentioned step 307, which will not be repeated here.
  • Step 412 Determine whether the LL path cache queue is empty.
  • step 413 If no, go to step 413 ; if yes, go to step 414 .
  • the control information scheduled and output by the data forwarding device last time came from the LL path cache queue, indicating that the LPKT was scheduled and output from the LL path cache queue last time. Then, according to the priorities of the LL path cache queue and the SAF path cache queue, priority is given to Scheduling and outputting LPKT from the LL path cache queue, and switching to scheduling and outputting SPKT from the SAF path cache queue only when the LL path cache queue is empty.
  • Step 413 Schedule and output the LPKT queued at the head of the queue from the LL path cache queue.
  • the data forwarding device continues to schedule from the LL path cache queue and outputs the control information queued at the head of the queue.
  • Step 414 Schedule and output the SPKT queued at the head of the queue from the SAF path cache queue.
  • the data forwarding device switches to schedule and output the SPKT from the SAF path cache queue. This ensures that the SPKT in the current packet after the LPKT must be scheduled and output after the LPKT is scheduled and output. The situation that these SPKTs are output earlier than the LPKTs is avoided, and the sequence of control information is guaranteed.
  • FIG. 5 is an exemplary flow chart of a process 500 of the data forwarding and scheduling method of the present application.
  • the process 500 can be executed by a data forwarding device, specifically the input module (located at the input) and the data forwarding device in the data forwarding device.
  • the output module (located at output) executes.
  • Process 500 is described as a series of steps or operations, and it should be understood that process 500 may be performed in various orders and/or concurrently, and is not limited to the order of execution shown in FIG. 5 .
  • the process 500 including the following steps is executed to forward the currently processed packet (ie, the current packet) The control information in the data slice in .
  • Step 501 Determine whether the target output port is congested.
  • step 502 If no, go to step 502 ; if yes, go to step 506 .
  • step 501 reference may be made to the above-mentioned step 302, which will not be repeated here.
  • Step 502 Determine whether there is an LPKT sent to the target output port on the LL path.
  • step 503 If no, go to step 503 ; if yes, go to step 505 .
  • step 502 reference may be made to the above-mentioned step 302, which will not be repeated here.
  • Step 503 Copy the control information to be forwarded to obtain shadow control information.
  • step 503 reference may be made to the above-mentioned step 303, which will not be repeated here.
  • Step 504 Send the control information to be forwarded to the target output port through the LL path, and send the shadow control information to the target output port through the SAF path.
  • step 504 reference may be made to the above-mentioned step 304, which will not be repeated here.
  • Step 505 Send the control information to be forwarded to the target output port through the LL path.
  • the data forwarding device can send the control information to be forwarded to the target output port through the LL path.
  • Step 506 Send the control information to be forwarded to the target output port through the SAF path.
  • the data forwarding device can send the control information to be forwarded to the target output port through the SAF path.
  • a forwarding state machine corresponding to the target output port can be set according to the path for sending the control information to be forwarded.
  • control information to be forwarded the forwarding state machine corresponding to the target output port can be set to indicate the LL path; if the control information to be forwarded is sent to the target output port through the SAF path, the forwarding state corresponding to the target output port can be set The machine is set to indicate the SAF path.
  • Step 507 Determine whether the forwarding state machine indicates the LL path, and whether the scheduling state machine indicates the SAF path.
  • the data forwarding device can set the scheduling state machine corresponding to the target output port according to whether the scheduled control information to be forwarded comes from the LL path buffer queue or the SAF path buffer queue, for example , if the control information to be forwarded is scheduled from the LL path cache queue, the data forwarding device can set the scheduling state machine corresponding to the target output port to indicate the LL path; if the control information to be forwarded is scheduled from the SAF path cache queue, the data The forwarding device may set the scheduling state machine corresponding to the target output port to indicate the SAF path.
  • forwarding state machine indicates the LL path and the scheduling state machine indicates the SAF path
  • Step 508 Schedule the first control information queued at the head of the queue from the SAF path cache queue.
  • the forwarding state machine indicates the LL path and the scheduling state machine indicates the SAF path, indicating that the control information was sent through the LL path last time, and the control information was scheduled from the SAF path cache queue last time.
  • Step 509 Determine whether the first control information is shadow control information.
  • step 510 If yes, go to step 510 ; if no, go to step 511 .
  • Step 510 Schedule and output the LPKT queued at the head of the queue from the LL path cache queue, and set the scheduling state machine to indicate the LL path.
  • step 510 reference may be made to the above-mentioned step 306, which will not be repeated here.
  • Step 511 output the first control information.
  • step 511 reference may be made to the above-mentioned step 307, which will not be repeated here.
  • Step 512 Schedule and output the LPKT queued at the head of the queue from the LL path cache queue.
  • the forwarding state machine indicates the LL path and the scheduling state machine indicates the LL path, indicating that the control information was sent through the LL path last time, and the control information was scheduled from the LL path cache queue last time.
  • the data forwarding device is still sending control information through the LL path. It can be considered that LPKT will enter the LL path cache queue. Therefore, the LL path cache queue will not be empty at this time, and the control information was dispatched from the LL path cache queue last time. , based on the priority of the LL path cache queue is higher than the priority of the SAF path cache queue, continue to schedule and output the LPKT queued at the head of the LL path cache queue.
  • Step 513 Determine whether the LL path cache queue is empty.
  • step 514 If no, go to step 514 ; if yes, go to step 515 .
  • the forwarding state machine indicates the SAF path and the scheduling state machine indicates the LL path, indicating that the control information was sent through the SAF path last time, and the control information was scheduled from the LL path cache queue last time.
  • the data forwarding device has switched to sending SPKT through the SAF path, but because the LL path cache queue is not empty, it is still scheduling and outputting LPKT from the LL path cache queue, or the priority of the LL path cache queue is higher than that of the SAF path cache queue. If it is not empty, it will continue to schedule from the LL path cache queue and output the LPKT queued at the head of the queue. If it is empty, switch to scheduling from the SAF path cache queue and output the queue. SPKT at the head of the team.
  • Step 514 Schedule and output the LPKT queued at the head of the queue from the LL path cache queue.
  • Step 515 Schedule and output the SPKT queued at the head of the queue from the SAF path cache queue, and set the scheduling state machine to indicate the SAF path.
  • Step 516 Schedule and output the SPKT queued at the head of the SAF path cache queue.
  • FIG. 6 is an exemplary schematic diagram of the data forwarding and scheduling method of the present application.
  • the schematic diagram is based on the structure shown in FIG. 2 , and the packet to be forwarded is sliced into 12 data slices and enters the same input port (for example, input0), for ease of understanding, the first four control messages forwarded through the SAF path are called SPKT1, and the four middle control messages forwarded through the LL path are called LPKT. The next four control messages forwarded through the SAF path are called SPKT2.
  • the shadow control information (M') is obtained after the first LPKT (M) is copied, M is sent through the LL path, and M' is sent through the SAF path. It can be seen that on the SAF pathway, M' is arranged between SPKT1 and SPKT2.
  • the Reorder module first schedules and outputs 4 SPKT1s from the SAF path cache queue.
  • M' When M' is detected, it switches to schedule and outputs 4 LPKTs from the LL path cache queue, and finally schedules and outputs 4 LPKTs from the SAF path cache queue.
  • the output order is consistent with the original arrangement order of the control information in the message.
  • FIG. 7 is an exemplary schematic structural diagram of a data forwarding apparatus 700 of the present application. As shown in FIG. 7 , the data forwarding apparatus 700 of this embodiment may be applied to the above-mentioned data forwarding device.
  • the data forwarding apparatus 700 includes: an input module 701, a forwarding module 702 and an output module 703, wherein,
  • the input module 701 is used for obtaining the control information to be forwarded and the target output port of the control information to be forwarded; judging whether the target output port is congested, and judging whether there is a low-latency LL path sent to the control information of the target output port; when the target output port is not congested and there is no control information sent to the target output port on the LL path, copy the control information to be forwarded to obtain shadow control information; forwarding Module 702, configured to send the control information to be forwarded to the target output port through the LL path, and send the shadow control information to the target output port through the store-and-forward SAF path; output module 703, configured to When the control information scheduled and output last time comes from the SAF path buffer queue corresponding to the target output port, the first control information queued at the head of the queue is scheduled from the SAF path buffer queue; when the first control information When the shadow control information is the shadow control information, schedule and output the control information at the head of the queue from the LL path cache queue corresponding to the target output port
  • the output module 703 is further configured to judge whether the LL path cache queue is empty when the control information scheduled and output last time comes from the LL path cache queue; when the LL path cache queue is empty; When the LL path cache queue is not empty, schedule and output the control information at the head of the queue from the LL path cache queue; when the LL path cache queue is empty, schedule from the SAF path cache queue And output the control information at the head of the queue.
  • the control information scheduled and outputted last time comes from the SAF path cache queue corresponding to the target output port means that the scheduling state machine corresponding to the target output port indicates the SAF path, wherein , the scheduling state machine indicating the SAF path refers to scheduling and outputting control information from the SAF path cache queue last time.
  • the output module 703 is further configured to set the scheduling state machine to indicate the LL path, and the scheduling state machine indicating that the LL path refers to the last cache from the LL path Schedule and output control information in the queue.
  • the output module 703 is further configured to set the scheduling state machine to indicate the SAF path.
  • the fact that the target output port is not congested means that the count value of the SAF path counter corresponding to the target output port is less than a set threshold.
  • control information not sent to the target output port on the LL path means that the count value of the LL path counter corresponding to the target output port is 0.
  • the input module 701 is further configured to send the control information to be forwarded to the target output port through the SAF path when the target output port is congested.
  • the occurrence of congestion on the target output port means that the count value of the SAF path counter corresponding to the target output port is greater than or equal to a set threshold.
  • the input module 701 is further configured to count the SAF path counter corresponding to the target output port when sending a control message to the target output port through the SAF path The value is incremented by 1; or, when a control message is sent to the target output port through the LL path, the count value of the LL path counter corresponding to the target output port is incremented by 1.
  • the output module 703 is further configured to, when scheduling and outputting a piece of control information from the SAF path buffer queue, set the count value of the SAF path counter corresponding to the target output port Decrement by 1; or, when scheduling and outputting a control message from the LL path buffer queue, decrement the count value of the LL path counter corresponding to the target output port by 1.
  • the apparatus in this embodiment can be used to implement the technical solutions of any of the method embodiments shown in FIGS. 3-6 , and the implementation principles and technical effects thereof are similar, and details are not repeated here.
  • each step of the above method embodiments may be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software.
  • the processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other Programming logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP digital signal processor
  • ASIC application-specific integrated circuit
  • FPGA field programmable gate array
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the methods disclosed in the embodiments of the present application may be directly embodied as executed by a hardware coding processor, or executed by a combination of hardware and software modules in the coding processor.
  • the software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
  • the memory mentioned in the above embodiments may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be random access memory (RAM), which acts as an external cache.
  • RAM random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous DRAM
  • SDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link dynamic random access memory
  • direct rambus RAM direct rambus RAM
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present application provides data forwarding and scheduling methods and apparatus. The data scheduling method comprises: obtaining control information to be forwarded and a target output port; when the target output port is not congested and there is no control information sent to the target output port on an LL path, copying said control information, and obtaining shadow control information; sending said control information to the target output port by means of the LL path, and sending the shadow control information to the target output port by means of a store and forward (SAF) path; when control information that was last scheduled and outputted comes from a cache queue of the SAF path, scheduling first control information at the head of the queue from within the SAF path cache queue; when the first control information is the shadow control information, scheduling from within a cache queue of the LL path and outputting the control information at the head of the queue; and when the first control information is not the shadow control information, outputting the first control information. The present application can adapt to traffic congestion conditions more accurately and can ensure that control information is outputted in the correct order.

Description

数据转发和调度方法和装置Data forwarding and scheduling method and device 技术领域technical field
本申请涉及通信技术,尤其涉及一种数据转发和调度方法和装置。The present application relates to communication technologies, and in particular, to a data forwarding and scheduling method and apparatus.
背景技术Background technique
随着网络的不断发展,对通信设备的延时要求越来越高。通常通信设备的输入端口(input)接收到数据(data)后,先将数据存储在共享缓存中,在转发时将数据从共享缓存的一个地址搬移到另一个地址,从而将数据交换到目标输出端口(output)。数据从输入端口到目标输出端口的过程可以包括一次或多次存储转发,每经过一次存储转发,会产生一定的延时,存储转发的次数越多,延时越大。With the continuous development of the network, the delay requirements for communication equipment are getting higher and higher. Usually, after the input port (input) of the communication device receives the data (data), the data is first stored in the shared buffer, and the data is moved from one address of the shared buffer to another address during forwarding, thereby exchanging the data to the target output. port (output). The process of data from the input port to the target output port may include one or more times of storage and forwarding. Each time the storage and forwarding is performed, a certain delay will occur. The more times the storage and forwarding are performed, the greater the delay.
相关技术为解决上述问题,采用的方案包括:当目标输出端口的流量不拥塞的情况下,数据不需要经过在共享缓存中的存储转发的过程,直接将数据直接写入目标输出端口对应的缓存(buffer)中,从而降低数据从输入端口到目标输出端口的延时;当目标输出端口的流量拥塞时,数据经过在共享缓存中的存储转发后交换到目标输出端口。In order to solve the above problems, the related art adopts the scheme including: when the traffic of the target output port is not congested, the data does not need to go through the process of storing and forwarding in the shared cache, and the data is directly written into the cache corresponding to the target output port. (buffer), thereby reducing the delay of data from the input port to the target output port; when the traffic of the target output port is congested, the data is switched to the target output port after store and forward in the shared buffer.
但是,由于直接写入目标输出端口对应的缓存的报文更快到达目标输出端口,因此在目标输出端口处可能会出现排序在后的报文经直接写入先于或同步排序在前的报文经存储转发到达的情况,而目标输出端口分不出报文的先后顺序,最终导致报文乱序输出。However, since the packets directly written to the buffer corresponding to the target output port arrive at the target output port faster, there may be cases where the packets in the later order are directly written before or synchronously with the packets in the previous order. When the message arrives via store-and-forward, the destination output port cannot distinguish the sequence of the message, which eventually leads to the out-of-order output of the message.
发明内容SUMMARY OF THE INVENTION
本申请提供一种数据转发和调度方法和装置,以更精准的自适应流量拥塞情况,并且确保控制信息以正确的顺序输出。The present application provides a data forwarding and scheduling method and device to more accurately adapt to traffic congestion and ensure that control information is output in the correct order.
第一方面,本申请提供一种数据调度方法,包括:获得待转发的控制信息,以及待转发的控制信息的目标输出端口,判断目标输出端口是否发生拥塞,以及判断LL路径上是否存在发送给目标输出端口的控制信息,当目标输出端口没有发生拥塞,且LL路径上没有发送给目标输出端口的控制信息时,复制待转发的控制信息得到影子控制信息,通过LL路径向目标输出端口发送待转发的控制信息,并通过SAF路径向目标输出端口发送影子控制信息。当上一次调度并输出的控制信息来自对应于目标输出端口的SAF路径缓存队列时,从SAF路径缓存队列中调度排在队头的第一控制信息,当第一控制信息是影子控制信息时,从对应于目标输出端口的LL路径缓存队列中调度并输出排在队头的控制信息,当第一控制信息不是影子控制信息时,输出第一控制信息。In a first aspect, the present application provides a data scheduling method, which includes: obtaining control information to be forwarded and a target output port of the control information to be forwarded, judging whether the target output port is congested, and judging whether there is a transmission to The control information of the target output port, when the target output port is not congested, and there is no control information sent to the target output port on the LL path, copy the control information to be forwarded to obtain shadow control information, and send the pending control information to the target output port through the LL path. Forwarded control information, and send shadow control information to the target output port through the SAF path. When the last scheduled and output control information comes from the SAF path buffer queue corresponding to the target output port, schedule the first control information at the head of the queue from the SAF path buffer queue. When the first control information is shadow control information, The control information queued at the head of the queue is scheduled and output from the LL path buffer queue corresponding to the target output port, and the first control information is output when the first control information is not shadow control information.
本申请可以避免转发路径很难再次切换为LL路径的情况。在满足目标输出端口没有发生拥塞和LL路径上不存在发送给目标输出端口的控制信息这两个条件时,确认了LL路径上不存在发送给目标输出端口的控制信息,而目标输出端口没有发生拥塞并不能说明SAF路径上没有发送给目标输出端口的控制信息,SAF路径上很可能还有发送给目标输出端口的控制信息。但此时其实数据转发设备已经具备了通过LL路径发送控制信息的条件,而根据相关技术就不能将控制信息的转发路径从SAF路径切换为LL路径,但根据本申请实施例是可以将控制信息的转发路径从SAF路径切换为LL路径的。因此,本申请可以更精准的自适应流量拥塞情况,将控制信息的转发路径从SAF路径切换为LL路径,而LL 路径可以降低数据转发的延时,满足低延时的要求。The present application can avoid the situation that the forwarding path is difficult to switch to the LL path again. When the two conditions of no congestion on the target output port and no control information sent to the target output port on the LL path are satisfied, it is confirmed that there is no control information sent to the target output port on the LL path, and no control information sent to the target output port on the LL path. Congestion does not mean that there is no control information sent to the target output port on the SAF path, and there may be control information sent to the target output port on the SAF path. However, at this time, the data forwarding device already has the conditions to send the control information through the LL path. According to the related art, the forwarding path of the control information cannot be switched from the SAF path to the LL path. However, according to the embodiment of the present application, the control information can be The forwarding path is switched from the SAF path to the LL path. Therefore, the present application can more accurately adapt to the traffic congestion situation, and switch the forwarding path of control information from the SAF path to the LL path, and the LL path can reduce the delay of data forwarding and meet the requirement of low delay.
第一控制信息不是影子控制信息表示第一控制信息不是M’,因此数据转发设备输出该第一控制信息,且无需切换调度的缓存队列,下一次还是从SAF路径缓存队列调度并输出SPKT。这样即使LL路径缓存队列中已经存入了LPKT,只要不满足步骤306的条件(第一控制信息是影子控制信息),数据转发设备都不会因为LL路径缓存队列的优先级高于SAF路径缓存队列而切换去调度LL路径缓存队列,防止了SPKT的顺序先于LPKT的顺序,但通过LL路径发送的LPKT先于通过SAF路径发送的SPKT达到对应的缓存队列,再基于优先级而被超前调度的情况。The fact that the first control information is not shadow control information indicates that the first control information is not M', so the data forwarding device outputs the first control information, and does not need to switch the scheduled buffer queue, and will schedule and output SPKT from the SAF path buffer queue next time. In this way, even if the LPKT has been stored in the LL path cache queue, as long as the condition in step 306 is not satisfied (the first control information is shadow control information), the data forwarding device will not have a higher priority than the SAF path cache because the priority of the LL path cache queue is higher than that of the SAF path cache. The LL path cache queue is switched to schedule the LL path cache queue, which prevents the order of SPKT from prior to the order of LPKT, but the LPKT sent through the LL path reaches the corresponding cache queue before the SPKT sent through the SAF path, and is scheduled ahead of schedule based on the priority Case.
本申请通过设定新的判定标准可以实现将控制信息的转发路径从SAF路径切换为LL路径的,更精准的自适应流量拥塞情况。又通过对标记为LPKT的第一个控制信息进行复制,并在LL路径和SAF路径上均发送该控制信息,可以在目标输出端口处基于该控制信息确定是否要从调度SAF路径缓存队列切换到调度LL路径缓存队列,确保了控制信息以正确的顺序输出。The present application can realize more accurate adaptive traffic congestion situation by switching the forwarding path of the control information from the SAF path to the LL path by setting a new judgment standard. By duplicating the first control information marked as LPKT and sending the control information on both the LL path and the SAF path, it can be determined at the target output port whether to switch from the scheduling SAF path cache queue to the SAF path based on the control information. Scheduling the LL path cache queue ensures that control information is output in the correct order.
在一种可能的实现方式中,还包括:当所述上一次调度并输出的控制信息来自所述LL路径缓存队列时,判断所述LL路径缓存队列是否为空;当所述LL路径缓存队列不为空时,从所述LL路径缓存队列中调度并输出排在队头的控制信息;当所述LL路径缓存队列为空时,从所述SAF路径缓存队列中调度并输出排在队头的控制信息。In a possible implementation manner, the method further includes: when the last scheduled and output control information comes from the LL path cache queue, judging whether the LL path cache queue is empty; when the LL path cache queue is empty When not empty, schedule and output the control information queued at the head of the queue from the LL path cache queue; when the LL path cache queue is empty, schedule and output the control information queued at the head of the SAF path cache queue control information.
在一种可能的实现方式中,所述上一次调度并输出的控制信息来自对应于所述目标输出端口的SAF路径缓存队列是指对应于所述目标输出端口的调度状态机指示SAF路径,其中,所述调度状态机指示SAF路径是指上一次从所述SAF路径缓存队列中调度并输出控制信息。In a possible implementation manner, the control information scheduled and outputted last time comes from the SAF path cache queue corresponding to the target output port means that the scheduling state machine corresponding to the target output port indicates the SAF path, wherein , the scheduling state machine indicating the SAF path refers to scheduling and outputting control information from the SAF path cache queue last time.
在一种可能的实现方式中,所述从对应于所述目标输出端口的LL路径缓存队列中调度并输出排在队头的控制信息之后,还包括:将所述调度状态机设置为指示所述LL路径,所述调度状态机指示LL路径是指上一次从所述LL路径缓存队列中调度并输出控制信息。In a possible implementation manner, after scheduling and outputting the control information queued at the head of the queue from the LL path buffer queue corresponding to the target output port, the method further includes: setting the scheduling state machine to indicate the For the LL path, the scheduling state machine indicating that the LL path refers to scheduling and outputting control information from the LL path buffer queue last time.
在一种可能的实现方式中,所述从所述SAF路径缓存队列中调度并输出排在队头的控制信息之后,还包括:将所述调度状态机设置为指示所述SAF路径。In a possible implementation manner, after scheduling and outputting the control information queued at the head of the queue from the SAF path cache queue, the method further includes: setting the scheduling state machine to indicate the SAF path.
在一种可能的实现方式中,所述目标输出端口没有发生拥塞是指对应于所述目标输出端口的SAF路径计数器的计数值小于设定阈值。In a possible implementation manner, the fact that the target output port is not congested means that the count value of the SAF path counter corresponding to the target output port is less than a set threshold.
在一种可能的实现方式中,所述LL路径上没有发送给所述目标输出端口的控制信息是指对应于所述目标输出端口的LL路径计数器的计数值为0。In a possible implementation manner, the control information not sent to the target output port on the LL path means that the count value of the LL path counter corresponding to the target output port is 0.
在一种可能的实现方式中,还包括:当所述目标输出端口发生拥塞时,通过所述SAF路径向所述目标输出端口发送所述待转发的控制信息。In a possible implementation manner, the method further includes: when the target output port is congested, sending the control information to be forwarded to the target output port through the SAF path.
在一种可能的实现方式中,所述目标输出端口发生拥塞是指对应于所述目标输出端口的SAF路径计数器的计数值大于或等于设定阈值。In a possible implementation manner, the occurrence of congestion on the target output port means that the count value of the SAF path counter corresponding to the target output port is greater than or equal to a set threshold.
在一种可能的实现方式中,还包括:当通过所述SAF路径向所述目标输出端口发送一个控制信息时,将对应于所述目标输出端口的SAF路径计数器的计数值加1;或者,当通过所述LL路径向所述目标输出端口发送一个控制信息时,将对应于所述目标输出端口的LL路径计数器的计数值加1。In a possible implementation manner, the method further includes: when sending a control information to the target output port through the SAF path, adding 1 to the count value of the SAF path counter corresponding to the target output port; or, When a control message is sent to the target output port through the LL path, the count value of the LL path counter corresponding to the target output port is incremented by one.
在一种可能的实现方式中,还包括:当从所述SAF路径缓存队列中调度并输出一个 控制信息时,将对应于所述目标输出端口的SAF路径计数器的计数值减1;或者,In a possible implementation manner, the method further includes: when scheduling and outputting a control information from the SAF path cache queue, decrementing the count value of the SAF path counter corresponding to the target output port by 1; or,
当从所述LL路径缓存队列中调度并输出一个控制信息时,将对应于所述目标输出端口的LL路径计数器的计数值减1。When a control message is scheduled and output from the LL path buffer queue, the count value of the LL path counter corresponding to the target output port is decremented by 1.
第二方面,本申请提供一种数据转发装置,包括:输入模块,用于获得待转发的控制信息,以及所述待转发的控制信息的目标输出端口;判断所述目标输出端口是否发生拥塞,以及判断低延时LL路径上是否存在发送给所述目标输出端口的控制信息;当所述目标输出端口没有发生拥塞,且所述LL路径上没有发送给所述目标输出端口的控制信息时,复制所述待转发的控制信息得到影子控制信息;转发模块,用于通过所述LL路径向所述目标输出端口发送所述待转发的控制信息,并通过存储转发SAF路径向所述目标输出端口发送所述影子控制信息;输出模块,用于当上一次调度并输出的控制信息来自对应于所述目标输出端口的SAF路径缓存队列时,从所述SAF路径缓存队列中调度排在队头的第一控制信息;当所述第一控制信息是所述影子控制信息时,从对应于所述目标输出端口的LL路径缓存队列中调度并输出排在队头的控制信息;当所述第一控制信息不是所述影子控制信息时,输出所述第一控制信息。In a second aspect, the present application provides a data forwarding device, comprising: an input module for obtaining control information to be forwarded and a target output port of the control information to be forwarded; judging whether the target output port is congested, And judge whether there is control information sent to the target output port on the low-latency LL path; when the target output port is not congested, and there is no control information sent to the target output port on the LL path, Copying the control information to be forwarded to obtain shadow control information; a forwarding module, configured to send the control information to be forwarded to the target output port through the LL path, and send the control information to the target output port through the store-and-forward SAF path Send the shadow control information; the output module is configured to schedule the queue head from the SAF path cache queue when the control information scheduled and output last time comes from the SAF path cache queue corresponding to the target output port first control information; when the first control information is the shadow control information, schedule and output the control information at the head of the queue from the LL path cache queue corresponding to the target output port; when the first control information is the shadow control information When the control information is not the shadow control information, the first control information is output.
在一种可能的实现方式中,所述输出模块,还用于当所述上一次调度并输出的控制信息来自所述LL路径缓存队列时,判断所述LL路径缓存队列是否为空;当所述LL路径缓存队列不为空时,从所述LL路径缓存队列中调度并输出排在队头的控制信息;当所述LL路径缓存队列为空时,从所述SAF路径缓存队列中调度并输出排在队头的控制信息。In a possible implementation manner, the output module is further configured to judge whether the LL path cache queue is empty when the control information scheduled and output last time comes from the LL path cache queue; When the LL path cache queue is not empty, schedule and output the control information at the head of the queue from the LL path cache queue; when the LL path cache queue is empty, schedule and output from the SAF path cache queue. Output the control information at the head of the queue.
在一种可能的实现方式中,所述上一次调度并输出的控制信息来自对应于所述目标输出端口的SAF路径缓存队列是指对应于所述目标输出端口的调度状态机指示SAF路径,其中,所述调度状态机指示SAF路径是指上一次从所述SAF路径缓存队列中调度并输出控制信息。In a possible implementation manner, the control information scheduled and outputted last time comes from the SAF path cache queue corresponding to the target output port means that the scheduling state machine corresponding to the target output port indicates the SAF path, wherein , the scheduling state machine indicating the SAF path refers to scheduling and outputting control information from the SAF path cache queue last time.
在一种可能的实现方式中,所述输出模块,还用于将所述调度状态机设置为指示所述LL路径,所述调度状态机指示LL路径是指上一次从所述LL路径缓存队列中调度并输出控制信息。In a possible implementation manner, the output module is further configured to set the scheduling state machine to indicate the LL path, and the scheduling state machine indicating that the LL path refers to the last cache queue from the LL path It schedules and outputs control information.
在一种可能的实现方式中,所述输出模块,还用于将所述调度状态机设置为指示所述SAF路径。In a possible implementation manner, the output module is further configured to set the scheduling state machine to indicate the SAF path.
在一种可能的实现方式中,所述目标输出端口没有发生拥塞是指对应于所述目标输出端口的SAF路径计数器的计数值小于设定阈值。In a possible implementation manner, the fact that the target output port is not congested means that the count value of the SAF path counter corresponding to the target output port is less than a set threshold.
在一种可能的实现方式中,所述LL路径上没有发送给所述目标输出端口的控制信息是指对应于所述目标输出端口的LL路径计数器的计数值为0。In a possible implementation manner, the control information not sent to the target output port on the LL path means that the count value of the LL path counter corresponding to the target output port is 0.
在一种可能的实现方式中,所述输入模块,还用于当所述目标输出端口发生拥塞时,通过所述SAF路径向所述目标输出端口发送所述待转发的控制信息。In a possible implementation manner, the input module is further configured to send the control information to be forwarded to the target output port through the SAF path when the target output port is congested.
在一种可能的实现方式中,所述目标输出端口发生拥塞是指对应于所述目标输出端口的SAF路径计数器的计数值大于或等于设定阈值。In a possible implementation manner, the occurrence of congestion on the target output port means that the count value of the SAF path counter corresponding to the target output port is greater than or equal to a set threshold.
在一种可能的实现方式中,所述输入模块,还用于当通过所述SAF路径向所述目标输出端口发送一个控制信息时,将对应于所述目标输出端口的SAF路径计数器的计数值加1;或者,当通过所述LL路径向所述目标输出端口发送一个控制信息时,将对应于所述目标输出端口的LL路径计数器的计数值加1。In a possible implementation manner, the input module is further configured to convert the count value of the SAF path counter corresponding to the target output port when a control message is sent to the target output port through the SAF path Add 1; or, when sending a control message to the target output port through the LL path, add 1 to the count value of the LL path counter corresponding to the target output port.
在一种可能的实现方式中,所述输出模块,还用于当从所述SAF路径缓存队列中调度并输出一个控制信息时,将对应于所述目标输出端口的SAF路径计数器的计数值减1;或者,当从所述LL路径缓存队列中调度并输出一个控制信息时,将对应于所述目标输出端口的LL路径计数器的计数值减1。In a possible implementation manner, the output module is further configured to decrement the count value of the SAF path counter corresponding to the target output port when scheduling and outputting a control information from the SAF path cache queue 1; or, when scheduling and outputting a control message from the LL path buffer queue, decrement the count value of the LL path counter corresponding to the target output port by 1.
第三方面,本申请提供一种数据转发设备,包括:一个或多个处理器;存储器,用于存储一个或多个程序;当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如上述第一至二方面中任一项所述的方法。In a third aspect, the present application provides a data forwarding device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors Executing, causing the one or more processors to implement the method according to any one of the first to second aspects above.
第四方面,本申请提供一种计算机可读存储介质,包括计算机程序,所述计算机程序在计算机上被执行时,使得所述计算机执行上述第一至二方面中任一项所述的方法。In a fourth aspect, the present application provides a computer-readable storage medium, comprising a computer program, which, when executed on a computer, causes the computer to execute the method according to any one of the first to second aspects above.
第五方面,本申请提供一种计算机程序,当所述计算机程序被计算机执行时,用于执行上述第一至二方面中任一项所述的方法。In a fifth aspect, the present application provides a computer program, when the computer program is executed by a computer, for executing the method described in any one of the first to second aspects above.
附图说明Description of drawings
图1为数据转发设备的一个示例性的转发示意图;1 is an exemplary forwarding schematic diagram of a data forwarding device;
图2为数据转发设备的一个示例性的转发示意图;2 is an exemplary forwarding schematic diagram of a data forwarding device;
图3为本申请数据转发和调度方法的过程300的一个示例性的流程图;FIG. 3 is an exemplary flowchart of a process 300 of the data forwarding and scheduling method of the present application;
图4为本申请数据转发和调度方法的过程400的一个示例性的流程图;FIG. 4 is an exemplary flowchart of a process 400 of the data forwarding and scheduling method of the present application;
图5为本申请数据转发和调度方法的过程500的一个示例性的流程图;FIG. 5 is an exemplary flowchart of a process 500 of the data forwarding and scheduling method of the present application;
图6为本申请数据转发和调度方法的一个示例性的示意图;FIG. 6 is an exemplary schematic diagram of the data forwarding and scheduling method of the present application;
图7为本申请数据转发装置700的一个示例性的结构示意图。FIG. 7 is a schematic structural diagram of an exemplary data forwarding apparatus 700 of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请中的附图,对本申请中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the accompanying drawings in the present application. Obviously, the described embodiments are part of the embodiments of the present application. , not all examples. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本申请的说明书实施例和权利要求书及附图中的术语“第一”、“第二”等仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元。方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", etc. in the description, embodiments and claims of the present application and the drawings are only used for the purpose of distinguishing and describing, and should not be construed as indicating or implying relative importance, nor should they be construed as indicating or implied order. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, eg, comprising a series of steps or elements. A method, system, product or device is not necessarily limited to those steps or units expressly listed, but may include other steps or units not expressly listed or inherent to the process, method, product or device.
应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。It should be understood that, in this application, "at least one (item)" refers to one or more, and "a plurality" refers to two or more. "And/or" is used to describe the relationship between related objects, indicating that there can be three kinds of relationships, for example, "A and/or B" can mean: only A, only B, and both A and B exist , where A and B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship. "At least one item(s) below" or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (a) of a, b or c, can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c" ", where a, b, c can be single or multiple.
图1为数据转发设备的一个示例性的转发示意图,如图1所示,数据转发设备包括 N+1个输入端口(input0~inputN)和N+1个输出端口(output0~outputN)。多个数据切片(对待转发的报文切片得到,每个数据切片可以包含以周期(cycle)为单位承载的字节数)进入某个输入端口(例如input0),然后经过输入交叉支撑(input crossbar,IXB)交叉后将数据切片中的数据(data)均衡地写入到队列管理器(Queue Manager)中,与此同时将数据切片中的包含数据缓存地址的控制信息(control)发送给存储转发(store and forward,SAF)模块。SAF模块中的输出交叉支撑(output crossbar,OXB)从缓存(buffer)中调取控制信息进行交叉处理,然后将控制信息交换到重排序(Reorder)模块。Reorder模块将控制信息存入SAF缓存(SAF buffer)中,然后调度程序(scheduler,SCH)对SAF buffer进行重排序调度,根据调度出的控制信息读取队列管理器提取数据,从而将数据输出到目标输出端口(例如output1)。对于需要多次存储换发的数据转发设备,数据切片中的控制信息需要经过多级SAF才能将数据交换到目标输出端口。FIG. 1 is an exemplary forwarding schematic diagram of a data forwarding device. As shown in FIG. 1 , the data forwarding device includes N+1 input ports (input0˜inputN) and N+1 output ports (output0˜outputN). Multiple data slices (obtained from packet slices to be forwarded, each data slice can contain the number of bytes carried in cycles) enter an input port (such as input0), and then pass through the input crossbar , IXB) After the crossover, the data in the data slice is written into the Queue Manager in a balanced manner, and at the same time, the control information (control) containing the data cache address in the data slice is sent to the store and forward. (store and forward, SAF) module. The output crossbar (OXB) in the SAF module retrieves the control information from the buffer for cross processing, and then exchanges the control information to the Reorder module. The Reorder module stores the control information in the SAF buffer (SAF buffer), and then the scheduler (scheduler, SCH) reorders and schedules the SAF buffer, reads the queue manager to extract data according to the scheduled control information, and outputs the data to The destination output port (eg output1). For a data forwarding device that needs to be stored and exchanged multiple times, the control information in the data slice needs to go through multi-level SAF before data can be exchanged to the target output port.
但是,该方案中的所有数据切片的控制信息都需要经过SAF模块转发,控制信息在SAF模块内完成组包、服务质量(quality of service,QoS)调度、多播信元复制等一系列操作,每经过一次存储转发都会引入几百个时钟(图1中的SAF DLY)的延时,这种延时无法满足低延时的性能要求。However, the control information of all data slices in this scheme needs to be forwarded by the SAF module, and the control information completes a series of operations such as grouping, quality of service (QoS) scheduling, and multicast cell replication in the SAF module. A delay of several hundred clocks (SAF DLY in Figure 1) is introduced every time the store and forward are passed, and this delay cannot meet the performance requirements of low delay.
图2为数据转发设备的一个示例性的转发示意图,如图2所示,为了解决图1的技术方案中的延时问题,尽可能降低存储转发引入的延时,增加一条与SAF路径并列的通路,即低延时(low latency,LL)路径。当目标输出端口的流量不拥塞时,多个控制信息逐个通过LL路径直接写入到目标输出端口(例如output1)对应的缓存队列中,在目标输出端口处根据LL路径缓存队列中控制信息的先后顺序,逐个调度并输出排在队头的控制信息,既可以保证QoS性能,还可以降低数据转发的延时,满足低延时的要求;当目标输出端口的流量拥塞时,为了保证QoS性能,控制信息仍然通过SAF路径转发到目标输出端口(例如output1)对应的缓存队列中。该方案可以被称作低延时存储转发。FIG. 2 is an exemplary forwarding schematic diagram of a data forwarding device. As shown in FIG. 2, in order to solve the delay problem in the technical solution of FIG. Path, that is, a low latency (LL) path. When the traffic of the target output port is not congested, multiple control information is directly written into the buffer queue corresponding to the target output port (for example, output1) through the LL path one by one, and the control information in the queue is cached at the target output port according to the order of the control information in the LL path. In order to schedule and output the control information at the head of the queue one by one, it can not only ensure the QoS performance, but also reduce the delay of data forwarding and meet the requirements of low delay; when the traffic of the target output port is congested, in order to ensure the QoS performance, The control information is still forwarded to the buffer queue corresponding to the target output port (eg output1) through the SAF path. This scheme may be referred to as low-latency store-and-forward.
示例性的,待转发的报文被切片为12个数据切片进入同一输入端口(例如input0),经过IXB交叉后将数据切片中的数据均衡地写入到队列管理器中,与此同时,针对数据切片中的包含数据缓存地址的控制信息,确定其转发路径:当目标输出端口的流量拥塞时,控制信息通过SAF路径转发到目标输出端口;当目标输出端口的流量不拥塞时,控制信息通过LL路径转发到目标输出端口。比如,上述12个控制信息中,排在前面的4个控制信息通过SAF路径转发,排在中间的4个控制信息通过LL路径转发,排在后面的4个控制信息通过SAF路径转发。为了便于理解,本文中将排在前面的4个通过SAF路径转发的控制信息称为SPKT1,将排在中间的4个通过LL路径转发的控制信息称为LPKT,将排在后面的4个通过SAF路径转发的控制信息称为SPKT2。Exemplarily, the packet to be forwarded is sliced into 12 data slices into the same input port (for example, input0), and after IXB crossover, the data in the data slices are written into the queue manager in a balanced manner. The control information including the data cache address in the data slice determines its forwarding path: when the traffic of the target output port is congested, the control information is forwarded to the target output port through the SAF path; when the traffic of the target output port is not congested, the control information passes through The LL path is forwarded to the destination output port. For example, among the above 12 control messages, the first 4 control messages are forwarded through the SAF path, the middle 4 control messages are forwarded through the LL path, and the last 4 control messages are forwarded through the SAF path. For ease of understanding, the first four control messages forwarded through the SAF path are called SPKT1, the middle four control messages forwarded through the LL path are called LPKT, and the last four control messages are forwarded through the LL path as LPKT. The control information forwarded by the SAF path is called SPKT2.
由于LL路径上转发的控制信息可能更快到达Reorder模块,所以在Reorder模块可能会出现LPKT比SPKT1先到达或者LPKT和SPKT1同时到达的情况,然而Reorder模块的排序逻辑无法区分出控制信息的先后顺序,最终导致LPKT和SPKT1乱序输出。Since the control information forwarded on the LL path may reach the Reorder module faster, in the Reorder module, LPKT may arrive before SPKT1 or LPKT and SPKT1 arrive at the same time. However, the sorting logic of the Reorder module cannot distinguish the order of the control information. , eventually leading to out-of-order output of LPKT and SPKT1.
为了解决上述输出乱序的问题,一种可能的方案中是保证LPKT(经由LL路径转发的控制信息)前无SPKT(经由SAF路径转发的控制信息),即转发路径切换为LL路径之前,先确定SAF路径上没有转发控制信息。该方案可以被称作两段式低延时。但是,两段式低延时由于不支持在LPKT前转发SPKT,因此当目标输出端口的流量不拥塞时, 通过LL路径可以有效降低数据转发的延时,当目标输出端口的流量拥塞时,转发路径切换为SAF路径,可以保证QoS性能,而当目标输出端口的流量再次变为不拥塞时,基于业务流量的持续性,无法保证SAF路径上无SPKT,从而使得转发路径很难再次切换为LL路径。In order to solve the problem of out-of-order output, a possible solution is to ensure that there is no SPKT (control information forwarded via the SAF path) before the LPKT (control information forwarded via the LL path), that is, before the forwarding path is switched to the LL path, the Make sure that there is no forwarding control information on the SAF path. This scheme can be called two-stage low-latency. However, the two-stage low-latency does not support forwarding SPKT before LPKT. Therefore, when the traffic of the target output port is not congested, the LL path can effectively reduce the delay of data forwarding. When the traffic of the target output port is congested, forwarding When the path is switched to the SAF path, the QoS performance can be guaranteed. When the traffic on the target output port becomes uncongested again, based on the continuity of the service traffic, it is impossible to ensure that there is no SPKT on the SAF path, which makes it difficult to switch the forwarding path to LL again. path.
为了解决上述技术问题,本申请提供了一种数据转发和调度方法。In order to solve the above technical problems, the present application provides a data forwarding and scheduling method.
图3为本申请数据转发和调度方法的过程300的一个示例性的流程图,如图3所示,过程300可由数据转发设备执行。过程300描述为一系列的步骤或操作,应当理解的是,过程300可以以各种顺序执行和/或同时发生,不限于图3所示的执行顺序。假设报文在数据转发设备中从输入端口被转发到目标输出端口,一个报文被切片为多个数据切片,执行包括如下步骤的过程300来转发当前正在处理的报文(即当前报文)中的数据切片中的控制信息。FIG. 3 is an exemplary flowchart of a process 300 of the data forwarding and scheduling method of the present application. As shown in FIG. 3 , the process 300 can be executed by a data forwarding device. Process 300 is described as a series of steps or operations, and it should be understood that process 300 may be performed in various orders and/or concurrently, and is not limited to the order of execution shown in FIG. 3 . Assuming that the packet is forwarded from the input port to the target output port in the data forwarding device, and a packet is sliced into multiple data slices, a process 300 including the following steps is performed to forward the currently processed packet (ie, the current packet) The control information in the data slice in .
步骤301、获得待转发的控制信息,以及待转发的控制信息的目标输出端口。Step 301: Obtain the control information to be forwarded and the target output port of the control information to be forwarded.
如上所述,当前报文是指数据转发设备此时正在处理的报文,该报文被切片后得到的多个数据切片从数据转发设备的输入端口转发到该报文的目标输出端口,其中,数据切片的控制信息可以通过SAF路径或者LL路径发送给目标输出端口,本申请可以才采用下文的步骤确定控制信息的路径。As mentioned above, the current packet refers to the packet currently being processed by the data forwarding device. Multiple data slices obtained after the packet is sliced are forwarded from the input port of the data forwarding device to the target output port of the packet, wherein , the control information of the data slice may be sent to the target output port through the SAF path or the LL path, and the present application may use the following steps to determine the path of the control information.
步骤302、判断目标输出端口是否发生拥塞,以及判断LL路径上是否存在发送给目标输出端口的控制信息。Step 302: Determine whether the target output port is congested, and determine whether there is control information sent to the target output port on the LL path.
在可选择的实施例中,目标输出端口是否发生拥塞可以通过对应于目标输出端口的SAF路径计数器的数值来体现。In an optional embodiment, whether the target output port is congested may be reflected by the value of the SAF path counter corresponding to the target output port.
本申请针对SAF路径设置多个SAF路径计数器,该多个SAF路径计数器与多个输出端口一一对应。针对当前报文的目标输出端口,每通过SAF路径向目标输出端口发送一个控制信息,对应于目标输出端口的SAF路径计数器的计数值加1;每从目标输出端口的SAF路径缓存队列中调度并输出一个控制信息,对应于目标输出端口的SAF路径计数器的计数值减1。在当前报文的多个控制信息逐个从输入端口转发至目标输出端口的过程中,按照上述对应于目标输出端口的SAF路径计数器的计数规则进行计数值的加减操作,可见对应于目标输出端口的SAF路径计数器的计数值是动态变化的。因此数据转发设备在转发待发送的控制信息之前,可以将对应于目标输出端口的SAF路径计数器的计数值与设定阈值进行比较,当对应于目标输出端口的SAF路径计数器的计数值小于设定阈值时,说明目标输出端口的SAF路径缓存队列中待调度并输出的控制信息的数量是小于设定阈值的,该数量不足以导致目标输出端口的流量拥塞,此时则认为目标输出端口没有发生拥塞;当对应于目标输出端口的SAF路径计数器的计数值大于或等于设定阈值时,说明目标输出端口的SAF路径缓存队列中待调度并输出的控制信息的数量是大于或等于设定阈值的,该数量可能会导致目标输出端口的流量拥塞,此时则认为目标输出端口发生拥塞。设定阈值可以是目标输出端口的流量是否拥塞的一个判断依据,可以根据历史数据或经验确定。需要说明的时,将对应于目标输出端口的SAF路径计数器的计数值和设定阈值作比较,相等这一情况下也可以表示目标输出端口没有发生拥塞,本申请对此不作具体限定。The present application sets multiple SAF path counters for the SAF path, and the multiple SAF path counters are in one-to-one correspondence with multiple output ports. For the target output port of the current packet, each time a control message is sent to the target output port through the SAF path, the count value of the SAF path counter corresponding to the target output port is incremented by 1; A control message is output, and the count value of the SAF path counter corresponding to the target output port is decremented by 1. In the process of forwarding multiple control information of the current packet from the input port to the target output port one by one, the count value is added and subtracted according to the above counting rule of the SAF path counter corresponding to the target output port. The count value of the SAF path counter is dynamically changed. Therefore, before forwarding the to-be-sent control information, the data forwarding device can compare the count value of the SAF path counter corresponding to the target output port with the set threshold, and when the count value of the SAF path counter corresponding to the target output port is less than the set threshold When the threshold is set, it indicates that the number of control information to be scheduled and output in the SAF path cache queue of the target output port is less than the set threshold, and the number is not enough to cause traffic congestion on the target output port. In this case, it is considered that the target output port has not occurred Congestion; when the count value of the SAF path counter corresponding to the target output port is greater than or equal to the set threshold, it indicates that the quantity of control information to be scheduled and output in the SAF path buffer queue of the target output port is greater than or equal to the set threshold , this amount may cause traffic congestion on the target output port, in which case the target output port is considered to be congested. The set threshold may be a basis for judging whether the traffic of the target output port is congested, and may be determined according to historical data or experience. It should be noted that the count value of the SAF path counter corresponding to the target output port is compared with the set threshold, and if they are equal, it may also indicate that the target output port is not congested, which is not specifically limited in this application.
在可选择的实施例中,LL路径上是否存在发送给目标输出端口的控制信息可以通过对应于目标输出端口的LL路径计数器的数值来体现。In an optional embodiment, whether there is control information sent to the target output port on the LL path may be reflected by the value of the LL path counter corresponding to the target output port.
本申请针对LL路径也设置了多个LL路径计数器,该多个LL路径计数器与多个输出端口一一对应。针对当前报文的目标输出端口,每通过LL路径向目标输出端口发送一个控制信息,对应于目标输出端口的LL路径计数器的计数值加1;每从目标输出端口的LL路径缓存队列中调度并输出一个控制信息,对应于目标输出端口的LL路径计数器的计数值减1。在当前报文中的多个控制信息逐个从输入端口转发至目标输出端口的过程中,按照上述对应于目标输出端口的LL路径计数器的计数规则进行计数值的加减操作,可见对应于目标输出端口的LL路径计数器的计数值是动态变化的。因此数据转发设备在转发待发送的控制信息之前,可以将对应于目标输出端口的LL路径计数器的计数值与0进行比较,当对应于目标输出端口的LL路径计数器的计数值为0时,说明LL路径上不存在发送给目标输出端口的控制信息,即在发送待转发的控制信息之前,LL路径上不存在发送给目标输出端口的控制信息,待转发的控制信息的上一个控制信息是通过SAF路径发送给目标输出端口的,上一个控制信息是指当前报文中仅排在待转发的控制信息之前发送的控制信息,亦即上一个控制信息在报文中的顺序仅先于待转发的控制信息。需要说明的是,LL路径上没有发送给目标输出端口的控制信息,并不表示LL路径上没有控制信息,LL路径上可能有发送给其他输出端口的控制信息,例如,当前报文的目标输出端口是output1,当前LL路径上没有发送给output1的控制信息,对应于output1的LL路径计数器的计数值为0,但LL路径上有发送给output2和output3的其他报文的控制信息,分别对应于output2和output3的LL路径计数器的计数值不为0。The present application also sets multiple LL path counters for the LL path, and the multiple LL path counters are in one-to-one correspondence with multiple output ports. For the target output port of the current packet, each time a control message is sent to the target output port through the LL path, the count value of the LL path counter corresponding to the target output port is incremented by 1; A control message is output, and the count value of the LL path counter corresponding to the target output port is decremented by 1. In the process of forwarding multiple control information in the current packet from the input port to the target output port one by one, the count value is added and subtracted according to the above counting rule corresponding to the LL path counter of the target output port. The count value of the LL path counter of the port changes dynamically. Therefore, before forwarding the control information to be sent, the data forwarding device can compare the count value of the LL path counter corresponding to the target output port with 0. When the count value of the LL path counter corresponding to the target output port is 0, it means that There is no control information sent to the target output port on the LL path, that is, before the control information to be forwarded is sent, there is no control information sent to the target output port on the LL path. If the SAF path is sent to the target output port, the last control information refers to the control information sent only before the control information to be forwarded in the current packet, that is, the order of the last control information in the packet is only before the to-be-forwarded control information. control information. It should be noted that the fact that there is no control information sent to the target output port on the LL path does not mean that there is no control information on the LL path. There may be control information sent to other output ports on the LL path, for example, the target output of the current packet. The port is output1, and there is no control information sent to output1 on the current LL path. The count value of the LL path counter corresponding to output1 is 0, but the LL path has control information of other packets sent to output2 and output3, corresponding to The count values of the LL path counters of output2 and output3 are not 0.
步骤303、当目标输出端口没有发生拥塞,且LL路径上没有发送给目标输出端口的控制信息时,复制待转发的控制信息得到影子控制信息。Step 303: When the target output port is not congested and there is no control information sent to the target output port on the LL path, copy the control information to be forwarded to obtain shadow control information.
在满足了目标输出端口没有发生拥塞,且LL路径上不存在发送给目标输出端口的控制信息这两个条件的前提下,可以确定待转发的控制信息要切换为通过LL路径发送。On the premise that the target output port is not congested and there is no control information sent to the target output port on the LL path, it can be determined that the control information to be forwarded should be switched to be sent through the LL path.
为了便于理解,本申请中将所有通过SAF路径转发的控制信息称为SPKT,将所有通过LL路径转发的控制信息称为LPKT。其中,从通过SAF路径发送切换为通过LL路径发送的上述待转发的控制信息(该控制信息的上一个控制信息是SPKT,而该控制信息是LPKT,因此可以认为是从SPKT切换到LPKT的第一个控制信息。为方便描述,下文中将从SPKT切换到LPKT的第一个控制信息称为第一个LPKT。需要说明的是,第一个LPKT不以报文划分,即第一个LPKT,可以是报文的多个控制信息中排在非首位的控制信息,也可以是报文的多个控制信息中排在首位的控制信息,对此不作具体限定)承担了保序的功能,这一点在下文说明。For ease of understanding, in this application, all control information forwarded through the SAF path is referred to as SPKT, and all control information forwarded through the LL path is referred to as LPKT. Among them, the switching from sending through the SAF path to the above-mentioned control information to be forwarded sent through the LL path (the previous control information of the control information is SPKT, and the control information is LPKT, so it can be considered as the first switching from SPKT to LPKT A control information. For the convenience of description, the first control information that will be switched from SPKT to LPKT is called the first LPKT. It should be noted that the first LPKT is not divided into packets, that is, the first LPKT , it can be the control information that is not ranked first among the multiple control information of the message, or it can be the control information that is ranked first among the multiple control information of the message, which is not specifically limited) undertakes the function of order preservation, This is explained below.
复制待转发的控制信息(第一个LPKT)得到影子控制信息。例如,M表示待转发的控制信息(第一个LPKT),M’表示影子控制信息。可选的,可以在M和M’的一个字段(本申请不限定该字段的位置和长度)中填入标识信息,这样可以在目标输出端口处解析控制信息中的前述字段,从而根据该字段中的值确定控制信息是M或者M’,或者既不是M也不是M’,而是非第一个LPKT或者SPKT。Copy the control information to be forwarded (the first LPKT) to obtain shadow control information. For example, M represents the control information to be forwarded (the first LPKT), and M' represents the shadow control information. Optionally, identification information can be filled in a field of M and M' (this application does not limit the position and length of this field), so that the aforementioned fields in the control information can be parsed at the target output port, so that according to this field The value in determines whether the control information is M or M', or neither M nor M', but not the first LPKT or SPKT.
步骤304、通过LL路径向目标输出端口发送待转发的控制信息,并通过SAF路径向目标输出端口发送影子控制信息。Step 304: Send the control information to be forwarded to the target output port through the LL path, and send the shadow control information to the target output port through the SAF path.
在可选择的实施例中,将当前控制信息通过LL路径发送给目标输出端口,将影子控制信息通过SAF路径发送给目标输出端口。In an optional embodiment, the current control information is sent to the target output port through the LL path, and the shadow control information is sent to the target output port through the SAF path.
本申请中当确定待转发的控制信息是第一个LPKT(M)时,可以复制待转发的控制信息得到影子控制信息(M’),然后通过LL路径将第一个LPKT(M)发送给目标输出端口,通过SAF路径将影子控制信息(M’)发送给目标输出端口,M’是SPKT。换言之,目标输出端口对应的LL路径缓存队列和SAF路径缓存队列收到了一个包含相同内容的控制信息,其中LL路径缓存队列收到的是M,SAF路径缓存队列收到的是M’。In this application, when it is determined that the control information to be forwarded is the first LPKT(M), the shadow control information (M') can be obtained by copying the control information to be forwarded, and then the first LPKT(M) is sent to the The target output port sends shadow control information (M') to the target output port through the SAF path, where M' is SPKT. In other words, the LL path cache queue and the SAF path cache queue corresponding to the target output port have received a control message containing the same content, wherein the LL path cache queue received M, and the SAF path cache queue received M'.
通过上述步骤301~步骤304的处理,可以避免图2所示的实施例中转发路径很难再次切换为LL路径的情况。在满足目标输出端口没有发生拥塞和LL路径上不存在发送给目标输出端口的控制信息这两个条件时,确认了LL路径上不存在发送给目标输出端口的控制信息,而目标输出端口没有发生拥塞并不能说明SAF路径上没有发送给目标输出端口的控制信息,SAF路径上很可能还有发送给目标输出端口的控制信息。但此时其实数据转发设备已经具备了通过LL路径发送控制信息的条件,而根据图2所示实施例,就不能将控制信息的转发路径从SAF路径切换为LL路径,但根据本申请实施例是可以将控制信息的转发路径从SAF路径切换为LL路径的。因此,相较于图2所示实施例,本申请可以更精准的自适应流量拥塞情况,将控制信息的转发路径从SAF路径切换为LL路径,而LL路径可以降低数据转发的延时,满足低延时的要求。Through the processing of the above steps 301 to 304, the situation in which the forwarding path is difficult to switch to the LL path again in the embodiment shown in FIG. 2 can be avoided. When the two conditions of no congestion on the target output port and no control information sent to the target output port on the LL path are satisfied, it is confirmed that there is no control information sent to the target output port on the LL path, and no control information sent to the target output port on the LL path. Congestion does not mean that there is no control information sent to the target output port on the SAF path, and there may be control information sent to the target output port on the SAF path. However, at this time, the data forwarding device already has the conditions for sending control information through the LL path. According to the embodiment shown in FIG. 2, the forwarding path of the control information cannot be switched from the SAF path to the LL path. However, according to the embodiment of the present application It is possible to switch the forwarding path of control information from the SAF path to the LL path. Therefore, compared with the embodiment shown in FIG. 2 , the present application can more accurately adapt to the traffic congestion situation, and switch the forwarding path of control information from the SAF path to the LL path, and the LL path can reduce the delay of data forwarding and satisfy the Low latency requirements.
在目标输出端口处,数据转发设备有一个重要的功能,即控制信息保序,以确保通过目标输出端口输出的多个控制信息的先后顺序与该多个控制信息在原报文中的先后顺序一致。而控制信息保序中最关键的一个环节就是标记为LPKT的第一个控制信息,下文进行说明。At the target output port, the data forwarding device has an important function, that is, control information sequence preservation, to ensure that the sequence of multiple control information output through the target output port is consistent with the sequence of the multiple control information in the original message . The most critical link in the control information order preservation is the first control information marked as LPKT, which will be described below.
需要说明的是,本申请中已经预先设定了LL路径缓存队列的优先级高于SAF路径缓存队列,即只要LL路径缓存队列中有待调度的控制信息(LPKT),而且数据转发设备已经开始从LL路径缓存队列调度并输出控制信息,就要把LL路径缓存队列中的控制信息全部调度并输出,直到LL路径缓存队列为空,才会从SAF路径缓存队列中调度并输出控制信息(SPKT)。需要说明的是,从缓存队列中调度控制信息可以理解为是从相应的缓存队列中将排在队头的控制信心读取出来,从缓存队列中输出控制信息可以理解为是将从相应的缓存队里中将调度出的控制信息从数据转发设备的目标输出端口输出去,从缓存队列中调度并输出控制信息可以理解为是从相应的缓存队列中将排在队头的控制信心读取出来,并从数据转发设备的目标输出端口输出去。可见,如果数据转发设备上一次是从LL路径缓存队列中调度并输出LPKT,只要LL路径缓存队列不为空,就不会切换到从SAF路径缓存队列中调度并输出SPKT,而一旦LL路径缓存队列为空,数据转发设备会自动切换到从SAF路径缓存队列中调度并输出SPKT(SAF路径缓存队列不为空)。而针对数据转发设备从SAF路径缓存队列中调度并输出SPKT的情况,本申请可以执行以下步骤,以确定是否要切换为从LL路径缓存队列中调度并输出LPKT。It should be noted that the priority of the LL path cache queue has been preset in this application to be higher than that of the SAF path cache queue, that is, as long as there is control information (LPKT) to be scheduled in the LL path cache queue, and the data forwarding device has started to When the LL path cache queue schedules and outputs control information, it is necessary to schedule and output all the control information in the LL path cache queue. Until the LL path cache queue is empty, the control information (SPKT) will be scheduled and output from the SAF path cache queue. . It should be noted that scheduling control information from the cache queue can be understood as reading the control confidence at the head of the queue from the corresponding cache queue, and outputting control information from the cache queue can be understood as reading the control information from the corresponding cache queue. In the queue, the scheduled control information is output from the target output port of the data forwarding device. Scheduling and outputting the control information from the cache queue can be understood as reading the control confidence at the head of the queue from the corresponding cache queue. , and output from the target output port of the data forwarding device. It can be seen that if the data forwarding device scheduled and output LPKT from the LL path cache queue last time, as long as the LL path cache queue is not empty, it will not switch to schedule and output SPKT from the SAF path cache queue. If the queue is empty, the data forwarding device will automatically switch to schedule and output SPKT from the SAF path cache queue (the SAF path cache queue is not empty). In the case where the data forwarding device schedules and outputs the SPKT from the SAF path cache queue, the present application may perform the following steps to determine whether to switch to schedule and output the LPKT from the LL path cache queue.
步骤305、当上一次调度并输出的控制信息来自对应于目标输出端口的SAF路径缓存队列时,从SAF路径缓存队列中调度排在队头的第一控制信息。Step 305: When the control information scheduled and output last time comes from the SAF path buffer queue corresponding to the target output port, schedule the first control information queued at the head of the queue from the SAF path buffer queue.
目标输出端口对应一个SAF路径缓存队列和一个LL路径缓存队列,SAF路径缓存队列中存入的是通过SAF路径传输来的去往目标输出端口控制信息(标记为SPKT),LL路径缓存队列中存入的是通过LL路径传输来的去往目标输出端口控制信息(标记为LPKT)。其他输出端口与此类似,不再赘述。目标输出端口就是当前报文要去的输出端 口。The target output port corresponds to a SAF path cache queue and an LL path cache queue. The SAF path cache queue stores the control information (marked as SPKT) to the target output port transmitted through the SAF path, and the LL path cache queue stores Incoming is the control information (labeled LPKT) to the target output port transmitted over the LL path. The other output ports are similar and will not be repeated here. The destination output port is the output port to which the current packet is destined.
针对当前控制信息(数据转发设备待处理的控制信息,数据转发设备在没有确定要从LL路径缓存队列调度控制信息之前,是从SAF路径缓存队列调度控制信息(SAF路径缓存队列不为空),该控制信息是为当前控制信息),先判断上一次调度并输出的控制信息是否来自对应于目标输出端口的SAF路径缓存队列,若是,则表明上一次调度并输出的是SPKT,若不是,则表明上一次调度并输出的是LPKT。For the current control information (control information to be processed by the data forwarding device, the data forwarding device schedules the control information from the SAF path cache queue before determining to schedule the control information from the LL path cache queue (the SAF path cache queue is not empty), The control information is the current control information), first determine whether the control information scheduled and output last time comes from the SAF path cache queue corresponding to the target output port, if so, it indicates that the last scheduled and output is SPKT, if not, then Indicates that the last scheduled and output is LPKT.
因此当满足上一次调度并输出的控制信息是来自SAF路径缓存队列的判定条件时,表示数据转发设备上一次从SAF路径缓存队列中调度并输出SPKT,还没有切换为从LL路径缓存队列中调度并输出LPKT。Therefore, when the judgment condition that the last scheduled and output control information is from the SAF path cache queue is satisfied, it means that the data forwarding device scheduled and output SPKT from the SAF path cache queue last time, and has not switched to scheduling from the LL path cache queue. and output LPKT.
在一种可能的实现方式中,上一次调度并输出的控制信息来自对应于目标输出端口的SAF路径缓存队列是指对应于目标输出端口的调度状态机指示SAF路径,其中,调度状态机指示SAF路径是指上一次从SAF路径缓存队列中调度并输出控制信息。In a possible implementation manner, the control information scheduled and output last time comes from the SAF path cache queue corresponding to the target output port means that the scheduling state machine corresponding to the target output port indicates the SAF path, wherein the scheduling state machine indicates the SAF path The path refers to the last dispatch and output control information from the SAF path cache queue.
目标输出端口对应一个转发状态机和一个调度状态机,转发状态机用于指示数据转发设备上一次是通过LL路径或者SAF路径向目标输出端口发送控制信息,调度状态机用于指示数据转发设备上一次是从对应于目标输出端口的LL路径缓存队列或者对应于目标输出端口的SAF路径缓存队列调度并输出控制信息。The target output port corresponds to a forwarding state machine and a scheduling state machine. The forwarding state machine is used to indicate that the data forwarding device sent control information to the target output port through the LL path or the SAF path last time, and the scheduling state machine is used to indicate that the data forwarding device Once is to schedule and output control information from the LL path buffer queue corresponding to the target output port or the SAF path buffer queue corresponding to the target output port.
基于此,上述转发状态机指示LL路径是指数据转发设备上一次是通过LL路径向目标输出端口发送LPKT,转发状态机指示SAF路径是指数据转发设备上一次是通过SAF路径向目标输出端口发送SPKT;调度状态机指示SAF路径是指数据转发设备上一次是从对应于目标输出端口的SAF路径缓存队列中调度并输出SPKT,调度状态机指示LL路径是指数据转发设备上一次是从对应于目标输出端口的LL路径缓存队列中调度并输出LPKT。Based on this, the above-mentioned forwarding state machine indicates the LL path means that the data forwarding device sent LPKT to the target output port through the LL path last time, and the forwarding state machine indicates the SAF path means that the data forwarding device sent the LPKT to the target output port through the SAF path last time SPKT; the scheduling state machine indicates that the SAF path means that the data forwarding device dispatched and output SPKT from the SAF path cache queue corresponding to the target output port last time, and the scheduling state machine indicates the LL path means that the data forwarding device last time was from the SAF path cache queue corresponding to the target output port. The LPKT is scheduled and output in the LL path buffer queue of the target output port.
假设转发状态机有两个值,当为第一值(例如0)时,转发状态机指示LL路径,即数据转发设备上一次是通过LL路径发送LPKT;当为第二值(例如1)时,转发状态机指示SAF路径,即数据转发设备上一次是通过SAF路径发送SPKT。转发状态机的取值在数据转发设备内全局可见,因此通过获取转发状态机的值,可以确定数据转发设备上一次采用哪条路径转发控制信息。Assuming that the forwarding state machine has two values, when it is the first value (eg 0), the forwarding state machine indicates the LL path, that is, the data forwarding device sent LPKT through the LL path last time; when it is the second value (eg 1) , the forwarding state machine indicates the SAF path, that is, the data forwarding device sent the SPKT through the SAF path last time. The value of the forwarding state machine is globally visible in the data forwarding device. Therefore, by acquiring the value of the forwarding state machine, it can be determined which path the data forwarding device used last time to forward the control information.
假设调度状态机也有两个值,当为第一值(例如0)时,调度状态机指示LL路径,即数据转发设备上一次是从LL路径缓存队列中调度并输出LPKT;当为第二值(例如1)时,调度状态机指示SAF路径,即数据转发设备上一次是从SAF路径缓存队列中调度并输出SPKT。调度状态机的取值也是在数据转发设备内全局可见,因此通过获取调度状态机的值,可以确定数据转发设备上一次从哪个路径缓存队列中调度控制信息。Assuming that the scheduling state machine also has two values, when it is the first value (for example, 0), the scheduling state machine indicates the LL path, that is, the data forwarding device scheduled and output LPKT from the LL path cache queue last time; when it is the second value (eg 1), the scheduling state machine indicates the SAF path, that is, the data forwarding device scheduled and output the SPKT from the SAF path buffer queue last time. The value of the scheduling state machine is also globally visible in the data forwarding device. Therefore, by obtaining the value of the scheduling state machine, the data forwarding device can determine which path cache queue the data forwarding device dispatched control information from last time.
因此当满足对应于目标输出端口的调度状态机指示SAF路径的判定条件时,可以确定数据转发设备上一次是从SAF路径缓存队列中调度并输出SPKT,而对于LL路径缓存队列中接收到的LPKT,尚未开始调度。Therefore, when the determination condition that the scheduling state machine corresponding to the target output port indicates the SAF path is satisfied, it can be determined that the data forwarding device scheduled and output the SPKT from the SAF path cache queue last time, and for the LPKT received in the LL path cache queue , scheduling has not yet started.
由此可见,当对应于目标输出端口的调度状态机指示SAF路径时,数据转发设备上一次是从SAF路径缓存队列中调度并输出SPKT。此时,数据转发设备仍然从SAF路径缓存队列中调度排在队头的控制信息(SPKT),称作第一控制信息。It can be seen that, when the scheduling state machine corresponding to the target output port indicates the SAF path, the data forwarding device schedules and outputs the SPKT from the SAF path buffer queue last time. At this time, the data forwarding device still schedules the control information (SPKT) at the head of the queue from the SAF path buffer queue, which is called the first control information.
步骤306、当第一控制信息是影子控制信息时,从对应于目标输出端口的LL路径缓 存队列中调度并输出排在队头的控制信息。Step 306: When the first control information is shadow control information, schedule and output the control information queued at the head of the queue from the LL path cache queue corresponding to the target output port.
如步骤303所述,数据转发设备会对第一个LPKT进行复制得到影子控制信息,M表示第一个LPKT,M’表示影子控制信息,并且M通过LL路径发送给目标输出端口,M’通过SAF路径发送给目标输出端口。M的上一个控制信息是SPKT,也是SPKT到LPKT的切换控制信息。As described in step 303, the data forwarding device will copy the first LPKT to obtain the shadow control information, where M represents the first LPKT, and M' represents the shadow control information, and M is sent to the target output port through the LL path, and M' is sent to the target output port through the LL path. The SAF path is sent to the target output port. The last control information of M is SPKT, which is also the handover control information from SPKT to LPKT.
因此在目标输出端口处,数据转发设备尝试从SAF路径缓存队列中找到M’,并以此作为切换到从LL路径缓存队列中调度并输出LPKT的契机。数据转发设备对从SAF路径缓存队列调度出来的第一控制信息进行解析,看其相关字段(见步骤301的描述)中是否写入了用于表示M’的信息,若该字段的信息指示M’,则表示第一控制信息是影子控制信息,若该字段的信息不指示M’,则表示第一控制信息是SPKT且不需要切换到从LL路径缓存队列中调度并输出LPKT。Therefore, at the target output port, the data forwarding device tries to find M' from the SAF path buffer queue, and uses this as an opportunity to switch to scheduling and outputting the LPKT from the LL path buffer queue. The data forwarding device parses the first control information dispatched from the SAF path cache queue, and sees whether the relevant field (see the description of step 301) has written information for indicating M', if the information in this field indicates M ', it indicates that the first control information is shadow control information, if the information in this field does not indicate M', it indicates that the first control information is SPKT and there is no need to switch to scheduling and outputting LPKT from the LL path buffer queue.
当确定第一控制信息是M’,数据转发设备可以将从SAF路径缓存队列调度并输出SPKT切换为从LL路径缓存队列调度并输出LPKT。在LL路径缓存队列中的多个LPKT中,M是第一个LPKT,基于发送的先后顺序,且同一路径上发送的控制信息不存在乱序的情况,因此数据转发设备从LL路径缓存队列调度出的排在队头的控制信息是M。When it is determined that the first control information is M', the data forwarding device may switch from scheduling and outputting SPKT from the SAF path buffer queue to scheduling and outputting LPKT from the LL path buffer queue. Among the multiple LPKTs in the LL path cache queue, M is the first LPKT, which is based on the sending order, and the control information sent on the same path is not out of order. Therefore, the data forwarding device schedules from the LL path cache queue. The outgoing control information at the head of the queue is M.
从M开始,数据转发设备可能连续通过LL路径向目标输出端口发送多个LPKT,因此在目标输出端口处,数据转发设备在识别出M’之后,开始切换到从LL路径缓存队列中调度并输出从M开始的LPKT。从LL路径缓存队列调度并输出LPKT的先后顺序和通过LL路径发送LPKT的先后顺序是一致的,保证了输出的多个LPKT的先后顺序与该多个LPKT在当前报文中的先后顺序一致。Starting from M, the data forwarding device may continuously send multiple LPKTs to the target output port through the LL path. Therefore, at the target output port, after identifying M', the data forwarding device starts to switch to schedule and output from the LL path buffer queue. LPKT from M. The sequence of scheduling and outputting LPKTs from the LL path cache queue is consistent with the sequence of sending LPKTs through the LL path, ensuring that the sequence of outputting multiple LPKTs is consistent with the sequence of the multiple LPKTs in the current packet.
步骤307、当第一控制信息不是影子控制信息时,输出第一控制信息。Step 307: When the first control information is not shadow control information, output the first control information.
第一控制信息不是影子控制信息表示第一控制信息不是M’,因此数据转发设备输出该第一控制信息,且无需切换调度的缓存队列,下一次还是从SAF路径缓存队列调度并输出SPKT。这样即使LL路径缓存队列中已经存入了LPKT,只要不满足步骤306的条件(第一控制信息是影子控制信息),数据转发设备都不会因为LL路径缓存队列的优先级高于SAF路径缓存队列而切换去调度LL路径缓存队列,防止了SPKT的顺序先于LPKT的顺序,但通过LL路径发送的LPKT先于通过SAF路径发送的SPKT达到对应的缓存队列,再基于优先级而被超前调度的情况。The fact that the first control information is not shadow control information indicates that the first control information is not M', so the data forwarding device outputs the first control information, and does not need to switch the scheduled buffer queue, and will schedule and output SPKT from the SAF path buffer queue next time. In this way, even if the LPKT has been stored in the LL path cache queue, as long as the condition in step 306 is not satisfied (the first control information is shadow control information), the data forwarding device will not have a higher priority than the SAF path cache because the priority of the LL path cache queue is higher than that of the SAF path cache. The LL path cache queue is switched to schedule the LL path cache queue, which prevents the order of SPKT from prior to the order of LPKT, but the LPKT sent through the LL path reaches the corresponding cache queue before the SPKT sent through the SAF path, and is scheduled ahead of schedule based on the priority Case.
本申请通过设定新的判定标准可以实现将控制信息的转发路径从SAF路径切换为LL路径的,更精准的自适应流量拥塞情况。又通过对标记为LPKT的第一个控制信息进行复制,并在LL路径和SAF路径上均发送该控制信息,可以在目标输出端口处基于该控制信息确定是否要从调度SAF路径缓存队列切换到调度LL路径缓存队列,确保了控制信息以正确的顺序输出。The present application can realize more accurate adaptive traffic congestion situation by switching the forwarding path of the control information from the SAF path to the LL path by setting a new judgment standard. By duplicating the first control information marked as LPKT and sending the control information on both the LL path and the SAF path, it can be determined at the target output port whether to switch from the scheduling SAF path cache queue to the SAF path based on the control information. Scheduling the LL path cache queue ensures that control information is output in the correct order.
图4为本申请数据转发和调度方法的过程400的一个示例性的流程图,如图4所示,过程400可由数据转发设备执行,具体为数据转发设备中的输入模块(位于input处)和输出模块(位于output处)执行。过程400描述为一系列的步骤或操作,应当理解的是,过程400可以以各种顺序执行和/或同时发生,不限于图4所示的执行顺序。假设报文在数据转发设备中从输入端口被转发到目标输出端口,一个报文被切片为多个数据切片,执行包括如下步骤的过程400来转发当前正在处理的报文(即当前报文)中的数据切片中的 控制信息。FIG. 4 is an exemplary flow chart of a process 400 of the data forwarding and scheduling method of the present application. As shown in FIG. 4 , the process 400 can be executed by a data forwarding device, specifically the input module (located at the input) and the data forwarding device in the data forwarding device. The output module (located at output) executes. Process 400 is described as a series of steps or operations, and it should be understood that process 400 may be performed in various orders and/or concurrently, and is not limited to the order of execution shown in FIG. 4 . Assuming that the packet is forwarded from the input port to the target output port in the data forwarding device, and a packet is sliced into multiple data slices, the process 400 including the following steps is executed to forward the currently processed packet (ie, the current packet) The control information in the data slice in .
步骤401、判断目标输出端口是否发生拥塞。Step 401: Determine whether the target output port is congested.
若否,则跳转至步骤402;若是,则跳转至步骤406。If no, go to step 402 ; if yes, go to step 406 .
步骤401可以参照上述步骤302,此处不再赘述。For step 401, reference may be made to the above-mentioned step 302, which will not be repeated here.
步骤402、判断LL路径上是否存在发送给目标输出端口的LPKT。Step 402: Determine whether there is an LPKT sent to the target output port on the LL path.
若否,则跳转至步骤403;若是,则跳转至步骤405。If no, go to step 403 ; if yes, go to step 405 .
步骤402可以参照上述步骤302,此处不再赘述。For step 402, reference may be made to the above-mentioned step 302, which will not be repeated here.
步骤403、复制待转发的控制信息得到影子控制信息。Step 403: Copy the control information to be forwarded to obtain shadow control information.
步骤403可以参照上述步骤303,此处不再赘述。For step 403, reference may be made to the above-mentioned step 303, which will not be repeated here.
步骤404、通过LL路径向目标输出端口发送待转发的控制信息,并通过SAF路径向目标输出端口发送影子控制信息。Step 404: Send the control information to be forwarded to the target output port through the LL path, and send the shadow control information to the target output port through the SAF path.
步骤404可以参照上述步骤304,此处不再赘述。For step 404, reference may be made to the above-mentioned step 304, which will not be repeated here.
步骤405、通过LL路径向目标输出端口发送待转发的控制信息。Step 405: Send the control information to be forwarded to the target output port through the LL path.
在目标输出端口没有发生拥塞时,如果LL路径上有发送给目标输出端口的LPKT,数据转发设备可以通过LL路径向目标输出端口发送待转发的控制信息。When the target output port is not congested, if there is LPKT sent to the target output port on the LL path, the data forwarding device can send the control information to be forwarded to the target output port through the LL path.
步骤406、通过SAF路径向目标输出端口发送待转发的控制信息。Step 406: Send the control information to be forwarded to the target output port through the SAF path.
目标输出端口发生拥塞了,就不能通过LL路径向目标输出端口发送控制信息,为了保证QoS性能,数据转发设备可以通过SAF路径向目标输出端口发送待转发的控制信息。When the target output port is congested, the control information cannot be sent to the target output port through the LL path. To ensure QoS performance, the data forwarding device can send the control information to be forwarded to the target output port through the SAF path.
步骤407、判断上一次调度并输出的控制信息是否来自对应于目标输出端口的SAF路径缓存队列。Step 407: Determine whether the control information scheduled and output last time comes from the SAF path buffer queue corresponding to the target output port.
若是,则跳转至步骤408;若否,则跳转至步骤412。If yes, go to step 408 ; if no, go to step 412 .
步骤407可以参照上述步骤305,此处不再赘述。For step 407, reference may be made to the above-mentioned step 305, which will not be repeated here.
步骤408、从SAF路径缓存队列中调度排在队头的第一控制信息。Step 408: Schedule the first control information queued at the head of the queue from the SAF path cache queue.
步骤408可以参照上述步骤305,此处不再赘述。For step 408, reference may be made to the above-mentioned step 305, which will not be repeated here.
步骤409、判断第一控制信息是否为影子控制信息。Step 409: Determine whether the first control information is shadow control information.
若是,则跳转至步骤410;若否,则跳转至步骤411。If yes, go to step 410 ; if no, go to step 411 .
步骤410、从LL路径缓存队列中调度并输出排在队头的LPKT。Step 410: Schedule and output the LPKT queued at the head of the queue from the LL path cache queue.
步骤410可以参照上述步骤306,此处不再赘述。For step 410, reference may be made to the above-mentioned step 306, which will not be repeated here.
步骤411、输出第一控制信息。Step 411 , output the first control information.
步骤411可以参照上述步骤307,此处不再赘述。For step 411, reference may be made to the above-mentioned step 307, which will not be repeated here.
步骤412、判断LL路径缓存队列是否为空。Step 412: Determine whether the LL path cache queue is empty.
若否,则跳转至步骤413;若是,则跳转至步骤414。If no, go to step 413 ; if yes, go to step 414 .
数据转发设备上一次调度并输出的控制信息是来自LL路径缓存队列,表明上一次是正从LL路径缓存队列中调度并输出LPKT,那么根据LL路径缓存队列和SAF路径缓存队列的优先级,优先考虑从LL路径缓存队列调度并输出LPKT,只有当LL路径缓存队列为空才会切换到从SAF路径缓存队列调度并输出SPKT。The control information scheduled and output by the data forwarding device last time came from the LL path cache queue, indicating that the LPKT was scheduled and output from the LL path cache queue last time. Then, according to the priorities of the LL path cache queue and the SAF path cache queue, priority is given to Scheduling and outputting LPKT from the LL path cache queue, and switching to scheduling and outputting SPKT from the SAF path cache queue only when the LL path cache queue is empty.
步骤413、从LL路径缓存队列中调度并输出排在队头的LPKT。Step 413: Schedule and output the LPKT queued at the head of the queue from the LL path cache queue.
LL路径缓存队列不为空,数据转发设备继续从LL路径缓存队列调度并输出排在队头的控制信息。If the LL path cache queue is not empty, the data forwarding device continues to schedule from the LL path cache queue and outputs the control information queued at the head of the queue.
步骤414、从SAF路径缓存队列中调度并输出排在队头的SPKT。Step 414: Schedule and output the SPKT queued at the head of the queue from the SAF path cache queue.
LL路径缓存队列为空,数据转发设备切换到从SAF路径缓存队列调度并输出SPKT,这样可以确保当前报文中排在LPKT之后的SPKT一定是在LPKT调度并输出之后才开始被调度并输出,避免了这些SPKT早于LPKT输出的情况,保证了控制信息的先后顺序。When the LL path cache queue is empty, the data forwarding device switches to schedule and output the SPKT from the SAF path cache queue. This ensures that the SPKT in the current packet after the LPKT must be scheduled and output after the LPKT is scheduled and output. The situation that these SPKTs are output earlier than the LPKTs is avoided, and the sequence of control information is guaranteed.
图5为本申请数据转发和调度方法的过程500的一个示例性的流程图,如图5所示,过程500可由数据转发设备执行,具体为数据转发设备中的输入模块(位于input处)和输出模块(位于output处)执行。过程500描述为一系列的步骤或操作,应当理解的是,过程500可以以各种顺序执行和/或同时发生,不限于图5所示的执行顺序。假设报文在数据转发设备中从输入端口被转发到目标输出端口,一个报文被切片为多个数据切片,执行包括如下步骤的过程500来转发当前正在处理的报文(即当前报文)中的数据切片中的控制信息。FIG. 5 is an exemplary flow chart of a process 500 of the data forwarding and scheduling method of the present application. As shown in FIG. 5 , the process 500 can be executed by a data forwarding device, specifically the input module (located at the input) and the data forwarding device in the data forwarding device. The output module (located at output) executes. Process 500 is described as a series of steps or operations, and it should be understood that process 500 may be performed in various orders and/or concurrently, and is not limited to the order of execution shown in FIG. 5 . Assuming that the packet is forwarded from the input port to the target output port in the data forwarding device, and a packet is sliced into multiple data slices, the process 500 including the following steps is executed to forward the currently processed packet (ie, the current packet) The control information in the data slice in .
步骤501、判断目标输出端口是否发生拥塞。Step 501: Determine whether the target output port is congested.
若否,则跳转至步骤502;若是,则跳转至步骤506。If no, go to step 502 ; if yes, go to step 506 .
步骤501可以参照上述步骤302,此处不再赘述。For step 501, reference may be made to the above-mentioned step 302, which will not be repeated here.
步骤502、判断LL路径上是否存在发送给目标输出端口的LPKT。Step 502: Determine whether there is an LPKT sent to the target output port on the LL path.
若否,则跳转至步骤503;若是,则跳转至步骤505。If no, go to step 503 ; if yes, go to step 505 .
步骤502可以参照上述步骤302,此处不再赘述。For step 502, reference may be made to the above-mentioned step 302, which will not be repeated here.
步骤503、复制待转发的控制信息得到影子控制信息。Step 503: Copy the control information to be forwarded to obtain shadow control information.
步骤503可以参照上述步骤303,此处不再赘述。For step 503, reference may be made to the above-mentioned step 303, which will not be repeated here.
步骤504、通过LL路径向目标输出端口发送待转发的控制信息,并通过SAF路径向目标输出端口发送影子控制信息。Step 504: Send the control information to be forwarded to the target output port through the LL path, and send the shadow control information to the target output port through the SAF path.
步骤504可以参照上述步骤304,此处不再赘述。For step 504, reference may be made to the above-mentioned step 304, which will not be repeated here.
步骤505、通过LL路径向目标输出端口发送待转发的控制信息。Step 505: Send the control information to be forwarded to the target output port through the LL path.
在目标输出端口没有发生拥塞时,如果LL路径上有发送给目标输出端口的LPKT,数据转发设备可以通过LL路径向目标输出端口发送待转发的控制信息。When the target output port is not congested, if there is LPKT sent to the target output port on the LL path, the data forwarding device can send the control information to be forwarded to the target output port through the LL path.
步骤506、通过SAF路径向目标输出端口发送待转发的控制信息。Step 506: Send the control information to be forwarded to the target output port through the SAF path.
目标输出端口发生拥塞了,就不能通过LL路径向目标输出端口发送控制信息,为了保证QoS性能,数据转发设备可以通过SAF路径向目标输出端口发送待转发的控制信息。When the target output port is congested, the control information cannot be sent to the target output port through the LL path. To ensure QoS performance, the data forwarding device can send the control information to be forwarded to the target output port through the SAF path.
上述通过LL路径或者SAF路径向目标输出端口发送控制信息的过程中,可以根据发送待转发的控制信息的路径设置对应于目标输出端口的转发状态机,例如,如果通过LL路径向目标输出端口发送待转发的控制信息,则可以将对应于目标输出端口的转发状态机设置为指示LL路径;如果通过SAF路径向目标输出端口发送待转发的控制信息,则可以将对应于目标输出端口的转发状态机设置为指示SAF路径。In the above process of sending control information to the target output port through the LL path or the SAF path, a forwarding state machine corresponding to the target output port can be set according to the path for sending the control information to be forwarded. control information to be forwarded, the forwarding state machine corresponding to the target output port can be set to indicate the LL path; if the control information to be forwarded is sent to the target output port through the SAF path, the forwarding state corresponding to the target output port can be set The machine is set to indicate the SAF path.
步骤507、判断转发状态机是否指示LL路径,以及调度状态机是否指示SAF路径。Step 507: Determine whether the forwarding state machine indicates the LL path, and whether the scheduling state machine indicates the SAF path.
数据转发设备对对应于目标输出端口的缓存队列进行调度的过程中,可以根据调度的待转发的控制信息是来自LL路径缓存队列或者SAF路径缓存队列设置对应于目标输出端口的调度状态机,例如,如果从LL路径缓存队列调度待转发的控制信息,则数据转发设备可以将对应于目标输出端口的调度状态机设置为指示LL路径;如果从SAF路径缓存队列调度待转发的控制信息,则数据转发设备可以将对应于目标输出端口的调度状态机设置 为指示SAF路径。In the process of scheduling the buffer queue corresponding to the target output port, the data forwarding device can set the scheduling state machine corresponding to the target output port according to whether the scheduled control information to be forwarded comes from the LL path buffer queue or the SAF path buffer queue, for example , if the control information to be forwarded is scheduled from the LL path cache queue, the data forwarding device can set the scheduling state machine corresponding to the target output port to indicate the LL path; if the control information to be forwarded is scheduled from the SAF path cache queue, the data The forwarding device may set the scheduling state machine corresponding to the target output port to indicate the SAF path.
若转发状态机指示LL路径且调度状态机指示SAF路径,则跳转至步骤508;若转发状态机指示LL路径且调度状态机指示LL路径,则跳转至步骤512;若转发状态机指示SAF路径且调度状态机指示LL路径,则跳转至步骤513;若转发状态机指示SAF路径且调度状态机指示SAF路径,则跳转至步骤516。If the forwarding state machine indicates the LL path and the scheduling state machine indicates the SAF path, go to step 508; if the forwarding state machine indicates the LL path and the scheduling state machine indicates the LL path, go to step 512; if the forwarding state machine indicates the SAF If the forwarding state machine indicates the LL path and the scheduling state machine indicates the LL path, then jump to step 513 ; if the forwarding state machine indicates the SAF path and the scheduling state machine indicates the SAF path, then jump to step 516 .
步骤508、从SAF路径缓存队列中调度排在队头的第一控制信息。Step 508: Schedule the first control information queued at the head of the queue from the SAF path cache queue.
转发状态机指示LL路径且调度状态机指示SAF路径,表示上一次通过LL路径发送控制信息,上一次是从SAF路径缓存队列中调度控制信息。可以参照上述步骤305。The forwarding state machine indicates the LL path and the scheduling state machine indicates the SAF path, indicating that the control information was sent through the LL path last time, and the control information was scheduled from the SAF path cache queue last time. Refer to step 305 above.
步骤509、判断第一控制信息是否为影子控制信息。Step 509: Determine whether the first control information is shadow control information.
若是,则跳转至步骤510;若否,则跳转至步骤511。If yes, go to step 510 ; if no, go to step 511 .
步骤510、从LL路径缓存队列中调度并输出排在队头的LPKT,并将调度状态机设置为指示LL路径。Step 510: Schedule and output the LPKT queued at the head of the queue from the LL path cache queue, and set the scheduling state machine to indicate the LL path.
步骤510可以参照上述步骤306,此处不再赘述。For step 510, reference may be made to the above-mentioned step 306, which will not be repeated here.
步骤511、输出第一控制信息。Step 511 , output the first control information.
步骤511可以参照上述步骤307,此处不再赘述。For step 511, reference may be made to the above-mentioned step 307, which will not be repeated here.
步骤512、从LL路径缓存队列中调度并输出排在队头的LPKT。Step 512: Schedule and output the LPKT queued at the head of the queue from the LL path cache queue.
转发状态机指示LL路径且调度状态机指示LL路径,表示上一次通过LL路径发送控制信息,上一次是从LL路径缓存队列中调度控制信息。数据转发设备还在通过LL路径发送控制信息,可以认为LL路径缓存队列还会有LPKT进入,因此LL路径缓存队列此时还不会为空,而上一次是从LL路径缓存队列中调度控制信息,基于LL路径缓存队列的优先级高于SAF路径缓存队列的优先级,继续从LL路径缓存队列中调度并输出排在队头的LPKT。The forwarding state machine indicates the LL path and the scheduling state machine indicates the LL path, indicating that the control information was sent through the LL path last time, and the control information was scheduled from the LL path cache queue last time. The data forwarding device is still sending control information through the LL path. It can be considered that LPKT will enter the LL path cache queue. Therefore, the LL path cache queue will not be empty at this time, and the control information was dispatched from the LL path cache queue last time. , based on the priority of the LL path cache queue is higher than the priority of the SAF path cache queue, continue to schedule and output the LPKT queued at the head of the LL path cache queue.
步骤513、判断LL路径缓存队列是否为空。Step 513: Determine whether the LL path cache queue is empty.
若否,则跳转至步骤514;若是,则跳转至步骤515。If no, go to step 514 ; if yes, go to step 515 .
转发状态机指示SAF路径且调度状态机指示LL路径,表示上一次通过SAF路径发送控制信息,上一次是从LL路径缓存队列中调度控制信息。数据转发设备已经切换到通过SAF路径发送SPKT,而由于LL路径缓存队列尚未空,因此还在从LL路径缓存队列中调度并输出LPKT,还是基于LL路径缓存队列的优先级高于SAF路径缓存队列的优先级,需要先判断LL路径缓存队列是否为空,不为空继续从LL路径缓存队列中调度并输出排在队头的LPKT,为空则切换为从SAF路径缓存队列中调度并输出排在队头的SPKT。The forwarding state machine indicates the SAF path and the scheduling state machine indicates the LL path, indicating that the control information was sent through the SAF path last time, and the control information was scheduled from the LL path cache queue last time. The data forwarding device has switched to sending SPKT through the SAF path, but because the LL path cache queue is not empty, it is still scheduling and outputting LPKT from the LL path cache queue, or the priority of the LL path cache queue is higher than that of the SAF path cache queue. If it is not empty, it will continue to schedule from the LL path cache queue and output the LPKT queued at the head of the queue. If it is empty, switch to scheduling from the SAF path cache queue and output the queue. SPKT at the head of the team.
步骤514、从LL路径缓存队列中调度并输出排在队头的LPKT。Step 514: Schedule and output the LPKT queued at the head of the queue from the LL path cache queue.
步骤515、从SAF路径缓存队列中调度并输出排在队头的SPKT,并将调度状态机设置为指示SAF路径。Step 515: Schedule and output the SPKT queued at the head of the queue from the SAF path cache queue, and set the scheduling state machine to indicate the SAF path.
步骤516、从SAF路径缓存队列中调度并输出排在队头的SPKT。Step 516: Schedule and output the SPKT queued at the head of the SAF path cache queue.
图6为本申请数据转发和调度方法的一个示例性的示意图,如图6所示,该示意图以图2所示结构为基础,待转发的报文被切片为12个数据切片进入同一输入端口(例如input0),为了便于理解,本文中将排在前面的4个通过SAF路径转发的控制信息称为SPKT1,将排在中间的4个通过LL路径转发的控制信息称为LPKT,将排在后面的4个通过SAF路径转发的控制信息称为SPKT2。FIG. 6 is an exemplary schematic diagram of the data forwarding and scheduling method of the present application. As shown in FIG. 6 , the schematic diagram is based on the structure shown in FIG. 2 , and the packet to be forwarded is sliced into 12 data slices and enters the same input port (for example, input0), for ease of understanding, the first four control messages forwarded through the SAF path are called SPKT1, and the four middle control messages forwarded through the LL path are called LPKT. The next four control messages forwarded through the SAF path are called SPKT2.
可以看到,第一个LPKT(M)被复制后得到影子控制信息(M’),通过LL路径发送的是M,通过SAF路径发送的是M’。可以看到,在SAF路径上,M’排在SPKT1和SPKT2之间。It can be seen that the shadow control information (M') is obtained after the first LPKT (M) is copied, M is sent through the LL path, and M' is sent through the SAF path. It can be seen that on the SAF pathway, M' is arranged between SPKT1 and SPKT2.
Reorder模块先从SAF路径缓存队列中调度并输出4个SPKT1,当检测到M’时,切换到从LL路径缓存队列调度并输出4个LPKT,最后再从SAF路径缓存队列中调度并输出4个SPKT2。输出顺序和报文中的控制信息的原始排列顺序是一致的。The Reorder module first schedules and outputs 4 SPKT1s from the SAF path cache queue. When M' is detected, it switches to schedule and outputs 4 LPKTs from the LL path cache queue, and finally schedules and outputs 4 LPKTs from the SAF path cache queue. SPKT2. The output order is consistent with the original arrangement order of the control information in the message.
图7为本申请数据转发装置700的一个示例性的结构示意图,如图7所示,本实施例的数据转发装置700可以应用于上述数据转发设备。该数据转发装置700包括:输入模块701、转发模块702和输出模块703,其中,FIG. 7 is an exemplary schematic structural diagram of a data forwarding apparatus 700 of the present application. As shown in FIG. 7 , the data forwarding apparatus 700 of this embodiment may be applied to the above-mentioned data forwarding device. The data forwarding apparatus 700 includes: an input module 701, a forwarding module 702 and an output module 703, wherein,
输入模块701,用于获得待转发的控制信息,以及所述待转发的控制信息的目标输出端口;判断所述目标输出端口是否发生拥塞,以及判断低延时LL路径上是否存在发送给所述目标输出端口的控制信息;当所述目标输出端口没有发生拥塞,且所述LL路径上没有发送给所述目标输出端口的控制信息时,复制所述待转发的控制信息得到影子控制信息;转发模块702,用于通过所述LL路径向所述目标输出端口发送所述待转发的控制信息,并通过存储转发SAF路径向所述目标输出端口发送所述影子控制信息;输出模块703,用于当上一次调度并输出的控制信息来自对应于所述目标输出端口的SAF路径缓存队列时,从所述SAF路径缓存队列中调度排在队头的第一控制信息;当所述第一控制信息是所述影子控制信息时,从对应于所述目标输出端口的LL路径缓存队列中调度并输出排在队头的控制信息;当所述第一控制信息不是所述影子控制信息时,输出所述第一控制信息。The input module 701 is used for obtaining the control information to be forwarded and the target output port of the control information to be forwarded; judging whether the target output port is congested, and judging whether there is a low-latency LL path sent to the control information of the target output port; when the target output port is not congested and there is no control information sent to the target output port on the LL path, copy the control information to be forwarded to obtain shadow control information; forwarding Module 702, configured to send the control information to be forwarded to the target output port through the LL path, and send the shadow control information to the target output port through the store-and-forward SAF path; output module 703, configured to When the control information scheduled and output last time comes from the SAF path buffer queue corresponding to the target output port, the first control information queued at the head of the queue is scheduled from the SAF path buffer queue; when the first control information When the shadow control information is the shadow control information, schedule and output the control information at the head of the queue from the LL path cache queue corresponding to the target output port; when the first control information is not the shadow control information, output all the control information. Describe the first control information.
在一种可能的实现方式中,所述输出模块703,还用于当所述上一次调度并输出的控制信息来自所述LL路径缓存队列时,判断所述LL路径缓存队列是否为空;当所述LL路径缓存队列不为空时,从所述LL路径缓存队列中调度并输出排在队头的控制信息;当所述LL路径缓存队列为空时,从所述SAF路径缓存队列中调度并输出排在队头的控制信息。In a possible implementation manner, the output module 703 is further configured to judge whether the LL path cache queue is empty when the control information scheduled and output last time comes from the LL path cache queue; when the LL path cache queue is empty; When the LL path cache queue is not empty, schedule and output the control information at the head of the queue from the LL path cache queue; when the LL path cache queue is empty, schedule from the SAF path cache queue And output the control information at the head of the queue.
在一种可能的实现方式中,所述上一次调度并输出的控制信息来自对应于所述目标输出端口的SAF路径缓存队列是指对应于所述目标输出端口的调度状态机指示SAF路径,其中,所述调度状态机指示SAF路径是指上一次从所述SAF路径缓存队列中调度并输出控制信息。In a possible implementation manner, the control information scheduled and outputted last time comes from the SAF path cache queue corresponding to the target output port means that the scheduling state machine corresponding to the target output port indicates the SAF path, wherein , the scheduling state machine indicating the SAF path refers to scheduling and outputting control information from the SAF path cache queue last time.
在一种可能的实现方式中,所述输出模块703,还用于将所述调度状态机设置为指示所述LL路径,所述调度状态机指示LL路径是指上一次从所述LL路径缓存队列中调度并输出控制信息。In a possible implementation manner, the output module 703 is further configured to set the scheduling state machine to indicate the LL path, and the scheduling state machine indicating that the LL path refers to the last cache from the LL path Schedule and output control information in the queue.
在一种可能的实现方式中,所述输出模块703,还用于将所述调度状态机设置为指示所述SAF路径。In a possible implementation manner, the output module 703 is further configured to set the scheduling state machine to indicate the SAF path.
在一种可能的实现方式中,所述目标输出端口没有发生拥塞是指对应于所述目标输出端口的SAF路径计数器的计数值小于设定阈值。In a possible implementation manner, the fact that the target output port is not congested means that the count value of the SAF path counter corresponding to the target output port is less than a set threshold.
在一种可能的实现方式中,所述LL路径上没有发送给所述目标输出端口的控制信息是指对应于所述目标输出端口的LL路径计数器的计数值为0。In a possible implementation manner, the control information not sent to the target output port on the LL path means that the count value of the LL path counter corresponding to the target output port is 0.
在一种可能的实现方式中,所述输入模块701,还用于当所述目标输出端口发生拥塞时,通过所述SAF路径向所述目标输出端口发送所述待转发的控制信息。In a possible implementation manner, the input module 701 is further configured to send the control information to be forwarded to the target output port through the SAF path when the target output port is congested.
在一种可能的实现方式中,所述目标输出端口发生拥塞是指对应于所述目标输出端口 的SAF路径计数器的计数值大于或等于设定阈值。In a possible implementation manner, the occurrence of congestion on the target output port means that the count value of the SAF path counter corresponding to the target output port is greater than or equal to a set threshold.
在一种可能的实现方式中,所述输入模块701,还用于当通过所述SAF路径向所述目标输出端口发送一个控制信息时,将对应于所述目标输出端口的SAF路径计数器的计数值加1;或者,当通过所述LL路径向所述目标输出端口发送一个控制信息时,将对应于所述目标输出端口的LL路径计数器的计数值加1。In a possible implementation manner, the input module 701 is further configured to count the SAF path counter corresponding to the target output port when sending a control message to the target output port through the SAF path The value is incremented by 1; or, when a control message is sent to the target output port through the LL path, the count value of the LL path counter corresponding to the target output port is incremented by 1.
在一种可能的实现方式中,所述输出模块703,还用于当从所述SAF路径缓存队列中调度并输出一个控制信息时,将对应于所述目标输出端口的SAF路径计数器的计数值减1;或者,当从所述LL路径缓存队列中调度并输出一个控制信息时,将对应于所述目标输出端口的LL路径计数器的计数值减1。In a possible implementation manner, the output module 703 is further configured to, when scheduling and outputting a piece of control information from the SAF path buffer queue, set the count value of the SAF path counter corresponding to the target output port Decrement by 1; or, when scheduling and outputting a control message from the LL path buffer queue, decrement the count value of the LL path counter corresponding to the target output port by 1.
本实施例的装置,可以用于执行图3-6任一所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The apparatus in this embodiment can be used to implement the technical solutions of any of the method embodiments shown in FIGS. 3-6 , and the implementation principles and technical effects thereof are similar, and details are not repeated here.
在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。处理器可以是通用处理器、数字信号处理器(digital signal processor,DSP)、特定应用集成电路(application-specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。本申请实施例公开的方法的步骤可以直接体现为硬件编码处理器执行完成,或者用编码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。In the implementation process, each step of the above method embodiments may be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other Programming logic devices, discrete gate or transistor logic devices, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the methods disclosed in the embodiments of the present application may be directly embodied as executed by a hardware coding processor, or executed by a combination of hardware and software modules in the coding processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
上述各实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。The memory mentioned in the above embodiments may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory may be random access memory (RAM), which acts as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synchlink DRAM, SLDRAM) ) and direct memory bus random access memory (direct rambus RAM, DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but not be limited to, these and any other suitable types of memory.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装 置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described systems, devices and units can refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (25)

  1. 一种数据转发和调度方法,其特征在于,包括:A data forwarding and scheduling method, comprising:
    获得待转发的控制信息,以及所述待转发的控制信息的目标输出端口;Obtain the control information to be forwarded, and the target output port of the control information to be forwarded;
    判断所述目标输出端口是否发生拥塞,以及判断低延时LL路径上是否存在发送给所述目标输出端口的控制信息;Judging whether the target output port is congested, and judging whether there is control information sent to the target output port on the low-latency LL path;
    当所述目标输出端口没有发生拥塞,且所述LL路径上没有发送给所述目标输出端口的控制信息时,复制所述待转发的控制信息得到影子控制信息;When the target output port is not congested, and there is no control information sent to the target output port on the LL path, copying the control information to be forwarded to obtain shadow control information;
    通过所述LL路径向所述目标输出端口发送所述待转发的控制信息,并通过存储转发SAF路径向所述目标输出端口发送所述影子控制信息;Sending the control information to be forwarded to the target output port through the LL path, and sending the shadow control information to the target output port through a store-and-forward SAF path;
    当上一次调度并输出的控制信息来自对应于所述目标输出端口的SAF路径缓存队列时,从所述SAF路径缓存队列中调度排在队头的第一控制信息;When the last scheduled and output control information comes from the SAF path cache queue corresponding to the target output port, schedule the first control information queued at the head of the queue from the SAF path cache queue;
    当所述第一控制信息是所述影子控制信息时,从对应于所述目标输出端口的LL路径缓存队列中调度并输出排在队头的控制信息;When the first control information is the shadow control information, scheduling and outputting the control information at the head of the queue from the LL path buffer queue corresponding to the target output port;
    当所述第一控制信息不是所述影子控制信息时,输出所述第一控制信息。When the first control information is not the shadow control information, the first control information is output.
  2. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1, further comprising:
    当所述上一次调度并输出的控制信息来自所述LL路径缓存队列时,判断所述LL路径缓存队列是否为空;When the last scheduled and output control information comes from the LL path cache queue, determine whether the LL path cache queue is empty;
    当所述LL路径缓存队列不为空时,从所述LL路径缓存队列中调度并输出排在队头的控制信息;When the LL path cache queue is not empty, schedule and output the control information at the head of the queue from the LL path cache queue;
    当所述LL路径缓存队列为空时,从所述SAF路径缓存队列中调度并输出排在队头的控制信息。When the LL path cache queue is empty, schedule and output the control information queued at the head of the SAF path cache queue.
  3. 根据权利要求2所述的方法,其特征在于,所述上一次调度并输出的控制信息来自对应于所述目标输出端口的SAF路径缓存队列是指对应于所述目标输出端口的调度状态机指示SAF路径,其中,所述调度状态机指示SAF路径是指上一次从所述SAF路径缓存队列中调度并输出控制信息。The method according to claim 2, wherein the control information scheduled and outputted last time comes from the SAF path buffer queue corresponding to the target output port means that the scheduling state machine instruction corresponding to the target output port SAF path, wherein the scheduling state machine indicates that the SAF path refers to scheduling and outputting control information from the SAF path cache queue last time.
  4. 根据权利要求3所述的方法,其特征在于,所述从对应于所述目标输出端口的LL路径缓存队列中调度并输出排在队头的控制信息之后,还包括:The method according to claim 3, wherein after scheduling and outputting the control information queued at the head of the queue from the LL path buffer queue corresponding to the target output port, the method further comprises:
    将所述调度状态机设置为指示所述LL路径,所述调度状态机指示LL路径是指上一次从所述LL路径缓存队列中调度并输出控制信息。The scheduling state machine is set to indicate the LL path, and the scheduling state machine indicating the LL path refers to scheduling and outputting control information from the LL path cache queue last time.
  5. 根据权利要求3所述的方法,其特征在于,所述从所述SAF路径缓存队列中调度并输出排在队头的控制信息之后,还包括:The method according to claim 3, wherein after scheduling and outputting the control information queued at the head of the queue from the SAF path cache queue, the method further comprises:
    将所述调度状态机设置为指示所述SAF路径。The scheduling state machine is set to indicate the SAF path.
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述目标输出端口没有发生拥塞是指对应于所述目标输出端口的SAF路径计数器的计数值小于设定阈值。The method according to any one of claims 1-5, wherein the fact that the target output port is not congested means that the count value of the SAF path counter corresponding to the target output port is less than a set threshold.
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述LL路径上没有发送给所述目标输出端口的控制信息是指对应于所述目标输出端口的LL路径计数器的计数值为0。The method according to any one of claims 1-6, wherein the control information not sent to the target output port on the LL path refers to the count of the LL path counter corresponding to the target output port The value is 0.
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1-7, further comprising:
    当所述目标输出端口发生拥塞时,通过所述SAF路径向所述目标输出端口发送所述待转发的控制信息。When the target output port is congested, the control information to be forwarded is sent to the target output port through the SAF path.
  9. 根据权利要求8所述的方法,其特征在于,所述目标输出端口发生拥塞是指对应于所述目标输出端口的SAF路径计数器的计数值大于或等于设定阈值。The method according to claim 8, wherein the occurrence of congestion on the target output port means that the count value of the SAF path counter corresponding to the target output port is greater than or equal to a set threshold.
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1-9, characterized in that, further comprising:
    当通过所述SAF路径向所述目标输出端口发送一个控制信息时,将对应于所述目标输出端口的SAF路径计数器的计数值加1;或者,When sending a control message to the target output port through the SAF path, increment the count value of the SAF path counter corresponding to the target output port by 1; or,
    当通过所述LL路径向所述目标输出端口发送一个控制信息时,将对应于所述目标输出端口的LL路径计数器的计数值加1。When a control message is sent to the target output port through the LL path, the count value of the LL path counter corresponding to the target output port is incremented by one.
  11. 根据权利要求1-10中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1-10, further comprising:
    当从所述SAF路径缓存队列中调度并输出一个控制信息时,将对应于所述目标输出端口的SAF路径计数器的计数值减1;或者,When scheduling and outputting a control message from the SAF path cache queue, the count value of the SAF path counter corresponding to the target output port is decremented by 1; or,
    当从所述LL路径缓存队列中调度并输出一个控制信息时,将对应于所述目标输出端口的LL路径计数器的计数值减1。When a control message is scheduled and output from the LL path buffer queue, the count value of the LL path counter corresponding to the target output port is decremented by 1.
  12. 一种数据转发装置,其特征在于,包括:A data forwarding device, comprising:
    输入模块,用于获得待转发的控制信息,以及所述待转发的控制信息的目标输出端口;判断所述目标输出端口是否发生拥塞,以及判断低延时LL路径上是否存在发送给所述目标输出端口的控制信息;当所述目标输出端口没有发生拥塞,且所述LL路径上没有发送给所述目标输出端口的控制信息时,复制所述待转发的控制信息得到影子控制信息;The input module is used to obtain the control information to be forwarded and the target output port of the control information to be forwarded; judge whether the target output port is congested, and judge whether there is a low-latency LL path to send to the target control information of the output port; when the target output port is not congested and there is no control information sent to the target output port on the LL path, copy the control information to be forwarded to obtain shadow control information;
    转发模块,用于通过所述LL路径向所述目标输出端口发送所述待转发的控制信息,并通过存储转发SAF路径向所述目标输出端口发送所述影子控制信息;a forwarding module, configured to send the control information to be forwarded to the target output port through the LL path, and send the shadow control information to the target output port through a store-and-forward SAF path;
    输出模块,用于当上一次调度并输出的控制信息来自对应于所述目标输出端口的SAF路径缓存队列时,从所述SAF路径缓存队列中调度排在队头的第一控制信息;当所述第一控制信息是所述影子控制信息时,从对应于所述目标输出端口的LL路径缓存队列中调度并输出排在队头的控制信息;当所述第一控制信息不是所述影子控制信息时,输出所述第一控制信息。The output module is configured to schedule the first control information queued at the head of the queue from the SAF path cache queue when the control information scheduled and output last time comes from the SAF path cache queue corresponding to the target output port; When the first control information is the shadow control information, schedule and output the control information at the head of the queue from the LL path buffer queue corresponding to the target output port; when the first control information is not the shadow control information, output the first control information.
  13. 根据权利要求12所述的装置,其特征在于,所述输出模块,还用于当所述上一次调度并输出的控制信息来自所述LL路径缓存队列时,判断所述LL路径缓存队列是否为空;当所述LL路径缓存队列不为空时,从所述LL路径缓存队列中调度并输出排在队头的控制信息;当所述LL路径缓存队列为空时,从所述SAF路径缓存队列中调度并输出排在队头的控制信息。The device according to claim 12, wherein the output module is further configured to judge whether the LL path cache queue is a LL path cache queue when the control information scheduled and output last time comes from the LL path cache queue Empty; when the LL path cache queue is not empty, schedule and output the control information at the head of the queue from the LL path cache queue; when the LL path cache queue is empty, from the SAF path cache Schedule and output the control information at the head of the queue in the queue.
  14. 根据权利要求13所述的装置,其特征在于,所述上一次调度并输出的控制信息来自对应于所述目标输出端口的SAF路径缓存队列是指对应于所述目标输出端口的调度状态机指示SAF路径,其中,所述调度状态机指示SAF路径是指上一次从所述SAF路径缓存队列中调度并输出控制信息。The apparatus according to claim 13, wherein the control information that is scheduled and output last time comes from the SAF path buffer queue corresponding to the target output port means that the scheduling state machine instruction corresponding to the target output port SAF path, wherein the scheduling state machine indicates that the SAF path refers to scheduling and outputting control information from the SAF path cache queue last time.
  15. 根据权利要求14所述的装置,其特征在于,所述输出模块,还用于将所述调度状态机设置为指示所述LL路径,所述调度状态机指示LL路径是指上一次从所述LL路径缓存队列中调度并输出控制信息。The apparatus according to claim 14, wherein the output module is further configured to set the scheduling state machine to indicate the LL path, and the scheduling state machine indicating that the LL path refers to the Schedule and output control information in the LL path buffer queue.
  16. 根据权利要求14所述的装置,其特征在于,所述输出模块,还用于将所述调度 状态机设置为指示所述SAF路径。The apparatus of claim 14, wherein the output module is further configured to set the scheduling state machine to indicate the SAF path.
  17. 根据权利要求12-16中任一项所述的装置,其特征在于,所述目标输出端口没有发生拥塞是指对应于所述目标输出端口的SAF路径计数器的计数值小于设定阈值。The apparatus according to any one of claims 12-16, wherein the fact that the target output port is not congested means that the count value of the SAF path counter corresponding to the target output port is less than a set threshold.
  18. 根据权利要求12-17中任一项所述的装置,其特征在于,所述LL路径上没有发送给所述目标输出端口的控制信息是指对应于所述目标输出端口的LL路径计数器的计数值为0。The apparatus according to any one of claims 12-17, wherein the control information not sent to the target output port on the LL path refers to the count of the LL path counter corresponding to the target output port The value is 0.
  19. 根据权利要求12-18中任一项所述的装置,其特征在于,所述输入模块,还用于当所述目标输出端口发生拥塞时,通过所述SAF路径向所述目标输出端口发送所述待转发的控制信息。The apparatus according to any one of claims 12-18, wherein the input module is further configured to send the information to the target output port through the SAF path when the target output port is congested Describe the control information to be forwarded.
  20. 根据权利要求19所述的装置,其特征在于,所述目标输出端口发生拥塞是指对应于所述目标输出端口的SAF路径计数器的计数值大于或等于设定阈值。The apparatus according to claim 19, wherein the occurrence of congestion on the target output port means that the count value of the SAF path counter corresponding to the target output port is greater than or equal to a set threshold.
  21. 根据权利要求12-20中任一项所述的装置,其特征在于,所述输入模块,还用于当通过所述SAF路径向所述目标输出端口发送一个控制信息时,将对应于所述目标输出端口的SAF路径计数器的计数值加1;或者,当通过所述LL路径向所述目标输出端口发送一个控制信息时,将对应于所述目标输出端口的LL路径计数器的计数值加1。The device according to any one of claims 12-20, wherein the input module is further configured to send a control message corresponding to the target output port through the SAF path to the target output port. The count value of the SAF path counter of the target output port is incremented by 1; or, when a control message is sent to the target output port through the LL path, the count value of the LL path counter corresponding to the target output port is incremented by 1 .
  22. 根据权利要求12-21中任一项所述的装置,其特征在于,所述输出模块,还用于当从所述SAF路径缓存队列中调度并输出一个控制信息时,将对应于所述目标输出端口的SAF路径计数器的计数值减1;或者,当从所述LL路径缓存队列中调度并输出一个控制信息时,将对应于所述目标输出端口的LL路径计数器的计数值减1。The apparatus according to any one of claims 12-21, wherein the output module is further configured to, when scheduling and outputting a piece of control information from the SAF path cache queue, send a message corresponding to the target The count value of the SAF path counter of the output port is decremented by 1; or, when a control message is scheduled and output from the LL path buffer queue, the count value of the LL path counter corresponding to the target output port is decremented by 1.
  23. 一种数据转发设备,其特征在于,包括:A data forwarding device, comprising:
    一个或多个处理器;one or more processors;
    存储器,用于存储一个或多个程序;memory for storing one or more programs;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-11中任一项所述的方法。The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-11.
  24. 一种计算机可读存储介质,其特征在于,包括计算机程序,所述计算机程序在计算机上被执行时,使得所述计算机执行权利要求1-11中任一项所述的方法。A computer-readable storage medium, characterized by comprising a computer program, which, when executed on a computer, causes the computer to execute the method of any one of claims 1-11.
  25. 一种计算机程序,其特征在于,当所述计算机程序被计算机执行时,用于执行权利要求1-11中任一项所述的方法。A computer program, characterized in that, when the computer program is executed by a computer, it is used to execute the method of any one of claims 1-11.
PCT/CN2021/090142 2021-04-27 2021-04-27 Data forwarding and scheduling methods and apparatus WO2022226762A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2021/090142 WO2022226762A1 (en) 2021-04-27 2021-04-27 Data forwarding and scheduling methods and apparatus
CN202180089412.5A CN116686259A (en) 2021-04-27 2021-04-27 Data forwarding and scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/090142 WO2022226762A1 (en) 2021-04-27 2021-04-27 Data forwarding and scheduling methods and apparatus

Publications (1)

Publication Number Publication Date
WO2022226762A1 true WO2022226762A1 (en) 2022-11-03

Family

ID=83847632

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/090142 WO2022226762A1 (en) 2021-04-27 2021-04-27 Data forwarding and scheduling methods and apparatus

Country Status (2)

Country Link
CN (1) CN116686259A (en)
WO (1) WO2022226762A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140098818A1 (en) * 2012-10-05 2014-04-10 Broadcom Corporation Internal Cut-Through For Distributed Switches
CN110366841A (en) * 2017-03-06 2019-10-22 三菱电机株式会社 Transmission device, transfer approach and conveyer system
US20190334837A1 (en) * 2018-04-27 2019-10-31 Avago Technologies General Ip (Singapore) Pte. Ltd. Traffic management for high-bandwidth switching
CN110417670A (en) * 2018-04-27 2019-11-05 安华高科技股份有限公司 Traffic management for high bandwidth exchange
US10601713B1 (en) * 2013-10-15 2020-03-24 Marvell Israel (M.I.S.L) Ltd. Methods and network device for performing cut-through

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140098818A1 (en) * 2012-10-05 2014-04-10 Broadcom Corporation Internal Cut-Through For Distributed Switches
US10601713B1 (en) * 2013-10-15 2020-03-24 Marvell Israel (M.I.S.L) Ltd. Methods and network device for performing cut-through
CN110366841A (en) * 2017-03-06 2019-10-22 三菱电机株式会社 Transmission device, transfer approach and conveyer system
US20190334837A1 (en) * 2018-04-27 2019-10-31 Avago Technologies General Ip (Singapore) Pte. Ltd. Traffic management for high-bandwidth switching
CN110417670A (en) * 2018-04-27 2019-11-05 安华高科技股份有限公司 Traffic management for high bandwidth exchange

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
A. FOGLAR, INNOROUTE M. PARKER, UNI ESSEX T. ROKKAS, INCITES: "IPv6 Source Routing for ultralow Latency ;draft-foglar-ipv6-ull-routing-08.txt", IPV6 SOURCE ROUTING FOR ULTRALOW LATENCY ;DRAFT-FOGLAR-IPV6-ULL-ROUTING-08.TXT, no. 8, 23 January 2021 (2021-01-23), pages 1 - 5, XP015143916 *

Also Published As

Publication number Publication date
CN116686259A (en) 2023-09-01

Similar Documents

Publication Publication Date Title
US20220231962A1 (en) System and method for facilitating data request management in a network interface controller (nic)
US10673770B1 (en) Intelligent packet queues with delay-based actions
EP4123997A2 (en) Multi-path rdma transmission
US9762497B2 (en) System, method and apparatus for network congestion management and network resource isolation
US11665104B1 (en) Delay-based tagging in a network switch
US8711752B2 (en) Distributed multicast packet replication with centralized quality of service
US10313255B1 (en) Intelligent packet queues with enqueue drop visibility and forensics
US11290388B2 (en) Flow control method and apparatus
US7830797B1 (en) Preserving packet order for data flows when applying traffic shapers
US8599694B2 (en) Cell copy count
US20140022895A1 (en) Reducing Store And Forward Delay In Distributed Systems
WO2022226762A1 (en) Data forwarding and scheduling methods and apparatus
WO2022174444A1 (en) Data stream transmission method and apparatus, and network device
Minkenberg et al. Speculative flow control for high-radix datacenter interconnect routers
US10193797B2 (en) Triggered-actions network processor
US11784933B2 (en) Traffic shaping offload on a network interface controller
US20230336487A1 (en) Flow control method
US20230403229A1 (en) System and method for facilitating efficient host memory access from a network interface controller (nic)
WO2024022572A1 (en) A hardware device for automatic detection and deployment of qos policies
JP2000316024A (en) System and method for packet buffer management

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21938250

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180089412.5

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21938250

Country of ref document: EP

Kind code of ref document: A1