PFC deadlock detection adaptive method, device, storage medium and electronic device

By obtaining the congestion index of the interconnected port and dynamically adjusting the deadlock threshold, the problem of untimely PFC deadlock detection in the existing technology is solved, and more accurate PFC deadlock detection is achieved to avoid the reduction of network throughput.

CN116723134BActive Publication Date: 2025-09-19MAIPU COMM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310842811.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-10
Publication Date
2025-09-19
Estimated Expiration
2043-07-10

AI Technical Summary

Technical Problem

In the prior art, PFC deadlock detection relies on manually set deadlock thresholds, which cannot detect deadlocks occurring in the network in a timely manner, causing the network throughput to drop to zero.

Method used

By obtaining the congestion index of the interconnected port and adjusting the deadlock threshold adjustment coefficient, the deadlock threshold is dynamically adjusted to adapt to changes in the network environment, thereby achieving timely detection of PFC deadlock.

Benefits of technology

The accuracy and timeliness of PFC deadlock detection are improved, avoiding the problem of the overall or partial network throughput being reduced to zero due to network deadlock.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116723134B_ABST
    Figure CN116723134B_ABST
Patent Text Reader

Abstract

The present application provides a PFC deadlock detection adaptive method, device, storage medium, and electronic device, relating to the field of communications. If a PFC deadlock is detected, the electronic device obtains a congestion index for at least one interconnected port. The PFC deadlock detection mechanism detects whether a PFC deadlock has occurred based on a current deadlock threshold. An adjustment coefficient for the deadlock threshold is then obtained based on the congestion index for the at least one interconnected port. The deadlock threshold is then adjusted based on the adjustment coefficient to obtain a new deadlock threshold. This allows the deadlock threshold in the PFC deadlock detection mechanism to change in accordance with the congestion status of the interconnected ports, enabling timely detection of PFC deadlocks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a PFC deadlock detection adaptive method, device, storage medium, and electronic device. Background Art

[0002] Priority-Based Flow Control (PFC) technology allows the creation of eight virtual channels on an Ethernet link, assigning each virtual channel a specific priority. Each virtual channel can be individually paused and restarted while allowing traffic on other virtual channels to flow uninterrupted. Based on the preconfigured priority of each virtual channel, the switch forwards packets according to their priority and assigns them to the corresponding queue for forwarding. When congestion on a switch port triggers the PFC watermark (XOFF watermark), the incoming data direction (i.e., the downstream device) sends a PFC PAUSE frame to apply backpressure. Upon receiving the PFC PAUSE frame, the upstream device stops sending data. If its local port buffer usage exceeds the threshold, it continues to apply backpressure upstream. This process continues upstream until the network end server pauses sending data within the pause time specified in the PAUSE frame, thus eliminating packet loss caused by congestion at network nodes. PFC ensures that congestion in one type of traffic does not affect the normal forwarding of other types of traffic, ensuring that different types of traffic on the same link do not interfere with each other.

[0003] like Figure 1 As shown, Figure 1 A link failure or device failure between the four switches in the topology can cause a brief loop during routing reconvergence. When all four switches reach the XOFF watermark, they simultaneously send PFC PAUSE frames to their upstream devices, causing their respective port buffers to exceed their thresholds while waiting for each other to release resources. Ultimately, all switches in the topology are in a paused state. Due to the back pressure effect of PFC, the throughput of the entire network or part of the network will drop to zero. Therefore, to resolve PFC deadlock, the first step is to perform PFC deadlock detection on network devices to determine whether PFC deadlock has occurred.

[0004] Currently, when a switch detects a PFC PAUSE frame, the internal scheduler stops sending traffic to the corresponding priority queue and starts a timer to count PFC PAUSE frames received by the queue based on the deadlock detection period and the deadlock threshold. If the queue remains in flow control within the configured PFC deadlock detection time, PFC deadlock is considered to have occurred, and the PFC deadlock recovery process must be performed.

[0005] For example, assume the deadlock detection period is 50 ms and the deadlock threshold is 40 times. This means that the switch chip scans every 50 ms to check whether a PFC PAUSE frame has been received within this 50 ms. If a PFC PAUSE frame is received 40 times in a row, a deadlock is determined to have occurred.

[0006] Based on the above description of the prior art, it should also be understood that the deadlock threshold can be configured based on different chips, but the accuracy of deadlock detection does depend on the chip capabilities of different manufacturers. Therefore, the overall method is to count the number of PFC PAUSE frames that reach the deadlock threshold within a certain period to determine whether a deadlock has been detected. However, research has found that because the deadlock threshold is manually set at the beginning, even if a deadlock has occurred, the manually set deadlock threshold may not necessarily detect the deadlock in time. For example, when PFC PAUSE frames are received 20 times in a row, a deadlock has occurred; and when the manually set deadlock threshold is 40, PFC PAUSE frames still need to be received within the remaining 20 periods to determine that a deadlock has occurred. Summary of the Invention

[0007] In order to overcome at least one deficiency in the prior art, the present application provides a PFC deadlock detection adaptive method, device, storage medium, and electronic device, specifically including:

[0008] In a first aspect, the present application provides a PFC deadlock detection adaptive method, the method comprising:

[0009] If a PFC deadlock is detected based on the current deadlock threshold, obtaining a congestion indicator of at least one interconnect port;

[0010] obtaining an adjustment coefficient of the deadlock threshold according to a congestion index of the at least one interconnected port;

[0011] The deadlock threshold is adjusted according to the adjustment coefficient to obtain a new deadlock threshold.

[0012] In conjunction with an optional implementation manner of the first aspect, obtaining a congestion index of at least one interconnected port includes:

[0013] For each of the interconnected ports, counting a first number of received first messages and a second number of received second messages at the interconnected port within a preset monitoring period, wherein both the first message and the second message are PFC PAUSE frames, and the first message can interfere with traffic forwarding;

[0014] A congestion index of the interconnection port is obtained according to the first reception quantity and the second reception quantity.

[0015] In conjunction with an optional implementation manner of the first aspect, the expression for obtaining the congestion index of the interconnected port according to the first reception quantity and the second reception quantity is:

[0016]

[0017] In the formula, T represents the congestion index, x1 represents the first received quantity, and x2 represents the second received quantity.

[0018] With reference to the optional implementation manner of the first aspect, the first message is a PFC PAUSE frame with a timestamp non-zero, and the second message is a PFC PAUSE frame with a timestamp zero.

[0019] In conjunction with an optional implementation manner of the first aspect, obtaining the adjustment coefficient of the deadlock threshold according to the congestion index of the at least one interconnected port includes:

[0020] Obtaining a congestion mean value between congestion indicators of the at least one interconnected port;

[0021] The congestion mean is used as the adjustment coefficient.

[0022] In conjunction with an optional implementation manner of the first aspect, adjusting the deadlock threshold according to the adjustment coefficient to obtain a new deadlock threshold includes:

[0023] If the opposite device in communication with the at least one interconnect port also detects a PFC deadlock, the deadlock threshold is adjusted according to the adjustment coefficient to obtain a new deadlock threshold.

[0024] In conjunction with the optional implementation manner of the first aspect, the method further includes:

[0025] receiving a device status message sent by the opposite device;

[0026] If the device status message includes a deadlock detection flag, it is determined that the opposite device has also detected a PFC deadlock.

[0027] In a second aspect, the present application further provides a PFC deadlock detection adaptive device, the device comprising:

[0028] a congestion module configured to obtain a congestion indicator of at least one interconnect port if a PFC deadlock is detected based on a current deadlock threshold;

[0029] a coefficient module, configured to obtain an adjustment coefficient of the deadlock threshold according to a congestion index of the at least one interconnected port;

[0030] The threshold module is configured to adjust the deadlock threshold according to the adjustment coefficient to obtain a new deadlock threshold.

[0031] In conjunction with an optional implementation manner of the second aspect, the congestion module is further configured to:

[0032] For each of the interconnected ports, counting a first number of received first messages and a second number of received second messages at the interconnected port within a preset monitoring period, wherein both the first message and the second message are PFC PAUSE frames, and the first message can interfere with traffic forwarding;

[0033] A congestion index of the interconnection port is obtained according to the first reception quantity and the second reception quantity.

[0034] In conjunction with an optional implementation manner of the second aspect, the expression for obtaining the congestion index of the interconnected port based on the first reception quantity and the second reception quantity is:

[0035]

[0036] In the formula, T represents the congestion index, x1 represents the first received quantity, and x2 represents the second received quantity.

[0037] With reference to the optional implementation manner of the second aspect, the first message is a PFC PAUSE frame with a timestamp non-zero, and the second message is a PFC PAUSE frame with a timestamp zero.

[0038] In conjunction with the optional implementation manner of the second aspect, the coefficient module is further configured to:

[0039] Obtaining a congestion mean value between congestion indicators of the at least one interconnected port;

[0040] The congestion mean is used as the adjustment coefficient.

[0041] In conjunction with the optional implementation manner of the second aspect, the threshold module is further configured to:

[0042] If the opposite device in communication with the at least one interconnect port also detects a PFC deadlock, the deadlock threshold is adjusted according to the adjustment coefficient to obtain a new deadlock threshold.

[0043] In conjunction with the optional implementation manner of the first aspect, the congestion module is further configured to:

[0044] receiving a device status message sent by the opposite device;

[0045] If the device status message includes a deadlock detection flag, it is determined that the opposite device has also detected a PFC deadlock.

[0046] In a third aspect, the present application further provides a storage medium storing a computer program, wherein when the computer program is executed by a processor, the PFC deadlock detection adaptive method is implemented.

[0047] In a fourth aspect, the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the PFC deadlock detection adaptive method is implemented.

[0048] Compared with the prior art, this application has the following beneficial effects:

[0049] In the PFC deadlock detection adaptive method, device, storage medium, and electronic device provided herein, if a PFC deadlock is detected based on a current deadlock threshold, the electronic device obtains a congestion index for at least one interconnected port. The PFC deadlock detection mechanism detects whether a PFC deadlock has occurred based on the current deadlock threshold. Then, based on the congestion index for the at least one interconnected port, an adjustment coefficient for the deadlock threshold is obtained. The deadlock threshold is adjusted based on the adjustment coefficient to obtain a new deadlock threshold. This allows the deadlock threshold in the PFC deadlock detection mechanism to change in accordance with the congestion status of the interconnected ports, enabling timely detection of PFC deadlocks. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0051] Figure 1 A deadlock diagram provided in an embodiment of the present application;

[0052] Figure 2 Flowchart of the PFC deadlock detection adaptive method provided in an embodiment of the present application;

[0053] Figure 3 A structural diagram of a PFC deadlock detection adaptive device provided in an embodiment of the present application;

[0054] Figure 4 A schematic diagram of the electronic device structure provided in an embodiment of the present application.

[0055] Icons: 101 - congestion module; 102 - coefficient module; 103 - threshold module; 201 - memory; 202 - processor; 203 - communication unit; 204 - system bus. DETAILED DESCRIPTION

[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.

[0057] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.

[0058] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0059] In the description of this application, it should be noted that the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be understood as indicating or implying relative importance. In addition, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0060] Based on the above statement, as introduced in the background technology, when deadlock detection is currently performed based on the deadlock detection cycle value and deadlock threshold, the deadlock threshold is manually configured by the user based on experience, resulting in the inability to adapt to changes in the network environment and the inability to detect deadlock in a timely manner.

[0061] Based on the discovery of the above technical problems, the inventors have proposed the following technical solutions after creative work to solve or improve the above problems. It should be noted that the defects existing in the solutions in the above prior art and the solutions provided in this embodiment are the results obtained by the inventors after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed in the embodiments of this application below for the above problems should all be the contributions made by the inventors to this application in the process of invention and creation, and should not be understood as technical contents known to those skilled in the art.

[0062] In light of this, this embodiment provides an adaptive PFC deadlock detection method. In this method, if a PFC deadlock is detected based on a current deadlock threshold, the electronic device obtains a congestion index for at least one interconnected port. Then, based on the congestion index of the at least one interconnected port, an adjustment coefficient for the deadlock threshold is obtained. The deadlock threshold is adjusted based on the adjustment coefficient to obtain a new deadlock threshold. In this way, the deadlock threshold in the PFC deadlock detection mechanism changes according to the congestion level of the interconnected ports, enabling timely detection of PFC deadlocks. The electronic device can be a network device such as a switch or router.

[0063] To make the solution provided by this embodiment clearer, the following takes a switch as an example. Figure 2 Each step of the method is described in detail. However, it should be understood that the operations in the flowchart can be implemented in a non-sequential order, and steps that have no logical contextual relationship can be reversed or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart, or remove one or more operations from the flowchart, guided by the content of this application. Figure 2 As shown, the method includes:

[0064] S101: If a PFC deadlock is detected based on a current deadlock threshold, a congestion index of at least one interconnected port is obtained.

[0065] As described in the above embodiment, a switch equipped with a deadlock detection mechanism, when not in the PFC PAUSE frame statistics state, upon receiving a PFC PAUSE frame, begins counting the PFC PAUSE frames received by the queue based on the deadlock detection period value and the deadlock threshold. When the PFC PAUSE frame statistics meet the deadlock condition, it means that a PFC deadlock has occurred. For example, when the period value is 50ms and the deadlock threshold is 40 times, it means that the switch scans once every 50ms to check whether a PFC PAUSE frame has been received within these 50ms. If a PFC PAUSE frame is received 40 times in a row, it means that a PFC deadlock has occurred. It is worth noting that, compared to the period value in the above example, the deadlock threshold can be flexibly adjusted as needed. In addition, the above deadlock detection method based on the deadlock threshold is merely an example provided for ease of explanation. Other deadlock detection methods based on the deadlock threshold are not further described in this embodiment.

[0066] In conjunction with the above introduction to the deadlock threshold, after studying PFC messages, it was discovered that PFC messages are multicast messages with a message length of 64 bytes. These 64 bytes include a field for recording timestamps, and the recorded timestamps can be either 0 or non-0. Only messages with non-0 timestamps affect cache occupancy and actual message forwarding, for example, PFC PAUSE frames with a timestamp of 65535. Therefore, in this embodiment, PFC PAUSE frames with a non-0 timestamp are used as the first message, and PFC PAUSE frames with a timestamp of 0 are used as the second message. The following implementation method for step S101 is also provided:

[0067] S101 - 1 : For each interconnection port, count a first number of first messages received and a second number of second messages received by the interconnection port within a preset monitoring period.

[0068] S101 - 2 , obtaining a congestion index of the interconnection port according to the first reception quantity and the second reception quantity.

[0069] The first reception quantity, the second reception quantity, and the congestion index satisfy the following relationship:

[0070]

[0071] In the formula, T represents the congestion indicator, x1 represents the first number of received frames, and x2 represents the second number of received frames. It should also be understood that since each interconnect port has eight virtual channels, and each virtual channel may receive a PFC PAUSE frame, x1 is actually the sum of PFC PAUSE frames with a non-zero timestamp received by each virtual channel during the preset monitoring period. Similarly, x2 is actually the sum of PFC PAUSE frames with a zero timestamp received by each virtual channel. The larger the proportion of x1, the more congested the interconnect port is during the preset monitoring period.

[0072] Furthermore, the preset monitoring period can be a preset time period after the PFC deadlock detection is triggered, and the duration of the preset monitoring period can be shorter than the original detection duration of the PFC deadlock detection mechanism, so as to detect congestion on the interconnect port within the detection duration of the PFC deadlock detection mechanism. For example, assuming that the original period value of the PFC deadlock detection mechanism is 50ms and the deadlock threshold is 40 times, the detection duration of the PFC deadlock detection mechanism is 50ms*40=2s, and the duration of the preset monitoring period can be 1s.

[0073] Combined with the above introduction to congestion indicators, continue to refer to Figure 2 , the method further comprises:

[0074] S102: Obtain an adjustment coefficient of a deadlock threshold according to a congestion indicator of at least one interconnected port.

[0075] In an optional implementation, the switch can obtain the average congestion index of at least one interconnected port and use the average congestion index as the adjustment coefficient. It should be understood that when the switch is connected to a peer device via multiple interconnected ports, in order to comprehensively consider the congestion indexes of all interconnected ports, this embodiment uses the average congestion index as the adjustment coefficient. The corresponding expression is:

[0076] T mean =(T1+T2+T3+…T n ) / n

[0077] Where, T mean represents the adjustment coefficient, T n It represents the congestion index of the nth interconnection port, where n is the number of interconnection ports.

[0078] Further, based on the above introduction to the adjustment coefficient, see Figure 2 , the method further comprises:

[0079] S103: Adjust the deadlock threshold according to the adjustment coefficient to obtain a new deadlock threshold.

[0080] The expression for adjusting the current deadlock threshold is:

[0081] Y′=Y*T mean ;

[0082] Where Y′ represents the new deadlock threshold, Y represents the current deadlock threshold, and T mean Represents the adjustment factor. For example, assuming the current PFC deadlock detection mechanism period is 50ms and the deadlock threshold is 40, and the adjustment factor is 0.8, the new deadlock threshold is 0.8 * 40 = 32. Therefore, when a PFC PAUSE frame is received again, the PFC PAUSE frame is counted based on the period of 50ms and the deadlock threshold of 32.

[0083] Research also found that since PFC deadlock often occurs in a loop, if a deadlock does occur, other devices in the loop will also detect it. Therefore, to avoid accidental errors, before adjusting the current deadlock threshold, it is possible to verify with the peer device that both devices have detected the PFC deadlock. Therefore, if the peer device also detects PFC deadlock, the switch adjusts the current deadlock threshold of the PFC deadlock detection mechanism based on the adjustment factor to obtain the new deadlock threshold.

[0084] To verify whether the peer device has also detected a PFC deadlock, the switch can receive a device status message from the peer device. If the device status message includes a deadlock detection flag, the peer device is determined to have also detected a PFC deadlock. Similarly, if the switch detects a PFC deadlock, it can also send its own device status message to the peer device to inform it of the PFC deadlock detection.

[0085] For example, the device status message can be a message based on the Link Layer Discovery Protocol (LLDP). If the peer device detects a PFC deadlock, the ratio of PFCPAUSE frames with a timestamp of 65535 can be used as a deadlock detection flag and added to the extended field of the LLDP message. Based on the ratio in the extended field, the switch can determine that the peer device has also detected a PFC deadlock.

[0086] Based on the same inventive concept as the PFC deadlock detection adaptive method provided in this embodiment, this embodiment also provides a PFC deadlock detection adaptive device, which includes at least one software function module that can be stored in a memory or fixed in an electronic device in the form of software. The processor in the electronic device is used to execute the executable module stored in the memory. For example, the software function module and computer program included in the PFC deadlock detection adaptive device. Please refer to Figure 3 Functionally, the PFC deadlock detection adaptive device includes:

[0087] The congestion module 101 is configured to obtain a congestion indicator of at least one interconnect port if a PFC deadlock is detected based on a current deadlock threshold;

[0088] A coefficient module 102 is configured to obtain an adjustment coefficient of a deadlock threshold according to a congestion indicator of at least one interconnected port;

[0089] The threshold module 103 is configured to adjust the deadlock threshold according to the adjustment coefficient to obtain a new deadlock threshold.

[0090] In this embodiment, the congestion module 101 is used to implement Figure 2 In step S101, the coefficient module 102 is used to implement Figure 2 In step S102, the threshold module 103 is used to implement Figure 2 For detailed descriptions of each module, please refer to the specific embodiments of the corresponding steps. It is worth noting that, since the PFC deadlock detection adaptive method shares the same inventive concept, the modules included in the PFC deadlock detection adaptive device can also be used to implement other steps or sub-steps of the method, which is not specifically limited in this embodiment.

[0091] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0092] It should also be understood that if the above embodiments are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.

[0093] Therefore, this embodiment further provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the PFC deadlock detection adaptive method provided in this embodiment. The computer-readable storage medium can be any medium capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0094] This embodiment provides an electronic device. Figure 4 As shown, the electronic device may include a processor 202 and a memory 201. In addition, the memory 201 stores a computer program, and the processor implements the PFC deadlock detection adaptive method provided in this embodiment by reading and executing the computer program corresponding to the above embodiment in the memory 201.

[0095] Continue to see Figure 4 The electronic device further includes a communication unit 203. The memory 201, the processor 202 and the communication unit 203 are electrically connected to each other directly or indirectly via a system bus 204 to achieve data transmission or interaction.

[0096] The memory 201 may be an information recording device based on any electronic, magnetic, optical or other physical principles, for recording execution instructions, data, etc. In some embodiments, the memory 201 may be, but is not limited to, a volatile memory, a non-volatile memory, a storage drive, etc.

[0097] In some embodiments, the volatile memory may be a random access memory (RAM); in some embodiments, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, etc.; in some embodiments, the storage drive may be a magnetic disk drive, a solid-state drive, any type of storage disk (such as a CD, DVD, etc.), or a similar storage medium, or a combination thereof.

[0098] The communication unit 203 is used to send and receive data through a network. In some embodiments, the network may include a wired network, a wireless network, a fiber optic network, a telecommunications network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a wide area network (WAN), a public switched telephone network (PSTN), a Bluetooth network, a ZigBee network, or a near field communication (NFC) network, or any combination thereof. In some embodiments, the network may include one or more network access points. For example, the network may include a wired or wireless network access point, such as a base station and / or a network switching node, through which one or more components of the service request processing system can connect to the network to exchange data and / or information.

[0099] The processor 202 may be an integrated circuit chip having signal processing capabilities, and the processor may include one or more processing cores (e.g., a single-core processor or a multi-core processor). By way of example only, the processor may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), an application-specific instruction set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a controller, a microcontroller unit, a reduced instruction set computer (RISC), or a microprocessor, or any combination thereof.

[0100] It should be understood that the devices and methods disclosed in the above embodiments may also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of the devices, methods, and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes may actually be executed substantially in parallel, or they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, may be implemented using a dedicated hardware-based system that performs a specified function or action, or may be implemented using a combination of dedicated hardware and computer instructions.

[0101] The above descriptions are merely examples of various embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any modifications or substitutions that can be readily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included within the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A PFC deadlock detection adaptive method, characterized in that: The method comprises: If a PFC deadlock is detected based on the current deadlock threshold, a congestion indicator of at least one interconnect port is obtained, including: For each of the interconnected ports, obtaining a first number of received first messages and a second number of received second messages for the interconnected port within a preset monitoring period, wherein the first message is a PFC PAUSE frame with a timestamp non-zero, and the second message is a PFC PAUSE frame with a timestamp zero; According to the first reception quantity and the second reception quantity, a congestion index of the interconnection port is obtained, which is expressed as: ; Where, represents the congestion index, represents the first received quantity; represents the second received quantity; Obtaining an adjustment coefficient for the deadlock threshold according to a congestion indicator of the at least one interconnected port includes: Obtaining a congestion mean value between congestion indicators of the at least one interconnected port; Using the congestion mean as the adjustment coefficient; The deadlock threshold is adjusted according to the adjustment coefficient to obtain a new deadlock threshold.

2. The PFC deadlock detection adaptive method according to claim 1, characterized in that: The step of adjusting the deadlock threshold according to the adjustment coefficient to obtain a new deadlock threshold includes: If the opposite device in communication with the at least one interconnect port also detects a PFC deadlock, the deadlock threshold is adjusted according to the adjustment coefficient to obtain a new deadlock threshold.

3. The PFC deadlock detection adaptive method according to claim 2, characterized in that: The method further comprises: receiving a device status message sent by the opposite device; If the device status message includes a deadlock detection flag, it is determined that the opposite device has also detected a PFC deadlock.

4. A PFC deadlock detection adaptive device, characterized in that: The device comprises: A congestion module is configured to obtain a congestion indicator of at least one interconnect port if a PFC deadlock is detected based on the current deadlock threshold. The congestion module is specifically configured to: For each of the interconnected ports, obtaining a first number of received first messages and a second number of received second messages for the interconnected port within a preset monitoring period, wherein the first message is a PFC PAUSE frame with a timestamp non-zero, and the second message is a PFC PAUSE frame with a timestamp zero; According to the first reception quantity and the second reception quantity, a congestion index of the interconnection port is obtained, which is expressed as: ; Where, represents the congestion index, represents the first received quantity; represents the second received quantity; A coefficient module is used to obtain an adjustment coefficient of the deadlock threshold according to the congestion index of the at least one interconnected port, and the coefficient module is specifically used to: Obtaining a congestion mean value between congestion indicators of the at least one interconnected port; Using the congestion mean as the adjustment coefficient; The threshold module is configured to adjust the deadlock threshold according to the adjustment coefficient to obtain a new deadlock threshold.

5. A storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by the processor, the PFC deadlock detection adaptive method according to any one of claims 1 to 3 is implemented.

6. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the PFC deadlock detection adaptive method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • High-speed network congestion control method and device based on dynamic threshold

    CN113938433A

  • PFC deadlock detection method and device

    CN114157609A