Data source flow control method, network device, storage medium and computer program product
By obtaining transmission link information to identify congested links, the problem of triggering flow control based on incorrect destination IP addresses in the source-end flow control mechanism is solved, achieving more efficient network throughput and utilization.
Patent Information
- Application Number
- CN202511055106.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-10-31
AI Technical Summary
In source-side flow control mechanisms, judging based on the destination IP address can easily trigger flow control operations incorrectly, leading to reduced network throughput and decreased utilization of non-congested links.
By obtaining the transmission link information of the service message, it is determined whether the conditions for flow control operation are met, including the target congested link, congested node or congested port, to accurately determine whether the service message passes through the congested link and avoid performing flow control operation on non-congested paths.
It improved network throughput, avoided erroneous flow control operations on non-congested paths, and enhanced overall network utilization.
Smart Images

Figure CN120880985A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a data source flow control method, network device, storage medium, and computer program product. Background Technology
[0002] In Source Flow Control (SFC), the source and destination IP addresses of a service packet are reversed to construct an SFC packet (also known as a Back To Sender (BTS) packet). Simultaneously, the SFC packet carries flow control pause / resumption information and is forwarded to the source node via routing. When the SFC packet returns to the source node, it passes through a border device (e.g., a ToR switch). The ToR switch caches the received SFC packet information locally, recording the flow control pause status using the destination Internet Protocol (IP) address (i.e., the source IP address of the SFC packet) as the key. If a new service packet arrives at the ToR switch, and its destination IP address is found in the SFC pause cache table, the ToR switch applies near-end flow control backpressure to this new service packet to prevent it from entering the network and exacerbating congestion at congestion points.
[0003] However, during network transmission, different transmission paths may have the same destination IP address. Judging based on the destination IP address can easily trigger flow control operations incorrectly, thereby reducing network throughput and reducing the utilization of non-congested links. Summary of the Invention
[0004] This application provides a data source flow control method, network device, storage medium, and computer program product to at least solve the problem that related source-side flow control mechanisms are prone to erroneously triggering flow control operations.
[0005] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide a data source flow control method applied to a network node, comprising: acquiring a service packet sent by a source device, the service packet including transmission link information; in response to determining that the service packet meets a first flow control operation condition based on the transmission link information, sending flow control operation indication information to the source device, the flow control operation indication information being used to instruct the source device to perform flow control operation; the first flow control operation condition including at least one of the following: the first transmission link indicated by the transmission link information includes a target congested link; the first transmission link includes two congested nodes corresponding to the target congested link; the first transmission link includes one congested node and a congested port corresponding to the target congested link.
[0006] In a second aspect, embodiments of this application provide a network device, the network device including a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions being executed by the processor to implement the steps of the method described in the first aspect above.
[0007] Thirdly, embodiments of this application provide a computer-readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect above.
[0008] Fourthly, embodiments of this application provide a computer program product, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the steps of the method described in the first aspect above.
[0009] In this embodiment, a network node acquires a service packet sent by a source device, the service packet including transmission link information. In response to determining that the service packet meets a first flow control operation condition based on the transmission link information, a flow control operation instruction is sent to the source device. The flow control operation instruction is used to instruct the source device to perform a flow control operation. The first flow control operation condition includes at least one of the following: the first transmission link indicated by the transmission link information includes a target congested link; the first transmission link includes two congested nodes corresponding to the target congested link; or the first transmission link includes one congested node and one congested port corresponding to the target congested link. This method can accurately determine whether a service packet passes through a congested link, avoiding incorrect flow control operations on non-congested paths, thereby effectively improving overall network throughput.
[0010] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0011] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0012] Figure 1 A schematic diagram illustrating flow control operations triggered erroneously based on the destination IP address is shown. Figure 2 A flowchart illustrating a data source flow control method provided in some embodiments of this application is shown; Figure 3 The present application provides schematic diagrams of the structure of a transmission network according to some embodiments. Figure 4Example diagrams of congestion locations provided in some embodiments of this application are shown; Figure 5 The present application provides schematic diagrams of the transmission network structure according to other embodiments. Figure 6 A flowchart illustrating a data source flow control method provided in other embodiments of this application is shown; Figure 7 This illustration shows extended information diagrams of SFC messages provided in some embodiments of this application; Figure 8 This application provides schematic diagrams illustrating the structure of the BTH message header according to some embodiments. Figure 9 This document illustrates a schematic diagram of the field information of the BTH message header provided in some embodiments of this application; Figure 10 This paper illustrates a schematic diagram of the structure of the extended header of an SFC message provided in some embodiments of this application; Figure 11 This application shows a structural diagram of a service flow information cache table provided in some embodiments; Figure 12 The diagram illustrates the processing flow of SFC messages provided in some embodiments of this application; Figure 13 A schematic diagram of the hardware structure of the network device provided in an embodiment of this application is shown. Detailed Implementation
[0013] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0014] RoCEv2 is a popular Remote Direct Memory Access (RDMA) technology. Because the go-back-N mechanism used in the transport layer is sensitive to packet loss, a lossless mechanism is typically used to ensure packet loss during network congestion. When congestion occurs, sufficient headroom buffer space is reserved, and flow control signals are sent upstream to alleviate congestion.
[0015] Traditional priority-based flow control (PFC) mechanisms are widely used. However, because PFC is based on priority granularity, it inevitably suffers from head-of-line blocking, which can further lead to deadlock and PFC storms. The reason for this is that PFC's flow control granularity is still relatively coarse. The IEEE working group proposed Source Flow Control (SFC), a mechanism where each flow uses a virtual queue and performs flow control backpressure on a per-flow basis. Since the device's output port is a physical queue, all traffic packets share the physical queue. In a wide area network, upstream nodes do not have enough physical queues to maintain each flow's packets. Therefore, the SFC mechanism sends a flow control signal for each flow to the source node, causing the source to stop sending traffic.
[0016] In the SFC mechanism, the source and destination IP addresses of the service packet are reversed to construct the SFC packet (also known as the Back To Sender packet, BTS). Simultaneously, the source queue pair (QP) information cached by the network device is used as the destination QP, and the destination QP is used as the source QP. Flow control pause / resume frame information is encapsulated in the packet, and the SFC packet is forwarded to the source node via routing. The source node determines which service flow to apply flow control to based on the QP pair information carried in the packet.
[0017] When an SFC (Signal for Flow Control) packet returns to the source node, it passes through a border device (e.g., a ToR switch). The ToR caches the received SFC packet information locally, using the destination IP address (i.e., the source IP address of the SFC packet) as the key to record the flow control pause status. If a new service flow packet arrives at the ToR switch at this time, and the destination IP address of that service flow packet is in the SFC pause cache table, the ToR switch will apply near-end flow control backpressure to that service flow packet. This accelerates source-end flow control, preventing the service flow from entering the network and exacerbating congestion at congestion points.
[0018] However, during network transmission, different transmission paths may have the same destination IP address. For example... Figure 1 As shown, flow1 encounters congestion and triggers SFC flow control. The returned SFC information is cached in ToR. At this time, the new flow2 arrives at the destination address host2. However, the path of flow2 may be different from that of flow1 (for example, using a multi-path load balancing strategy). If near-end coordinated flow control backpressure is applied to flow2 at this time, it will reduce the network throughput.
[0019] To address the problems existing in the aforementioned data source flow control process, this application provides a data source flow control method. A network node obtains a service packet sent by a source device, and in response to determining that the service packet meets a first flow control operation condition based on the transmission link information included in the service packet, sends flow control operation instruction information to the source device. The first flow control operation condition includes at least one of the following: the first transmission link indicated by the transmission link information includes a target congested link; the first transmission link includes two congested nodes corresponding to the target congested link; or the first transmission link includes one congested node and one congested port corresponding to the target congested link. This method can accurately determine whether a service packet passes through a congested link, avoiding erroneous flow control operations on non-congested paths.
[0020] Please see Figure 2 , Figure 2 A flowchart illustrating a data source flow control method provided in some embodiments of this application is shown. The execution entity of this method is a network node, which can be a router, a switch, or a corresponding configuration unit of a server. As shown in the figure, the data source flow control method 200 may include the following steps: Step 201: Obtain the service message sent by the source device, which includes transmission link information.
[0021] In an exemplary embodiment, taking a ToR switch as an example, the ToR switch receives a service packet sent by the source device host1. If the service packet uses the SRv6 strict explicit path, the transmission link information carried in the service packet, such as SID List information, can be obtained by parsing the service packet.
[0022] Step 202: In response to determining that the service packet meets the first flow control operation condition based on the transmission link information, a flow control operation instruction information is sent to the source device. The flow control operation instruction information is used to instruct the source device to perform flow control operation. The first flow control operation condition includes at least one of the following: the first transmission link indicated by the transmission link information includes a target congested link; the first transmission link includes two congested nodes corresponding to the target congested link; the first transmission link includes one congested node and one congested port corresponding to the target congested link.
[0023] Continuing with the above embodiments, the ToR switch determines whether a service packet meets the following flow control operation conditions based on the transmission link information: (1) The first transmission link indicated by the transmission link information includes the target congested link; (2) The first transmission link includes the two congested nodes corresponding to the target congested link; (3) The first transmission link includes a congested node and a congested port corresponding to the target congested link.
[0024] Based on the transmission link information, if the service packet obtained by the ToR switch meets one of the above flow control operation conditions, it is considered that the service packet has passed through the congested link and needs to be subjected to near-end flow control backpressure, that is, the flow control operation instruction information is sent to the source device host1 to instruct the source device host1 to perform flow control operation.
[0025] In another exemplary embodiment, such as Figure 3 As shown, the segment identifier (SID) of the congested link is sid1, and the SIDs of the congested node and the peer node of the congested link are sid2 and sid3, respectively. Assuming the obtained service packet's transmission link information SID List is a strict SID List, its transmission link is as follows: ToR->sid7->sid4->sid2->sid1->sid5 or ToR->sid7->sid4->sid2->sid3->sid5; At this point, since the congested link sid1, or the sids (sid2 and sid3) of the nodes at both ends of the congested link, or a congested node and a congested port of the congested link are located on the SID List of the service packet, it can be directly determined that the service packet has passed through the congested link. The ToR switch sends flow control operation instruction information to the source device to instruct the source device to perform flow control operation.
[0026] Compared to near-end flow control based on destination IP address, the method provided in this application determines whether a service packet passes through a congested link by using the target congested link, or two congested nodes corresponding to the target congested link, or one congested node and one congested port corresponding to the target congested link. This can avoid incorrectly performing flow control operations on non-congested paths, improve the utilization of non-congested paths, and thus effectively improve the overall network throughput.
[0027] In some embodiments, after obtaining the service message sent by the source device in step 201 above, the method further includes: Obtain service flow information for suspended service messages, including information for identifying the second transmission link; in response to the first and second transmission links having the same congested link, send flow control operation instruction information to the source device.
[0028] In an exemplary embodiment, if a service packet uses an SRv6 loose path, the following method can be used to determine whether to apply near-end flow control backpressure to the service packet: (1) If the loose SID List carried by the SRv6 message carries the sid of the congested link, or the SID of the nodes at both ends of the congested link, or the SID of the node at one end of the congested link and the congested port (equivalent to the congested link), then the service message is determined to pass through the congested link by the above steps 201 to 202. (2) If the loose SID List carried by the SRv6 message does not carry the SID of the congested link, or the SIDs of the nodes at both ends of the congested link, or the SID of the node at one end of the congested link and the congested port, the service flow information of the pre-stored suspended service message can be obtained. This service flow information includes information used to identify the second transmission link, such as the SRv6 path information of the suspended service flow. By comparing the SRv6 path information of the suspended service flow with the loose SID List, it is determined whether the first transmission link used to transmit the service message and the second transmission link used to transmit the suspended service message have the same congested link. If the first transmission link and the second transmission link have the same congested link, flow control operation indication information is sent to the source device to instruct the source device to perform flow control operation.
[0029] In some embodiments, before sending flow control operation indication information to the source device in response to the first transmission link and the second transmission link having the same congested link, the method further includes: Identify at least two target nodes that match the first transmission link and the second transmission link; obtain the target transmission path between two adjacent target nodes among the at least two target nodes; in response to the target transmission path including a congested node and a congested port, and the target congested node where the congested port is located satisfying a preset condition, determine that the first transmission link and the second transmission link have the same congested link. The preset conditions include at least one of the following: the target congested node does not use a multi-path load balancing strategy, and the destination address of the first transmission link is the same as the destination address of the second transmission link; or the target congested node uses a multi-path load balancing strategy, the destination address of the first transmission link is the same as the destination address of the second transmission link, and the first hash value is the same as the second hash value, wherein the first hash value is determined based on the header information of the service message, and the second hash value is determined based on the header information of the suspended service message.
[0030] In one exemplary embodiment, such as Figure 4 As shown, assuming the service packets acquired by the ToR switch and the suspended service packets have some intersections in their SRv6 loose paths (i.e., the congested node SIDs are the same), then the congestion point has two possible locations: either it is located between the two intersecting SIDs of the service flow, or it is located after the intersecting SID of the suspended flow. It should be noted that location 1 includes both the ToR and SID2 themselves. The following method is used to determine whether the newly acquired service packets and the suspended service packets have traversed the same congested link: (1) Determine at least two target nodes that match the first transmission link used to transmit newly acquired service messages and the second transmission link used to transmit paused service messages. Extract any two adjacent target nodes from these two target nodes sequentially, for example, ToR and SID2, or SID2 and SID3. Assume that the network nodes use the shortest routing algorithm and longest prefix matching, and the target transmission path is the shortest path between adjacent target nodes calculated using the shortest routing algorithm. Determine whether the congested node and congested port are located on this shortest path. It should be noted that in scenarios supporting multiple routes, there may be multiple equivalent paths.
[0031] (2) If the congested node and the congested port are located on the shortest path between any two adjacent target nodes, then the newly acquired service packet and the suspended service packet are determined to have passed through the same congested link based on whether the target congested node where the congested port is located supports load balancing and whether the hash algorithm is the same; specifically, for non-SR service packets, the following conditions are used to determine whether the new service flow has passed through the congested link: a) If the load balancing algorithm is "No" (i.e., the target congested node where the congested port is located does not use a multi-path load balancing strategy), then the determination of whether the newly acquired service packet has passed through the congested link is based on whether the destination IP address of the newly acquired service packet is the same as the destination IP address of the suspended service packet. Specifically, when the target congested node where the congested port is located does not use a multi-path load balancing strategy, and the destination IP address of the first transmission link is the same as the destination IP address of the second transmission link, it is determined that the newly acquired service packet and the suspended service packet have passed through the same congested link.
[0032] b) If the load balancing algorithm is "yes" (i.e., the target congested node where the congested port is located uses a multi-path load balancing strategy), then according to the pre-stored hash algorithm and hash parameters, the header information of the new service flow is hashed. For example, the five-tuple of the new service flow is hashed to obtain the first hash value. It is then determined whether the first hash value is the same as the second hash value corresponding to the suspended flow. When the first hash value is the same as the second hash value, it is determined that the newly acquired service message and the suspended service message have passed through the same congested link.
[0033] It should be noted that in the current transmission network, network nodes are assumed to use the same load balancing strategy and hash algorithm.
[0034] If any of the above conditions are met, it is considered that the newly acquired service packets need to be subject to near-end flow control backpressure; otherwise, near-end flow control is not performed. For example, if the load balancing strategy used by the current network is inconsistent or unknown, then traffic may not be able to reach the congested node from the ToR (even though the hash result of the service flow at the congested node is the same). In this case, the preferred solution is not to perform near-end flow control backpressure.
[0035] (3) If the congested node and the congested port are not located on the shortest path between any two adjacent target nodes, then it is determined that the service message and the suspended service message do not have the same congested link.
[0036] In another exemplary embodiment, such as Figure 3 As shown, the SID of the congested link is sid1, and the SIDs of the congested node and the peer node of the congested link are sid2 and sid3, respectively. Assuming the SID List of service packets is a loose SID List, the first transmission link used to transmit service packets is: ToR->sid6->sid4->sid5; the second transmission link used to transmit paused service packets is: ToR->sid7->sid4->sid5. First, determine whether the SID List of the service message contains sid1 or sid2\sid3. The result is that it does not contain it. At this time, extract the service flow information of the paused service message. This service flow information includes the SID List used to identify the second transmission link. Take the intersection to get: ToR->sid4->sid5. Based on the intersection of the obtained SID Lists, extract the adjacent target nodes sid in sequence, calculate the shortest path from the ToR switch to sid4, and check whether it passes through the congested node sid1. The result is no. Secondly, the shortest path from sid4 to sid5 is calculated, and it is found that the congested node is located on the shortest path between these two sids. Assuming that the network nodes use shortest route and longest prefix matching, and do not use load balancing, it can be determined that the service packets will also pass through sid4, reach the congested node sid2, and then reach sid5 through the congested link.
[0037] In another exemplary embodiment, assuming the SID List of the service packet is a loose SID List, the first transmission link for transmitting the service packet is: ToR->sid4->sid8, and the second transmission link for transmitting the paused service packet is: ToR->sid4->sid7. Then the intersection of the sid lists of the service packet and the paused service packet is: ToR->sid4. At this time, it has been determined that the congestion point and the congestion port are not located between ToR and sid4. Although the congestion point may be located between sid4 and sid8, it cannot be determined that it will take the same congestion link because it may take a different outgoing port than sid4->sid5. At this time, no flow control backpressure is applied to the service packet.
[0038] In some embodiments, after obtaining the service flow information of the paused service message as described above, the method further includes: In response to the inability to determine whether the first transmission link and the second transmission link have the same congested link, a flow control operation instruction message is sent to the source device according to a preset flow control policy.
[0039] The preset flow control strategy includes either performing near-source flow control on service packets or not performing near-source flow control on service packets.
[0040] In practical implementation, if the preset flow control strategy is to perform near-source flow control on service packets, then flow control operation instruction information is sent to the source device; if the preset flow control strategy is not to perform near-source flow control on service packets, then flow control operation instruction information is not sent to the source device. Preferably, when it cannot be determined that the first transmission link and the second transmission link have the same congested link, near-source flow control is not performed on service packets, and rate adjustment can be performed based on congestion feedback.
[0041] In some embodiments, after obtaining the service message sent by the source device in step 201 above, the method further includes: In response to determining that the service packet meets the second flow control operation conditions based on the transmission link information, flow control operation instruction information is sent to the source device; the second flow control operation conditions include: the destination address corresponding to the transmission link information is the same as the destination address corresponding to the suspended service packet, and the first hash value is the same as the second hash value, the first hash value is determined based on the packet header information of the service packet, and the second hash value is determined based on the packet header information of the suspended service packet.
[0042] In one exemplary embodiment, such as Figure 5As shown, assuming the paused service packet flow1 is the traffic that triggers congestion, and its destination IP address is IP1, the service flow information of flow1 can be brought back and stored in the ToR switch via SFC packets. This service flow information includes whether a multi-path load balancing strategy is used and hash algorithm parameter information, etc. When the ToR switch obtains the service packet flow2, it compares the transmission link information of flow2 with the service flow information of flow1, and obtains the following situations: In one possible scenario: the destination IP address of flow2 is the same as the destination IP address of flow1, and their hash values are also the same; Assuming that flow2 arrives at the ToR switch with a destination IP address of ip1 and hash(flow1) = hash(flow2), it can be assumed that the flow1 and flow2 packets will travel to the same congested link.
[0043] In another possible scenario: the destination IP address of flow2 is the same as the destination IP address of flow1, but their hash values are different; Assuming flow2 reaches the ToR switch with a destination IP address of ip1 and hash(flow1) ≠ hash(flow2), flow2 may reach another egress link (e.g., to network node 3) after reaching the congested node, and will not pass through the same congested link. In this case, backpressure on flow2 at the near end cannot be applied.
[0044] In another possible scenario: the destination IP address of flow2 is different from the destination IP address of flow1.
[0045] If the destination IP address of flow2 is ip2, then regardless of whether the hash value is the same as that of flow1, it cannot be guaranteed that the flow2 packet will reach the congestion point. Figure 5 Taking the transmission network in the example, flow2 might originate from ToR, reach network node 2, and then arrive at the receiving end IP2. Therefore, in this case, near-end backpressure cannot be applied to the new service flow.
[0046] In other embodiments, such as Figure 6 As shown, the above-mentioned data source flow control method may include the following steps: Step 601: Obtain the service flow information of the service packets and paused service packets sent by the source device, and determine the encapsulation method used by the service packet. If SRv6 encapsulation is used, proceed to step 602; otherwise, proceed to step 604. Step 602: Based on the SID List of transmission link information included in the service message, determine whether the service message meets the first flow control operation condition. For example, determine whether the congested link sid is in the SID List, or whether the congested node and the congested link peer node sid (the node's end-sid) are in the SID List, or whether a congested node and a congested port corresponding to the congested link are in the SID List. If so, determine that the service message passes through the congested link and goes through the near-end flow control backpressure, and proceed to step 605; otherwise, proceed to step 603. Step 603: Obtain the service flow information of the suspended service message, which includes the SID List information used to identify the second transmission link; take the intersection of the service message and the SID List of the suspended service message (the result may be empty), and then extract the SIDs of two adjacent intersecting target nodes in sequence. Based on the shortest path algorithm, determine whether the congested node is between two adjacent SIDs. If it is, proceed to step 604; otherwise, proceed to step 606. Step 604: If the target congestion point where the congested port is located does not use load balancing (then determine whether the destination IP address is the same), or uses multi-path load balancing (then determine whether the hash algorithm calculation result is the same), if so, determine that the service packet and the suspended service packet have passed through the same congested link, and perform near-end flow control backpressure on the service packet; otherwise, proceed to step 606. Step 605: Implement near-end flow control backpressure, that is, send flow control operation instruction information to the source device. This flow control operation instruction information is used to instruct the source device to perform flow control operation. Step 606: Do not implement near-end flow control back pressure.
[0047] In some embodiments, before obtaining the service message sent by the source device in step 201 above, the method further includes: Receive a source-end flow control SFC message, which includes message flow control information and congestion node information. The congestion node information includes congestion node identification information and congestion port information. In response to the message flow control information indicating that the SFC message is a flow control pause message, determine at least one of the following based on the congestion node information: target congested link; two congested nodes corresponding to the target congested link; one congested node and one congested port corresponding to the target congested link.
[0048] In an exemplary embodiment, when the ToR switch needs to determine whether a service packet and a flow that triggers the pause information buffer share the same congested link, it first needs to obtain information about the congested node and the congested link. The ToR switch receives a source-end flow control (SFC) packet. The SFC packet typically carries the destination node information of the service packet (e.g., destination QP, destination IP address). The SFC packet needs to be extended; consider extending the SFC packet to carry the following information: Figure 7 As shown: (1) Congested node identification information, including router-id, locator, sid information, etc.; (2) Port information of congested nodes, including link ID, port ID or port IP address, SID information, etc.; (3) Information such as the SID of the peer node of the congested link; Optionally, it can also carry congestion queue information in the congested node port, such as the corresponding DSCP value; In addition to the basic information mentioned above, since the choice of the message's exit route may also involve load balancing mechanisms and algorithms, the following information also needs to be carried to the source device: (4) Load balancing strategy; Optionally, it can also carry the hash algorithm and hash algorithm parameter information; The above information is encapsulated in the SFC message extension of RoCEv2. The SFC message may be carried via extensions based on UDP or ICMP messages, etc. Specific extension methods and encapsulation techniques for SFC messages are not limited here.
[0049] In another exemplary embodiment, the SFC message encapsulation format takes a typical RoCEv2 message as an example. The SFC message carries various extended information. Since the reserved fields in the existing RoCEv2 Base Transport Header (BTH) are insufficient, they can be carried through extended headers. The BTH message header format is as follows: Figure 8 As shown, it includes the opcode field.
[0050] The opcode field defines different message types; for example, opcode=100 00000 indicates a CNP message. It also defines whether the BTH message header includes an extension header, and the format of that extension header. Figure 9 As shown, for example, when opcode=000 10001, an ACK message is identified, followed by an ACK extension header (AETH, ACK ExtensionTransport Header) after BTH.
[0051] In this embodiment, a new opcode value can be defined to indicate that this is an SFC message (opcode=SFC, for example, 100 00000). This opcode also indicates that the BTH header is followed by an SFC extension header (SFC ETH). The extension header carries the information that needs to be returned from the congested node, including but not limited to the congested node, congested link, congestion queue, load balancing strategy, hash algorithm parameters, etc. Referring to AETH, the format of the SFC ETH extension header is as follows: Figure 10 As shown. This embodiment does not specify the number of bits for each field, the order of the fields, or the detailed encapsulation format.
[0052] In some embodiments, after receiving the source-end flow control SFC message as described above, the method further includes: In response to the message flow control information indicating that the SFC message is a flow control pause message, the count value of the paused service message corresponding to the message flow control information is incremented by one. In response to the count value not reaching the first preset value, the SFC message is sent to the source device; or, in response to the count value exceeding the first preset value, the SFC message is discarded.
[0053] In other embodiments, after receiving the source-end flow control SFC message as described above, the method further includes: In response to the message flow control information indicating that the SFC message is a flow control recovery message, the count value of the suspended service message corresponding to the message flow control information is decremented by one. In response to the count value reaching the second preset value, the SFC message is sent to the source device and the service flow information of the suspended service message is deleted; or, in response to the count value not reaching the second preset value, the SFC message is discarded.
[0054] The first and second preset values in this step can be set according to actual needs. For example, the first preset value can be set to 1 and the second preset value can be set to 0.
[0055] In one exemplary embodiment, when an SFC message arrives at the ToR switch, the ToR switch needs to parse the SFC message and store the relevant information in a cache table (denoted as the pauseCache table). Currently, the table entries use the destination IP as the key, which needs to be modified to use the triple {congested node, congested outgoing port, congestion queue} as the key, where the congestion queue is optional. Figure 11 As shown. Using this method, even if the receiving end (destination IP address) of the service packet and the paused service packet are different, if it can be determined that they have experienced the same congestion location, then near-end coordinated flow control backpressure can be performed to improve flow control efficiency.
[0056] The SFC message includes flow control information, which indicates whether the SFC message is a flow control pause message or a flow control resumption message. SFC pause indicates a flow control pause message, and SFC unpause indicates a flow control resumption message. The same congestion point may return SFC pause and unpause messages for multiple flows. To correctly handle near-end backpressure, pauseCache counts the received pause messages, denoted as pauseCount. Receiving a pause message increments pauseCount by 1; receiving an unpause message decrements pauseCount by 1. When pauseCount increases to a first preset value, the SFC message is sent to the source device; otherwise, the SFC message is discarded. For example, the first preset value is set to 1. When pauseCount decreases to 0, the SFC message is sent to the source device to send an SFC flow control resumption message to all paused traffic; otherwise, the SFC message is discarded.
[0057] In a ToR switch, near-end flow control backpressure is implemented. When the ToR switch receives a pause / recovery frame, it can promptly restore paused traffic. Therefore, a table (denoted as pausedFlows) can be added to the ToR switch to maintain the service flow information of paused service packets. This table records the service flow information extracted from SFC packets and the service flow information controlled by near-end flow control, etc. The service flow information of paused service packets may include: (1) The flow ID of the suspended service message; (2) Information such as the source QP and source IP of the suspended service message; (3) Information used to identify the service path in the suspended service message, including but not limited to SRv6 path (which may be loose or strict), destination IP address, etc. Optionally, it may also include: paused state.
[0058] The two tables mentioned above are maintained based on the ToR switch, such as Figure 12 As shown, the processing flow when the ToR switch receives an SFC message is as follows (ignoring the process of triggering the establishment of table entries): Step 1201: Receive the source flow control SFC message; Step 1202: Determine whether the SFC message is a flow control pause message or a flow control unpause message. If it is a pause message, proceed to step 1203; otherwise, proceed to step 1205. Step 1203: Increment pauseCount by 1, check if pauseCount is equal to 1. If it is, proceed to step 1204; otherwise, proceed to step 1207. Step 1204: Send the SFC message to the originator of the flow, record the flow in the pausedFlows table, and proceed to step 1208; Step 1205: Decrement pasueCount by 1, and check if pasueCount is equal to 0. If it is, proceed to step 1206; otherwise, proceed to step 1207. Step 1206: Extract the paused traffic from the pausedFlows table, construct an SFC unpause message for each one and send it to the traffic originator, delete the traffic from pausedFlows, and proceed to step 1208. Step 1207: Discard the received SFC message (ignore this SFC pause or unpause); Step 1208: Process ends.
[0059] Figure 13 This diagram illustrates the hardware structure of the network device provided in the embodiments of this application. Referring to the diagram, at the hardware level, the network device 1300 includes a processor 1310, and optionally includes an internal bus 1320, a network interface 1330, and a memory. The memory may include RAM 1341, such as high-speed random-access memory (RAM), and may also include non-volatile memory 1342, such as at least one disk storage device. Of course, the network device 1300 may also include other hardware required for other services.
[0060] The processor 1310, network interface 1330, and memory can be interconnected via an internal bus 1320. This internal bus 1320 can be an Advanced Microcontroller Bus Architecture (AMIC) bus, a Wishbone bus, an Open Core Protocol (OCP) bus, an Avalon bus, etc. The bus can be categorized as an address bus, data bus, control bus, etc. For ease of illustration, only a single bidirectional arrow is used in this diagram, but this does not imply that there is only one bus or one type of bus.
[0061] The memory stores programs. Specifically, the program may include program code, which includes computer operation instructions. The memory may include main memory 1341 and non-volatile memory 1342, and provides instructions and data to the processor 1310.
[0062] Processor 1310 reads the corresponding computer program from non-volatile memory 1342 into memory and then runs it, forming a device for locating the target user at the logical level. Processor 1310 executes the program stored in memory and specifically performs the following: Figure 2 or Figure 6 or Figure 12 The methods disclosed in the embodiments shown achieve the functions and beneficial effects of the methods described in the preceding method embodiments, and will not be repeated here.
[0063] The above is as stated in this application. Figure 2 or Figure 6 or Figure 12 The methods disclosed in the illustrated embodiments can be applied to or implemented by processor 1310. Processor 1310 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the hardware of processor 1310 or by instructions in software form. The processor 1310 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0064] The computer device can also execute the methods described in the preceding method embodiments and achieve the functions and beneficial effects of the methods described in the preceding method embodiments, which will not be repeated here.
[0065] Of course, in addition to software implementation, the network device 1300 of this application does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0066] This application also proposes a computer-readable storage medium that stores one or more programs, which, when executed by a network device including multiple applications, cause the network device to perform... Figure 2 or Figure 6 or Figure 12 The methods disclosed in the embodiments shown achieve the functions and beneficial effects of the methods described in the preceding method embodiments, and will not be repeated here.
[0067] The computer-readable storage medium mentioned above includes read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc.
[0068] Furthermore, embodiments of this application also provide a computer program product, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, which, when executed by a computer, implement the following process: Figure 2 or Figure 6 or Figure 12 The methods disclosed in the embodiments shown achieve the functions and beneficial effects of the methods described in the preceding method embodiments, and will not be repeated here.
[0069] The embodiments of this application can be applied to various network device collaboration or interconnection scenarios, including: collaboration and interconnection between mobile phones and laptops / tablets; collaboration and interconnection between mobile terminals and smart TVs / monitors; collaboration and interconnection between mobile phones or tablets and in-vehicle entertainment systems; collaboration and interconnection between mobile terminals and smart conferencing systems, etc. This satisfies users' diverse needs in smart home, smart office, and smart travel scenarios.
[0070] In summary, the above description is merely a preferred embodiment of this application and does not limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
[0071] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0072] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0073] It should also be noted that 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 a process, method, article, or apparatus. Without further limitation, 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 said element.
[0074] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
Claims
1. A data source flow control method, applied to network nodes, characterized in that, include: Acquire service packets sent by the source device, wherein the service packets include transmission link information; In response to determining that the service packet meets the first flow control operation condition based on the transmission link information, flow control operation instruction information is sent to the source device. The flow control operation instruction information is used to instruct the source device to perform flow control operation. The first flow control operation condition includes at least one of the following: the first transmission link indicated by the transmission link information includes a target congested link; the first transmission link includes two congested nodes corresponding to the target congested link; the first transmission link includes one congested node and one congested port corresponding to the target congested link.
2. The method according to claim 1, characterized in that, After obtaining the service message sent by the source device, the method further includes: Obtain service flow information for paused service messages, wherein the service flow information includes information for identifying the second transmission link; In response to the first transmission link and the second transmission link having the same congested link, the flow control operation instruction information is sent to the source device.
3. The method according to claim 2, characterized in that, Before sending the flow control operation indication information to the source device in response to the first transmission link and the second transmission link having the same congestion, the method further includes: Identify at least two target nodes that match the first transmission link and the second transmission link; Obtain the target transmission path between two adjacent target nodes among the at least two target nodes. In response to the target transmission path including the congested node and the congested port, and the target congested node where the congested port is located satisfying a preset condition, determine that the first transmission link and the second transmission link have the same congested link. The preset conditions include at least one of the following: the target congested node does not use a multi-path load balancing strategy, and the destination address of the first transmission link is the same as the destination address of the second transmission link; or the target congested node uses a multi-path load balancing strategy, the destination address of the first transmission link is the same as the destination address of the second transmission link, and the first hash value is the same as the second hash value, wherein the first hash value is determined based on the header information of the service message, and the second hash value is determined based on the header information of the suspended service message.
4. The method according to claim 2, characterized in that, After obtaining the service flow information of the paused service message, the following is also included: In response to the inability to determine whether the first transmission link and the second transmission link have the same congested link, a flow control operation instruction message is sent to the source device according to a preset flow control policy.
5. The method according to claim 1, characterized in that, After obtaining the service message sent by the source device, the method further includes: In response to determining that the service packet meets the second flow control operation conditions based on the transmission link information, flow control operation instruction information is sent to the source device; the second flow control operation conditions include: the destination address corresponding to the transmission link information is the same as the destination address corresponding to the suspended service packet, and the first hash value is the same as the second hash value, wherein the first hash value is determined based on the packet header information of the service packet, and the second hash value is determined based on the packet header information of the suspended service packet.
6. The method according to any one of claims 1 to 5, characterized in that, Before obtaining the service packets sent by the source device, the method further includes: Receive source-end flow control SFC message, the SFC message includes message flow control information and congestion node information, the congestion node information includes congestion node identification information and congestion port information; In response to the message flow control information indicating that the SFC message is a flow control pause message, at least one of the following is determined based on the congestion node information: the target congested link; the two congested nodes corresponding to the target congested link; or the one congested node and the congested port corresponding to the target congested link.
7. The method according to claim 6, characterized in that, Following the received source-end flow control SFC message, the following is also included: In response to the message flow control information indicating that the SFC message is a flow control pause message, the count value of the paused service message corresponding to the message flow control information is incremented by one; in response to the count value not reaching a first preset value, the SFC message is sent to the source device; or... In response to the count value exceeding the first preset value, the SFC message is discarded.
8. The method according to claim 6, characterized in that, Following the received source-end flow control SFC message, the following is also included: In response to the message flow control information indicating that the SFC message is a flow control recovery message, the count value of the suspended service message corresponding to the message flow control information is decremented by one. In response to the count value reaching a second preset value, the SFC message is sent to the source device, and the service flow information of the suspended service message is deleted; or, In response to the count value not reaching the second preset value, the SFC message is discarded.
9. A network device, characterized in that, The network device includes a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions being executed by the processor to implement the steps of the method as described in any one of claims 1 to 8.
10. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions that, when executed by a computer, cause the computer to perform the steps of the method as described in any one of claims 1 to 8.