Pfc deadlock detection method and apparatus, electronic device, and storage medium
By receiving PFC backpressure frame information, calculating the convergence time, and adjusting the deadlock detection period, the problem of low accuracy in PFC deadlock detection is solved, achieving higher detection accuracy and adaptability.
Patent Information
- Application Number
- CN202311577904.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-23
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-11-23
AI Technical Summary
Existing technologies have low accuracy in PFC deadlock detection and cannot effectively identify deadlock states between network devices.
By receiving PFC backpressure frame information from terminal devices, the convergence time of the backpressure link is calculated, and the deadlock detection cycle of network devices is adjusted according to this time to improve detection accuracy.
It improves the accuracy and adaptability of PFC deadlock detection, avoiding network congestion caused by inaccurate deadlock detection cycles.
Smart Images

Figure CN117614860B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and more specifically, to a PFC deadlock detection method, apparatus, electronic device, and storage medium. Background Technology
[0002] Priority-based flow control (PFC) is a widely used flow control technique. PFC deadlock refers to a network state where multiple network devices experience congestion simultaneously due to loops or other reasons, their port buffers exceed thresholds, and they wait for each other to release resources, resulting in a permanent blockage of data flow on all switches.
[0003] In existing technologies, PFC deadlock detection is performed by adding a loop detection mechanism as a preprocessing step based on a fixed detection accuracy and number of detections. However, in practical applications, when PFC deadlock occurs between network devices, a loop may not necessarily exist, resulting in low accuracy of PFC deadlock detection. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a PFC deadlock detection method, apparatus, electronic device and storage medium to solve the problem of low accuracy of PFC deadlock detection in the prior art.
[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows:
[0006] In a first aspect, the present invention provides a PFC deadlock detection method applied to a controller, the controller being communicatively connected to multiple network devices and terminal devices, the method comprising:
[0007] Receive feedback information sent by any of the terminal devices based on the received PFC backpressure frame; the feedback information includes the time when the network device that first experienced outgoing congestion on the backpressure link generated the PFC backpressure frame and the time when the terminal device received the PFC backpressure frame;
[0008] The convergence time of the backpressure link is obtained based on the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame. The convergence time is then sent to the network device that first experienced outgoing congestion so that the network device that first experienced outgoing congestion can adjust the deadlock detection cycle based on the convergence time.
[0009] In an optional implementation, obtaining the convergence time of the backpressure link based on the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame includes:
[0010] Calculate the time difference between the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame.
[0011] The convergence time of the backpressure link is determined based on the time difference, so that the deadlock detection period of the network device that first experiences outbound congestion is greater than or equal to the convergence time.
[0012] In an optional implementation, the feedback information further includes the identification information of the network device that first experienced egress congestion, obtained based on the received PFC backpressure frame, and the step of sending the convergence time to the network device that first experienced egress congestion includes:
[0013] Based on the identification information, the network device that first experienced outgoing congestion is identified, and the convergence time is sent to the network device that first experienced outgoing congestion.
[0014] Secondly, the present invention provides a PFC deadlock detection method, applicable to any one of multiple network devices, wherein the multiple network devices are communicatively connected to a controller, and the controller is also communicatively connected to multiple terminal devices, the method comprising:
[0015] When outgoing congestion is detected, a PFC backpressure frame is generated and sent to the upstream device. The PFC backpressure frame carries the PFC backpressure frame generation time of the network device as the earliest network device to experience outgoing congestion on the backpressure link. This ensures that each upstream device on the backpressure link carries the PFC backpressure frame generation time when generating its own PFC backpressure frame and sends it to the controller through feedback information from the terminal device. The feedback information also includes the time when the terminal device receives the PFC backpressure frame from the network device it is connected to.
[0016] The system receives the convergence time of the backpressure link sent by the controller and adjusts the deadlock detection period according to the convergence time so that its own deadlock detection period is greater than or equal to the convergence time.
[0017] In an optional implementation, generating a PFC backpressure frame and sending it to the upstream device when outgoing congestion is detected includes:
[0018] The network device that generates the PFC backpressure frame is considered the network device that first experiences outbound congestion on the backpressure link, and the generated PFC backpressure frame carries the identification information of this device.
[0019] In an optional implementation, receiving the convergence time of the backpressure link sent by the controller and adjusting the deadlock detection period based on the convergence time includes:
[0020] If the convergence time is less than or equal to the deadlock detection cycle of this device, the deadlock detection cycle of this device will not be adjusted; otherwise, the deadlock detection cycle of this device will be adjusted to be greater than or equal to the convergence time.
[0021] Thirdly, the present invention provides a PFC deadlock detection device applied to a controller, wherein the controller is communicatively connected to multiple network devices and multiple terminal devices, and the device includes:
[0022] The feedback information receiving module is used to receive feedback information sent by any of the terminal devices based on the received PFC backpressure frame; the feedback information includes the time when the network device that first experienced outgoing congestion on the backpressure link generated the PFC backpressure frame and the time when the terminal device received the PFC backpressure frame.
[0023] The convergence time acquisition module is used to obtain a convergence time based on the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame, and send the convergence time to the network device that first experienced outgoing congestion, so that the network device that first experienced outgoing congestion can adjust the deadlock detection cycle according to the convergence time.
[0024] Fourthly, the present invention provides a PFC deadlock detection device, applied to any one of a plurality of network devices, wherein the plurality of network devices are communicatively connected to a controller, and the controller is also communicatively connected to a plurality of terminal devices, the device comprising:
[0025] The PFC module is used to generate a PFC backpressure frame and send it to the upstream device when outgoing congestion is detected. The PFC backpressure frame carries the PFC backpressure frame generation time of the network device as the earliest network device to experience outgoing congestion on the backpressure link, so that each upstream device on the backpressure link carries the PFC backpressure frame generation time when generating its own PFC backpressure frame and sends it to the controller through feedback information from the terminal device; the feedback information also includes the time when the terminal device receives the PFC backpressure frame from the network device it is connected to.
[0026] The convergence time receiving module is used to receive the convergence time of the backpressure link sent by the controller, and adjust the deadlock detection period according to the convergence time so that its own deadlock detection period is greater than or equal to the convergence time.
[0027] Fifthly, the present invention provides an electronic device including a processor and a memory, the memory storing a computer program executable by the processor, the processor executing the computer program to implement the PFC deadlock detection method described in any of the foregoing embodiments.
[0028] In a sixth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the PFC deadlock detection method as described in any of the foregoing embodiments.
[0029] The present invention provides a PFC deadlock detection method, apparatus, electronic device, and storage medium. The method is applied to a controller, which is communicatively connected to multiple network devices and multiple terminal devices. The method includes: receiving feedback information sent by any terminal device based on a received PFC backpressure frame. The feedback information includes the time when the network device that first experienced outgoing congestion on the backpressure link generated the PFC backpressure frame and the time when the terminal device received the PFC backpressure frame; obtaining the convergence time of the backpressure link based on the time when the network device that first experienced outgoing congestion generated the PFC backpressure frame and the time when the terminal device received the PFC backpressure frame; and sending the convergence time to the network device that first experienced outgoing congestion, so that the network device that first experienced outgoing congestion adjusts the deadlock detection cycle according to the convergence time, thereby improving the accuracy and adaptability of PFC deadlock detection.
[0030] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0031] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 This diagram illustrates an application environment of the PFC deadlock detection method provided in an embodiment of the present invention.
[0033] Figure 2 This invention provides a schematic flowchart of a PFC deadlock detection method.
[0034] Figure 3 This diagram illustrates another application environment of the PFC deadlock detection method provided in this embodiment of the invention.
[0035] Figure 4 A schematic diagram of the PFC reverse compression frame format provided in an embodiment of the present invention is shown;
[0036] Figure 5 This paper illustrates another flowchart of the PFC deadlock detection method provided in an embodiment of the present invention.
[0037] Figure 6 This invention provides a module block diagram of a PFC deadlock detection device according to an embodiment of the invention.
[0038] Figure 7 This invention illustrates another module block diagram of the PFC deadlock detection device provided in an embodiment of the present invention;
[0039] Figure 8 A block diagram of the PFC deadlock detection system provided in an embodiment of the present invention is shown.
[0040] Icons: 100-Controller; 200-Network device; 300-Terminal device; apparatus; 410-Feedback information receiving module; 420-Convergence time acquisition module; apparatus; 510-PFC module; 520-Convergence time receiving module; 600-Electronic device; 610-Memory; 620-Processor; 630-Communication module. Detailed Implementation
[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0042] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0043] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0044] In existing technologies, PFC deadlock detection is based on a fixed detection accuracy and number of detections. Further steps involve determining whether the network device forms a loop with other network devices. If a Layer 2 or tertiary loop exists, a PFC deadlock is confirmed. However, in practice, when a PFC deadlock occurs, due to buffer occupancy, there are often no packets that can be forwarded between the network devices. A loop is possible, but not certain. Therefore, using loop existence as a criterion still results in inaccurate PFC deadlock detection. To address this, the PFC deadlock detection method, apparatus, electronic device, and storage medium provided in this invention adjust the PFC deadlock detection cycle by adjusting the convergence time of the backpressure link based on the time when the network device experiencing the earliest egress congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame. This improves the accuracy and adaptability of PFC deadlock detection.
[0045] Please refer to Figure 1 , Figure 1 An environmental schematic diagram of the PFC deadlock detection method provided in an embodiment of the present invention is shown. For example... Figure 1 As shown, the controller 100 is communicatively connected to multiple network devices 200 and multiple terminal devices 300 to realize data interaction between the controller 100 and the multiple network devices 200 and the multiple terminal devices 300. The multiple network devices 200 are directly or indirectly communicatively connected to each other, and the specific connection relationship and the specific number of network devices 200 are not limited in this embodiment.
[0046] In one manner, the controller 100 can be connected to the network device 200 via Ethernet cable, Wi-Fi, ZigBee, or 2G / 3G / 4G / 5G; the controller 100 can be connected to the terminal device 300 via Ethernet cable, Wi-Fi, ZigBee, or 2G / 3G / 4G / 5G; and the network device 200 can be connected to the terminal device 300 via Ethernet cable, Wi-Fi, ZigBee, or 2G / 3G / 4G / 5G. No specific limitations are imposed here.
[0047] In some implementations, controller 100 can be used to manage multiple network devices 200. Network devices 200 can be devices such as switches and routers, and are not limited thereto. Terminal devices 300 can be devices such as desktop computers, laptops, and smartphones.
[0048] Please see Figure 2 , Figure 2 This diagram illustrates a flowchart of a PFC deadlock detection method provided in an embodiment of the present invention. This PFC deadlock detection method can be applied to controllers. The specific flow of this embodiment will be described below using a controller as an example. The following will focus on... Figure 2The process shown is described in detail. This PFC deadlock detection method may specifically include the following steps:
[0049] Step S110: Receive feedback information sent by any terminal device based on the received PFC backpressure frame; the feedback information includes the time when the network device that first experienced outgoing congestion on the backpressure link generated the PFC backpressure frame and the time when the terminal device received the PFC backpressure frame.
[0050] In this step, according to the PFC implementation mechanism, when each network device experiences outgoing congestion, it generates a PFC backpressure frame and sends it to the terminal device level by level through the upstream device in a backpressure manner. This means that when each network device experiences outgoing congestion, it generates a PFC backpressure frame and sends it to its upstream device. When the upstream device receiving the PFC backpressure frame experiences its own outgoing congestion, it generates its own PFC backpressure frame and sends it to its own upstream device (i.e., the upstream device's upstream device). In this way, network devices at each level generate PFC backpressure frames and reach the terminal device that sends the data stream.
[0051] In this embodiment, the link formed from the network device that first experiences outgoing congestion, through successive backpressure stages up to the terminal device, is referred to as the backpressure link. It can be understood that all network devices on the backpressure link are those experiencing outgoing congestion. The upstream device of the network device that first experiences outgoing congestion may be another network device or a terminal device.
[0052] like Figure 3 The diagram shown illustrates another application environment of the PFC deadlock detection method provided in this embodiment of the invention. Figure 3 The controller is not shown in the image; the controller is related to... Figure 3 (Both network devices and terminal devices are communication connected.) Figure 3This includes network devices 200A, 200B, 200C, 200D, 200E, 200F, terminal devices 300A, 300B, C, and D. The normal transmission path of the data stream sent from terminal device 300D to terminal device 300A is: terminal device 300D → network device 200F → network device 200D → network device 200B → network device 200A → terminal device 300A. When congestion occurs in a receive buffer on the interface of network device 200A, network device 200A sends a PFC backpressure frame to the upstream device, i.e., network device 200B. Upon receiving the PFC backpressure frame, network device 200B will stop sending packets in the corresponding priority queue according to the PFC backpressure frame instruction and store the data stream in its local interface buffer. If the local interface buffer of network device 200B... If the consumption exceeds the threshold, a PFC backpressure frame is sent to the upstream device, i.e., network device 200D. If the local interface buffer consumption of network device 200D exceeds the threshold, a PFC backpressure frame is sent to the upstream device, i.e., network device 200F. If the local interface buffer consumption of network device 200F exceeds the threshold, a PFC backpressure frame is sent to the upstream device, i.e., terminal device 300D. After receiving the PFC backpressure frame, terminal device 300D stops sending packets in the corresponding priority queue and processes subsequent traffic from the source to prevent the data traffic that has already been sent from being dropped. This can eliminate packet loss caused by network node congestion. At this time, network device 200A → network device 200B → network device 200D → network device 200F → terminal device 300D will form a backpressure link. Among them, network device 200A is the network device that first experienced outbound congestion, and terminal device 300D is the terminal device that received the PFC backpressure frame. Terminal device 300D receives a PFC backpressure frame generated by network device 200D and sends feedback information to the controller based on the PFC backpressure frame. The PFC backpressure frame is an Ethernet frame.
[0053] In some implementations, the format of the PFC anticompression frame is as follows: Figure 4 As shown, the time of PFC backpressure frame generation can be added to the PAD field of the PFC backpressure frame generated by the network device that first experienced outgoing congestion. This ensures that the PFC backpressure frame generated by the network device that first experienced outgoing congestion will include the time of its generation. It should be noted that all PFC backpressure frames generated by network devices in the backpressure link include the time of the PFC backpressure frame generated by the network device that first experienced outgoing congestion.
[0054] In some implementations, the terminal device can receive a PFC backpressure frame generated by a network device directly connected to the terminal device in the backpressure link, and send feedback information to the controller based on the PFC backpressure frame. The controller receives the feedback information, which includes the time when the network device that first experienced outgoing congestion generated the PFC backpressure frame and the time when the terminal device received the PFC backpressure frame.
[0055] Step S120: Obtain the convergence time of the backpressure link based on the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame, and send the convergence time to the network device that first experienced outgoing congestion so that the network device that first experienced outgoing congestion can adjust the deadlock detection cycle.
[0056] In this embodiment, the controller can obtain the convergence time based on the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame, and send the convergence time to the network device that first experienced outgoing congestion, so that the network device that first experienced outgoing congestion can adjust the PFC deadlock detection cycle according to the convergence time.
[0057] In some implementations, the controller can send the convergence time to the network devices experiencing outgoing congestion in the backpressure link, so that the network devices experiencing outgoing congestion in the backpressure link can adjust their deadlock detection cycles based on the convergence time.
[0058] For example, such as Figure 3As shown, the normal transmission path of the data stream sent from terminal device 300D to terminal device 300A is: terminal device 300D → network device 200F → network device 200D → network device 200B → network device 200A → terminal device 300A. Assuming network device 200B is the network device that first experiences egress congestion, network device 200B sends a PFC backpressure frame generated by network device 200B to network device 200D in a backpressure manner. The PFC backpressure frame generated by network device 200B includes the time when network device 200B generated the PFC backpressure frame. When network device 200D receives the PFC backpressure frame generated by network device 200B, network device 200D... The PFC backpressure frame generated by 0B indicates to stop sending packets in the corresponding priority queue. If the local interface buffer consumption of network device 200D exceeds the threshold, it sends a PFC backpressure frame to the upstream device, i.e., network device 200F. If the local interface buffer consumption of network device 200F exceeds the threshold, it sends a PFC backpressure frame to the upstream device, i.e., terminal device 300D. After receiving the PFC backpressure frame, terminal device 300D stops sending packets in the corresponding priority queue and processes subsequent traffic from the source to prevent the data traffic that has already been sent from being dropped. This can eliminate packet loss caused by network node congestion. At this time, network device 200B → network device 200D → network device 200F → terminal device 300D will form a backpressure link. The PFC backpressure frame generated by network device 200D includes the time when network device 200B generated the PFC backpressure frame. Each upstream device in the backpressure link carries the time when network device 200B generated its PFC backpressure frame. Terminal device 300D parses the received PFC backpressure frame generated by network device 200F to obtain the time when network device 200B generated the PFC backpressure frame. Terminal device 300D then combines the time when network device 200B generated the PFC backpressure frame with the time when it received the PFC backpressure frame generated by network device 200F. The frame time is sent to the controller. The controller obtains the convergence time based on the time when network device 200B generates the PFC backpressure frame and the time when terminal device 300D receives the PFC backpressure frame generated by network device 200F. The controller can send the convergence time to network device 200B so that network device 200B can adjust its deadlock detection cycle according to the convergence time. The controller can also send the convergence time to network devices 200D and 200F. Both network devices 200D and 200F adjust their own deadlock detection cycles according to the convergence time.
[0059] In some implementations, the controller can generate a control command based on the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame. The control command is then sent to the network device experiencing outgoing congestion. The control command includes a convergence time. This control command is used to set the deadlock detection period of the network device experiencing outgoing congestion, or the network device experiencing outgoing congestion on the backpressure link, to the convergence time included in the control command.
[0060] The PFC deadlock detection method provided in this embodiment of the invention receives feedback information sent by any terminal device based on a received PFC backpressure frame. The feedback information includes the time when the network device experiencing the earliest egress congestion on the backpressure link generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame. The convergence time of the backpressure link is obtained based on these two times, and the convergence time is sent to the network device experiencing the earliest egress congestion. This allows the network device experiencing the earliest egress congestion to adjust its deadlock detection cycle based on the convergence time, thereby improving the accuracy and adaptability of PFC deadlock detection. In some embodiments, step S120 may specifically include the following steps: calculating the time difference between the time when the network device experiencing the earliest egress congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame; and determining the convergence time of the backpressure link based on the time difference, so that the deadlock detection cycle of the network device experiencing the earliest egress congestion is greater than or equal to the convergence time.
[0061] It should be noted that after the terminal device receives the PFC backpressure frame, it will no longer send the corresponding priority queue message to the downstream network device. Therefore, the network device in the backpressure link that is experiencing outgoing congestion will not experience outgoing congestion. Thus, the time difference between the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC is the convergence time of the backpressure link.
[0062] In some implementations, the controller can determine the convergence time of the backpressure link based on the time difference, so that the deadlock detection period of the network device that first experiences egress congestion is greater than or equal to the convergence time. The controller can send the convergence time to the network device that first experiences egress congestion, or the controller can send the convergence time to all network devices in the backpressure link that experience egress congestion. The network devices that experience egress congestion that receive the convergence time adjust their PFC deadlock detection period according to the convergence time.
[0063] In some implementations, the deadlock detection count and / or deadlock detection accuracy are adjusted based on the convergence time of the backpressure link for the network device that experiences the earliest egress congestion, thereby adjusting the corresponding deadlock detection cycle. Alternatively, the deadlock detection cycle for the network device that experiences the earliest egress congestion is reset based on the convergence time.
[0064] As one implementation method, the deadlock detection count for the network device that experiences the earliest egress congestion is adjusted based on the convergence time of the backpressure link, thereby adjusting the corresponding deadlock detection period. The convergence time is used as the adjusted deadlock detection period for the network device that experiences the earliest egress congestion. For example, assuming the deadlock detection count for the network device that experiences the earliest egress congestion is 40 times, and the deadlock detection accuracy is 50ms, the deadlock detection period for the network device that experiences the earliest egress congestion is 2s (40 times * 50ms). That is, the chip scans every 50ms to check whether a PFC PAUSE frame is received within these 50ms. If a PFC PAUSE frame (PFC backpressure frame) is received 40 times consecutively, it is considered that a deadlock has occurred. When the convergence time obtained in this embodiment of the invention is 3s, the deadlock detection count corresponding to the network device that first experienced egress congestion is adjusted to 60 times, and the deadlock detection period corresponding to the network device that first experienced egress congestion is adjusted to 3s (60 times * 50ms), which is equal to the convergence time, thus obtaining a deadlock detection period equal to the convergence time, i.e., 3s; when the convergence time is 3s, the deadlock detection count corresponding to the network device that first experienced egress congestion is adjusted to 65 times, and the corresponding deadlock detection period is adjusted to 3.25s (65 times * 50ms), thus obtaining a deadlock detection period greater than the convergence time, i.e., 3.25s.
[0065] As one implementation method, the deadlock detection precision is adjusted based on the network device experiencing the earliest egress congestion, thereby adjusting the corresponding deadlock detection period. For example, assuming the network device experiencing the earliest egress congestion has 20 deadlock detection attempts and a deadlock detection precision of 40ms, the deadlock detection period is 0.8s (20 * 40ms). When the convergence time is 1s, the detection precision of the deadlock detection period for the network device experiencing the earliest egress congestion is adjusted to 50ms, thus adjusting the deadlock detection period to 1s (20 * 50ms), equal to the convergence time. Similarly, when the convergence time is 1s, the detection precision of the deadlock detection period for the network device experiencing the earliest egress congestion is adjusted to 60ms, thus adjusting the deadlock detection period to 1.2s (20 * 60ms), which is greater than the convergence time, resulting in a deadlock detection period of 1.2s that is greater than the convergence time.
[0066] As one implementation method, the deadlock detection count and deadlock detection accuracy are adjusted according to the network device that experiences outbound congestion earliest in the convergence time, thereby adjusting the corresponding deadlock detection cycle. For example, assuming the earliest network device experiencing outgoing congestion has 50 deadlock detections and a detection precision of 40ms, the deadlock detection period for this device would be 2s (50 * 40ms). When the convergence time is 2.7s, the network device experiencing the earliest outgoing congestion would adjust its deadlock detection period to 45 detections and 60ms precision, thus adjusting the deadlock detection period to 2.7s (45 * 60ms), which equals the convergence time, resulting in a deadlock detection period of 2.7s. Conversely, when the convergence time is 2.5s, the network device experiencing the earliest outgoing congestion would adjust its deadlock detection period to 60 detections and 45ms precision, thus adjusting the deadlock detection period to 2.7s (60 * 45ms), which is greater than the convergence time, resulting in a deadlock detection period greater than the convergence time of 2.7s.
[0067] Optionally, the feedback information sent by the terminal device based on the received PFC backpressure frame may further include the identification information of the network device that first experienced outgoing congestion, obtained based on the received PFC backpressure frame. The controller may then send the convergence time to the network device that first experienced outgoing congestion based on the identification information. Specifically, step S120 may further include the following steps: determining the network device that first experienced outgoing congestion based on the identification information, and sending the convergence time to the network device that first experienced outgoing congestion.
[0068] In some implementations, the format of the PFC anticompression frame is as follows: Figure 4As shown, the PAD field of the PFC backpressure frame generated by the network device that first experienced outgoing congestion can be added to the time when the PFC backpressure frame was generated and the identification information of the network device that first experienced outgoing congestion. The PFC backpressure frames generated by network devices on the backpressure link all include the time when the PFC backpressure frame was generated by the network device that first experienced outgoing congestion and the identification information of the network device that first experienced outgoing congestion. Therefore, by parsing the received PFC backpressure frame, the terminal device can obtain the time when the PFC backpressure frame was generated by the network device that first experienced outgoing congestion and the identification information of the network device that first experienced outgoing congestion. Then, based on the parsed information and the time when the PFC backpressure frame was received, feedback information is obtained and sent to the controller. The feedback information includes the time when the PFC backpressure frame was generated by the network device that first experienced outgoing congestion, the time when the terminal device received the PFC backpressure frame, and the identification information of the network device that first experienced outgoing congestion.
[0069] In some implementations, the controller can store the connection relationships between network devices. Therefore, the controller can identify the network devices in the backpressure link that are experiencing outgoing congestion based on the identification information of the network device that first experienced outgoing congestion, and send the convergence time to these network devices experiencing outgoing congestion.
[0070] In some implementations, the controller can identify the network device experiencing outgoing congestion in the backpressure link based on the identification information of the network device that first experienced outgoing congestion, and send control commands to the network devices experiencing outgoing congestion in the backpressure link to control these network devices experiencing outgoing congestion to adjust the PFC deadlock detection cycle according to the convergence time.
[0071] The PFC deadlock detection method provided in this embodiment of the invention involves the controller receiving the time when the earliest network device experiencing outgoing congestion generates a PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame. The difference between the generation and reception times is calculated to obtain the convergence time of the backpressure link. Based on the convergence time of the backpressure link, the current deadlock detection period corresponding to the earliest network device experiencing outgoing congestion is adjusted so that the adjusted deadlock detection period is greater than or equal to the convergence time. The network device experiencing the earliest outgoing congestion and the network devices experiencing outgoing congestion on the link from the earliest network device experiencing outgoing congestion to the terminal device are identified based on the received identification information. The convergence time is sent to the network devices experiencing outgoing congestion so that these network devices adjust their deadlock detection periods according to the convergence time. This prevents inaccurate PFC deadlock detection caused by the deadlock detection period being less than the convergence time.
[0072] Please see Figure 5 , Figure 5This diagram illustrates a flowchart of a PFC deadlock detection method provided in an embodiment of the present invention. This PFC deadlock detection method can be applied to any one of multiple network devices, each of which is communicatively connected to a controller, and the controller is also communicatively connected to multiple terminal devices. The specific flow of this embodiment will be described below using any one of the multiple network devices as an example. The following will focus on... Figure 5 The process shown is described in detail. This PFC deadlock detection method may specifically include the following steps:
[0073] Step S210: When outgoing congestion is detected, a PFC backpressure frame is generated and sent to the upstream device. The PFC backpressure frame carries the PFC backpressure frame generation time of the network device as the earliest network device to experience outgoing congestion on the backpressure link, so that each upstream device on the backpressure link carries the PFC backpressure frame generation time when it generates its own PFC backpressure frame and sends it to the controller through the feedback information of the terminal device; the feedback information also includes the time when the terminal device receives the PFC backpressure frame from the network device it is connected to.
[0074] In some implementations, the network device that generates the PFC backpressure frame among multiple network devices is the network device that first experiences outbound congestion on the backpressure link, and carries its own identification information in the generated PFC backpressure frame.
[0075] Step S220: Receive the convergence time of the backpressure link sent by the controller, and adjust the deadlock detection period according to the convergence time so that its own deadlock detection period is greater than or equal to the convergence time.
[0076] In some implementations, if the convergence time is less than or equal to the deadlock detection period of the device, the deadlock detection period of the device is not adjusted; otherwise, the deadlock detection period of the device is adjusted to be greater than or equal to the convergence time.
[0077] The PFC deadlock detection method provided in this invention involves any network device generating a PFC backpressure frame and sending it to an upstream device when it detects outgoing congestion. The PFC backpressure frame carries the generation time of the PFC backpressure frame from the network device that first experienced outgoing congestion on the backpressure link. This ensures that each upstream device on the backpressure link carries its own PFC backpressure frame generation time when generating its own PFC backpressure frame and sends it to the controller via feedback information from the terminal device. The feedback information also includes the time when the terminal device receives the PFC backpressure frame from its connected network device, the convergence time of the backpressure link sent by the controller, and adjusts the deadlock detection period based on the convergence time to ensure that its own deadlock detection period is greater than or equal to the convergence time. The controller determines a suitable convergence time for the congested network device based on the time when the network device that first experienced outgoing congestion generated the PFC backpressure frame and the time when the terminal device received the PFC backpressure frame, thus adjusting the deadlock detection period and improving the accuracy and adaptability of PFC deadlock detection.
[0078] To perform the corresponding steps in the above embodiments and various possible methods, an implementation of a PFC deadlock detection device is given below. Further, please refer to... Figure 6 , Figure 6 This is a functional block diagram of a PFC deadlock detection device provided in an embodiment of the present invention. It should be noted that the PFC deadlock detection device provided in this embodiment is applied to a controller, and its basic principle and the resulting technical effects are the same as those in the above embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments. The PFC deadlock detection device includes: a feedback information receiving module 410 and a convergence time acquisition module 420, wherein:
[0079] The feedback information receiving module 410 is used to receive feedback information sent by any terminal device based on the received PFC backpressure frame; the feedback information includes the time when the network device that first experienced outgoing congestion on the backpressure link generated the PFC backpressure frame and the time when the terminal device received the PFC backpressure frame.
[0080] The convergence time acquisition module 420 is used to obtain the convergence time of the backpressure link based on the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame, and send the convergence time to the network device that first experienced outgoing congestion so that the network device that first experienced outgoing congestion can adjust the deadlock detection cycle according to the convergence time.
[0081] Optionally, the convergence time acquisition module 420 is further used to calculate the time difference between the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame; and to determine the convergence time of the backpressure link based on the time difference, so that the deadlock detection period of the network device that first experienced outgoing congestion is greater than or equal to the convergence time.
[0082] Optionally, the convergence time acquisition module 420 further determines the network device that first experienced outgoing congestion based on the identification information, and sends the convergence time to the network device that first experienced outgoing congestion; the feedback information also includes the identification information of the network device that first experienced outgoing congestion obtained based on the received PFC backpressure frame.
[0083] To perform the corresponding steps in the above embodiments and various possible methods, an implementation of a PFC deadlock detection device is given below. Further, please refer to... Figure 7 , Figure 7 This is a functional block diagram of a PFC deadlock detection device provided in an embodiment of the present invention. It should be noted that the PFC deadlock detection device provided in this embodiment is applied to any one of multiple network devices, and its basic principle and the resulting technical effects are the same as those in the above embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments. The PFC deadlock detection device includes: a PFC module 510 and a convergence time receiving module 520, wherein:
[0084] PFC module 510 is used to generate a PFC backpressure frame and send it to the upstream device when outgoing congestion is detected. The PFC backpressure frame carries the PFC backpressure frame generation time of the network device as the earliest network device to experience outgoing congestion on the backpressure link, so that each upstream device on the backpressure link carries the PFC backpressure frame generation time when it generates its own PFC backpressure frame and sends it to the controller through feedback information from the terminal device; the feedback information also includes the time when the terminal device receives the PFC backpressure frame from the network device it is connected to.
[0085] The convergence time receiving module 520 is used to receive the convergence time of the backpressure link sent by the controller, and adjust the deadlock detection period according to the convergence time so that its own deadlock detection period is greater than or equal to the convergence time.
[0086] Optionally, the PFC module 510 is further configured to use the network device that generates the PFC backpressure frame as the network device that first experiences outbound congestion on the backpressure link, and to carry the identification information of the device in the generated PFC backpressure frame.
[0087] Optionally, the convergence time receiving module 520 is further configured to not adjust the deadlock detection period of the device when the convergence time is less than or equal to the deadlock detection period of the device; otherwise, adjust the deadlock detection period of the device to be greater than or equal to the convergence time.
[0088] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0089] In several embodiments provided by the present invention, the coupling between modules can be electrical, mechanical or other forms of coupling.
[0090] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0091] Please refer to Figure 8 This is an exemplary block diagram of an electronic device 600 that can implement the controller 100 and network device 200 described above, according to an embodiment of the present invention. The electronic device 600 includes a memory 610, a processor 620, and a communication module 630. The memory 610, processor 620, and communication module 630 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0092] The memory 610 is used to store programs or data. The memory 610 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0093] The processor 620 is used to read / write data or programs stored in the memory and perform corresponding functions. For example, when a computer program stored in the memory 610 is executed by the processor 620, the PFC deadlock detection method disclosed in the above embodiments can be implemented.
[0094] The communication module 630 is used to establish a communication connection between the electronic device 600 and other communication terminals via a network, and to send and receive data via the network.
[0095] It should be understood that, Figure 8 The structure shown is only a schematic diagram of an electronic device; the electronic device may also include components that are larger than those shown. Figure 8 The more or fewer components shown, or having the same Figure 8 The different configurations shown. Figure 8 The components shown can be implemented using hardware, software, or a combination thereof.
[0096] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the PFC deadlock detection method described in the above method embodiments.
[0097] Computer-readable storage media can be electronic storage devices such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, computer-readable storage media includes non-transitory computer-readable storage medium. The computer-readable storage medium has storage space for program code that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code can be compressed, for example, in a suitable form.
[0098] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or 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 blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0099] In addition, the functional modules in the various embodiments of the present invention 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.
[0100] If the functionality is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0101] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A PFC deadlock detection method, applied to a controller, wherein the controller is communicatively connected to multiple network devices and multiple terminal devices, characterized in that, The method includes: Receive feedback information sent by any of the terminal devices based on the received PFC backpressure frame; the feedback information includes the time when the network device that first experienced outgoing congestion on the backpressure link generated the PFC backpressure frame and the time when the terminal device received the PFC backpressure frame; The convergence time of the backpressure link is obtained based on the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame. The convergence time is then sent to the network device that first experienced outgoing congestion so that the network device that first experienced outgoing congestion can adjust the deadlock detection cycle based on the convergence time.
2. The method according to claim 1, characterized in that, The step of obtaining the convergence time of the backpressure link based on the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame includes: Calculate the time difference between the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame. The convergence time of the backpressure link is determined based on the time difference, so that the deadlock detection period of the network device that first experiences outbound congestion is greater than or equal to the convergence time.
3. The method according to claim 1 or 2, characterized in that, The feedback information also includes the identification information of the network device that first experienced egress congestion, obtained based on the received PFC backpressure frame. Sending the convergence time to the network device that first experienced egress congestion includes: Based on the identification information, the network device that first experienced outgoing congestion is identified, and the convergence time is sent to the network device that first experienced outgoing congestion.
4. A PFC deadlock detection method, applied to any one of multiple network devices, each of the network devices being communicatively connected to a controller, and the controller also being communicatively connected to multiple terminal devices, characterized in that, The method includes: When outgoing congestion is detected, a PFC backpressure frame is generated and sent to the upstream device. The PFC backpressure frame carries the PFC backpressure frame generation time of the network device that first experienced outgoing congestion on the backpressure link, so that each upstream device on the backpressure link carries the PFC backpressure frame generation time when it generates its own PFC backpressure frame and sends it to the controller through feedback information from the terminal device. The feedback information also includes the time when the terminal device receives the PFC backpressure frame from the network device it is connected to. The controller receives the convergence time of the backpressure link sent by the controller and adjusts the deadlock detection period according to the convergence time so that its own deadlock detection period is greater than or equal to the convergence time. The convergence time is obtained by the controller based on the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame.
5. The method according to claim 4, characterized in that, The step of generating a PFC backpressure frame and sending it to the upstream device when outgoing congestion is detected includes: The network device that generates the PFC backpressure frame is considered the network device that first experiences outbound congestion on the backpressure link, and the generated PFC backpressure frame carries the identification information of this device.
6. The method according to claim 4, characterized in that, The step of receiving the convergence time of the backpressure link sent by the controller and adjusting the deadlock detection period according to the convergence time includes: If the convergence time is less than or equal to the deadlock detection cycle of this device, the deadlock detection cycle of this device will not be adjusted; otherwise, the deadlock detection cycle of this device will be adjusted to be greater than or equal to the convergence time.
7. A PFC deadlock detection device, applied to a controller, wherein the controller is communicatively connected to multiple network devices and multiple terminal devices, characterized in that, The device includes: The feedback information receiving module is used to receive feedback information sent by any of the terminal devices based on the received PFC backpressure frame; the feedback information includes the time when the network device that first experienced outgoing congestion on the backpressure link generated the PFC backpressure frame and the time when the terminal device received the PFC backpressure frame. The convergence time acquisition module is used to obtain a convergence time based on the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame, and send the convergence time to the network device that first experienced outgoing congestion, so that the network device that first experienced outgoing congestion can adjust the deadlock detection cycle according to the convergence time.
8. A PFC deadlock detection device, applied to any one of multiple network devices, wherein all of the multiple network devices are communicatively connected to a controller, and the controller is also communicatively connected to multiple terminal devices, characterized in that, The device includes: The PFC module is used to generate a PFC backpressure frame and send it to the upstream device when outgoing congestion is detected. The PFC backpressure frame carries the PFC backpressure frame generation time of the network device that first experienced outgoing congestion on the backpressure link, so that each upstream device on the backpressure link carries the PFC backpressure frame generation time when it generates its own PFC backpressure frame and sends it to the controller through feedback information from the terminal device; the feedback information also includes the time when the terminal device receives the PFC backpressure frame from the network device it is connected to. The convergence time receiving module is used to receive the convergence time of the backpressure link sent by the controller, and adjust the deadlock detection period according to the convergence time so that its own deadlock detection period is greater than or equal to the convergence time. The convergence time is obtained by the controller based on the time when the network device that first experienced outgoing congestion generates the PFC backpressure frame and the time when the terminal device receives the PFC backpressure frame.
9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a computer program that can be executed by the processor, the processor being able to execute the computer program to implement the PFC deadlock detection method according to any one of claims 1-6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the PFC deadlock detection method as described in any one of claims 1-6.
Citation Information
Patent Citations
PFC deadlock detection adaptive method and device, storage medium and electronic equipment
CN116723134A
Flow controller and flow control method
JP2003244181A
