Distributed scheduling method and device for data in a switch chip, and switch chip

By monitoring the transmission link load parameters of the switching chip and dynamically adjusting the data volume of the sending port, the problem of wasted buffer resources in the existing technology is solved, and more efficient data transmission is achieved, which is suitable for large-scale switching chips.

CN122496480APending Publication Date: 2026-07-31TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TSINGHUA UNIVERSITY
Filing Date
2026-05-18
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing data transmission methods for switching chips, the buffer authorization returned by the receiving end leads to a waste of buffer resources, resulting in low data transmission efficiency and an inability to effectively utilize the resources of the entire transmission link.

Method used

By monitoring the transmission link load parameters of the switching chip, the data volume of the sending port is dynamically adjusted to ensure that the data transmission meets the actual capacity of the transmission link, avoid waste of buffer resources, and adopt a distributed scheduling method to adapt to the needs of large-scale switching chips.

Benefits of technology

It improves the data transmission efficiency of the switching chip, makes full use of the resources of the entire transmission link, reduces the waste of buffer resources, and is suitable for high-efficiency data transmission of large-scale switching chips.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122496480A_ABST
    Figure CN122496480A_ABST
Patent Text Reader

Abstract

This invention provides a distributed scheduling method, apparatus, and switching chip for data in a switching chip, relating to the field of communication technology. In response to a cross-port transmission request from sending port i to receiving port j in the switching chip, the method determines the load parameters of transmission link ij based on monitoring data of transmission link ij, where transmission link ij is the transmission link from sending port i to receiving port j, and the load parameters of transmission link ij indicate the data congestion on transmission link ij. The method then determines the amount of data allocated to sending port i based on the load parameters of transmission link ij to obtain the target data amount. Based on the target data amount, the method configures the amount of cross-port data transmitted from sending port i to receiving port j. By considering how much data is currently running on the transmission link, the method determines how much more data can run on the transmission link, fully utilizing the resources of the entire transmission link, reducing the waste of buffer resources, and thus improving the data transmission efficiency of the switching chip.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and in particular to a distributed scheduling method, apparatus, and switching chip for data in a switching chip. Background Technology

[0002] Switching chips are one of the core components of switches / routers, responsible for the efficient forwarding of traffic between various ports. With the continuous growth of industry demands, switching chips are constantly evolving towards higher bandwidth and higher radix, where radix refers to the total number of ports provided by the switching chip. On the other hand, as Moore's Law gradually slows down, the growth of on-chip component density is also decreasing, forcing high-end switching chips to move towards larger scale and even chiplet-level designs. Chiplet refers to packaging multiple dies into a single unit, providing performance comparable to a large chip.

[0003] To ensure efficient traffic forwarding and avoid queuing and congestion caused by traffic conflicts, the switching chip needs to properly schedule the sending timing of each data packet. In existing distributed scheduling methods, the sender sends a request to the receiver, and the receiver determines how much data it can still receive based on its remaining buffer, thus selectively returning a grant. Only after receiving the grant is the sender allowed to send the corresponding amount of data.

[0004] However, the above method is essentially a form of "static pre-allocation." A certain amount of time is consumed between the receiver returning the Grant and the receiver completing the buffering of the sender's data. During this time, the buffer allocated to the sender by the receiver is not fully utilized; in fact, this buffer may be empty during the Grant's transmission. This results in a situation where the receiver has reserved buffer space for the sender, but this buffer space is actually in an idle state, leading to a waste of buffer resources and low data transmission efficiency. Summary of the Invention

[0005] This invention provides a distributed scheduling method, apparatus, and switching chip for data in a switching chip, in order to improve the data transmission efficiency of the switching chip.

[0006] This invention provides a distributed scheduling method for data in a switching chip, comprising the following steps: In response to a cross-port transmission request from transmitting port i to receiving port j in the switching chip, the load parameters of the transmission link ij are determined based on the monitoring data of the transmission link ij, wherein the transmission link ij is the transmission link from the transmitting port i to the receiving port j, and the load parameters of the transmission link ij represent the data lag status on the transmission link ij. The target data amount is obtained by determining the amount of data allocated to the sending port i based on the load parameters of the transmission link ij. Configure the amount of data to be transmitted across ports from the sending port i to the receiving port j based on the target data volume.

[0007] According to a distributed scheduling method for data in a switching chip provided by the present invention, the step of determining the load parameters of the transmission link ij based on monitoring data of the transmission link ij in response to a cross-port transmission request from transmitting port i to receiving port j in the switching chip includes: In response to a cross-port transmission request from a transmitting port i to a receiving port j in a switching chip, the amount of data sent from the transmitting port i to the receiving port j is obtained to obtain a first data amount, and the amount of data sent from the receiving port j to the outside of the switching chip is obtained to obtain a second data amount, wherein the monitoring data includes the first data amount and the second data amount, and the first data is the data sent from the transmitting port i to the receiving port j; Calculate the difference between the first data volume and the second data volume to obtain the load parameters of the transmission link ij from the sending port i to the receiving port j.

[0008] According to a distributed scheduling method for data in a switching chip provided by the present invention, the method determines the amount of data allocated to the transmitting port i based on the load parameters of the transmission link ij to obtain the target data amount, including: Obtain the basic delay of the transmission link ij and the forwarding rate of the receiving port j for sending the first data, and calculate the capacity of the transmission link ij based on the basic delay and the forwarding rate; The first remaining load of the transmission link ij is calculated based on the load threshold, load parameters and capacity of the transmission link ij; The target data amount is obtained by determining the amount of data allocated to the sending port i based on the first remaining load amount.

[0009] According to a distributed scheduling method for data in a switching chip provided by the present invention, the method includes obtaining the basic delay of the transmission link ij and the forwarding rate of the receiving port j for transmitting first data, and calculating the capacity of the transmission link ij based on the basic delay and the forwarding rate, comprising: For the amount of data sent by the receiving port j as the first data, the forwarding rate is obtained by solving its derivative with respect to time. Obtain the basic delay of the transmission link ij, and calculate the capacity of the transmission link ij by multiplying the basic delay of the transmission link ij by the forwarding rate.

[0010] According to a distributed scheduling method for data in a switching chip provided by the present invention, the first remaining load of the transmission link ij is calculated based on the load threshold, load parameters, and capacity of the transmission link ij, including: The overload of transmission link ij is obtained by calculating the difference between the load parameter of the transmission link ij and the capacity. The first remaining load of the transmission link ij is obtained by calculating the difference between the load threshold of the transmission link ij and the overload amount.

[0011] According to a distributed scheduling method for data in a switching chip provided by the present invention, the method determines the amount of data allocated to the transmitting port i based on the first remaining load to obtain the target data amount, including: The third data amount is obtained by obtaining the amount of data requested in the cross-port transmission request; If the third data amount is less than or equal to the first remaining load amount, the target data amount allocated to the sending port i is determined to be the third data amount. If the third data volume is greater than the first remaining load volume, the target data volume allocated to the sending port i is determined to be either the first remaining load volume or zero.

[0012] According to a distributed scheduling method for data in a switching chip provided by the present invention, the data volume of cross-port transmission from the sending port i to the receiving port j is configured based on the target data volume, including: The data transmission rate is calculated based on the target data volume and the control loop delay of the transmission link ij. Based on the data transmission rate, authorization tokens are continuously injected into the token bucket in the time dimension, and the amount of data sent from the sending port i to the receiving port j is configured based on the authorization tokens in the token bucket. The method further includes: Before all the authorization tokens corresponding to the target data volume are injected into the token bucket, if the sending port i obtains a new authorization, then all the remaining authorization tokens for the target data volume are stored in the token bucket.

[0013] According to a distributed scheduling method for data in a switching chip provided by the present invention, the method further includes: Obtain the bandwidth-delay product of the transmission link ij, wherein the bandwidth-delay product is equal to the product of the control loop delay of the transmission link ij and its link line speed; The fourth data quantity is determined based on the bandwidth-delay product, and a request pool of the fourth data quantity size is allocated to the transmission link ij. The fourth data quantity is greater than or equal to the bandwidth-delay product of the transmission link ij. The total size of the request pools of each transmission link in the switching chip is equal to the total buffer space in the switching chip used to store request signals. The request pool is used to buffer the cross-port transmission request.

[0014] According to a distributed scheduling method for data in a switching chip provided by the present invention, the step of determining the load parameters of the transmission link ij based on monitoring data of the transmission link ij in response to a cross-port transmission request from transmitting port i to receiving port j in the switching chip includes: In response to a cross-port transmission request from sending port i to receiving port j in the switching chip, the value of the congestion flag bit of the data packet transmitted in the transmission link ij is obtained. The monitoring data includes the value of the congestion flag bit. During the transmission of the data packet, when the queuing time of the data packet at each node in the transmission link ij is less than a preset time threshold, the value of the congestion flag bit of the data packet is a first value; otherwise, the value of the congestion flag bit of the data packet is a second value. Based on the value of the congestion flag bit, the load parameters of the transmission link ij are determined, wherein the load parameters indicate whether there is data congestion or delay in the data retention situation on the transmission link ij; The step of determining the amount of data allocated to the sending port i based on the load parameters of the transmission link ij to obtain the target data amount includes: If the load parameter indicates that there is data congestion on the transmission link ij, the target data amount allocated to the sending port i is determined to be zero. If the load parameter indicates that there is no data congestion or delay on the transmission link ij, the target data amount allocated to the sending port i is determined to be the third data amount, wherein the third data amount is the data amount requested by the cross-port transmission request.

[0015] According to a distributed scheduling method for data in a switching chip provided by the present invention, the step of determining the load parameters of the transmission link ij based on monitoring data of the transmission link ij in response to a cross-port transmission request from transmitting port i to receiving port j in the switching chip includes: In response to a cross-port transmission request from transmit port i to receive port j in a switching chip, the transmission delay of the data packet in the transmission link ij is obtained, wherein the monitoring data includes the transmission delay; The transmission delay of the data packet is quantized into the load parameter of the transmission link ij according to the first mapping relationship, wherein the first mapping relationship is a mapping relationship between transmission delay and load parameter; or, the delay growth parameter of the transmission link ij is calculated based on the transmission delay of the data packet, and the delay growth parameter is mapped into the load parameter according to the second mapping relationship, wherein the second mapping relationship is a mapping relationship between delay growth parameter and load parameter. The step of determining the amount of data allocated to the sending port i based on the load parameters of the transmission link ij to obtain the target data amount includes: The second remaining load is obtained by calculating the difference between the load threshold and the load parameter of the transmission link ij; The third data amount is obtained by obtaining the amount of data requested in the cross-port transmission request; If the third data amount is less than or equal to the second remaining load amount, the target data amount allocated to the sending port i is determined to be the third data amount; If the third data volume is greater than the second remaining load volume, the target data volume allocated to the sending port i is determined to be either the second remaining load volume or zero.

[0016] The present invention also provides a distributed scheduling device for data in a switching chip, comprising the following modules: The load parameter determination module is used to respond to the cross-port transmission request from the sending port i to the receiving port j in the switching chip, and determine the load parameter of the transmission link ij based on the monitoring data of the transmission link ij, wherein the transmission link ij is the transmission link from the sending port i to the receiving port j, and the load parameter of the transmission link ij indicates the data lag status on the transmission link ij. The target data volume determination module is used to determine the amount of data allocated to the sending port i based on the load parameters of the transmission link ij to obtain the target data volume; The data configuration module is used to configure the amount of data transmitted across ports from the sending port i to the receiving port j based on the target data amount.

[0017] The present invention also provides a switching chip, comprising: The monitor is used to monitor the data retention status of the transmission link ij from the sending port i to the receiving port j, and obtain monitoring data. A distributor, in response to a cross-port transmission request from transmit port i to receive port j in a switching chip, determines the load parameters of the transmission link ij based on the monitoring data, wherein the load parameters of the transmission link ij represent the data lag on the transmission link ij; and determines the amount of data to be allocated to the transmit port i based on the load parameters of the transmission link ij to obtain the target data amount. A regulator is configured to configure the amount of data transmitted across ports from the sending port i to the receiving port j based on the target data amount.

[0018] According to a switching chip provided by the present invention, the monitor and the distributor are located at the receiving end of the switching chip, and the regulator is located at the transmitting end of the switching chip; or, the distributor is located at the receiving end of the switching chip, and the monitor and the regulator are located at the transmitting end of the switching chip; or, the distributor, the monitor and the regulator are all located at the transmitting end of the switching chip.

[0019] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a distributed scheduling method for data in a switching chip as described above.

[0020] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements a distributed scheduling method for data in a switching chip as described above.

[0021] The distributed scheduling method, apparatus, and switching chip for data in a switching chip provided by this invention, in response to a cross-port transmission request from sending port i to receiving port j in the switching chip, determines the load parameters of transmission link ij based on monitoring data of transmission link ij, where transmission link ij is the transmission link from sending port i to receiving port j, and the load parameters of transmission link ij represent the data lag on transmission link ij; determines the amount of data allocated to sending port i based on the load parameters of transmission link ij to obtain the target data amount; and configures the amount of cross-port data transmitted from sending port i to receiving port j based on the target data amount. The load parameters represent the data lag on the transmission link. Determining the target data amount allocated to the sending port using the load parameters considers the actual data lag on the entire transmission link. Compared with the prior art, which only considers the buffer capacity at the receiving port, this invention breaks away from the mode of using the receiving port buffer as the sole criterion, fully considering how much data is currently "running" on the transmission link, thereby determining how much more data can run on the transmission link. This allows for more efficient use of the resources of the entire transmission link, reduces the waste of buffer resources, and thus improves the data transmission efficiency of the switching chip. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0023] Figure 1 This is one of the flowcharts illustrating the distributed scheduling method for data in a switching chip provided by the present invention; Figure 2 This is the second flowchart illustrating the distributed scheduling method for data in the switching chip provided by the present invention. Figure 3 This is the third flowchart illustrating the distributed scheduling method for data in the switching chip provided by the present invention; Figure 4 This is a schematic diagram of a possible implementation of step S103 in the distributed scheduling method for data in the switching chip provided by the present invention; Figure 5 This is a schematic diagram comparing the performance of typical traffic patterns under different scheduling methods provided by this invention; Figure 6 This is a schematic diagram of the cumulative distribution function under different scheduling methods provided by the present invention; Figure 7 This is a schematic diagram of the structure of the distributed scheduling device for data in the switching chip provided by the present invention; Figure 8 This is a schematic diagram of the switching chip provided by the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0025] Typical scheduling mechanisms in switching chips fall into two main categories: centralized and distributed. Centralized mechanisms transform scheduling into a matching problem, obtaining and matching the forwarding requests of each port to ensure that multiple input ports do not simultaneously send data to a single output port. Distributed mechanisms, on the other hand, often avoid conflicts in a decentralized manner. Each sending end sends a request to the receiving end, which selectively returns authorization based on local information. Only after receiving authorization is the sending end allowed to send a certain amount of data.

[0026] As the scale of switching chips expands, existing scheduling mechanisms face new challenges. The complexity of centralized scheduling mechanisms increases superlinearly with the number of ports, which means greater implementation overhead and higher scheduling latency, making them more difficult to deploy in large-scale switching chips and less able to meet the high throughput and low latency requirements of switching chips.

[0027] Existing distributed scheduling mechanisms cannot fully address the new challenges brought about by the scaling of switching chips: the switching fabric is no longer non-blocking, and conflicts between forwarded traffic may occur within the switching fabric itself, rather than just at the output ports. Existing request-grant scheduling mechanisms only focus on output-end conflicts, failing to recognize conflicts within the switching fabric and only considering output-end buffer usage, thus ignoring the overall data throughput of the link and resulting in low data transmission efficiency. Furthermore, the varying physical distances between ports lead to differences in control signal transmission delays, resulting in asymmetric control loops. Closer ports can send requests and receive grants more frequently, thus gaining an advantage in competition with more distant ports. This affects scheduling fairness and even risks starving some ports.

[0028] To address at least one of the aforementioned problems, the present invention provides a distributed scheduling method, apparatus, and switching chip for data in a switching chip, which are described below in conjunction with... Figures 1 to 8 Please provide a detailed explanation.

[0029] Figure 1 This is one of the flowcharts illustrating the distributed scheduling method for data in a switching chip provided by the present invention, such as... Figure 1 As shown, the method includes the following steps: S101, in response to a cross-port transmission request from sending port i to receiving port j in the switching chip, the load parameters of the transmission link ij are determined based on the monitoring data of the transmission link ij, wherein the transmission link ij is the transmission link from the sending port i to the receiving port j, and the load parameters of the transmission link ij indicate the data lag status on the transmission link ij.

[0030] In this invention, the sending port and receiving port refer to the internal data transmission of the switching chip. The sending port receives data sent from outside the switching chip and sends the data from inside the switching chip to the receiving port, which then sends the data to the outside of the switching chip. Sending port i is any sending port in the switching chip, and receiving port j is any receiving port in the switching chip. When sending port i needs to send data to receiving port j, sending port i generates a cross-port transmission request for receiving port j.

[0031] The entire link from transmitting port i to receiving port j in a switching chip is called transmission link ij. Transmission link ij includes not only transmitting port i and receiving port j, but also all nodes between them on the entire link. Both the load parameter and monitoring data of transmission link ij can represent the data congestion status on transmission link ij. The difference lies in that the monitoring data is the raw data obtained from transmission link ij to represent the data congestion status; while the load parameter is quantized data obtained from the monitoring data to represent the data congestion status. In one example, if the monitoring data of transmission link ij includes the transmission delay of transmission link ij, then the load parameter can be the amount of overloaded data on transmission link ij obtained by quantizing the transmission delay. In another example, if the monitoring data of transmission link ij includes the first amount of data sent from transmitting port i to receiving port j and the second amount of data sent externally by transmission link ij, then the load parameter can be the amount of data congested on transmission link ij (first data amount - second data amount). In yet another example, if the monitoring data of transmission link ij includes the value of the congestion flag bit of the data packet, then the load parameter can indicate whether link congestion has occurred on transmission link ij.

[0032] S102, determine the amount of data allocated to the sending port i based on the load parameters of the transmission link ij to obtain the target data amount.

[0033] Based on the data volume requested in the cross-port transfer request and the load parameters, the target data volume is determined by allocating it to sending port i. The target data volume allocated to sending port i is negatively correlated with the data congestion level; the more severe the data congestion, the smaller the target data volume allocated to sending port i, and vice versa. Furthermore, it must be ensured that the target data volume allocated to sending port i does not exceed the data volume requested in the cross-port transfer request.

[0034] S103, configure the amount of cross-port data transmission from the sending port i to the receiving port j based on the target data amount.

[0035] The amount of data that the sending port i can transmit to the receiving port j is configured based on the target data amount allocated to the sending port i, so that the sending port i can send data to the receiving port j based on the configured data amount.

[0036] In this embodiment of the invention, the load parameter represents the data latency on the transmission link. Using the load parameter to determine the target data amount allocated to the sending port considers the actual data latency across the entire transmission link. Compared to existing technologies that only consider the buffer capacity at the receiving end, this fully considers how much data is currently "running" on the transmission link, thus determining how much more data can be processed. This allows for more efficient use of the entire transmission link's resources, reduces wasted buffer resources, and improves the data transmission efficiency of the switching chip. Furthermore, this embodiment of the invention implements distributed scheduling using the transmission link as the basic scheduling unit. Compared to centralized scheduling mechanisms, this is applicable to large-scale scheduling scenarios with a large number of ports.

[0037] exist Figure 1 Based on the illustrated embodiments, in one possible implementation, see [link to relevant documentation]. Figure 2 Step S101, in response to a cross-port transmission request from transmit port i to receive port j in the switching chip, determines the load parameters of the transmission link ij based on monitoring data of the transmission link ij, including: S1011, in response to a cross-port transmission request from sending port i to receiving port j in the switching chip, the amount of data sent by sending port i to receiving port j is obtained to obtain a first data amount, and the amount of data sent by receiving port j to the outside of the switching chip is obtained to obtain a second data amount, wherein the monitoring data includes the first data amount and the second data amount, and the first data is the data sent by sending port i to receiving port j.

[0038] In one example, a counter can be maintained at both the sending port i and the receiving port j. The counter at the sending port i records the amount of data sent from the sending port i to the receiving port j, denoted as I. i,j (First data volume); The counter at the transmit / receive port j is used to record the amount of the first data sent from the receive port j to the outside of the switching chip, denoted as 0. i,j (Second data volume), where the first data is the data sent from the sending port i to the receiving port j, that is, the first data is the data sent from the transmission link ij to the outside of the link.

[0039] S1012, calculate the difference between the first data volume and the second data volume to obtain the load parameters of the transmission link ij from the sending port i to the receiving port j.

[0040] Subtracting the second data amount from the first data amount yields the current amount of data remaining on transmission link ij, which is the load parameter L of transmission link ij. i,j For: L i,j =I i,j - O i,j.

[0041] In this embodiment of the invention, by calculating the difference between the input data and the output data of the transmission link ij, the amount of data remaining on the entire transmission link ij can be accurately expressed. This takes into account the actual data retention situation on the entire transmission link. Compared with the prior art method where the receiving end allocates buffers before informing the transmission, this fully considers how much data is "running" on the transmission link, thereby determining how much data can still run on the transmission link, reducing the waste of buffer resources, and thus improving the data transmission efficiency of the switching chip.

[0042] exist Figure 2 Based on the illustrated embodiments, in one possible implementation, see [link to relevant documentation]. Figure 3 Step S102 determines the amount of data allocated to the sending port i based on the load parameters of the transmission link ij to obtain the target data amount, including: S1021, obtain the basic delay of the transmission link ij and the forwarding rate of the receiving port j for sending the first data, and calculate the capacity of the transmission link ij based on the basic delay and the forwarding rate.

[0043] The fundamental delay, also known as propagation delay or channel delay, refers to the time it takes for a data signal to travel through the physical medium. It is only related to the transmission distance and the speed of data signal propagation in the physical medium. The forwarding rate of the first data transmitted by receiving port j refers to the amount of the first data transmitted by receiving port j to the outside of the switching chip per unit time.

[0044] Based on the base delay and forwarding rate of transmission link ij, the allowable capacity of transmission link ij (how much data can be held in transmission link ij without considering buffering) can be calculated. In one example, step S1021 calculates the capacity of transmission link ij based on the base delay of transmission link ij and the forwarding rate at which the receiving port j transmits the first data, including: Step A1: For the amount of first data sent by the receiving port j, calculate its derivative with respect to time to obtain the forwarding rate.

[0045] Forwarding rate r of transmission link ij i,j r i,j =dO i,j / dt.

[0046] Step A2: Calculate the capacity of the transmission link ij by multiplying the basic delay of the transmission link ij by the forwarding rate.

[0047] The capacity C of transmission link ij i,j For: C i,j=r i,j ×D i,j ; where D i,j The fundamental delay of transmission link ij is determined solely by the physical properties of transmission link ij and is independent of whether transmission link ij is congested. Typically, the fundamental delay of transmission link ij is the ratio of the length of transmission link ij to the signal transmission speed.

[0048] S1022, the first remaining load of the transmission link ij is calculated based on the load threshold, load parameters and capacity of the transmission link ij.

[0049] The load threshold of transmission link ij is the upper limit of the amount of extra data that transmission link ij can handle, and it can be set according to the actual extra load capacity of transmission link ij. The load threshold is positively correlated with the buffer size of transmission link ij. The larger the buffer of transmission link ij, the larger the amount of extra data that transmission link ij can handle, and the larger the load threshold will be.

[0050] Based on the load threshold, load parameters, and capacity of transmission link ij, the remaining load of transmission link ij, i.e., the first remaining load, can be calculated. In one example, step S1022, calculating the first remaining load of transmission link ij based on its load threshold, load parameters, and capacity, includes: Step B1: Calculate the difference between the load parameter of the transmission link ij and the capacity to obtain the overload of the transmission link ij.

[0051] The load parameter of transmission link ij indicates the amount of data that is retained in transmission link ij. For example, the load parameter L of transmission link ij... i,j For: L i,j =I i,j - O i,j , among which, I i,j For the first data volume, O i,j Let G be the second data volume. Then the overload G of transmission link ij is... i,j For: G i,j =L i,j - C i,j .

[0052] Step B2: Calculate the difference between the load threshold of the transmission link ij and the overload amount to obtain the first remaining load of the transmission link ij.

[0053] The overload of transmission link ij represents the amount of data stored in the buffer of transmission link ij. Subtracting the overload from the load threshold of transmission link ij yields the remaining load of transmission link ij, i.e., the first remaining load. The first remaining load Si,j For: S i,j =ρ i,j -G i,j , where ρ i,j This represents the load threshold for transmission link ij.

[0054] S1023, determine the amount of data allocated to the transmitting port i based on the first remaining load amount to obtain the target data amount.

[0055] The first remaining load of transmission link ij represents how much data can still be accommodated in the entire transmission link ij. The target amount of data that can be used can be allocated to the sending port i based on the first remaining load. The target amount of data cannot be greater than the first remaining load.

[0056] Target data volume θ p It can be: θ p =min(θ) q S i,j ), where θ q The amount of data requested for a cross-port transmission request. In one example, step S1023, determining the amount of data allocated to the sending port i based on the first remaining load to obtain the target data amount, includes: Step C1: Obtain the amount of data requested by the cross-port transmission request to obtain the third data amount.

[0057] Step C2: If the third data amount is less than or equal to the first remaining load amount, determine the target data amount to be allocated to the sending port i as the third data amount.

[0058] Step C3: If the third data volume is greater than the first remaining load volume, determine that the target data volume allocated to the sending port i is either the first remaining load volume or zero.

[0059] In this embodiment, by calculating the first remaining load of transmission link ij using the load threshold, load parameters, and capacity of transmission link ij, the amount of data that the entire transmission link ij can still accommodate can be accurately obtained, thereby more accurately configuring the target data amount of sending port i to improve the data transmission efficiency of the switching chip.

[0060] In addition to monitoring the first and second data volumes, other link status monitoring mechanisms can be used. For example, explicit congestion notification (ECN), delay monitoring, and in-band network telemetry (INT) can be used to detect data congestion within the transmission link.

[0061] When using ECN to acquire monitoring data, Figure 1 Based on the illustrated embodiment, in one possible implementation, step S101, in response to a cross-port transmission request from transmit port i to receive port j in the switching chip, determines the load parameters of the transmission link ij based on monitoring data of the transmission link ij, including: Step D1: In response to the cross-port transmission request from sending port i to receiving port j in the switching chip, obtain the value of the congestion flag bit of the data packet transmitted in transmission link ij. The monitoring data includes the value of the congestion flag bit. During the transmission of the data packet, when the queuing time of the data packet at each node in the transmission link ij is less than a preset time threshold, the value of the congestion flag bit of the data packet is a first value; otherwise, the value of the congestion flag bit of the data packet is a second value.

[0062] A congestion flag (default value 0) is maintained in the data packet. When the data packet is transmitted in the transmission link ij, if a hop queue exceeds the threshold, the congestion flag will be set to 1.

[0063] Step D2: Determine the load parameters of the transmission link ij based on the value of the congestion flag bit, wherein the load parameters indicate whether there is data congestion or delay in the data retention situation on the transmission link ij.

[0064] When a data packet arrives at receiving port j, the network status can be determined by the status of the congestion flag (1 indicates that there is data congestion in the link).

[0065] Step S102 determines the amount of data allocated to the transmitting port i based on the load parameters of the transmission link ij to obtain the target data amount, including: Step D3: If the load parameter indicates that there is data congestion on the transmission link ij, determine that the target data amount allocated to the sending port i is zero.

[0066] Step D4: If the load parameters indicate that there is no data congestion or delay on the transmission link ij, the target data amount allocated to the sending port i is determined to be the third data amount, wherein the third data amount is the data amount requested by the cross-port transmission request.

[0067] In this embodiment, the target data volume is allocated based on whether the transmission link ij is congested or delayed, which fully considers the data capacity of the entire transmission link ij. Compared with the prior art, which only considers the buffer capacity at the exit point, this can improve the data transmission efficiency of the switching chip.

[0068] When using delayed monitoring and INT methods to acquire monitoring data, Figure 1Based on the illustrated embodiment, in one possible implementation, step S101, in response to a cross-port transmission request from transmit port i to receive port j in the switching chip, determines the load parameters of the transmission link ij based on monitoring data of the transmission link ij, including: Step E1: In response to a cross-port transmission request from transmit port i to receive port j in the switching chip, the transmission delay of the data packet in the transmission link ij is obtained. The monitoring data includes the transmission delay.

[0069] The data packet carries a timestamp, recording its transmission time. When receiving a data packet, receiving port j calculates the transmission delay based on the current time and the transmission time.

[0070] Step E2: Quantize the transmission delay of the data packet into the load parameter of the transmission link ij according to the first mapping relationship, wherein the first mapping relationship is the mapping relationship between transmission delay and load parameter; or, calculate the delay growth parameter of the transmission link ij based on the transmission delay of the data packet, and map the delay growth parameter into the load parameter according to the second mapping relationship, wherein the second mapping relationship is the mapping relationship between delay growth parameter and load parameter.

[0071] The first and second mapping relationships can be mapping functions used to quantify transmission delay or late growth parameters into load parameters, i.e. how much data is currently overloaded on the transmission link, thus facilitating subsequent calculations.

[0072] Step S102 determines the amount of data allocated to the transmitting port i based on the load parameters of the transmission link ij to obtain the target data amount, including: Step E3: Calculate the difference between the load threshold and the load parameter of the transmission link ij to obtain the second remaining load.

[0073] Step E4: Obtain the amount of data requested by the cross-port transmission request to obtain the third data amount.

[0074] Step E5: If the third data amount is less than or equal to the second remaining load amount, determine the target data amount to be allocated to the sending port i as the third data amount.

[0075] Step E6: If the third data volume is greater than the second remaining load volume, determine that the target data volume allocated to the sending port i is either the second remaining load volume or 0.

[0076] In this embodiment, the transmission delay of the entire transmission link ij is quantified into a load parameter to determine the target data amount allocated to the sending port i. This fully considers the data capacity of the entire transmission link ij, which, compared to the prior art which only considers the buffer capacity at the exit point, can improve the data transmission efficiency of the switching chip.

[0077] exist Figures 1-3 Based on any of the illustrated embodiments, in one possible implementation, see [link to relevant documentation]. Figure 4 Step S103 configures the data volume of cross-port transmission from the sending port i to the receiving port j based on the target data volume, including: S1031, calculate the data transmission rate based on the target data volume and the control loop delay of the transmission link ij.

[0078] When transmitting port i receives authorization for the target data amount, it does not immediately transmit the target data amount at linear speed. Instead, it distributes the target data amount over the duration of the control loop delay. In one example, the data transmission rate can be obtained by calculating the ratio of the target data amount to the control loop delay of the transmission link ij.

[0079] S1032, based on the data transmission rate, the authorization token is continuously injected into the token bucket in the time dimension, and the amount of data sent from the sending port i to the receiving port j is configured based on the authorization token in the token bucket.

[0080] Maintaining a token bucket corresponding to transmission link ij at sending port i allows the control loop delay to be divided into multiple time units, with each time unit serving as the basic processing unit for data transmission. Based on the transmission rate and the time unit, the number of authorized tokens consumed within each time unit (hereinafter referred to as the target number) can be obtained. In the time dimension, the target number of authorized tokens is injected into the token bucket every time a unit of time elapses. Thus, sending port i can obtain the target number of authorized tokens from the token bucket within each time unit to send data to receiving port j.

[0081] If network jitter or other factors cause a new authorization to be obtained before the authorization tokens corresponding to the target data volume are used up, the method further includes: before all the authorization tokens corresponding to the target data volume are injected into the token bucket, if the sending port i obtains a new authorization, then all the remaining authorization tokens of the target data volume are stored in the token bucket.

[0082] The remaining authorization tokens for the target data volume are those tokens that have not yet been injected into the token bucket. Storing all remaining authorization tokens into the token bucket allows sending port i to acquire a large number of authorization tokens at once, thus enabling the transmission of the target data volume at a linear speed and reducing data congestion.

[0083] In this embodiment of the invention, the flexibility and burst processing capability of the transmission link are maximized while ensuring compliance with long-term average rate, thereby improving the transmission efficiency of data transmission.

[0084] To address the issue of potentially large asymmetric delays in the control loop, the request and authorization signals can be modulated separately. Figures 1-4 Based on any of the illustrated embodiments, in one possible implementation, the method further includes: Step F1: Obtain the bandwidth-delay product of the transmission link ij, wherein the bandwidth-delay product is equal to the product of the control loop delay of the transmission link ij and its link line speed.

[0085] Among them, the link line speed of transmission link ij refers to the maximum forwarding rate allowed by transmission link ij.

[0086] Step F2: Determine the fourth data quantity based on the bandwidth-delay product, and allocate a request pool of the fourth data quantity size to the transmission link ij, wherein the fourth data quantity is greater than or equal to the bandwidth-delay product of the transmission link ij, and the total size of the request pools of each transmission link in the switching chip is equal to the total buffer space in the switching chip used to store request signals.

[0087] For transmission link ij, the request to send port i is allocated from a request pool. Before a cross-port transmission request is sent, it is cached in the cache pool. Sending port i retrieves the cross-port transmission request from the cache pool and sends it. The total size of the request pools for all transmission links in the switching chip is equal to the total cache space used to store request signals in the switching chip. ; Where S is the size of the total buffer space in the switching chip used to store request signals. This represents the size of the request pool corresponding to transmission link ij. ,in, For the control loop delay of transmission link ij, Let be the link line speed of transmission link ij.

[0088] In this embodiment of the invention, it can be ensured that within the control loop delay time, the sending port has enough request signals to send continuously, thereby maintaining the full bandwidth utilization of the link, reducing the risk of port starvation, and improving the data transmission efficiency of the switching chip.

[0089] Using the industry-recognized simulation tool BookSim2, the above... Figure 3 + Figure 4 The distributed data scheduling method in the switching chip shown in this invention was tested for performance. The experiment simulated a switching chip consisting of four chips, providing 32 input-output ports. Each chip uses a 4x4 two-dimensional mesh topology. The distributed data scheduling method in the switching chip of this invention was compared with existing industry scheduling schemes: Iterative Scheduler with Lookback and Priority (iSLIP), Parallel Iterative Matching (PIM), Maximum Size Matching (MaxSize), Wavefront Scheduler, and None. The comparison results are as follows: Figure 5 and Figure 6 As shown, where, Figure 5 Uniform, random, reversed, and permuted represent various typical network traffic patterns. Uniform: Each sending port sends traffic evenly to each receiving port. Random: Each sending port randomly selects a receiving port, sends data for a random duration, then randomly selects another, and so on. Reversed: Each sending port selects a port mirrored by its topology and continuously sends data; here, topology refers to the topology of the switching structure. Permuted: A random permutation P of the sequence 1, 2, ..., N (e.g., 1, 2, 3, 4 -> 2, 1, 4, 3) is generated, and sending port i sends data to receiving port P[i] (in the above example, 1 to 2, 2 to 1, 3 to 4, 4 to 3).

[0090] from Figure 5 As can be seen, for large-scale switching chip scenarios, under various typical traffic modes, compared with existing solutions, the distributed scheduling method for data in switching chips proposed in this invention has lower latency and higher throughput, which can effectively improve the overall performance of chip switching.

[0091] Figure 6 The cumulative distribution function (CDF) in a random variable is a function that describes the probability that the value of the random variable is less than or equal to a certain value. Figure 6It can be seen that, under heavy load scenarios, the distributed scheduling method for data in the switching chip proposed in this invention has significantly better latency performance than other existing solutions, with p75 and p99.9 quantiles reduced by 77.5% and 40.3%, respectively.

[0092] The distributed scheduling device for data in a switching chip provided by the present invention is described below. The distributed scheduling device for data in a switching chip described below can be referred to in correspondence with the distributed scheduling method for data in a switching chip described above.

[0093] See Figure 7 , Figure 7 This is a schematic diagram of a distributed scheduling device for data exchange in a switching chip according to an embodiment of this application, including: The load parameter determination module 701 is used to respond to a cross-port transmission request from the sending port i to the receiving port j in the switching chip, and determine the load parameter of the transmission link ij based on the monitoring data of the transmission link ij, wherein the transmission link ij is the transmission link from the sending port i to the receiving port j, and the load parameter of the transmission link ij indicates the data lag status on the transmission link ij.

[0094] The target data volume determination module 702 is used to determine the amount of data allocated to the sending port i based on the load parameters of the transmission link ij to obtain the target data volume.

[0095] The data configuration module 703 is used to configure the amount of data transmitted across ports from the sending port i to the receiving port j based on the target data amount.

[0096] In one possible implementation, the load parameter determination module 701 is specifically configured to: in response to a cross-port transmission request from a transmitting port i to a receiving port j in a switching chip, obtain a first data volume by acquiring the amount of data sent from the transmitting port i to the receiving port j, and obtain a second data volume by acquiring the amount of data of the first data sent from the receiving port j to the outside of the switching chip, wherein the monitoring data includes the first data volume and the second data volume, the first data being the data sent from the transmitting port i to the receiving port j; calculate the difference between the first data volume and the second data volume to obtain the load parameters of the transmission link ij from the transmitting port i to the receiving port j.

[0097] In one possible implementation, the target data volume determination module 702 is specifically used to: obtain the basic delay of the transmission link ij and the forwarding rate of the receiving port j for sending the first data; calculate the capacity of the transmission link ij based on the basic delay and the forwarding rate; calculate the first remaining load of the transmission link ij based on the load threshold, load parameters and capacity of the transmission link ij; and determine the amount of data allocated to the sending port i based on the first remaining load to obtain the target data volume.

[0098] In one possible implementation, the target data volume determination module 702 is specifically used to: calculate the forwarding rate by solving the time derivative of the data volume of the first data sent by the receiving port j; obtain the basic delay of the transmission link ij; and calculate the capacity of the transmission link ij by multiplying the basic delay of the transmission link ij by the forwarding rate.

[0099] In one possible implementation, the target data volume determination module 702 is specifically used to: calculate the difference between the load parameter of the transmission link ij and the capacity to obtain the overload of the transmission link ij; and calculate the difference between the load threshold of the transmission link ij and the overload to obtain the first remaining load of the transmission link ij.

[0100] In one possible implementation, the target data volume determination module 702 is specifically configured to: obtain the data volume requested by the cross-port transmission request to obtain a third data volume; if the third data volume is less than or equal to the first remaining load, determine the target data volume allocated to the sending port i as the third data volume; if the third data volume is greater than the first remaining load, determine the target data volume allocated to the sending port i as the first remaining load or as zero.

[0101] In one possible implementation, the data configuration module 703 is specifically used to: calculate the data transmission rate based on the target data volume and the control loop delay of the transmission link ij; continuously inject authorization tokens into the token bucket in the time dimension based on the data transmission rate; and configure the data volume of the data sent from the sending port i to the receiving port j based on the authorization tokens in the token bucket. The device further includes a token processing module, which, before all the authorization tokens corresponding to the target data volume are injected into the token bucket, stores all the remaining authorization tokens of the target data volume into the token bucket if the sending port i obtains a new authorization.

[0102] In one possible implementation, the apparatus further includes: a request pool allocation module, configured to obtain the bandwidth-delay product of the transmission link ij, wherein the bandwidth-delay product is equal to the product of the control loop delay and the link line speed of the transmission link ij; determine a fourth data quantity based on the bandwidth-delay product, and allocate a request pool of the fourth data quantity size to the transmission link ij, wherein the fourth data quantity is greater than or equal to the bandwidth-delay product of the transmission link ij, the total size of the request pools of each transmission link in the switching chip is equal to the size of the total buffer space in the switching chip used to store request signals, and the request pool is used to buffer the cross-port transmission request.

[0103] In one possible implementation, the load parameter determination module 701 is specifically configured to: in response to a cross-port transmission request from sending port i to receiving port j in the switching chip, obtain the value of the congestion flag bit of the data packet transmitted in the transmission link ij, wherein the monitoring data includes the value of the congestion flag bit, and during the transmission of the data packet, when the queuing time of the data packet at each node in the transmission link ij is less than a preset time threshold, the value of the congestion flag bit of the data packet is a first value; otherwise, the value of the congestion flag bit of the data packet is a second value; and determine the load parameter of the transmission link ij based on the value of the congestion flag bit, wherein the load parameter indicates whether there is data congestion in the data stagnation situation on the transmission link ij. The target data volume determination module 702 is specifically used to: determine that the target data volume allocated to the sending port i is zero when the load parameter indicates that there is data congestion on the transmission link ij; and determine that the target data volume allocated to the sending port i is a third data volume when the load parameter indicates that there is no data congestion on the transmission link ij, wherein the third data volume is the data volume requested by the cross-port transmission request.

[0104] In one possible implementation, the load parameter determination module 701 is specifically configured to: in response to a cross-port transmission request from sending port i to receiving port j in the switching chip, obtain the transmission delay of the data packet in the transmission link ij, wherein the monitoring data includes the transmission delay; quantize the transmission delay of the data packet into a load parameter of the transmission link ij according to a first mapping relationship, wherein the first mapping relationship is a mapping relationship between the transmission delay and the load parameter; or, calculate the delay growth parameter of the transmission link ij based on the transmission delay of the data packet, and map the delay growth parameter to a load parameter according to a second mapping relationship, wherein the second mapping relationship is a mapping relationship between the delay growth parameter and the load parameter; The target data volume determination module 702 is specifically used for: calculating the difference between the load threshold and the load parameter of the transmission link ij to obtain a second remaining load volume; obtaining the data volume requested by the cross-port transmission request to obtain a third data volume; if the third data volume is less than or equal to the second remaining load volume, determining the target data volume allocated to the sending port i as the third data volume; if the third data volume is greater than the second remaining load volume, determining the target data volume allocated to the sending port i as the second remaining load volume or as zero.

[0105] This invention also provides a switching chip, see [link to relevant documentation]. Figure 8 ,include: Monitor 801 is used to monitor the data retention status of the transmission link ij from the sending port i to the receiving port j, and obtain monitoring data; Distributor 802 is used to respond to a cross-port transmission request from transmitting port i to receiving port j in the switching chip, determine the load parameters of the transmission link ij based on the monitoring data, wherein the load parameters of the transmission link ij represent the data lag on the transmission link ij; and determine the amount of data allocated to the transmitting port i based on the load parameters of the transmission link ij to obtain the target data amount. Regulator 803 is configured to configure the amount of data transmitted across ports from the sending port i to the receiving port j based on the target data amount.

[0106] Figure 8 In this example, the monitor 801 and the distributor 802 are located at the receiving end of the switching chip, and the regulator 803 is located at the transmitting end of the switching chip. In other possible embodiments, the distributor 802 may be located at the receiving end of the switching chip, and the monitor 801 and the regulator 803 may be located at the transmitting end of the switching chip; or, the distributor 802, the monitor 801, and the regulator 803 may all be located at the transmitting end of the switching chip.

[0107] In one possible implementation, the allocator 802 is specifically configured to: in response to a cross-port transmission request from a transmitting port i to a receiving port j in a switching chip, acquire the amount of data sent from the transmitting port i to the receiving port j to obtain a first data amount, and acquire the amount of data of the first data sent from the receiving port j to the outside of the switching chip to obtain a second data amount, wherein the monitoring data includes the first data amount and the second data amount, the first data being the data sent from the transmitting port i to the receiving port j; calculate the difference between the first data amount and the second data amount to obtain the load parameters of the transmission link ij from the transmitting port i to the receiving port j.

[0108] In one possible implementation, the allocator 802 is specifically configured to: obtain the basic delay of the transmission link ij and the forwarding rate of the receiving port j for sending the first data; calculate the capacity of the transmission link ij based on the basic delay and the forwarding rate; calculate the first remaining load of the transmission link ij based on the load threshold, load parameters and capacity of the transmission link ij; and determine the amount of data allocated to the sending port i based on the first remaining load to obtain the target data amount.

[0109] In one possible implementation, the allocator 802 is specifically configured to: calculate the forwarding rate by solving the time derivative of the amount of first data sent to the receiving port j; obtain the basic delay of the transmission link ij; and calculate the capacity of the transmission link ij by multiplying the basic delay of the transmission link ij by the forwarding rate.

[0110] In one possible implementation, the distributor 802 is specifically configured to: calculate the difference between the load parameter of the transmission link ij and the capacity to obtain the overload of the transmission link ij; and calculate the difference between the load threshold of the transmission link ij and the overload to obtain the first remaining load of the transmission link ij.

[0111] In one possible implementation, the allocator 802 is specifically configured to: obtain the amount of data requested by the cross-port transmission request to obtain a third data amount; if the third data amount is less than or equal to the first remaining load, determine the target data amount to be allocated to the sending port i as the third data amount; if the third data amount is greater than the first remaining load, determine the target data amount to be allocated to the sending port i as the first remaining load or as zero.

[0112] In one possible implementation, the regulator 803 is specifically configured to: calculate the data transmission rate based on the target data volume and the control loop delay of the transmission link ij; continuously inject authorization tokens into the token bucket in the time dimension based on the data transmission rate; and configure the data volume of data sent from the sending port i to the receiving port j based on the authorization tokens in the token bucket. The regulator 803 is further configured to: before all the authorization tokens corresponding to the target data volume are injected into the token bucket, if the sending port i obtains a new authorization, store all the remaining authorization tokens of the target data volume into the token bucket.

[0113] In one possible implementation, the allocator 802 is further configured to: obtain the bandwidth-delay product of the transmission link ij, wherein the bandwidth-delay product is equal to the product of the control loop delay of the transmission link ij and its link line speed; determine a fourth data quantity based on the bandwidth-delay product, and allocate a request pool of the fourth data quantity size to the transmission link ij, wherein the fourth data quantity is greater than or equal to the bandwidth-delay product of the transmission link ij, the total size of the request pools of each transmission link in the switching chip is equal to the size of the total buffer space in the switching chip used to store request signals, and the request pool is used to buffer the cross-port transmission request.

[0114] In one possible implementation, the allocator 802 is specifically configured to: in response to a cross-port transmission request from sending port i to receiving port j in the switching chip, obtain the value of the congestion flag bit of the data packet transmitted in the transmission link ij, wherein the monitoring data includes the value of the congestion flag bit, and during the transmission of the data packet, when the queuing time of the data packet at each node in the transmission link ij is less than a preset time threshold, the value of the congestion flag bit of the data packet is a first value; otherwise, the value of the congestion flag bit of the data packet is a second value; and determine the load parameter of the transmission link ij based on the value of the congestion flag bit, wherein the load parameter indicates whether there is data congestion in the data stagnation situation on the transmission link ij; The regulator 803 is specifically configured to: determine that the target data amount allocated to the sending port i is zero when the load parameters indicate that there is data congestion on the transmission link ij; and determine that the target data amount allocated to the sending port i is a third data amount when the load parameters indicate that there is no data congestion on the transmission link ij, wherein the third data amount is the data amount requested by the cross-port transmission request.

[0115] In one possible implementation, the allocator 802 is specifically configured to: in response to a cross-port transmission request from sending port i to receiving port j in the switching chip, acquire the transmission delay of a data packet in transmission link j, wherein the monitoring data includes the transmission delay; quantize the transmission delay of the data packet into a load parameter of the transmission link j according to a first mapping relationship, wherein the first mapping relationship is a mapping relationship between transmission delay and load parameter; or, calculate a delay growth parameter of the transmission link j based on the transmission delay of the data packet, and map the delay growth parameter to a load parameter according to a second mapping relationship, wherein the second mapping relationship is a mapping relationship between delay growth parameter and load parameter; The regulator 803 is specifically configured to: calculate the difference between the load threshold and the load parameter of the transmission link ij to obtain a second remaining load; obtain the data amount requested by the cross-port transmission request to obtain a third data amount; if the third data amount is less than or equal to the second remaining load, determine the target data amount allocated to the sending port i as the third data amount; if the third data amount is greater than the second remaining load, determine the target data amount allocated to the sending port i as the second remaining load.

[0116] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the distributed scheduling method for data in the switching chip provided by the above methods.

[0117] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a distributed scheduling method for data in a switching chip provided by the methods described above.

[0118] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0119] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for distributed scheduling of data in a switch chip, the method comprising: include: In response to a cross-port transmission request from transmitting port i to receiving port j in the switching chip, the load parameters of the transmission link ij are determined based on the monitoring data of the transmission link ij, wherein the transmission link ij is the transmission link from the transmitting port i to the receiving port j, and the load parameters of the transmission link ij represent the data lag status on the transmission link ij. The target data amount is obtained by determining the amount of data allocated to the sending port i based on the load parameters of the transmission link ij. Configure the amount of data to be transmitted across ports from the sending port i to the receiving port j based on the target data volume.

2. The method of claim 1, wherein, The response to the cross-port transmission request from transmit port i to receive port j in the switching chip, determining the load parameters of transmission link ij based on monitoring data of transmission link ij, includes: In response to a cross-port transmission request from a transmitting port i to a receiving port j in a switching chip, the amount of data sent from the transmitting port i to the receiving port j is obtained to obtain a first data amount, and the amount of data sent from the receiving port j to the outside of the switching chip is obtained to obtain a second data amount, wherein the monitoring data includes the first data amount and the second data amount, and the first data is the data sent from the transmitting port i to the receiving port j; Calculate the difference between the first data volume and the second data volume to obtain the load parameters of the transmission link ij from the sending port i to the receiving port j.

3. The method according to claim 2, characterized in that, The target data amount is obtained by determining the amount of data allocated to the sending port i based on the load parameters of the transmission link ij, including: Obtain the basic delay of the transmission link ij and the forwarding rate of the receiving port j for sending the first data, and calculate the capacity of the transmission link ij based on the basic delay and the forwarding rate; The first remaining load of the transmission link ij is calculated based on the load threshold, load parameters and capacity of the transmission link ij; The target data amount is obtained by determining the amount of data allocated to the sending port i based on the first remaining load amount.

4. The method according to claim 3, characterized in that, Obtain the basic delay of the transmission link ij and the forwarding rate of the receiving port j for transmitting the first data, and calculate the capacity of the transmission link ij based on the basic delay and the forwarding rate, including: For the amount of data sent by the receiving port j as the first data, the forwarding rate is obtained by solving its derivative with respect to time. Obtain the basic delay of the transmission link ij, and calculate the capacity of the transmission link ij by multiplying the basic delay of the transmission link ij by the forwarding rate; The step of calculating the first remaining load of the transmission link ij based on its load threshold, load parameters, and capacity includes: The overload of transmission link ij is obtained by calculating the difference between the load parameter of the transmission link ij and the capacity. The first remaining load of the transmission link ij is obtained by calculating the difference between the load threshold of the transmission link ij and the overload amount; The step of determining the amount of data allocated to the transmitting port i based on the first remaining load to obtain the target data amount includes: The third data amount is obtained by obtaining the amount of data requested in the cross-port transmission request; If the third data amount is less than or equal to the first remaining load amount, the target data amount allocated to the sending port i is determined to be the third data amount. If the third data volume is greater than the first remaining load volume, the target data volume allocated to the sending port i is determined to be either the first remaining load volume or zero.

5. The method according to claim 1, characterized in that, Configure the amount of data transmitted across ports from the sending port i to the receiving port j based on the target data volume, including: The data transmission rate is calculated based on the target data volume and the control loop delay of the transmission link ij. Based on the data transmission rate, authorization tokens are continuously injected into the token bucket in the time dimension, and the amount of data sent from the sending port i to the receiving port j is configured based on the authorization tokens in the token bucket. The method further includes: Before all the authorization tokens corresponding to the target data volume are injected into the token bucket, if the sending port i obtains a new authorization, then all the remaining authorization tokens for the target data volume are stored in the token bucket.

6. The method according to claim 1, characterized in that, The method further includes: Obtain the bandwidth-delay product of the transmission link ij, wherein the bandwidth-delay product is equal to the product of the control loop delay of the transmission link ij and its link line speed; The fourth data quantity is determined based on the bandwidth-delay product, and a request pool of the fourth data quantity size is allocated to the transmission link ij. The fourth data quantity is greater than or equal to the bandwidth-delay product of the transmission link ij. The total size of the request pools of each transmission link in the switching chip is equal to the total buffer space in the switching chip used to store request signals. The request pool is used to buffer the cross-port transmission request.

7. The method according to claim 1, characterized in that, The response to the cross-port transmission request from transmit port i to receive port j in the switching chip, determining the load parameters of transmission link ij based on monitoring data of transmission link ij, includes: In response to a cross-port transmission request from sending port i to receiving port j in the switching chip, the value of the congestion flag bit of the data packet transmitted in the transmission link ij is obtained. The monitoring data includes the value of the congestion flag bit. During the transmission of the data packet, when the queuing time of the data packet at each node in the transmission link ij is less than a preset time threshold, the value of the congestion flag bit of the data packet is a first value; otherwise, the value of the congestion flag bit of the data packet is a second value. Based on the value of the congestion flag bit, the load parameters of the transmission link ij are determined, wherein the load parameters indicate whether there is data congestion or delay in the data retention situation on the transmission link ij; The step of determining the amount of data allocated to the sending port i based on the load parameters of the transmission link ij to obtain the target data amount includes: If the load parameter indicates that there is data congestion on the transmission link ij, the target data amount allocated to the sending port i is determined to be zero. If the load parameter indicates that there is no data congestion or delay on the transmission link ij, the target data amount allocated to the sending port i is determined to be the third data amount, wherein the third data amount is the data amount requested by the cross-port transmission request.

8. The method according to claim 1, characterized in that, The response to the cross-port transmission request from transmit port i to receive port j in the switching chip, determining the load parameters of transmission link ij based on monitoring data of transmission link ij, includes: In response to a cross-port transmission request from transmit port i to receive port j in a switching chip, the transmission delay of the data packet in the transmission link ij is obtained, wherein the monitoring data includes the transmission delay; The transmission delay of the data packet is quantized into the load parameter of the transmission link ij according to the first mapping relationship, wherein the first mapping relationship is a mapping relationship between transmission delay and load parameter; or, the delay growth parameter of the transmission link ij is calculated based on the transmission delay of the data packet, and the delay growth parameter is mapped into the load parameter according to the second mapping relationship, wherein the second mapping relationship is a mapping relationship between delay growth parameter and load parameter. The step of determining the amount of data allocated to the sending port i based on the load parameters of the transmission link ij to obtain the target data amount includes: The second remaining load is obtained by calculating the difference between the load threshold and the load parameter of the transmission link ij; The third data amount is obtained by obtaining the amount of data requested in the cross-port transmission request; If the third data amount is less than or equal to the second remaining load amount, the target data amount allocated to the sending port i is determined to be the third data amount; If the third data volume is greater than the second remaining load volume, the target data volume allocated to the sending port i is determined to be either the second remaining load volume or zero.

9. A switching chip, characterized in that, include: The monitor is used to monitor the data retention status of the transmission link ij from the sending port i to the receiving port j, and obtain monitoring data. A distributor, in response to a cross-port transmission request from transmit port i to receive port j in a switching chip, determines the load parameters of the transmission link ij based on the monitoring data, wherein the load parameters of the transmission link ij represent the data lag on the transmission link ij; and determines the amount of data to be allocated to the transmit port i based on the load parameters of the transmission link ij to obtain the target data amount. A regulator is configured to configure the amount of data transmitted across ports from the sending port i to the receiving port j based on the target data amount.

10. A distributed scheduling device for switching data in a chip, characterized in that, include: The load parameter determination module is used to respond to the cross-port transmission request from the sending port i to the receiving port j in the switching chip, and determine the load parameter of the transmission link ij based on the monitoring data of the transmission link ij, wherein the transmission link ij is the transmission link from the sending port i to the receiving port j, and the load parameter of the transmission link ij indicates the data lag status on the transmission link ij. The target data volume determination module is used to determine the amount of data allocated to the sending port i based on the load parameters of the transmission link ij to obtain the target data volume; The data configuration module is used to configure the amount of data transmitted across ports from the sending port i to the receiving port j based on the target data amount.