A data processing method and related device

By identifying incoming ports of non-main cause in the data center network and adjusting their PFC thresholds to avoid innocent damage, the problem of inefficiency under dynamic thresholding strategies is solved, and the overall transmission efficiency and performance of the system is improved.

CN116170377BActive Publication Date: 2025-07-08HUAWEI TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111415441.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2025-07-08
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

The existing dynamic thresholding strategy cannot effectively solve the traffic burst problem in the data center network, resulting in the same reduction of the PFC threshold of the non-main reason ports, affecting the packet transmission efficiency of other ports.

Method used

By identifying the incoming ports with non-main causes, adjusting its PFC threshold to be greater than the incoming ports with primary causes, avoiding triggering pause frames and ensuring that the packet transmission of non-main causes ports with non-main causes is not affected.

Benefits of technology

It improves the transmission efficiency of the system, reduces the service damage of innocent ports, reduces the number of PFC triggers, and improves the overall performance of the data center network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116170377B_ABST
    Figure CN116170377B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, the method comprising: based on that the increase amplitude of the packet traffic received by the first ingress port indicated by the port status information is greater than a threshold value, and the increase amplitude of the packet traffic received by the second ingress port is less than the threshold value, configuring a first PFC threshold value of the first ingress port and configuring a second PFC threshold value of the second ingress port; wherein the first PFC threshold value is less than the second PFC threshold value. When it is recognized in the present application that the second ingress port is not the main cause of the blockage of the target egress port, the PFC threshold value corresponding to the second ingress port will be configured to be greater than the PFC threshold value corresponding to the first ingress port. Furthermore, as the second ingress port which is not the main cause of the blockage of the target egress port, it will not easily trigger sending indication information (such as a pause frame) to the upstream network device, and thus will not affect the packet transmission on the second ingress port for other egress ports except the target egress port, improving the transmission efficiency of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and particularly to a data processing method and related devices. Background Art

[0002] In recent years, lossless data center network technology has become the focus of the industry. Among them, remote direct memory access (RDMA) is a technology that allows computers in a network to interact with data without going through the processor, cache, and operating system, and has the characteristics of zero-copy, kernel bypass, and no central processing unit (CPU) involvement. It not only saves a large amount of CPU resources, but also improves system throughput and reduces network communication latency. Generally speaking, end-to-end congestion control cannot effectively act on this bursty traffic. To ensure the lossless environment of RDMA, many congestion control algorithms in current data centers will adopt the PFC mechanism. Priority-based flow control (PFC), PFC is an Ethernet protocol based on the 802.Qbb standard at the L2 layer. It supports selecting the priorities of different types of traffic in the network and is a mechanism to prevent packet loss in case of congestion. The PFC mechanism mainly acts on the ingress port of a switch (or other network devices, such as routers, etc.), and is controlled according to the queue length of the ingress port (or the length of the ingress queue). The specific means is to send indication information (such as a pause frame) to notify the upstream port to stop sending data.

[0003] Taking the network device as a switch as an example, there are four cache allocation strategies shared by multiple ports in the switch: full sharing, equal sharing, static threshold, and dynamic threshold (DT). The currently popular method is mainly the dynamic threshold strategy.

[0004] The DT strategy improves the adaptability of traditional strategies, but it cannot solve the problem of traffic bursts. The problem with the DT strategy is that the PFC threshold for each port on the same network device is configured to be the same (that is, the PCT thresholds of the switch's ingress ports change uniformly). When a traffic burst occurs, the remaining buffer decreases, and the PFC thresholds of all ports will decrease synchronously. Therefore, regardless of whether a port has a traffic burst, it is very likely to trigger a pause frame. This pause frame will block the packet transmission of the upstream port, and the upstream port may have other traffic. These services may not be directly related to the port that generates the traffic burst, but the transmission performance of these services will be damaged innocently, resulting in low transmission efficiency. Summary of the Invention

[0005] An embodiment of the present application provides a data processing method. When it is recognized that the second ingress port is not the main cause of the blockage of the target egress port, the PFC threshold corresponding to the second ingress port is configured to be greater than the PFC threshold corresponding to the first ingress port. For example, the PFC threshold corresponding to the second ingress port can be increased, or the PFC threshold corresponding to the second ingress port can be kept unchanged, or the decrease amplitude of the PFC threshold corresponding to the second ingress port is less than the decrease amplitude of the PFC threshold corresponding to the first ingress port. Furthermore, as the second ingress port that is not the main cause of the blockage of the target egress port, it is not easy to trigger the sending of indication information (such as a pause frame) to the upstream network device, and thus it will not affect the packet transmission on the second ingress port for other egress ports except the target egress port, improving the transmission efficiency of the system.

[0006] In a first aspect, an embodiment of the present application provides a data processing method, which is applied to a network device. The network device includes a first ingress port, a second ingress port, and a target egress port; the method includes: respectively obtaining the port status information of the first ingress port and the second ingress port; the port status information is related to the packet traffic received by the corresponding ingress port for the target egress port; based on the port status information indicating that the increase amplitude of the packet traffic received by the first ingress port is greater than a threshold, and the increase amplitude of the packet traffic received by the second ingress port is less than the threshold, configuring the first PFC threshold of the first ingress port and the second PFC threshold of the second ingress port; where the first PFC threshold is less than the second PFC threshold.

[0007] It should be understood that the "threshold value" in "the increase amplitude of the packet traffic received by the second ingress port is less than the threshold value" is not necessarily the same value as the "threshold value" in "the increase amplitude of the packet traffic received by the first ingress port indicated by the port status information is greater than the threshold value". For example, the port status information indicates that the increase amplitude of the packet traffic received by the first ingress port is greater than the first threshold value, and the increase amplitude of the packet traffic received by the second ingress port is less than the second threshold value, and the second threshold value can be less than or equal to the first threshold value.

[0008] In a possible implementation, if the port status information indicates that the increase amplitude of the packet traffic received by the first ingress port is greater than the threshold value, and the increase amplitude of the packet traffic received by the second ingress port is less than the threshold value, it can be considered that the first ingress port has received burst traffic for the target egress port, while the second ingress port has not received burst traffic for the target egress port. In this case, it can be considered that the first ingress port is the main reason for the blockage of the target egress port, while the second ingress port is not the main reason for the blockage of the target egress port. In the existing implementation, the PFC threshold values corresponding to the first ingress port and the second ingress port will be reduced to the same extent. In this case, even if the second ingress port is not the main reason for the blockage of the target egress port, the PFC threshold value corresponding to the second ingress port will also be reduced to the same extent as the PFC threshold value corresponding to the first ingress port, thereby affecting the packet transmission from the second ingress port to other egress ports and greatly reducing the packet transmission efficiency.

[0009] It should be understood that the threshold value in the embodiment of the present application can be a preset value, for example, it can be 10% of the original traffic.

[0010] In the embodiment of the present application, when it is recognized that the second ingress port is not the main reason for the blockage of the target egress port, the PFC threshold value corresponding to the second ingress port will be configured to be greater than the PFC threshold value corresponding to the first ingress port. For example, the PFC threshold value corresponding to the second ingress port can be increased, or the PFC threshold value corresponding to the second ingress port can be kept unchanged, or the reduction amplitude of the PFC threshold value corresponding to the second ingress port is less than the reduction amplitude of the PFC threshold value corresponding to the first ingress port. Furthermore, as the second ingress port that is not the main reason for the blockage of the target egress port, it will not easily trigger the sending of indication information (such as a pause frame) to the upstream network device, and thus will not affect the packet transmission on the second ingress port for other egress ports except the target egress port, improving the transmission efficiency of the system.

[0011] In a possible implementation, the first ingress port and the second ingress port share the cache resources of the network device.

[0012] In a possible implementation, the first ingress port corresponds to a first ingress queue. The switch is configured to send first indication information to an upstream port of the first ingress port when the number of packets in the first ingress queue is greater than the first PFC threshold, and the first indication information is used to indicate to stop sending packets to the first ingress port.

[0013] In a possible implementation, the second ingress port corresponds to a second ingress queue. The switch is configured to send second indication information to an upstream port of the second ingress port when the number of packets in the second ingress queue is greater than the second PFC threshold, and the second indication information is used to indicate to stop sending packets to the second ingress port.

[0014] Exemplarily, the first indication information and the second indication information may be PFC frames, and the PFC frames are used to indicate that the ports of the upstream network device temporarily stop sending packets to the ports of this network device. For example, the PFC frame may be a PFC pause frame, which is used to notify the upstream device to temporarily stop sending packets to the ports of this network device. It should be noted that here it is only to illustrate the function of the PFC frame, and it is exemplified as a PFC pause frame for illustration.

[0015] In a possible implementation, the port status information includes a first packet dequeue rate of the first ingress queue and a second packet dequeue rate of the second ingress queue. The packet dequeue rate represents the number of packets leaving the ingress port within a period. When the packet dequeue rate is greater than the dequeue rate threshold, it can be considered that the number of packets received on the first ingress port destined for the target egress port is small (because the target egress port is already in a blocked state at this time. The reason why the packet dequeue rate of the first ingress port is still large is that the first ingress port has also received many packets that do not correspond (do not need to be transmitted) to the target egress port). When the packet dequeue rate is less than the dequeue rate threshold, it can be considered that the number of packets received on the first ingress port destined for the target egress port is large (because the target egress port is already in a blocked state at this time. The reason why the packet dequeue rate of the first ingress port is very small is that the first ingress port has received many packets that correspond (need to be transmitted) to the target egress port).

[0016] Exemplarily, the dequeue rate threshold may be related to the performance of the network device itself. The dequeue rate threshold may be the dequeue rate of the ingress port queue when the ingress port of the network device is working normally (when there is no blocked state), for example, it may be the historical average dequeue rate of the ingress port queue when there is no blocked state.

[0017] That is to say, when the port status information indicates that the dequeue rate of the first packet is less than the dequeue rate threshold, it can be considered that the port status information indicates that the increase rate of the packet traffic received by the first ingress port is greater than the threshold. Similarly, when the port status information indicates that the dequeue rate of the second packet is greater than the dequeue rate threshold, it can be considered that the increase rate of the packet traffic received by the second ingress port is less than the threshold.

[0018] In a possible implementation, when it is determined that the first ingress port is the main cause of the congestion at the target egress port, the PFC threshold of the first ingress port can be configured from the third PFC threshold to the first PFC threshold, and the first PFC threshold is less than the third PFC threshold.

[0019] In a possible implementation, the first PFC threshold can be configured by the following formula:

[0020] T(t) = α · (B - ∑ i Q i (t));

[0021] where B can represent the switch buffer size, Q i (t) represents the length of the i-th port queue, α is an adjustment factor, for example, a = 2. T(t) represents the maximum cache size that the port can occupy at time t.

[0022] In a possible implementation, when it is determined that the second ingress port is not the main cause of the congestion at the target egress port, the PFC threshold of the second ingress port can be configured from the fourth PFC threshold to the second PFC threshold; where the second PFC threshold is greater than or equal to the fourth PFC threshold, or the second PFC threshold is less than the fourth PFC threshold, and the reduction amplitude of the second PFC threshold compared to the fourth PFC threshold is less than the reduction amplitude of the first PFC threshold compared to the third PFC threshold.

[0023] In a possible implementation, the second PFC threshold can be configured in the following way: select a value between α / (α + 1)B and B.

[0024] In a possible implementation, the third PFC threshold and the fourth PFC threshold are equal. That is to say, when the PFC threshold is not configured based on the threshold adjustment method in the embodiments of the present application, the PFC thresholds corresponding to each port are the same.

[0025] In a second aspect, the present application provides a data processing device, which is applied to a network device. The network device includes a first ingress port, a second ingress port, and a target egress port; the device includes:

[0026] An acquisition module, configured to respectively acquire port status information of a first ingress port and the second ingress port; the port status information is related to the packet traffic received by the corresponding ingress port for the target egress port.

[0027] A threshold configuration module, configured to, based on the port status information, indicate that the increase rate of the packet traffic received by the first ingress port is greater than a threshold, and the increase rate of the packet traffic received by the second ingress port is less than the threshold, configure a first PFC threshold for the first ingress port, and configure a second PFC threshold for the second ingress port; wherein, the first PFC threshold is less than the second PFC threshold.

[0028] In an embodiment of the present application, when it is recognized that the second ingress port is not the main cause of the blockage of the target egress port, the PFC threshold corresponding to the second ingress port will be configured to be greater than the PFC threshold corresponding to the first ingress port. For example, the PFC threshold corresponding to the second ingress port can be increased, or the PFC threshold corresponding to the second ingress port can be kept unchanged, or the reduction rate of the PFC threshold corresponding to the second ingress port is less than the reduction rate of the PFC threshold corresponding to the first ingress port. Furthermore, as the second ingress port that is not the main cause of the blockage of the target egress port, it will not easily trigger sending indication information (such as a pause frame) to the upstream network device, and thus will not affect the packet transmission on the second ingress port for other egress ports except the target egress port, improving the transmission efficiency of the system.

[0029] In a possible implementation, the first ingress port and the second ingress port share the cache resources of the network device.

[0030] In a possible implementation, the first ingress port corresponds to a first ingress queue, and the second ingress port corresponds to a second ingress queue;

[0031] The network device is configured to, when the number of packets in the first ingress queue is greater than the first PFC threshold, send a first indication information to the upstream port of the first ingress port, and the first indication information is used to indicate to stop sending packets to the first ingress port;

[0032] The network device is configured to, when the number of packets in the second ingress queue is greater than the second PFC threshold, send a second indication information to the upstream port of the second ingress port, and the second indication information is used to indicate to stop sending packets to the second ingress port.

[0033] In a possible implementation, the port status information includes a first packet dequeue rate of the first ingress queue and a second packet dequeue rate of the second ingress queue;

[0034] The port status information indicates that the increase amplitude of the packet traffic received by the first ingress port is greater than a threshold, including:

[0035] The port status information indicates that the dequeue rate of the first packet is less than the dequeue rate threshold;

[0036] The increase amplitude of the packet traffic received by the second ingress port is less than the threshold, including:

[0037] The port status information indicates that the dequeue rate of the second packet is greater than the dequeue rate threshold.

[0038] In a possible implementation, the target egress port corresponds to a target egress queue, and the target egress queue is in a congested state.

[0039] In a possible implementation, the threshold configuration module is specifically configured to:

[0040] Configure the PFC threshold of the first ingress port from a third PFC threshold to the first PFC threshold, where the first PFC threshold is less than the third PFC threshold.

[0041] In a possible implementation, the threshold configuration module is specifically configured to:

[0042] Configure the PFC threshold of the second ingress port from a fourth PFC threshold to the second PFC threshold; where the second PFC threshold is greater than or equal to the fourth PFC threshold, or the second PFC threshold is less than the fourth PFC threshold, and the reduction amplitude of the second PFC threshold compared to the fourth PFC threshold is less than the reduction amplitude of the first PFC threshold compared to the third PFC threshold.

[0043] In a possible implementation, the third PFC threshold and the fourth PFC threshold are equal.

[0044] In a third aspect, the present application provides a network device, where the device includes a processor, a memory, and a bus, where:

[0045] The processor and the memory are connected through the bus;

[0046] The memory is used to store computer programs or instructions;

[0047] The processor is used to call or execute the programs or instructions stored on the memory to implement the steps described in the first aspect and any possible implementation manner in the first aspect.

[0048] Fourthly, the present application provides a computer storage medium, including computer instructions which, when running on a computer, execute the steps described in the first aspect and any possible implementation manner of the first aspect above.

[0049] Fifthly, the present application provides a computer program product which, when running on a computer, executes the steps described in the first aspect and any possible implementation manner of the first aspect above.

[0050] Eighthly, the present application provides a chip system which includes a processor for supporting a computer to implement the functions involved in the above aspects, for example, sending or processing the data or information involved in the above method. In a possible design, the chip system further includes a memory for storing the necessary program instructions and data of an execution device or a training device. The chip system may be composed of chips or may include chips and other discrete devices.

[0051] An embodiment of the present application provides a data processing method which is applied to a network device including a first ingress port, a second ingress port, and a target egress port. The method includes: respectively obtaining the port status information of the first ingress port and the second ingress port, where the port status information is related to the packet traffic received by the corresponding ingress port for the target egress port; based on the port status information indicating that the increase amplitude of the packet traffic received by the first ingress port is greater than a threshold and the increase amplitude of the packet traffic received by the second ingress port is less than the threshold, configuring a first PFC threshold for the first ingress port and a second PFC threshold for the second ingress port, where the first PFC threshold is less than the second PFC threshold.

[0052] In a possible implementation, if the port status information indicates that the increase amplitude of the packet traffic received by the first ingress port is greater than a threshold and the increase amplitude of the packet traffic received by the second ingress port is less than the threshold, it can be considered that the first ingress port has received burst traffic for the target egress port, while the second ingress port has not received burst traffic for the target egress port. In this case, it can be considered that the first ingress port is the main cause of the blockage of the target egress port, while the second ingress port is not the main cause of the blockage of the target egress port. In the existing implementation, the PFC thresholds corresponding to the first ingress port and the second ingress port will be reduced to the same extent. In this case, even if the second ingress port is not the main cause of the blockage of the target egress port, the PFC threshold corresponding to the second ingress port will also be reduced to the same extent as the PFC threshold corresponding to the first ingress port, thereby affecting the packets received by the second ingress port for transmission to other egress ports and greatly reducing the packet transmission efficiency.

[0053] In the embodiments of the present application, when it is recognized that the second ingress port is not the main cause of the blockage of the target egress port, the PFC threshold corresponding to the second ingress port will be configured to be greater than the PFC threshold corresponding to the first ingress port. For example, the PFC threshold corresponding to the second ingress port can be increased, or the PFC threshold corresponding to the second ingress port can be kept unchanged, or the reduction amplitude of the PFC threshold corresponding to the second ingress port is less than the reduction amplitude of the PFC threshold corresponding to the first ingress port. Furthermore, as the second ingress port that is not the main cause of the blockage of the target egress port, it will not easily trigger the sending of indication information (such as a pause frame) to the upstream network device, and thus will not affect the packet transmission on the second ingress port for other egress ports except the target egress port, improving the transmission efficiency of the system. Description of the Drawings

[0054] Figure 1 It is a schematic diagram of the application architecture provided by the embodiments of the present application;

[0055] Figure 2 It is a schematic diagram of the application architecture provided by the embodiments of the present application;

[0056] Figure 3 It is a schematic diagram of the application architecture provided by the embodiments of the present application;

[0057] Figure 4 It is a schematic diagram of the application architecture provided by the embodiments of the present application;

[0058] Figure 5 It is a schematic diagram of the application architecture provided by the embodiments of the present application;

[0059] Figure 6 It is a schematic diagram of an embodiment of a data processing method provided by the embodiments of the present application;

[0060] Figure 7 It is a schematic diagram of a circuit provided by the embodiments of the present application;

[0061] Figure 8 It is a schematic diagram of a state transition provided by the embodiments of the present application;

[0062] Figure 9 It is a schematic diagram of an embodiment of a data processing method provided by the embodiments of the present application;

[0063] Figure 10 It is a schematic diagram of an experimental topology provided by the embodiments of the present application;

[0064] Figure 11 It is a schematic diagram of an experimental topology provided by the embodiments of the present application;

[0065] Figure 12Schematic diagram of an embodiment of a data processing device provided by an embodiment of the present application;

[0066] Figure 13 Schematic diagram of an embodiment of a network device provided by an embodiment of the present application. Detailed implementation manners

[0067] The embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention. The terms used in the embodiments of the present invention are only for explaining the specific embodiments of the present invention, and are not intended to limit the present invention.

[0068] The embodiments of the present application will be described below with reference to the accompanying drawings. Those of ordinary skill in the art will understand that with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0069] The terms "first", "second", etc. in the specification, claims and above-mentioned drawings of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, and this is only a way of distinguishing objects with the same attributes when describing the embodiments of the present application. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product or device comprising a series of units does not have to be limited to those units, but may include other units not explicitly listed or inherent to these process, method, product or device.

[0070] In recent years, lossless data center network technology has become the focus of attention in the industry. Among them, Remote Direct Memory Access (RDMA) is a technology that allows computers in a network to interact with data without going through the processor, cache, and operating system. It has characteristics such as zero-copy, kernel bypass, and no central processing unit (CPU) involvement. It not only saves a large amount of CPU resources, but also improves system throughput and reduces network communication latency. Currently, RDMA technology has been widely used in various fields, and the application scope varies according to different application requirements. Applications that require low latency characteristics, such as high performance computing (HPC), financial services, etc.; applications that require high bandwidth, such as HPC, medical devices, storage and backup systems, cloud computing, etc.; applications that require less CPU occupancy, such as HPC, cloud computing, etc.

[0071] On the other hand, traffic bursts are typical traffic patterns in modern data centers. Traffic bursts are usually generated by various online data-intensive applications and virtualization services, such as distributed computing. These applications and services will generate multiple concurrent data packets entering the ports of the same routing and switching device at the same time, resulting in short-term congestion. Traffic bursts may cause the queue at the port to be too long, resulting in packet loss or even timeout retransmission, which is unacceptable for applications in the data center, especially latency-sensitive applications. Although RDMA has the application advantages of high bandwidth and low latency, the prerequisite for exerting this performance advantage is to ensure that no packets are lost during the data transmission process. Otherwise, it will lead to large-scale retransmission, causing serious performance loss and load overhead.

[0072] Generally speaking, end-to-end congestion control cannot effectively act on this bursty traffic. To ensure a lossless environment for RDMA, many congestion control algorithms in current data centers adopt the PFC mechanism. Priority-based flow control (PFC) is an Ethernet protocol based on the 802.Qbb standard at the L2 layer. It supports selecting the priorities of different types of traffic in the network and is a mechanism to prevent packet loss in case of congestion. The PFC mechanism mainly acts on the ingress port of the switch (or other network devices, such as routers), and controls according to the queue length of the ingress port (or the length of the ingress queue). The specific means is to send indication information (such as pause frames) to notify the upstream port to stop sending data. Specifically, when the queue length of the ingress port exceeds the pre-set PFC threshold (such as XOFF), a pause (stop) frame is sent, and when it is less than XON, the sending stops. Here, XOFF and XON can represent the thresholds of the ingress port queue length.

[0073] Exemplarily, the working principle of PFC can be as Figure 1 shown, and the working process includes the following four basic processing procedures:

[0074] (1) The upstream port sends packets to the downstream port;

[0075] (2) The packets accumulate in the downstream port, and the queue length keeps increasing. When the queue length exceeds XOFF, the downstream port sends a pause frame to the upstream port;

[0076] (3) After receiving the pause frame, the upstream port stops sending packets;

[0077] (4) When the queue length of the downstream port is less than XON, the downstream port stops sending the pause frame and instead sends a resume frame to notify the upstream port to resume packet sending.

[0078] Among them, the setting of the PFC trigger threshold (i.e., XOFF) determines when the downstream port sends a pause frame, and whether to send a pause frame undoubtedly has a huge impact on network transmission. Therefore, the most critical technical challenge of the PFC mechanism is to determine the PFC trigger threshold (which can be simply referred to as the PFC threshold in the embodiments of this application). Most current commercial switches share a buffer among multiple ports, which is called a shared memory switch. For a shared memory switch, the physical meaning of the PFC trigger threshold is the maximum buffer size that this port can occupy. Therefore, the problem of setting the PFC trigger threshold is equivalent to the problem of buffer allocation among multiple ports.

[0079] Exemplarily, as Figure 2 shown, the sending interface of network device A ( Figure 2 simply referred to as device A in Figure 2 ) is divided into 8 queues, and the receiving interface of network device B (

[0080] simply referred to as device B in

[0081] ) has 8 receiving buffer queues (or simply referred to as the entry queues of the incoming port), and buffer allocation is performed to form 8 virtual channels in the network. The buffer size enables each queue to have different data caching capabilities, and the 8 queues of device A correspond one-to-one with the 8 receiving buffer queues of device B. Next, the application architecture of the embodiments of this application will be introduced.

[0082] Referring to Figure 3 , Figure 3 is a schematic diagram of an application architecture provided by the embodiments of this application. Among them, Figure 3 the shown topology is a three-layer structure (which does not constitute a limitation to this application. In other topologies applicable to this application, there may be more or fewer layers and / or the number of network devices), optionally, Figure 3The various branches in the shown topology may have the same bandwidth. For ease of description, in the embodiments of this application, a network device is taken as an example of a switch for illustration. As a bridge between the service cluster of the data center and the application client, the switch plays an important role. The present invention is based on the system architecture of the data center and improves the currently commercial network devices that support priority-based flow control (PFC).

[0083] Specifically, Figure 4 A simplified model of a typical PFC-enabled shared-cache switch is shown. This model can be divided into three parts: a forwarding core, a paged memory management unit (MMU), and a shared memory pool. Traditional switches are in an output-queue shared-cache mode, and when the output queue length is greater than a specific threshold, the incoming packets are discarded. PFC-enabled switches are in an input-port-queue shared-cache mode. When a data packet enters an input port, the MMU checks whether the queue length of the current input port exceeds the threshold for triggering PFC, and then updates the queue length of the input port and the queue length of the associated output port, where the latter is used to set the explicit congestion notification (ECN) threshold.

[0084] To better understand the principle of a PFC-enabled switch, Figure 5 A 5-to-1 traffic scenario within the MMU is shown from two perspectives. Five traffic flows (each with two packets) enter the switch through 5 ports and leave the switch through one port. Physically, these ten packets are all stored in the shared memory pool. However, from the perspective of the MMU, different views have different functions.

[0085] (a) The ingress view is used to control PFC. In the ingress view, the data packets of each flow are queued at the corresponding input port. When the queue length of the input port reaches the PFC threshold, PFC pause is triggered.

[0086] (b) The egress view is used to control ECN. In the egress view, the data packets of each flow are queued at the output port. When the queue length of the output queue reaches the threshold, each data packet will be marked with an ECN.

[0087] Among them, taking a network device as a switch as an example, there are four cache allocation strategies shared by multiple ports in the switch: full sharing, equal sharing, static threshold, and dynamic threshold. In the full sharing strategy, each port fully shares the memory. This method is efficient but unfair, as new traffic arrivals may not be able to occupy the memory, easily causing the starvation problem of some flows. In the equal sharing strategy, the cache of each port is evenly allocated. Although this method ensures fairness, it is inefficient and cannot allocate more cache to high-throughput ports. The static threshold strategy has high requirements for parameters and poor adaptability and cannot be commercialized. Therefore, the currently popular method is mainly the dynamic threshold (DT) strategy.

[0088] In some scenarios, there will be burst traffic. In the traffic burst scenario, DT may cause the "victim flow" problem. The "victim flow" problem refers to the situation where, when traffic bursts occur, some services may not be directly related to the congested port, but the transmission performance of these services will be innocently damaged. The embodiments of the present application can solve the "victim" flow problem brought by the existing DT strategy and reduce the number of PFC triggers.

[0089] Specifically, taking a network device as a switch as an example, in an implementation of DT, the PCT thresholds (such as XOFF described in the above embodiments) configured for multiple ingress ports in the network device are not fixed, but are proportional to the available cache in the network device. Its core idea can be described by the following formula:

[0090]

[0091] Among them, B represents the switch cache size, Q i (t) represents the queue length of the i-th port, α is an adjustment factor, for example, a = 2. T(t) represents the maximum cache size that the port can occupy at time t.

[0092] The PFC threshold is positively correlated with T(t). In some PFC implementations, XOFF = T(t), XON = T(t) - 3MTU, where MTU represents the maximum transmission unit. Obviously, the larger α is, the more difficult it is to trigger PFC.

[0093] The DT strategy improves the adaptability of traditional strategies, but it cannot solve the problem of traffic bursts. When a traffic burst occurs, the bursty traffic cannot be fully buffered. When the queue length is greater than the PFC threshold, a pause frame will be triggered. The problem with the DT strategy is that the PFC threshold for each port on the same network device is configured to be the same (that is, the PCT thresholds of the switch's ingress ports change uniformly). When a traffic burst occurs, the remaining buffer decreases, and the PFC thresholds of all ports will decrease synchronously. Therefore, regardless of whether a port has bursty traffic, it has a high probability of triggering a pause frame. This pause frame will block the packet transmission of the upstream port, and the upstream port may have other traffic. These services may not be directly related to the port that generates the traffic burst, but the transmission performance of these services will be damaged innocently, resulting in low transmission efficiency. In addition, after more ports trigger pause frames, they will spread to their respective upstream ports, further reducing the transmission efficiency of the entire network.

[0094] The embodiments of the present application can solve the above problems. For the bursty traffic of the ingress port, the "victim" flow problem can be solved, the fairness of each port can be guaranteed, and the transmission efficiency can be improved.

[0095] Refer to Figure 6 , Figure 6 is a schematic flow chart of a data processing method provided by an embodiment of the present application. The method is applied to a network device, and the network device includes a first ingress port, a second ingress port, and a target egress port; as Figure 6 described, a data processing method provided by an embodiment of the present application includes:

[0096] 601. Obtain the port status information of the first ingress port and the second ingress port respectively; the port status information is related to the packet traffic received by the corresponding ingress port for the target egress port.

[0097] In a possible implementation, the network device can be a switch, a router, etc. The embodiments of the present application take the network device as a switch as an example for illustration:

[0098] In a possible implementation, the switch can include multiple ingress ports and multiple egress ports. For example, the switch can include 4 ingress ports and 4 egress ports. The 4 ingress ports are I1, I2, I3, and I4 respectively, and the 4 egress ports are O1, O2, O3, and O4 respectively. Since the switch can communicate bidirectionally, I1, I2, I3, and I4 can also be egress ports, and O1, O2, O3, and O4 can also be ingress ports.

[0099] The switch may include a buffer (or simply referred to as cache), and the buffer (BUFFER) can be used to cache packets. The buffer may include multiple packet buffer areas, and each output port may correspond to a packet buffer area. Exemplarily, the packet buffer areas corresponding to output ports O1 to O4 are B1 to B4 respectively, and each packet buffer area may contain one or more queues.

[0100] In a possible implementation, each input port in the switch may share the buffer, and an input queue may be configured for each input port. Among them, a first input queue may be configured for the first input port, and a second input queue may be configured for the second input port. The first input queue is used to store the packets sent from the upstream network device to the first input port, and the second input queue is used to store the packets sent from the upstream network device to the second input port.

[0101] In a possible implementation, the first input port may receive a packet sent from the upstream network device, and the packet is a burst traffic for the target output port. Among them, the so-called burst traffic for the target output port can be understood as that within a certain period of time, the packet traffic of the packets received by the first input port that need to be transmitted to the target output port suddenly increases.

[0102] For example, at the first moment, the first input port does not receive a packet that needs to be transmitted to the target output port. At the second moment (a moment after the first moment), the first input port receives a packet that needs to be transmitted to the target output port. Then it can be considered that compared with the first moment, the packet traffic of the packets received by the first input port that need to be transmitted to the target output port suddenly increases at the second moment.

[0103] For example, at the first moment, the packet traffic size of the packets received by the first input port that need to be transmitted to the target output port is A1. At the second moment (a moment after the first moment), the packet traffic size of the packets received by the first input port that need to be transmitted to the target output port is A2, and A2 is greater than A1. Then it can be considered that compared with the first moment, the packet traffic of the packets received by the first input port that need to be transmitted to the target output port suddenly increases at the second moment.

[0104] In a possible implementation, the second input port may receive a packet sent from the upstream network device, and the packet needs to be transmitted to the target output port, but the packet is not burst traffic for the target output port. Or, the second input port does not receive a packet that needs to be transmitted to the target output port.

[0105] For example, at the first moment, the second ingress port does not receive a packet that needs to be transmitted to the target egress port. At the second moment (a moment after the first moment), the second ingress port also does not receive a packet that needs to be transmitted to the target egress port. Then it can be considered that, compared with the first moment, the packet traffic of the packets received by the second ingress port that need to be transmitted to the target egress port remains unchanged at the second moment.

[0106] For example, at the first moment, the packet traffic size of the packets received by the second ingress port that need to be transmitted to the target egress port is A1. At the second moment (a moment after the first moment), the packet traffic size of the packets received by the second ingress port that need to be transmitted to the target egress port is A2, and A2 is equal to A1. Then it can be considered that, compared with the first moment, the packet traffic of the packets received by the second ingress port that need to be transmitted to the target egress port remains unchanged at the second moment.

[0107] For example, at the first moment, the packet traffic size of the packets received by the second ingress port that need to be transmitted to the target egress port is A1. At the second moment (a moment after the first moment), the packet traffic size of the packets received by the second ingress port that need to be transmitted to the target egress port is A2, and A2 is less than A1. Then it can be considered that, compared with the first moment, the packet traffic of the packets received by the second ingress port that need to be transmitted to the target egress port becomes smaller at the second moment.

[0108] In a possible implementation, due to the burst traffic received by the first ingress port for the target egress port, the target egress port will be in a congested state. Furthermore, it is necessary to adjust the PFC threshold corresponding to the ingress port in the switch (such as XOFF described in the above embodiment, or referred to as the PFC trigger threshold).

[0109] 602. Configure the first PFC threshold of the first ingress port and configure the second PFC threshold of the second ingress port based on the port status information indicating that the increase amplitude of the packet traffic received by the first ingress port is greater than the threshold and the increase amplitude of the packet traffic received by the second ingress port is less than the threshold; wherein, the first PFC threshold is less than the second PFC threshold.

[0110] In a possible implementation, if the port status information indicates that the increase rate of the packet traffic received by the first ingress port is greater than the threshold, and the increase rate of the packet traffic received by the second ingress port is less than the threshold, it can be considered that the first ingress port has received burst traffic for the target egress port, while the second ingress port has not received burst traffic for the target egress port. In this case, it can be considered that the first ingress port is the main cause of the blockage of the target egress port, while the second ingress port is not the main cause of the blockage of the target egress port. In the existing implementation, the PFC thresholds corresponding to the first ingress port and the second ingress port will be reduced to the same extent. In this case, even if the second ingress port is not the main cause of the blockage of the target egress port, the PFC threshold corresponding to the second ingress port will also be reduced to the same extent as the PFC threshold corresponding to the first ingress port, which will then affect the packets received by the second ingress port and destined for other egress ports, greatly reducing the packet transmission efficiency.

[0111] In the embodiment of the present application, when it is identified that the second ingress port is not the main cause of the blockage of the target egress port, the PFC threshold corresponding to the second ingress port will be configured to be greater than the PFC threshold corresponding to the first ingress port. For example, the PFC threshold corresponding to the second ingress port can be increased, or the PFC threshold corresponding to the second ingress port can be kept unchanged, or the reduction rate of the PFC threshold corresponding to the second ingress port can be less than the reduction rate of the PFC threshold corresponding to the first ingress port. Furthermore, as the second ingress port that is not the main cause of the blockage of the target egress port, it will not easily trigger the sending of indication information (such as a pause frame) to the upstream network device, and thus will not affect the packet transmission on the second ingress port for other egress ports except the target egress port, improving the transmission efficiency of the system.

[0112] It should be understood that the threshold in the embodiment of the present application can be a preset value, for example, it can be 10% of the original traffic.

[0113] Next, introduce how to determine the port status information.

[0114] In a possible implementation, the port status information includes the first packet dequeue rate of the first ingress queue and the second packet dequeue rate of the second ingress queue. The packet dequeue rate represents the number of packets leaving the ingress port within a period. When the packet dequeue rate is greater than the dequeue rate threshold, it can be considered that the number of packets received on the first ingress port targeted at the destination egress port is small (because the destination egress port is blocked at this time. The reason why the packet dequeue rate of the first ingress port is still large is that the first ingress port also receives a lot of packets that do not correspond (do not need to be transmitted) to the destination egress port). When the packet dequeue rate is less than the dequeue rate threshold, it can be considered that the number of packets received on the first ingress port targeted at the destination egress port is large (because the destination egress port is blocked at this time. The reason why the packet dequeue rate of the first ingress port is small is that the first ingress port receives a lot of packets that correspond (need to be transmitted) to the destination egress port).

[0115] That is to say, when the port status information indicates that the first packet dequeue rate is less than the dequeue rate threshold, it can be considered that the port status information indicates that the increase amplitude of the packet traffic received on the first ingress port is greater than the threshold. Similarly, when the port status information indicates that the second packet dequeue rate is greater than the dequeue rate threshold, it can be considered that the increase amplitude of the packet traffic received on the second ingress port is less than the threshold.

[0116] In a possible implementation, when it is determined that the first ingress port is the main cause of the blockage of the destination egress port, the PFC threshold of the first ingress port can be configured from the third PFC threshold to the first PFC threshold, and the first PFC threshold is less than the third PFC threshold.

[0117] In a possible implementation, the first PFC threshold can be configured by the following formula:

[0118] T(t) = α · (B - ∑ i Q i (t));

[0119] Among them, B can represent the switch buffer size, Q i (t) represents the length of the i-th port queue, α is an adjustment factor, for example, a = 2. T(t) represents the maximum cache size that the port can occupy at time t.

[0120] In a possible implementation, when it is determined that the second ingress port is not the main cause of the blockage of the target egress port, the PFC threshold of the second ingress port can be configured from the fourth PFC threshold to the second PFC threshold; wherein, the second PFC threshold is greater than or equal to the fourth PFC threshold, or the second PFC threshold is less than the fourth PFC threshold, and the reduction amplitude of the second PFC threshold compared to the fourth PFC threshold is less than the reduction amplitude of the first PFC threshold compared to the third PFC threshold.

[0121] In a possible implementation, the second PFC threshold can be configured in the following manner: select a value between α / (α + 1)B and B.

[0122] In a possible implementation, the third PFC threshold is equal to the fourth PFC threshold. That is, when the PFC threshold is not configured based on the threshold adjustment method in the embodiments of the present application, the PFC thresholds corresponding to each port are the same.

[0123] Next, introduce how to obtain the packet dequeue rate described above:

[0124] In a possible implementation, in the internal implementation of the switch MMU, the above-mentioned dequeue rate acquisition and processing can be achieved through a clock module, an ingress port rate calculation module, an ingress port status judgment module, and an ingress port status saving module. For the clock module, the ingress port rate calculation module, the ingress port status judgment module, and the ingress port status saving module, this embodiment can be exemplarily implemented in the form of a circuit as Figure 7 shown.

[0125] Among them, Figure 7 the circuit shown can be composed of three parts: a timeout clock (TC), an ingress rate counter (IRC), and a state holder (SH). The input is the ingress port dequeue signal and the PFC pause signal, and the output is the control state of the port. Before introducing each part of this embodiment, first explain the two control states of the port: Absorption and Normal. The mutual conversion of the two states can be as Figure 8 shown.

[0126] Among them, high load and low load represent the traffic status of the port. High load means that the dequeue speed of the ingress port is relatively high, indicating that the number of packets leaving the ingress port within a period exceeds a certain threshold; low load means that the dequeue speed of the ingress port is relatively low, indicating that the number of packets leaving the ingress port within a period is less than the threshold. The traffic status of the port is used to determine the control status of the port, that is, whether it is in Normal or Absorption.

[0127] The detailed implementation of each part of the above circuit is as follows:

[0128] TC: It is a timer that is fixedly used to calculate the cycle time TC of the outgoing speed, periodically resets the dequeue rate counter. The clock C cycle TC is preferably greater than the RTT. According to experience, it is recommended that TC≥3RTT. When a pulse is generated, it starts to count down and stops at 0. During the countdown process, the output position is 0, and when it counts down to 0, the output position is 1. At this time, it can notify the IRC to reset the counter to calculate the speed of the next cycle.

[0129] IRC: It is a dequeue rate counter that records the number of emptied queues and is the key to determining the state. It is set to (C*TC) / k, where C is the line speed, C*TC is the maximum number of outgoing packets within the cycle TC, and k represents the tolerance degree of the concurrent scale. For example, when k = 5, it means that when an ingress port competes for the same egress port with less than 5 ingress ports, this ingress port is considered to be under high load. The dequeue signal of each ingress port will trigger its increment. Therefore, the combination of the dequeue rate of the ingress port and TC can represent the number of outgoing packets within a period. When the threshold is not exceeded, the output is 0, and the port control state is Normal; otherwise, it is 1, and the port control state is Absorption.

[0130] SH: It is used to save the state of the IRC. Because whenever TC is reset, IRC will be set to 0 and the output will be 0. SH is used to save the state within the previous cycle. It is also used to penalize the port that occupies a lot of caches but still triggers PFC. When the PFCpause is triggered, the output is 0, and the port control state becomes Normal.

[0131] Regarding the threshold setting module in the switch MMU, for the ports in Absorption, the cache scheme of the embodiment of the present application is adopted to increase the maximum usage threshold of this port. Since the maximum length of the port queue under the DT policy is α / (α + 1)B, this embodiment sets this value between α / (α + 1)B and B; for the ports in the Normal state, the existing DT policy can be adopted. This configuration method can make the PFC trigger threshold of the ports in the Absorption state not less than the PFC trigger threshold of the ports in the Normal state, so that the ports in the Normal state are preferentially allowed to trigger the pause frame.

[0132] In a possible implementation, the first ingress port corresponds to a first ingress queue, and the switch is configured to send first indication information to an upstream port of the first ingress port when the number of packets in the first ingress queue is greater than the first PFC threshold, where the first indication information is used to indicate to stop sending packets to the first ingress port.

[0133] In a possible implementation, the second ingress port corresponds to a second ingress queue, and the switch is configured to send second indication information to an upstream port of the second ingress port when the number of packets in the second ingress queue is greater than the second PFC threshold, where the second indication information is used to indicate to stop sending packets to the second ingress port.

[0134] Exemplarily, the first indication information and the second indication information may be PFC frames, and the PFC frames are used to indicate that the port of the upstream network device temporarily stops sending packets to the port of this network device. For example, the PFC frame may be a PFC pause frame, which is used to notify the upstream device to temporarily stop sending packets to the port of this network device. It should be noted that here it is only for illustrating the function of the PFC frame, and it is exemplarily referred to as a PFC pause frame for illustration.

[0135] Next, a specific embodiment is combined to describe the data processing method in the embodiments of the present application.

[0136] Refer to Figure 9 , Figure 9 , which is a schematic flow of a data processing method provided by an embodiment of the present application. Among them, the control state of the port is divided into Absorption (absorption state) and Normal (normal state):

[0137] (1) Absorption: The dequeue rate of the ingress port is relatively large.

[0138] (2) Normal: The dequeue rate of the ingress port is relatively small.

[0139] According to the control state of the ingress port, the corresponding port PFC trigger threshold is adopted.

[0140] Step 1: Calculate the dequeue rate of the ingress port;

[0141] Step 2: Determine the control state of the port according to the dequeue rate of the ingress port. If the port control state is not the Absorption state, go to Step 3; otherwise, go to Step 4;

[0142] Step 3: Set the PFC threshold of the port to B;

[0143] Step 4: Set the PFC threshold of this port to A, where A is greater than B.

[0144] An embodiment of this application provides a data processing method, which is applied to a network device. The network device includes a first input port, a second input port, and a target output port. The method includes: respectively obtaining the port status information of the first input port and the second input port; the port status information is related to the packet traffic received by the corresponding input port for the target output port; based on the port status information indicating that the increase amplitude of the packet traffic received by the first input port is greater than the threshold, and the increase amplitude of the packet traffic received by the second input port is less than the threshold, configure the first PFC threshold of the first input port and configure the second PFC threshold of the second input port; where the first PFC threshold is less than the second PFC threshold.

[0145] In a possible implementation, if the port status information indicates that the increase amplitude of the packet traffic received by the first input port is greater than the threshold, and the increase amplitude of the packet traffic received by the second input port is less than the threshold, it can be considered that the first input port has received burst traffic for the target output port, while the second input port has not received burst traffic for the target output port. In this case, it can be considered that the first input port is the main cause of the blockage of the target output port, while the second input port is not the main cause of the blockage of the target output port. In the existing implementation, the PFC thresholds corresponding to the first input port and the second input port will be reduced to the same extent. In this case, even if the second input port is not the main cause of the blockage of the target output port, the PFC threshold corresponding to the second input port will also be reduced to the same extent as the PFC threshold corresponding to the first input port, thereby affecting the packet transmission of the second input port to other output ports and greatly reducing the transmission efficiency of the packets.

[0146] In the embodiment of this application, when it is identified that the second input port is not the main cause of the blockage of the target output port, the PFC threshold corresponding to the second input port will be configured to be greater than the PFC threshold corresponding to the first input port. For example, the PFC threshold corresponding to the second input port can be increased, or the PFC threshold corresponding to the second input port can be kept unchanged, or the reduction amplitude of the PFC threshold corresponding to the second input port can be less than the reduction amplitude of the PFC threshold corresponding to the first input port. Furthermore, as the second input port that is not the main cause of the blockage of the target output port, it will not easily trigger the sending of indication information (such as a pause frame) to the upstream network device, and thus will not affect the packet transmission of the second input port for other output ports except the target output port, improving the transmission efficiency of the system.

[0147] Next, the beneficial effects of the embodiments of this application will be introduced in combination with the test results:

[0148] Technical effect 1: Reduce the probability of innocent business victims by 82% - 85%:

[0149] The experimental topology structure of the embodiment of the present application is as Figure 10 shown. This scenario is very classic and representative in the data center, such as in Clos, Fat-Tree, etc.

[0150] There are a total of 31 senders from H0 - H30 and 2 receivers from R0 - R1, which are connected by two switches S0 and S1. The bandwidth of all links is 50Gbps, with a delay of 5us. The traffic consists of long flows and concurrent burst short flows. Specifically, H0 and H1 respectively send long flows to R0 and R1. When the two long flows are stably transmitted, H2 - H30 simultaneously generate 29 burst short flows at line speed and send them to R1. The size of each short flow is 64KB, and the duration is 11us.

[0151] The experimental results show that compared with the existing scheme DT, the embodiment of the present application reduces the PFC pause trigger rate of the H0 - R0 service by 82% - 85%.

[0152] Technical effect 2: The embodiment of the present application can reduce the deadlock probability by 43%:

[0153] The experimental topology structure of the embodiment of the present application is as Figure 11 shown. In 1000 simulation experiments, the embodiment of the present application encountered 207 to 233 deadlocks, while the existing scheme DT encountered 592 to 668 deadlocks. The data processing method provided by the embodiment of the present application can reduce the deadlock probability from 66% to 23%, a reduction of 43%.

[0154] Refer to Figure 12 , Figure 12 is a schematic structural diagram of a data processing device provided by the embodiment of the present application. As Figure 12 shown, the device can be applied to network devices (such as switches, routers, etc.). The network device can include a first input port, a second input port, and a target output port; the device 1200 can include:

[0155] An acquisition module 1201, configured to respectively acquire the port status information of the first input port and the second input port; the port status information is related to the packet traffic received by the corresponding input port for the target output port;

[0156] Among them, for the specific description of the acquisition module 1201, reference can be made to the description of step 601 in the above embodiment, which will not be elaborated here.

[0157] A threshold configuration module 1202, configured to, based on the port status information, indicate that the increase rate of the packet traffic received by the first ingress port is greater than a threshold and the increase rate of the packet traffic received by the second ingress port is less than the threshold, configure a first PFC threshold for the first ingress port and configure a second PFC threshold for the second ingress port; wherein, the first PFC threshold is less than the second PFC threshold.

[0158] Wherein, for the specific description of the threshold configuration module 1202, reference may be made to the description of step 602 in the foregoing embodiment, which will not be elaborated herein.

[0159] In a possible implementation, the first ingress port and the second ingress port share the cache resources of the network device.

[0160] In a possible implementation, the first ingress port corresponds to a first ingress queue, and the second ingress port corresponds to a second ingress queue;

[0161] The network device is configured to, when the number of packets in the first ingress queue is greater than the first PFC threshold, send first indication information to the upstream port of the first ingress port, where the first indication information is used to indicate to stop sending packets to the first ingress port;

[0162] The network device is configured to, when the number of packets in the second ingress queue is greater than the second PFC threshold, send second indication information to the upstream port of the second ingress port, where the second indication information is used to indicate to stop sending packets to the second ingress port.

[0163] In a possible implementation, the port status information includes a first packet dequeue rate of the first ingress queue and a second packet dequeue rate of the second ingress queue;

[0164] The port status information indicating that the increase rate of the packet traffic received by the first ingress port is greater than a threshold includes:

[0165] The port status information indicates that the first packet dequeue rate is less than a dequeue rate threshold;

[0166] The port status information indicating that the increase rate of the packet traffic received by the second ingress port is less than the threshold includes:

[0167] The port status information indicates that the second packet dequeue rate is greater than the dequeue rate threshold.

[0168] In a possible implementation, the target egress port corresponds to a target egress queue, and the target egress queue is in a congested state.

[0169] In a possible implementation, the threshold configuration module is specifically configured to:

[0170] Configure the PFC threshold of the first input port from a third PFC threshold to the first PFC threshold, where the first PFC threshold is less than the third PFC threshold.

[0171] In a possible implementation, the threshold configuration module is specifically configured to:

[0172] Configure the PFC threshold of the second input port from a fourth PFC threshold to the second PFC threshold; where the second PFC threshold is greater than or equal to the fourth PFC threshold, or the second PFC threshold is less than the fourth PFC threshold, and the reduction amplitude of the second PFC threshold compared to the fourth PFC threshold is less than the reduction amplitude of the first PFC threshold compared to the third PFC threshold.

[0173] In a possible implementation, the third PFC threshold is equal to the fourth PFC threshold.

[0174] Based on the same inventive concept, an embodiment of the present invention further provides a network device 1300. Referring to Figure 13 as shown, the network device 1300 is used to implement the steps of the data processing method described in the corresponding embodiment in the above method embodiment. The network device 1300 in this embodiment may include: a memory 1301, a processor 1302, and a computer program stored in the memory and executable on the processor, such as a data processing program. When the processor executes the computer program, the steps in the above various data processing method embodiments are implemented. Figure 6 In the embodiment of the invention, the specific connection medium between the above-mentioned memory 1301 and the processor 1302 is not limited. In the embodiment of the present application

[0175] it is connected by a bus 1303 between the memory 1301 and the processor 1302. The bus 1303 is represented by a thick line in Figure 5 The connection manners between other components are only for illustrative purposes and are not limited thereto. The bus 1303 may be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 13 it is only represented by a thick line in Figure 13 but it does not mean that there is only one bus or one type of bus.

[0176] The memory 1301 can be a volatile memory, such as a random-access memory (RAM); the memory 1301 can also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD), or the memory 1301 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1301 can be a combination of the above memories.

[0177] An embodiment of the present application further provides a computer program product, which when running on a computer causes the computer to execute the above embodiments Figure 6 the steps of the data processing method described in the corresponding embodiments.

[0178] An embodiment of the present application further provides a computer-readable storage medium, which stores a program for signal processing. When running on a computer, it causes the computer to execute as in the foregoing embodiments Figure 6 the steps of the data processing method described in the corresponding embodiments.

[0179] In addition, it should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the device embodiments provided in the present application, the connection relationships between the modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.

[0180] Through the description of the above embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions accomplished by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, for this application, software program implementation is a better embodiment in more cases. Based on such an understanding, the technical solution of this application, in essence, or the part that makes contributions to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disc of a computer, and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.

[0181] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.

[0182] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

Claims

1. A data processing method, characterized in that The method is applied to a network device, which includes a first ingress port, a second ingress port, and a target egress port; the method includes: Obtaining the port status information of the first ingress port and the second ingress port respectively; the port status information is related to the packet traffic received by the corresponding ingress port for the target egress port; Based on the port status information indicating that the increase rate of the packet traffic received by the first ingress port is greater than a threshold, and the increase rate of the packet traffic received by the second ingress port is less than the threshold, configuring a first priority-based flow control (PFC) threshold for the first ingress port and a second PFC threshold for the second ingress port; wherein, the first PFC threshold is less than the second PFC threshold.

2. The method according to claim 1, wherein The first ingress port and the second ingress port share the cache resources of the network device.

3. The method according to claim 1, wherein The first ingress port corresponds to a first ingress queue, and the second ingress port corresponds to a second ingress queue; The network device is configured to send a first indication message to the upstream port of the first ingress port when the number of packets in the first ingress queue is greater than the first PFC threshold, and the first indication message is used to indicate to stop sending packets to the first ingress port; The network device is configured to send a second indication message to the upstream port of the second ingress port when the number of packets in the second ingress queue is greater than the second PFC threshold, and the second indication message is used to indicate to stop sending packets to the second ingress port.

4. The method according to claim 3, characterized in that, The port status information includes a first packet dequeue rate of the first ingress queue and a second packet dequeue rate of the second ingress queue; The port status information indicating that the increase rate of the packet traffic received by the first ingress port is greater than a threshold includes: The port status information indicates that the first packet dequeue rate is less than a dequeue rate threshold; The increase rate of the packet traffic received by the second ingress port being less than the threshold includes: The port status information indicates that the second packet dequeue rate is greater than the dequeue rate threshold.

5. The method according to any one of claims 1 to 4, characterized in that The target egress port corresponds to a target egress queue, and the target egress queue is in a congested state.

6. The method according to any one of claims 1 to 4, characterized in that, The configuring the first PFC threshold for the first ingress port includes: Configuring the PFC threshold of the first ingress port from a third PFC threshold to the first PFC threshold, and the first PFC threshold is less than the third PFC threshold.

7. The method according to claim 6, characterized in that, The configuring the second PFC threshold for the second ingress port includes: Configuring the PFC threshold of the second ingress port from a fourth PFC threshold to the second PFC threshold; wherein, the second PFC threshold is greater than or equal to the fourth PFC threshold, or the second PFC threshold is less than the fourth PFC threshold, and the reduction amplitude of the second PFC threshold compared to the fourth PFC threshold is less than the reduction amplitude of the first PFC threshold compared to the third PFC threshold.

8. The method according to claim 7, wherein The third PFC threshold and the fourth PFC threshold are equal.

9. A data processing device, characterized in that, The apparatus is applied to a network device, which includes a first ingress port, a second ingress port, and a target egress port; the apparatus includes: An acquisition module, configured to acquire port status information of a first ingress port and the second ingress port respectively; the port status information is related to the packet traffic received by the corresponding ingress port for the target egress port. A threshold configuration module, configured to configure a first PFC threshold for the first ingress port and a second PFC threshold for the second ingress port based on the port status information indicating that the increase rate of the packet traffic received by the first ingress port is greater than a threshold and the increase rate of the packet traffic received by the second ingress port is less than the threshold; wherein, the first PFC threshold is less than the second PFC threshold.

10. The device according to claim 9, characterized in that, The first ingress port and the second ingress port share the buffer resources of the network device.

11. The device according to claim 9, characterized in that, The first ingress port corresponds to a first ingress queue, and the second ingress port corresponds to a second ingress queue. The network device is configured to send a first indication message to an upstream port of the first ingress port when the number of packets in the first ingress queue is greater than the first PFC threshold, and the first indication message is used to indicate to stop sending packets to the first ingress port. The network device is configured to send a second indication message to an upstream port of the second ingress port when the number of packets in the second ingress queue is greater than the second PFC threshold, and the second indication message is used to indicate to stop sending packets to the second ingress port.

12. The device according to claim 11, wherein The port status information includes a first packet dequeue rate of the first ingress queue and a second packet dequeue rate of the second ingress queue. The port status information indicating that the increase rate of the packet traffic received by the first ingress port is greater than a threshold includes: The port status information indicates that the first packet dequeue rate is less than a dequeue rate threshold. The increase rate of the packet traffic received by the second ingress port being less than the threshold includes: The port status information indicates that the second packet dequeue rate is greater than the dequeue rate threshold.

13. The device according to any one of claims 9 to 12, characterized in that The target egress port corresponds to a target egress queue, and the target egress queue is in a congested state.

14. The device according to any one of claims 9 to 12, characterized in that, The threshold configuration module is specifically configured to: Configure the PFC threshold of the first ingress port from a third PFC threshold to the first PFC threshold, and the first PFC threshold is less than the third PFC threshold.

15. The device according to claim 14, characterized in that, The threshold configuration module is specifically configured to: Configure the PFC threshold of the second ingress port from a fourth PFC threshold to the second PFC threshold; wherein, the second PFC threshold is greater than or equal to the fourth PFC threshold, or the second PFC threshold is less than the fourth PFC threshold, and the reduction amplitude of the second PFC threshold compared to the fourth PFC threshold is less than the reduction amplitude of the first PFC threshold compared to the third PFC threshold.

16. The device according to claim 15, characterized in that, The third PFC threshold and the fourth PFC threshold are equal.

17. A network device, characterized in that, The device includes a processor, a memory, and a bus, wherein: The processor and the memory are connected through the bus. The memory is used to store a computer program or instruction. The processor is configured to call or execute the program or instruction stored on the memory to implement the method steps of any one of claims 1-8.

18. A computer-readable storage medium includes a program which, when running on a computer, causes the computer to execute the method according to any one of claims 1 to 8.

19. A computer program product comprising instructions, characterized in that, When the computer program product runs on a computer, it causes the computer to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Congestion avoidance in network switch device

    CN109391557A

  • Traffic management in a network switching system with remote physical ports

    CN109565477A