Priority-based flow control anti-deadlock method and device

By monitoring and managing microloops in the CLOS network, reducing their congestion, and eliminating microloops with ECN marking and QoS adjustments, the PFC deadlock problem is solved and network performance and stability is improved.

CN113872869BActive Publication Date: 2025-02-18ZTE CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010615576.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-30
Publication Date
2025-02-18
Estimated Expiration
2040-06-30

AI Technical Summary

Technical Problem

In CLOS networks, the formation of microloops may cause PFC deadlocks, which in turn affects network performance and throughput.

Method used

By monitoring whether there is a microloop and whether congestion occurs in the virtual channel, if congestion occurs, the flow in the microloop is slowed down, and the microloop is eliminated using ECN marking and QoS adjustment.

Benefits of technology

It effectively avoids the occurrence of PFC deadlocks, reduces packet loss, and improves network stability and throughput.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113872869B_ABST
    Figure CN113872869B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a priority-based flow control anti-deadlock method and device, the method comprising: a switching device monitors whether a microloop exists in a virtual channel of a CLOS network; when a microloop exists in the virtual channel, the switching device monitors whether congestion occurs in the microloop; when congestion occurs in the microloop, the flow in the microloop is slowed down. Through the present invention, when congestion occurs in a microloop in the network, PFC deadlock can be avoided by slowing down the flow in the microloop, solving the problem of PFC deadlock in a network generating a microloop in the related art, thereby achieving the effect of avoiding PFC deadlock and avoiding message loss due to deadlock.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of communication technology, and in particular to a priority-based flow control (PFC) anti-deadlock method and device. Background Art

[0002] Currently, the typical topology architecture of large data centers is the Leaf-Spine structure. Figure 1 This is a topological diagram of a single pod (point of delivery) scenario network based on related technologies. Figure 2 This is a topological diagram of the cross-pod scenario network based on relevant technologies, such as Figure 1 and Figure 2 As shown in the figure, in a stable state, there is no routing loop in the data center network of the CLOS architecture, that is, in the absence of any link failure or traffic engineering, the traffic transmission path in the data center is usually: in a single pod scenario, it usually does not pass through two spine switches, and in a multi-pod scenario, it usually does not pass through two core switches.

[0003] In application scenarios with lossless requirements, in order to avoid congestion and packet loss, PFC flow control technology needs to be deployed between Leaf and Spine, and between Spine and Core.

[0004] PFC is a lossless flow control mechanism that can prevent packet loss due to congestion. PFC allows the creation of 8 virtual channels on an Ethernet link and specifies a priority level for each virtual channel. It allows the individual suspension (PAUSE carries XOFF) and restart (PAUSE carries XON) of any virtual channel, while allowing the traffic of other virtual channels to pass uninterrupted. This method enables the network to create lossless (no packet loss) services for a single virtual link, allowing it to coexist with other traffic types on the same interface. Although PFC can implement queue-based flow control by mapping different priorities to different queues, it also introduces a new problem: PFC deadlock.

[0005] PFC deadlock refers to a network state in which a short loop may occur during BGP route reconvergence under special circumstances, such as when a link failure or device failure occurs, resulting in a circular buffer dependency. When congestion occurs, the port buffer consumption of the switch exceeds the threshold, and the switches wait for each other to release resources, resulting in permanent blockage (stoppage) of data flows on the related switches. At this time, due to the back pressure effect of PFC, the throughput of the entire network or part of the network will become zero. Once a deadlock occurs, even if the traffic causing the PFC deadlock stops flowing and the loop disappears, the deadlock cannot be automatically recovered.

[0006] At present, the solution to PFC deadlock is: PFC deadlock has been formed in the network, and the device detects that the PFC deadlock has occurred. The device performs PFC deadlock release processing: the switch ignores the PFC PAUSE frame (the scheduler ignores the XOFF state of the PFC-PAUSE of the deadlock queue for a period of time and continues to schedule), and the PFC mechanism is restored after the deadlock is released. This method may seriously affect network performance. Although the deadlock is released, it cannot guarantee losslessness, that is, messages will be lost during the deadlock recovery process. In addition, this method does not eliminate micro-loops in the network (i.e., routing loops on a single virtual channel). When the micro-loop is congested, CBD (Cyclic Buffer Dependency) will be triggered again, which will cause deadlock again, seriously affecting throughput. Summary of the invention

[0007] The embodiments of the present invention provide a PFC anti-deadlock method and device to at least solve the problem of PFC deadlock occurring in a network generating a micro-loop in the related art.

[0008] The following is a brief description of some relevant terms involved in the embodiments of the present invention:

[0009] Valley routing: For example, spine-leaf-spine, or core-spine-core. Figure 3 and Figure 4 As shown, in the embodiment of the present invention, since the device port is divided into 8 virtual channels (corresponding to 8 priority queues one by one), the valley routing refers to the valley routing in the same virtual channel, rather than the valley routing at the port level. The valley routing does not cross different virtual channels.

[0010] Micro-loop: PFC allows the creation of eight virtual channels on an Ethernet link, creating lossless (no packet loss) service for a single virtual link, enabling it to coexist with other traffic types on the same interface. This article refers to routing loops on a single virtual channel as micro-loops.

[0011] QoS: (Quality of Service): Devices that support QoS functions can provide transmission quality services. For a certain category of data flow, a certain level of transmission priority can be assigned to it to identify its relative importance, and various priority forwarding strategies, congestion avoidance and other mechanisms provided by the device can be used to provide special transmission services for these data flows.

[0012] ECN (Explicit Congestion Notification): A flow control mechanism. ECN refers to a flow control mechanism that, when congestion occurs at the device's egress port, the device sends a CNP message by marking the message with ECN, causing the source end to slow down the flow. Fast CNP is sent by the switch, and traditional CNP is sent by the destination node. The two flow control mechanisms, PFC and ECN, are usually used in combination. Since the PFC flow control mechanism stops the flow, while the ECN flow control mechanism slows down, PFC will have a greater impact on the continuity of the flow and the bandwidth after triggering, which is not friendly to throughput. Therefore, the flow control strategy is usually that ECN flow control is triggered before PFC flow control. In this patent, if it is found that the micro-loop congestion is aggravated, the strategy is to limit the triggering of the PFC flow control mechanism, because triggering PFC flow control in the micro-loop will cause PFC deadlock, and PFC deadlock cannot be prevented in advance.

[0013] The Clos architecture was born in 1952 and was proposed by Charles Clos at Bell Labs. The CLOS switching architecture can be strictly non-blocking, re-arrangeable, and scalable, and can provide a non-blocking network.

[0014] Pod (point of delivery): The basic physical design unit of a data center, including servers, access networks, converged network cabinets and their supporting facilities. It is considered an area of ​​the entire network. The entire network includes multiple pods. Pod division can improve the utilization of the entire network and facilitate computing virtualization. There are three layers of structure in the pod: leaf, spine, and core.

[0015] According to one embodiment of the present invention, a priority-based flow control anti-deadlock method is provided, comprising: a switching device monitors whether there is a microloop in a virtual channel of a CLOS network; when a microloop exists in the virtual channel, the switching device monitors whether congestion occurs in the microloop; when congestion occurs in the microloop, the flow in the microloop is slowed down.

[0016] In an exemplary embodiment, the switching device monitors whether a microloop exists in a virtual channel of a CLOS network, including: the switching device monitors whether valley routing occurs in the virtual channel; if valley routing occurs in the virtual channel, the switching device further monitors whether a microloop exists in the virtual channel.

[0017] In an exemplary embodiment, the switching device monitoring whether valley routing occurs in the virtual channel comprises: determining whether valley routing occurs in the virtual channel corresponding to the priority queue by monitoring the service flow direction of the priority queues of the ingress port and the egress port of the switching device.

[0018] In an exemplary embodiment, when a microloop exists in the virtual channel, the switching device monitors whether congestion occurs in the microloop, including: when a microloop exists in the virtual channel, monitoring the cache utilization of the priority queue of the egress port of the switching device; when the cache utilization reaches a preset value, determining that congestion occurs in the microloop, wherein the preset value is less than an ECN threshold.

[0019] In an exemplary embodiment, when congestion occurs in the microloop, the traffic in the microloop is slowed down, including: when congestion occurs in the microloop, the switching device applies ECN traffic control technology to slow down the traffic in the microloop by ECN marking the traffic in the microloop.

[0020] In an exemplary embodiment, after the traffic in the micro-loop is slowed down, the method further includes: the switching device continues to monitor the cache utilization of the priority queue of the egress port; if the cache utilization reaches the preset value again, the traffic in the micro-loop is slowed down again.

[0021] In an exemplary embodiment, after the traffic in the microloop is decelerated, the method further includes: when it is monitored that the congestion of the microloop has increased to a preset threshold, the switching device eliminates the valley routing by modifying the QoS value of the valley traffic of the virtual channel.

[0022] In an exemplary embodiment, when it is monitored that the congestion of the micro-loop has intensified to reach a preset threshold value, the switching device eliminates the valley route by modifying the QoS value of the valley traffic of the virtual channel, including: when the cache utilization reaches the ECN threshold of the priority queue, modifying the QoS value of the valley traffic of the virtual channel inside the switching device so that the traffic in the ingress port direction and the egress port direction of the valley route are respectively transmitted in different virtual channels, and the micro-loop is eliminated by eliminating the valley route.

[0023] In an exemplary embodiment, after modifying the QoS value of the valley traffic of the virtual channel within the device so that the traffic in the ingress port direction and the egress port direction of the valley route are respectively transmitted in different virtual channels, it also includes: when the switching device detects that the valley route is eliminated, stopping modifying the QoS value of the valley traffic of the virtual channel.

[0024] In an exemplary embodiment, when the valley routing is Spine-Leaf-Spine valley routing, the switching device is a Leaf node; when the valley routing is Core-Spine-Core valley routing, the switching device is a Spine node.

[0025] According to another embodiment of the present invention, a priority-based flow control anti-deadlock device is provided, comprising: a first monitoring module, used to monitor whether there is a microloop in a virtual channel of a CLOS network; a second monitoring module, used to further monitor whether congestion occurs in the microloop when a microloop exists in the virtual channel; and a speed reduction module, used to reduce the speed of the flow in the microloop when congestion occurs in the microloop.

[0026] In an exemplary embodiment, the first monitoring module includes: a first monitoring unit, configured to monitor whether valley routing occurs in the virtual channel; and a second monitoring unit, configured to further monitor whether there is a microloop in the virtual channel when the device detects valley routing occurs in the virtual channel.

[0027] In an exemplary embodiment, the device also includes: a modification module, which is used to modify the QoS value of the valley traffic of the virtual channel when the congestion of the micro-loop increases, so that the traffic in the inlet port direction and the outlet port direction of the valley route are transmitted in different virtual channels respectively, so as to eliminate the valley route.

[0028] In an exemplary embodiment, when the valley routing is Spine-Leaf-Spine valley routing, the device may be a Leaf node; when the valley routing is Core-Spine-Core valley routing, the device may be a Spine node.

[0029] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.

[0030] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0031] Through the above-mentioned embodiments of the present invention, when congestion occurs in a micro-loop in a network, PFC deadlock in the network is avoided by reducing the speed of the traffic in the micro-loop. Therefore, the problem of PFC deadlock in a network generating micro-loops in the related art can be solved, thereby achieving the effect of avoiding PFC deadlock and avoiding message loss due to deadlock. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a topological diagram of a single pod scenario network based on related technologies;

[0033] Figure 2 It is a topological diagram of cross-pod scenario networking based on relevant technologies;

[0034] Figure 3 is a flow chart of a priority-based flow control anti-deadlock method according to an embodiment of the present invention;

[0035] Figure 4 is a structural block diagram of a priority-based flow control anti-deadlock device according to an embodiment of the present invention;

[0036] Figure 5 is a structural block diagram of a priority-based flow control anti-deadlock device according to an optional embodiment of the present invention;

[0037] Figure 6 is a schematic diagram of spine-leaf-spine valley routing according to an embodiment of the present invention;

[0038] Figure 7 is a schematic diagram of core-spine-core valley routing according to an embodiment of the present invention;

[0039] Figure 8 is a schematic diagram of cropping valley flow according to an embodiment of the present invention;

[0040] Fig. 9 is a flow chart of a PFC deadlock prevention method according to an embodiment of the present invention;

[0041] Fig.10 is a flow diagram before a link failure in a single pod network architecture according to an embodiment of the present invention;

[0042] Fig.11 is a flow diagram of a micro-loop generated after a link failure in a single pod network architecture according to an embodiment of the present invention;

[0043] Fig.12 is a schematic diagram of a micro-loop between the spine and the leaf according to an embodiment of the present invention;

[0044] Fig.13 is a schematic diagram of a micro-loop in a virtual channel according to an embodiment of the present invention;

[0045] Fig.14 is a schematic diagram of a virtual channel after valley routing is eliminated according to an embodiment of the present invention;

[0046] Fig.15 is a schematic diagram of a virtual channel after valley routing is eliminated in a single pod scenario according to an embodiment of the present invention;

[0047] Fig.16 is a flow diagram before a link failure in a cross-pod network architecture according to an optional embodiment of the present invention;

[0048] Fig.17 is a flow diagram of a micro-loop generated after a link failure in a cross-pod network architecture according to an optional embodiment of the present invention;

[0049] Fig.18 is a schematic diagram of a micro-loop between the spine and the core according to an optional embodiment of the present invention;

[0050] Fig.19 is a schematic diagram of a micro-loop in a virtual channel according to an optional embodiment of the present invention;

[0051] Fig. 20 is a schematic diagram of a virtual channel after valley routing is eliminated according to an optional embodiment of the present invention;

[0052] Fig.21 It is a schematic diagram of a virtual channel after valley routing is eliminated in a cross-pod scenario according to an optional embodiment of the present invention. DETAILED DESCRIPTION

[0053] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

[0054] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0055] In this embodiment, a priority-based flow control anti-deadlock method is provided. Figure 3 is a flow chart of a priority-based flow control anti-deadlock method according to an embodiment of the present invention, such as Figure 3 As shown, the process includes the following steps:

[0056] Step S301, the switching device monitors whether there is a micro-loop in the virtual channel of the CLOS network;

[0057] Step S302, when a micro-loop exists in the virtual channel, the switching device monitors whether congestion occurs in the micro-loop;

[0058] Step S303: when congestion occurs in the micro-loop, the flow in the micro-loop is decelerated.

[0059] In step S301 of this embodiment, the switching device monitors whether valley routing occurs in the virtual channel; if valley routing occurs in the virtual channel, the switching device further monitors whether micro-loops occur in the virtual channel.

[0060] Furthermore, the switching device monitoring whether valley routing occurs in the virtual channel includes: determining whether valley routing occurs in the virtual channel corresponding to the priority queue by monitoring the service flow trends of the priority queues of the ingress and egress ports of the switching device.

[0061] In step S302 of this embodiment, when a micro-loop exists in the virtual channel, the cache utilization of the priority queue of the egress port of the switching device is monitored; when the cache utilization reaches a preset value, it is determined that congestion occurs in the micro-loop, wherein the preset value is less than an ECN threshold.

[0062] In step S303 of this embodiment, when congestion occurs in the micro-loop, the switching device applies ECN flow control technology to reduce the speed of the traffic in the micro-loop by performing ECN marking on the traffic in the micro-loop.

[0063] After step S303 of this embodiment, the method further includes: the switching device continues to monitor the cache utilization of the priority queue of the egress port; if the cache utilization reaches the preset value again, the traffic in the micro-loop is slowed down again.

[0064] After step S303 of this embodiment, the method further includes: when it is monitored that the congestion of the micro-loop is aggravated, the switching device eliminates the valley routing by modifying the QoS value of the valley traffic of the virtual channel.

[0065] Specifically, when the cache utilization reaches the ECN threshold of the priority queue, the QoS value of the valley traffic of the virtual channel is modified inside the switching device so that the traffic in the ingress port direction and the egress port direction of the valley route are transmitted in different virtual channels respectively, and the micro-loop is eliminated by eliminating the valley route.

[0066] In this embodiment, the method may further include: when the switching device detects that the valley route is eliminated, stopping modifying the QoS value of the valley traffic of the virtual channel.

[0067] In this embodiment, when the valley routing is Spine-Leaf-Spine valley routing, the switching device is a Leaf node; when the valley routing is Core-Spine-Core valley routing, the switching device is a Spine node.

[0068] Through the description of the above implementation methods, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0069] In this embodiment, a priority-based flow control anti-deadlock device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be repeated for what has been described. As used below, the terms "module" and "unit" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0070] Figure 4 is a structural block diagram of a structural block diagram of a priority-based flow control anti-deadlock device according to an embodiment of the present invention, such as Figure 4 As shown, the device includes a first monitoring module 10 , a second monitoring module 20 and a speed reduction module 30 .

[0071] The first monitoring module 10 is used to monitor whether there is a micro-loop in the virtual channel of the CLOS network.

[0072] The second monitoring module 20 is used to further monitor whether congestion occurs in the micro-loop when there is a micro-loop in the virtual channel.

[0073] The speed reduction module 30 is used to reduce the speed of the traffic in the micro-loop when congestion occurs in the micro-loop.

[0074] Figure 5 is a structural block diagram of a priority-based flow control anti-deadlock device according to an optional embodiment of the present invention, such as Figure 5 As shown, the device includes Figure 4 In addition to all the modules shown, the first monitoring module 10 further includes a first monitoring unit 11 and a second monitoring unit 12 , and the device further includes a modifying module 40 .

[0075] The first monitoring unit 11 is used to monitor whether valley routing occurs in the virtual channel.

[0076] The second monitoring unit 12 is used to further monitor whether there is a micro loop in the virtual channel when the device detects that a valley route appears in the virtual channel.

[0077] The modification module 40 is used to modify the QoS value of the valley traffic of the virtual channel when the congestion of the micro-loop increases, so that the traffic in the inlet port direction and the outlet port direction of the valley route are transmitted in different virtual channels respectively, so as to eliminate the valley route.

[0078] In this embodiment, when the valley routing is Spine-Leaf-Spine valley routing, the device may be a Leaf node; and when the valley routing is Core-Spine-Core valley routing, the device may be a Spine node.

[0079] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0080] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0081] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0082] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0083] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0084] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0085] In order to facilitate the understanding of the technical solution provided by the present invention, it will be described in detail below in combination with embodiments of specific scenarios.

[0086] The embodiment of the present invention proposes a method for predicting PFC Deadlock applied in the CLOS architecture of a data center. The method is characterized in that: before the PFC deadlock occurs, it is predicted that the deadlock will occur, so that the device can perform a series of processing in advance, thereby eliminating the conditions for the generation of PFC Deadlock in advance and avoiding the occurrence of PFC deadlock.

[0087] As we all know, the necessary condition for the formation of PFC deadlock is the formation of CBD in the network, and the necessary condition for the formation of CBD is the formation of micro-loops in the network. The characteristics of micro-loops are due to valley routing. In a data center network with a CLOS structure, micro-loops will not be formed in a network without valley routing, and the formation of valley routing is caused by link failure.

[0088] Usually, the QoS value of service messages inside IDC (Internet Data Center) is usually unchanged. Specifically, at the edge of IDC, the message enters the corresponding queue of the device switching chip (virtual channel of PFC) according to the message characteristics, and rewrites the QoS (for example: DSCP, Differentiated Services Code Point); inside IDC, it only enters the corresponding queue of the device switching chip (virtual channel of PFC) according to QoS (for example: DSCP). Reduce the use of policies inside IDC to meet the high-speed forwarding.

[0089] The embodiment of the present invention defines valley routing, which includes, for example, spine-leaf-spine and core-spine-core. Figure 6 is a schematic diagram of spine-leaf-spine valley routing according to an embodiment of the present invention, Figure 7 is a schematic diagram of core-spine-core valley routing according to an embodiment of the present invention, such as Figure 6 and Figure 7As shown in the figure. In this article, since the device ports are divided into 8 virtual channels (corresponding to 8 priority queues one by one), valley routing refers to valley routing in the same virtual channel, not valley routing at the port level. Valley routing does not cross different virtual channels.

[0090] Fig. 9 is a flow chart of a PFC deadlock prevention method according to an embodiment of the present invention. Fig. 9 The implementation method of predicting PFC Deadlock in the embodiment of the present invention is as follows:

[0091] Step S901: A device in a CLOS network detects whether there is a micro-loop.

[0092] In this embodiment, step S901 may include: the device monitors valley routing. The device determines whether valley routing (such as Fig.11 and Fig.12 The valley routing of port1 and port2 of the leaf2 device).

[0093] In this embodiment, step S901 may further include: if the device detects valley routing, the device detects micro loops. The characteristic of micro loops is that valley routing appears in the virtual channel (e.g. Fig.11 and Fig.12 If a valley route is found, the device monitors whether a microloop occurs in the virtual channel.

[0094] In this embodiment, step S901 may also include: the network device that monitors valley routing and micro-loops specifically refers to: in a CLOS network, the Leaf and Spine are monitored by Leaf nodes, and the Spine and Core are monitored by Spine nodes.

[0095] Step S902: If a micro-loop has been formed in the virtual channel, the device monitors whether congestion occurs in the micro-loop. If congestion occurs, the traffic in the micro-loop is firstly slowed down.

[0096] In this embodiment, step S902 may include: a method for monitoring micro-loop congestion is: monitoring the cache utilization of the priority queue corresponding to the egress port of the device, when the cache utilization reaches a set value K (the K value should be less than the ECN threshold, such as 90% of the ECN threshold. This value should ensure that the traffic is slowed down before the ECN threshold is triggered. In a network using lossless technology, the usual practice is: when setting the device port threshold value, the ECN threshold must be triggered before the PFC threshold), the ECN mechanism is triggered in advance, that is, the egress port message is ECN marked to achieve early deceleration of the egress port traffic of the micro-loop.

[0097] In this embodiment, step S902 may also include: after the traffic speed is reduced, if the cache utilization rate drops below the set value K, it means that the speed reduction has alleviated the congestion of the micro-loop, and the micro-loop will not be triggered to form a PFC deadlock. It is only necessary to continue to monitor the congestion status of the micro-loop, and no subsequent steps are performed. If the cache utilization rate reaches the K value again due to congestion, the ECN speed reduction will be triggered again.

[0098] In this embodiment, step S902 may further include: after the traffic speed is reduced, if the ECN threshold of the device egress port queue is triggered again (the PFC threshold has not been triggered yet), it indicates that the traffic congestion of the micro-loop formed by the virtual channel is aggravating, and the speed reduction cannot solve the congestion problem.

[0099] Step S903: After the traffic speed reduction is triggered, if the microloop congestion is still increasing, the PFC threshold should be avoided in the congested microloop, because once the device is triggered to send a PFC PAUSE frame, it may cause PFC Deadlock. At this time, the device will eliminate the valley traffic and thus eliminate the microloop.

[0100] In this embodiment, step S903 may include: modifying the QoS value (for example, DSCP value) of the valley traffic inside the monitoring device, so that the QoS values ​​of the traffic in the ingress direction and the traffic in the egress direction are different (mainstream switch chips support modifying the QoS value of the message), so that a valley traffic is cut into two different traffic segments, thereby eliminating the valley traffic. Figure 8 is a schematic diagram of cutting valley flow according to an embodiment of the present invention. Figure 8 As shown in the figure: Leaf3 modifies QoS so that the valley traffic transmitted in one virtual channel becomes non-valley traffic transmitted in two virtual channels. Specifically, Flow4 is cut into two sections at the leaf3 node. The traffic at the ingress port and the traffic at the egress port of the leaf3 node are transmitted in different virtual channels due to different QoS values, and neither the traffic at the ingress port nor the traffic at the egress port is valley traffic. Since neither the traffic at the ingress port nor the traffic at the egress port of the leaf3 node is valley traffic, it will not cause other virtual channels to add new valley traffic, and thus will not cause new microloops.

[0101] Step S904: When the link failure is eliminated, the valley routing is eliminated accordingly, and the device no longer modifies the QoS level of the traffic of the virtual channel.

[0102] In addition, in the most extreme case, all eight virtual channels of the monitoring device are congested. The above steps can still be used to eliminate microloops (i.e. valley routing) so that the device is not in any microloop, that is, PFC deadlock will not occur in the device. The strategy of ensuring lossless after congestion occurs on the device port can be achieved by properly configuring the PFC and ECN thresholds.

[0103] In order to make the purpose, technical solution and advantages of the present invention more clear, the embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other arbitrarily without conflict.

[0104] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments.

[0105] Embodiment 1

[0106] This embodiment is a PFC deadlock prevention for a single Pod networking topology. Due to link failure, rerouting occurs, i.e., valley routing occurs between spine-leaf-spine. When conditions are met, a micro-loop is formed first, and then a CBD is formed, which may eventually lead to a PFC deadlock. In this embodiment, the implementation method of the present invention can be applied to prevent the occurrence of a PFC deadlock in advance.

[0107] Fig.10 FIG. 4 is a flow diagram before a link failure in a single pod network architecture according to an embodiment of the present invention. Fig.10 As shown in the figure, before the link failure, there are four flows, flow1, flow2, flow3, and flow4. The four flows are mapped to the priority queue 3 (virtual channel 3) of the corresponding port respectively. Flow1: C2③ (i.e., priority queue 3 of port 2 of switching device C) --> B4③ --> B3③ --> F2③; Flow2: D2③ --> B1③ --> B2③ --> E2③; Flow3: E1③ --> A3③ --> A2③ --> D1③; Flow4: F1③ --> A4③ --> A1③ --> C1③. Here, C2③ represents the priority queue 3 (corresponding to virtual channel 3) of port 2 of switching device C, and the others are similar. Since there is no valley routing ( Fig.11 The leaf node has no traffic that enters and is sent from the upstream port, and the four flows do not form a microloop. Therefore, the conditions for forming a PFC deadlock are not met at this time.

[0108] Fig.11 is a flow diagram of a micro-loop generated after a link failure in a single pod network architecture according to an embodiment of the present invention, such as Fig.11As shown in the figure, due to the failure of two links (Spine1--Leaf4, Spine2--Leaf2), flow1 and flow4 cannot pass Fig.10 The system assigns new transmission paths to flow1 and flow4 respectively to transmit packets along the paths in the flow. The four flows are mapped to the priority queue 3 of the corresponding ports, Flow1: A1③-->A2③-->D1③-->D2③-->B1③-->B3③; Flow2: D3③-->D2③-->B1③-->B2③-->E2③-->E3③; Flow3: E3③-->E1③-->A3③-->A2③-->D1③-->D3③; Flow4: B3③-->B2③-->E2③-->E1③-->A3③-->A1③. It can be seen that Flow1 has a valley route at the leaf2 node, and Flow4 has a valley route at the leaf3 node. Combining the directions of the four flows, it can be found that the four flows have formed a micro-loop. Fig.12 is a schematic diagram of a micro-loop between the spine and the leaf according to an embodiment of the present invention, Fig.13 is a schematic diagram of a micro-loop in a virtual channel according to an embodiment of the present invention ( Fig.13 Only two priority virtual channels are drawn), such as Fig.12 and Fig.13 As shown in the figure, the micro-loop is: A2③-->D1③-->D2③-->B1③-->B2③-->E2③-->E1③-->A3③-->A2③-->D1③. The four nodes that the virtual channel micro-loop passes through are: A (port 2 and port 3), B (port 2 and port 3), D (port 1 and port 2), F (port 1 and port 2). The micro-loop is as follows: Fig.12 If the queue 3 of the relevant outbound port of any of the four nodes A, B, D, and F is congested and the congestion persists, when the queue 3 of the corresponding ports of the four nodes reaches the PFC threshold, CBD will occur, which will eventually lead to PFC deadlock.

[0109] In order to avoid the occurrence of dead PFC deadlock, the method of the embodiment of the present invention is applied, which is specifically as follows:

[0110] 1. Leaf3 node monitors whether there is valley routing in the virtual channel passing through the node. Specifically: Leaf3 node marks the message received from the uplink port. If the QoS priority of the message does not change and it is sent out from another uplink port, it means that there is valley routing in the virtual channel. For example Fig.11 Flow4 shown in the figure meets the valley routing conditions: the packet enters from the upstream port Port2 and is sent from the upstream port Port1. The packet is untagged before being sent from the egress port.

[0111] 2. Leaf3 node monitors whether the valley route forms a microloop in the virtual channel. Specifically, in the virtual channel where the valley route is found,

[0112] (1) Table 1 is a description of the fields carried in the loop monitoring message. As shown in Table 1, port 1 (egress port) of the Leaf3 node (the first monitoring node) sends a loop monitoring message, and the loop monitoring message carries at least three fields in Table 1. The monitoring priority level is 3, and the initial value of the hop count is 0.

[0113] Table 1

[0114]

[0115] (2) Port 3 of the Spine1 node (the second monitoring node) receives a loop monitoring message and extracts a monitoring priority value of 3 from the message, that is, the microloop of the virtual channel with a priority of 3 needs to be monitored. Mark the messages with a priority of 3 received from each downstream port of the device, and check whether the messages are marked at each output port. Filter out a group of downstream output ports (the messages are marked), and remove the ports that receive the loop monitoring message from the filtered downstream ports to obtain the downstream port set S. The Spine1 node forwards the loop monitoring message from the filtered downstream port set. Before sending the loop monitoring message, add 1 to the hop count value. At this time, the hop count value is 1.

[0116] (3) Port 1 of Leaf2 node (the third monitoring node) receives a loop monitoring message and extracts a monitoring priority value of 3 from the message, that is, it needs to monitor the microloop of the virtual channel with a priority of 3. First, determine whether the source node ID is the same as its own. If so, perform subsequent processing to discover the microloop. If not, mark the messages with a priority of 3 received from each upstream port of the device, and check whether the messages are marked at each output port. Filter out a group of upstream output ports (the messages are marked). Remove the ports that receive the loop monitoring message from the filtered upstream ports to obtain the upstream port set SS. Leaf2 node forwards the loop monitoring message from the filtered upstream port set SS. Before sending the loop monitoring message, add 1 to the hop count value. At this time, the hop count value is 2.

[0117] (4) Port 1 of the Spine2 node (the fourth monitoring node) receives a loop monitoring message and extracts a monitoring priority value of 3 from the message, that is, the micro-loop of the virtual channel with a priority of 3 needs to be monitored. Spine2 marks the messages with a priority of 3 received from each downstream port of the device, and checks whether the messages are marked at each output port. A group of downstream output ports (the messages are marked) are screened out, and the ports that receive the loop monitoring message are removed from the screened downstream ports to obtain the downstream port set S. The Spine2 node forwards the loop monitoring message from the screened downstream port set S. Before the loop monitoring message is sent, the hop count value is increased by 1. At this time, the hop count value is 3.

[0118] (5) Port 2 of Leaf3 node (the first monitoring node) receives the loop monitoring message and extracts the monitoring priority value 3 from the loop monitoring message, that is, it needs to monitor the microloop of the virtual channel with priority 3. The source node ID value is extracted from the loop monitoring message and is determined to be the same as its own. After analyzing the source node ID value, it is known that a microloop has occurred in the virtual channel corresponding to queue 3 of port 1 of Leaf3 node.

[0119] 3. Since a microloop has occurred in the virtual channel corresponding to queue 3 of port 1 of leaf3 node (abbreviated as microloop in E1③), leaf3 node monitors whether queue E1③ has reached the monitoring congestion threshold. If so, it will reduce the speed of the relevant valley flow. If the congestion still increases after the flow is reduced in speed, proceed to the next step. Specifically:

[0120] When the buffer utilization rate of the monitored E1③ queue reaches 80% of the ECN threshold (this value is defined by the user according to the actual situation, and is only used as an example here), the packets in the queue are marked with ECN in advance (equivalent to triggering the ECN threshold in advance), so that the valley flow (flow4) passing through this node in the micro-loop is slowed down in advance. After the flow is slowed down, if the buffer utilization rate of the E1③ queue drops below 80%, the congestion monitoring of the queue flow continues; after the flow is slowed down, if the buffer utilization rate of the E1③ queue reaches 80% again, the speed reduction mechanism is triggered again; if the buffer utilization rate of the E1③ queue is still higher than 80% after the speed reduction, when the ECN threshold is reached, it proves that the speed reduction cannot solve the congestion of the micro-loop, and the speed reduction is no longer performed, and subsequent processing continues.

[0121] 4. Since the valley flow rate reduction cannot solve the congestion of the micro-loop, the QoS level of the valley flow (flow4) is modified through Leaf3 so that the flow is no longer transmitted in the current micro-loop at the egress port of the node. This method is equivalent to splitting a valley flow into two non-valley flows transmitted in different virtual channels. Eliminating the valley flow is equivalent to eliminating the current micro-loop, and eliminating the micro-loop is equivalent to preventing PFC deadlock. Specifically:

[0122] Change the QoS level of flow4 from 3 to 2 through the switching chip of the Leaf3 node (all mainstream switching chips have this function): when flow4 is on port 2 (input port) of the Leaf3 node, the QoS level is 3; when flow4 is on port 1 (output port) of the Leaf3 node, the QoS level is 2. Fig.15 is a schematic diagram of a virtual channel after valley routing is eliminated in a single pod scenario according to an embodiment of the present invention, as shown Fig.15 As shown, the original valley flow Flow4 is split into two non-valley flows: new Flow4 and Flow14, and these two non-valley routes are in different virtual channels.

[0123] Fig.14 is a schematic diagram of a virtual channel after valley routing is eliminated according to an embodiment of the present invention ( Fig.14 Only two priority virtual channels are drawn), such as Fig.14 As shown in the figure, after the QoS level of flow4 is changed from 3 to 2, the four traffic flows are as follows: Flow1: A1③-->A2③-->D1③-->D2③-->B1③-->B3③; Flow2: D3③-->D2③-->B1③-->B2③-->E2③-->E3③; Flow3: E3③-->E1③-->A3③-->A2③-->D1③-->D3③; Flow4: B3③-->B2③-->E2③-->E1②-->A3②-->A1②. Combining the directions of the four flows, it can be found that the microloop has been eliminated, E1③-->A3③-->A2③-->D1③-->D2③-->B1③-->B2③-->E2③-->E1②-->A3②.

[0124] It should be noted that, in this embodiment:

[0125] First, the QoS level adjustment strategy is determined by the user, for example: giving priority to virtual channels with less congestion (one-to-one correspondence with priority), or choosing which virtual channel to choose based on economic benefits.

[0126] Second, no matter whether the adjusted virtual channel has a microloop or congestion occurs, since the valley traffic with modified priority has become non-valley traffic, no new microloop will be caused in the new virtual channel.

[0127] Third, after eliminating valley traffic, the triggering threshold of PFC is no longer limited. Lossless transmission can be achieved by using PFC and ECN technology properly.

[0128] Fourth, after the link failure is eliminated, the rerouting is also eliminated, the microloop is also eliminated, and the traffic still uses the original QoS.

[0129] By applying the method of this embodiment, PFC deadlock is avoided in a network where micro-loops are generated.

[0130] Embodiment 2

[0131] This embodiment is a PFC deadlock prevention for cross-Pod networking topology. Due to link failure, rerouting occurs, that is, valley routing occurs between core-spine-core. When conditions are met, a micro-loop is formed first, and then a CBD is formed, which may eventually lead to a PFC deadlock. In this embodiment, the implementation method of the present invention can be applied to prevent the occurrence of PFC deadlock in advance.

[0132] Fig.16 is a flow diagram before a link failure in a cross-pod network architecture according to an optional embodiment of the present invention, such as Fig.16 As shown in the figure, before the link failure, there are four flows, flow1, flow2, flow3, and flow4, which are mapped to the priority queue 3 (virtual channel 3) of the corresponding port, Flow1: C2③-->B4③-->B3③-->F2③; Flow2: D2③-->B1③-->B2③-->E2③; Flow3: E1③-->A3③-->A2③-->D1③; Flow4: F1③-->A4③-->A1③-->C1③. Here, C2③ represents the priority queue 3 (corresponding to virtual channel 3) of port 2 of switching device C, and the others are similar. Since there is no valley routing ( Fig.16 The spine node in the network has no traffic entering from the upstream port and then being sent from the upstream port), and the four flows do not form a microloop. Therefore, the conditions for forming a PFC deadlock are not met at this time.

[0133] Fig.17 is a flow diagram of a micro-loop generated after a link failure in a cross-pod network architecture according to an optional embodiment of the present invention, such as Fig.17 As shown in the figure, due to the failure of four links (Spine1-core2, Spine4-core1, leaf1-spine2, leaf4-Spine3), flow1 and flow4 cannot pass Fig.16The system assigns new transmission paths to flow1 and flow4 respectively to transmit packets along the paths in the flow. The four flows are mapped to the priority queue 3 of the corresponding ports, Flow1: A1③-->A2③-->D1③-->D2③-->B1③-->B3③; Flow2: D4③-->D2③-->B1③-->B2③-->E2③-->E3③; Flow3: E3③-->E1③-->A3③-->A2③-->D1③-->D4③; Flow4: B3③-->B2③-->E2③-->E1③-->A3③-->A1③. It can be seen that Flow1 has a valley route at the spine2 node, and Flow4 has a valley route at the spine3 node. Combining the directions of the four flows, the four flows have formed a micro-loop. Fig.18 is a schematic diagram of a micro-loop between the spine and the core according to an optional embodiment of the present invention, Fig.19 is a schematic diagram of a microloop in a virtual channel according to an optional embodiment of the present invention ( Fig.19 Only two priority virtual channels are drawn), such as Fig.18 and Fig.19 The micro-loop shown is: A2③-->D1③-->D2③-->B1③-->B2③-->E2③-->E1③-->A3③-->A2③-->D1③. The four nodes that this virtual channel micro-loop passes through are: A (port 2 and port 3), B (port 2 and port 3), D (port 1 and port 2), F (port 1 and port 2). If the queue 3 of the corresponding outbound port of any of the four nodes A, B, D, and F is congested and the congestion persists, when the queue 3 of the corresponding ports of the four nodes reaches the PFC threshold, CBD will occur, which will eventually lead to PFC deadlock.

[0134] In order to avoid the occurrence of dead PFC deadlock, the method of the embodiment of the present invention is applied, which is specifically as follows:

[0135] 1. The spine3 node monitors whether there is a valley route in the virtual channel passing through the node. Specifically: the spine3 node will mark the message received from the uplink port. If the QoS priority of the message has not changed inside the device and is sent out from another uplink port, it means that there is a valley route in the virtual channel. For example, Fig.17 Flow4 shown in the figure: it enters from the upstream port Port2 and is sent from the upstream port Port1. The message is unmarked before being sent from all outbound ports.

[0136] 2. The spine3 node monitors whether the valley route forms a microloop in the virtual channel. Specifically, in the virtual channel where the valley route is found,

[0137] (1) Table 2 is a description of the fields carried in the loop monitoring message. As shown in Table 2, the loop monitoring message is sent at port 1 (egress port) of the spine3 node (the first monitoring node). The loop monitoring message carries at least three fields in Table 2. The monitoring priority level is 3, and the initial value of the hop count is 0.

[0138] Table 2

[0139]

[0140] (2) Port 3 of the Core1 node (the second monitoring node) receives a loop monitoring message and extracts a monitoring priority value of 3 from the message, that is, the micro-loop of the virtual channel with a priority of 3 needs to be monitored. Mark the messages with a priority of 3 received from each downstream port of the device, and check whether the messages are marked at each output port. Filter out a group of downstream output ports (the messages are marked), and remove the ports that receive the loop monitoring message from the filtered downstream ports to obtain the downstream port set S. The Core1 node forwards the loop monitoring message from the filtered downstream port set. Before the loop monitoring message is sent, the hop count value is increased by 1. At this time, the hop value is 1

[0141] (3) Port 1 of the Spine2 node (the third monitoring node) receives a loop monitoring message and extracts a monitoring priority value of 3 from the message, that is, it needs to monitor the microloop of the virtual channel with a priority of 3. First, determine whether the source node ID is the same as its own. If so, perform subsequent processing to discover the microloop. If not, mark the messages with a priority of 3 received from each upstream port of the device, and check whether the messages are marked at each output port. Filter out a group of upstream output ports (messages are marked). Remove the ports that receive the loop monitoring message from the filtered upstream ports to obtain the upstream port set SS. The Spine2 node forwards the loop monitoring message from the filtered upstream port set SS. Before sending the loop monitoring message, add 1 to the hop count. At this time, the hop value is 2

[0142] (4) Port 1 of the Core2 node (the fourth monitoring node) receives a loop monitoring message and extracts a monitoring priority value of 3 from the message, that is, the micro-loop of the virtual channel with a priority of 3 needs to be monitored. Core2 marks the messages with a priority of 3 received from each downstream port of the device, and checks at each output port whether the message is marked. A group of downstream output ports (the messages are marked) are screened out, and the ports that receive the loop monitoring message are removed from the screened downstream ports to obtain the downstream port set S. The Core2 node forwards the loop monitoring message from the screened downstream port set S. Before the loop monitoring message is sent, the hop count value is increased by 1. At this time, the hop count value is 3

[0143] (5) Port 2 of the Spine3 node (the first monitoring node) receives a loop monitoring message and extracts a monitoring priority value of 3 from the loop monitoring message, which means that it needs to monitor a microloop of a virtual channel with a priority of 3. The source node ID value is extracted from the loop monitoring message and is determined to be the same as its own. After analyzing the source node ID value, it is known that a microloop has occurred in the virtual channel corresponding to queue 3 of port 1 of the Spine3 node.

[0144] 3. Since a microloop has occurred in the virtual channel corresponding to queue 3 of port 1 of the Spine3 node (abbreviated as E1③ has a microloop), the Spine3 node monitors whether the E1③ queue has reached the monitoring congestion threshold. If so, the relevant valley flow is decelerated. If congestion still increases after the flow is decelerated, proceed to the next step. Specifically:

[0145] When the buffer utilization rate of the monitored E1③ queue reaches 80% of the ECN threshold (this value is defined by the user according to the actual situation, and is only used as an example here), the packets in the queue are marked with ECN in advance (equivalent to triggering the ECN threshold in advance), so that the valley flow (flow4) passing through this node in the micro-loop is slowed down in advance. After the flow flow4 is slowed down, if the buffer utilization rate of the E1③ queue drops below 80%, the congestion monitoring of the queue traffic continues; after the flow flow4 is slowed down, if the buffer utilization rate of the E1③ queue reaches 80% again, the speed reduction mechanism is triggered again; if the buffer utilization rate of the E1③ queue is still higher than 80% after the flow4 is slowed down, when the ECN threshold is reached, it proves that the speed reduction cannot solve the congestion of the micro-loop, and the speed reduction is no longer performed, and subsequent processing continues.

[0146] 6. Since slowing down the valley flow flow4 cannot solve the congestion of the microloop, the QoS level of the valley flow (flow4) is modified through Spine3 so that the flow is no longer transmitted in the current microloop at the node's egress port port1. This method is equivalent to splitting the valley flow flow4 into two non-valley flows (new flow4 and flow14) transmitted on different virtual channels. Eliminating the valley flow is equivalent to eliminating the current microloop, and eliminating the microloop is equivalent to preventing PFC deadlock. Specifically:

[0147] Change the QoS level of flow4 from 3 to 2 through the switching chip of the Spine3 node (all mainstream switching chips have this function): the QoS level of flow4 is 3 when it is on port 2 (input port) of the Spine3 node; the QoS level of flow4 is 2 when it is on port 1 (output port) of the Spine3 node. Fig.21 is a schematic diagram of a virtual channel after valley routing is eliminated in a cross-pod scenario according to an optional embodiment of the present invention, such as Fig.21As shown, the original valley flow Flow4 is split into two non-valley flows: new Flow4 and Flow14, and these two non-valley routes are in different virtual channels.

[0148] Fig. 20 is a schematic diagram of a virtual channel after valley routing is eliminated according to an optional embodiment of the present invention ( Fig. 20 Only two priority virtual channels are drawn), such as Fig. 20 As shown in the figure, after the QoS level of flow4 is changed from 3 to 2, the four traffic flows are as follows: Flow1: A1③-->A2③-->D1③-->D2③-->B1③-->B3③; Flow2: D3③-->D2③-->B1③-->B2③-->E2③-->E3③; Flow3: E3③-->E1③-->A3③-->A2③-->D1③-->D3③; Flow4: B3③-->B2③-->E2③-->E1②-->A3②-->A1②. Combining the directions of the four flows, it can be found that the microloop has been eliminated, E1③-->A3③-->A2③-->D1③-->D2③-->B1③-->B2③-->E2③-->E1②-->A3②.

[0149] It should be noted that, in this embodiment:

[0150] First, the QoS level adjustment strategy is determined by the user, for example: giving priority to virtual channels with less congestion (one-to-one correspondence with priority), or choosing which virtual channel to choose based on economic benefits.

[0151] Second, no matter whether the adjusted virtual channel has a microloop or congestion occurs, since the valley traffic with modified priority has become non-valley traffic, no new microloop will be caused in the new virtual channel.

[0152] Third, after eliminating valley traffic, the PFC threshold is no longer limited. Lossless traffic can be achieved by using PFC and ECN technology properly.

[0153] Fourth, after the link failure is eliminated, the rerouting is also eliminated, the microloop is also eliminated, and the traffic still uses the original QoS.

[0154] By applying the method of this embodiment, PFC deadlock is avoided in a network where micro-loops are generated.

[0155] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0156] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A priority-based flow control anti-deadlock method, characterized in that: include: The switching device monitors whether valley routing occurs in a virtual channel of the CLOS network. If valley routing occurs in the virtual channel, the switching device further monitors whether a microloop occurs in the virtual channel. When a micro-loop exists in the virtual channel, the switching device monitors whether congestion occurs in the micro-loop; When congestion occurs in the micro-loop, the traffic in the micro-loop is decelerated.

2. The method according to claim 1, characterized in that: The switching device monitoring whether valley routing occurs in the virtual channel includes: By monitoring the service flow trends of the priority queues of the inbound port and the outbound port of the switching device, it is determined whether valley routing occurs in the virtual channel corresponding to the priority queue.

3. The method according to claim 1, characterized in that: When a micro-loop exists in the virtual channel, the switching device monitors whether congestion occurs in the micro-loop, including: When a micro-loop exists in the virtual channel, monitoring the buffer utilization rate of the priority queue of the egress port of the switching device; When the cache utilization reaches a preset value, it is determined that congestion occurs in the micro-loop, wherein the preset value is less than an ECN threshold.

4. The method according to claim 3, characterized in that When congestion occurs in the micro-loop, the traffic in the micro-loop is decelerated, including: When congestion occurs in the micro-loop, the switching device applies ECN flow control technology to reduce the speed of the flow in the micro-loop by performing ECN marking on the flow in the micro-loop.

5. The method according to claim 4, characterized in that After the flow in the micro-loop is decelerated, the method further includes: The switching device continues to monitor the buffer utilization of the priority queue of the egress port; If the cache utilization rate reaches the preset value again, the traffic in the micro-loop is decelerated again.

6. The method according to claim 4, characterized in that After the flow in the micro-loop is decelerated, the method further includes: When it is monitored that the congestion of the micro-loop is aggravated, the switching device eliminates the valley routing by modifying the QoS value of the valley traffic of the virtual channel.

7. The method according to claim 6, characterized in that When it is monitored that the congestion of the micro-loop is aggravated, the switching device eliminates the valley routing by modifying the QoS value of the valley traffic of the virtual channel, including: When the cache utilization reaches the ECN threshold of the priority queue, the QoS value of the valley traffic of the virtual channel is modified inside the switching device, so that the traffic in the inbound port direction and the outbound port direction of the valley route are transmitted in different virtual channels respectively, and the microloop is eliminated by eliminating the valley route.

8. The method according to claim 7, characterized in that After modifying the QoS value of the valley traffic of the virtual channel inside the device so that the traffic in the inbound port direction and the traffic in the outbound port direction of the valley route are transmitted in different virtual channels respectively, the method further includes: When the switching device detects that the valley route is eliminated, it stops modifying the QoS value of the valley traffic of the virtual channel.

9. The method according to claim 1, characterized in that: When the valley routing is Spine-Leaf-Spine valley routing, the switching device is a Leaf node; when the valley routing is Core-Spine-Core valley routing, the switching device is a Spine node.

10. A priority-based flow control anti-deadlock device, characterized in that: include: A first monitoring module is used to monitor whether there is a microloop in a virtual channel of the CLOS network; A second monitoring module, configured to further monitor whether congestion occurs in the micro-loop when there is a micro-loop in the virtual channel; A speed reduction module for reducing the speed of the traffic in the micro-loop when congestion occurs in the micro-loop; Wherein, the first monitoring module includes: A first monitoring unit, configured to monitor whether valley routing occurs in the virtual channel; The second monitoring unit is used to further monitor whether there is a micro loop in the virtual channel when the first monitoring unit detects that a valley routing occurs in the virtual channel.

11. The device according to claim 10, characterized in that Also includes: The modification module is used to modify the QoS value of the valley flow of the virtual channel when the congestion of the micro-loop aggravates and reaches a preset threshold value, so that the flow in the inlet port direction and the outlet port direction of the valley route are transmitted in different virtual channels respectively, so as to eliminate the valley route.

12. The device according to claim 10, characterized in that When the valley routing is Spine-Leaf-Spine valley routing, the device is a Leaf node; when the valley routing is Core-Spine-Core valley routing, the device is a Spine node.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 9 when executed.

14. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Deadlock-avoidance lossless traffic control method and device

    CN108768781A

  • Method and system for realizing fault switching in communications environments

    CN1983978A