Congestion notification method based on message mirror image and chip

By pre-stored spare CNP and generated mirror CNP in the forwarding chip, the problem of long CNP response time in RoCEv2 technology is solved, congestion processing efficiency is improved, generation steps are simplified and feedback time is shortened.

CN118714082APending Publication Date: 2024-09-27CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410917597.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

The CNP response time in existing RoCEv2 technology is long, resulting in low congestion processing efficiency. Traditional forwarding chips lack protocol processing and new message generation capabilities and need to rely on the CPU to generate CNP, which prolongs the feedback time.

Method used

The backup CNP is pre-stored in the forwarding chip, and based on the forward flow information of the received IP packets, the flow direction data entries are retrieved from the flow information table, a mirror CNP is generated, and its flow direction information field is directly modified in the chip to generate the target CNP. Avoid reporting CPU generation.

Benefits of technology

The CNP generation steps are simplified, the feedback response time is shortened, and the processing efficiency of packet congestion is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118714082A
    Figure CN118714082A
Patent Text Reader

Abstract

The invention provides a congestion notification method based on a message mirror image and a chip, relates to the technical field of network communication, and can improve the processing efficiency of message congestion. The method is applied to a forwarding chip in the message forwarding equipment, the message forwarding equipment further comprises a central processing unit (CPU), the forwarding chip is coupled with the CPU, and the method comprises the following steps: receiving an internet protocol (IP) message from sending end equipment, and sending the IP message to the forwarding end equipment according to forward flow direction information carried by the IP message under the condition of monitoring that a sending queue is congested; the method comprises the steps of retrieving and determining a corresponding flow direction data entry from a flow direction information table, determining reverse flow direction information according to the flow direction data entry, generating a mirroring CNP according to a standby congestion notification message CNP issued by a CPU in advance in at least one standby storage space, modifying a flow direction information related field in the mirroring CNP according to the reverse flow direction information, obtaining a target CNP, and sending the target CNP to a server. And inputting the target CNP into the receiving queue. The embodiment of the invention is used in an advanced CNP notification process in a message congestion scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to a congestion notification method and chip based on message mirroring. Background Art

[0002] In order to solve the problems of high processing latency, low single-core throughput and high central processing unit (CPU) consumption caused by frequent kernel-based data copying and interrupt operations to transmit data, a remote direct memory access (RDMA) technology is proposed in the related art to offload the network stack to the network card, thereby achieving high throughput and ultra-low latency with near-zero CPU overhead.

[0003] In RDMA technology, the normal use of RDMA applications is usually supported by infinite bandwidth (IB) and remote direct memory access over converged Ethernet version 2 (RoCEv2) technology. In RoCEv2 technology, if there is congestion in the transmission of data, a congestion notification packet (CNP) can be used for congestion notification. Specifically: after the intermediate device finds congestion, it first uses the explicit congestion notification (ECN) technology to make a special mark in the Internet Protocol (IP) message header. After receiving the IP message, the receiving end generates the corresponding CNP according to the special mark and transmits the CNP to the sending end. The sending end controls the transmission speed of the IP message according to the CNP.

[0004] However, in the above congestion notification method, after the network finds congestion, the receiving end needs to generate and send a CNP, which results in a long reaction time to the network congestion.

[0005] In order to solve the problem of long CNP reaction time in the existing RoCEv2 technology, the related technology proposes a fast CNP solution to generate CNP in advance in the intermediate device. However, since the traditional forwarding chip focuses on high-speed forwarding and has almost no ability to process protocols and generate new messages, the CNP is generated by the general-purpose computing chip CPU in the intermediate device. Therefore, the fast CNP solution needs to send the congestion message to the CPU after the intermediate device finds congestion, which leads to low efficiency in handling congestion. Summary of the invention

[0006] The present application provides a congestion notification method and chip based on message mirroring, which can improve the processing efficiency of message congestion.

[0007] In order to achieve the above objectives, this application adopts the following technical solutions:

[0008] In a first aspect, the present application provides a congestion notification method based on message mirroring, which is applied to a forwarding chip in a message forwarding device, wherein the message forwarding device also includes a CPU, and the forwarding chip is coupled to the CPU. The method includes: receiving an IP message from a sending end device, and when congestion in a sending queue is detected, retrieving and determining a corresponding flow data entry from a flow information table according to forward flow information carried by the IP message, and determining reverse flow information according to the flow data entry, generating a mirror CNP according to a spare CNP in at least one spare storage space pre-stored, the spare CNP being a message pre-sent by the CPU, modifying flow information-related fields in the mirror CNP according to the reverse flow information, obtaining a target CNP, and inputting the target CNP into a receiving queue, wherein the target CNP is used to characterize congestion in the transmission process of the IP message.

[0009] The forward flow information includes the IP address of the sending device of the IP message, the IP address of the receiving device, the user datagram protocol (UDP) port number of the sending device, the UDP port number of the receiving device and the destination queue pair number (QPN) of the receiving device; the reverse flow information includes the IP address of the sending device of the CNP, the IP address of the receiving device, the UDP port number of the sending device, the UDP port number of the receiving device and the destination QPN of the sending device.

[0010] Based on the above technical solution, the congestion notification method based on message mirroring provided by the embodiment of the present application, by pre-storing at least one spare storage space in the forwarding chip, enables the forwarding chip to retrieve and determine the corresponding flow data entry from the flow information table according to the forward flow information carried by the IP message, and determine the reverse flow information according to the flow data entry, and generate a mirror CNP according to the spare CNP in at least one spare storage space pre-stored, so as to directly modify the flow information field of the mirror CNP according to the reverse flow information in the forwarding chip to obtain the target CNP. There is no need to report the congestion information to the CPU to generate the CNP after the congestion occurs, which simplifies the steps of generating the CNP, shortens the response time of the feedback CNP, and thus improves the processing efficiency of message congestion.

[0011] In a first possible implementation manner of the first aspect, the at least one spare storage space includes a spare CNP queue and / or a spare CNP memory.

[0012] In a second possible implementation manner of the first aspect, the standby CNP includes a general CNP or a dedicated CNP, a flow direction information-related field in the general CNP is an empty field, there is no corresponding relationship between the general CNP and a flow direction data entry in the flow direction information table, and a flow direction information-related field in the dedicated CNP is determined according to the flow direction data entry in the flow direction information table, and there is a corresponding relationship between the dedicated CNP and the flow direction data entry in the flow direction information table.

[0013] In a third possible implementation manner of the first aspect, the congestion notification method based on message mirroring provided in an embodiment of the present application also includes: when the spare CNP includes a general CNP, obtaining the general CNP and generating a first spare storage space, the first spare storage space being a storage space in at least one spare storage space, and storing the general CNP in the first spare storage space.

[0014] In a fourth possible implementation manner of the first aspect, the standby CNP includes a dedicated CNP, and the generating the mirror CNP according to the standby CNP in at least one pre-stored standby storage space includes: determining a second standby storage space corresponding to the forward flow information carried by the IP message from at least one pre-stored standby storage space, and generating the mirror CNP according to the dedicated CNP in the second standby storage space.

[0015] In a fifth possible implementation manner of the first aspect, the congestion notification method based on message mirroring provided by an embodiment of the present application also includes: when the backup CNP includes a dedicated CNP, receiving at least one dedicated CNP from the CPU and a flow data entry corresponding to each dedicated CNP in at least one dedicated CNP, generating a third backup storage space for each dedicated CNP in at least one dedicated CNP, the third backup storage space being a storage space in at least one backup storage space, storing the dedicated CNP in the third backup storage space, storing the flow data entry in a flow information table, and establishing a correspondence between the flow data entry and the third backup storage space.

[0016] In a sixth possible implementation manner of the first aspect, the congestion notification method based on message mirroring provided in an embodiment of the present application also includes: when the backup CNP includes a dedicated CNP and the flow information table does not include a flow data entry corresponding to the forward flow information carried by the IP message, the forward flow information carried by the IP message is sent to the CPU.

[0017] In a second aspect, the present application provides a chip, the chip comprising a processor and a communication interface; the communication interface and the processor are coupled, and the processor is used to run a computer program or instructions to implement the congestion notification method based on message mirroring as described in the first aspect and any possible implementation method of the first aspect.

[0018] Specifically, the chip provided in the embodiment of the present application also includes a memory for storing computer programs or instructions.

[0019] In a third aspect, the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a chip, the chip executes a congestion notification method based on message mirroring as described in the first aspect and any possible implementation of the first aspect.

[0020] In a fourth aspect, the present application provides a computer program product comprising instructions, which, when the computer program product runs on a chip, enables the chip to execute the congestion notification method based on message mirroring as described in the first aspect and any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram of a transmission path for triggering a CNP notification in the related art;

[0022] Figure 2 It is a structural diagram of a message forwarding device with advanced CNP proposed in the related art;

[0023] Figure 3 A structural diagram of a message forwarding device provided in an embodiment of the present application;

[0024] Figure 4 One of the method flow charts of a congestion notification method based on message mirroring provided in an embodiment of the present application;

[0025] Figure 5 A second method flow chart of a congestion notification method based on message mirroring provided in an embodiment of the present application;

[0026] Figure 6 A schematic diagram of the scheduling principle of a general CNP provided in an embodiment of the present application;

[0027] Figure 7 A schematic diagram of the scheduling principle of a dedicated CNP provided in an embodiment of the present application;

[0028] Figure 8 A method flow chart of a congestion notification method based on message mirroring provided in an embodiment of the present application;

[0029] Fig. 9A fourth method flow chart of a congestion notification method based on message mirroring provided in an embodiment of the present application;

[0030] Fig.10 A fifth method flow chart of a congestion notification method based on message mirroring provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] The following is a detailed description of the congestion notification method and chip based on message mirroring provided in the embodiments of the present application in conjunction with the accompanying drawings.

[0032] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0033] The terms "first" and "second" and the like in the specification and drawings of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0034] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0035] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0036] In the description of the present application, unless otherwise specified, “plurality” means two or more.

[0037] Traditional transmission control protocol (TCP) / IP network technology transmits data through frequent data copying and interrupt operations in the operating system kernel. However, this communication method based on the operating system kernel has problems such as high processing latency, low single-core throughput and high CPU consumption.

[0038] Therefore, by introducing RDMA technology to bypass the kernel and offload the network stack to the NIC, high throughput and ultra-low latency with close to zero CPU overhead can be achieved. However, RDMA technology has high requirements for network performance quality. If packet loss occurs in the network, it will have a huge impact on RDMA transmission performance. Therefore, in order to support upper-layer RDMA applications, IB technology and RoCEv2 technology are used to achieve near-lossless performance for the network. Specifically: through key technologies such as headroom buffer, priority-based flow control (PFC), and ECN, a lossless transmission channel is provided for RDMA at the network level.

[0039] In RoCEv2 technology, a CNP is defined for congestion notification. For example, in standard protocols (such as infiniBand architecture specification volume 1), a message in which the high 3 bits of the opcode field (opcode) in the base transport header (BTH) are filled with 100 is defined as a CNP.

[0040] In the related art, if packet loss actually occurs during the transmission process, a negative acknowledgment (NAK) is used to notify the packet loss; if congestion occurs in the intermediate device but the congestion is not to the extent of packet loss, it will trigger CNP to notify the congestion, prompting the sending device to slow down to avoid packet loss caused by increased congestion. After receiving the CNP, the sending device will associate with the queue (queue pair, QP) corresponding to the CNP and slow down the QP according to specific rules.

[0041] like Figure 1 The figure shows a transmission path diagram for triggering CNP notification in related technologies. In conventional IB and RoCEv2 technologies, the transmission protocol runs on the NICs at both ends. The intermediate device does not process the transmission protocol, but only forwards it. When transmitting a message, if the intermediate device finds congestion, it uses ECN technology to make a special mark in the message header and transmit it to the receiving NIC first. After the receiving NIC generates CNP, it is transmitted to the sending NIC. The sending NIC controls the transmission speed of the message according to CNP.

[0042] However, in this method of generating CNPs through a receiving device, the transmission path of the CNPs is long and the processing efficiency of message congestion is low.

[0043] In order to solve the problem that the CNP transmission path is long and the processing efficiency of message congestion is low, an early CNP technology is proposed in the related art. Figure 2 As shown in the figure, it is a structural diagram of the message forwarding device of the advance CNP. Since forwarding chips such as network processor (NP) / application specific integrated circuit (ASIC) / traffic management (TM) can only process specific message headers but cannot perform protocol processing, after the forwarding chip receives the IP message via the switching network, if queue congestion is detected, a special mark will be made in the IP message header and sent to the CPU (such as the CPU of the interface board or the CPU of the device main control board) for processing. The CNP is assembled with the help of the general computing power of the CPU, and then the CNP is sent to the forwarding chip and sent via the switching network.

[0044] However, the above-mentioned method of assembling CNPs using the general computing power of the CPU, on the one hand, in the case of congestion, each congested message must be sent to the CPU for processing, which will cause pressure on the CPU; on the other hand, after the congestion occurs, the message is sent to the CPU for processing. Since the processing is performed after the congestion event occurs, the response time is still relatively long, resulting in low processing efficiency for message congestion.

[0045] In this context, in order to solve the problem of low processing efficiency of message congestion in the related art, the present application provides a congestion notification method based on message mirroring, by pre-storing at least one spare storage space in the forwarding chip, so that after receiving the IP message from the sending end device, if the forwarding chip detects that the transmission queue is congested, it can directly generate a mirror CNP based on the spare CNP in the pre-stored at least one spare storage space, and retrieve and determine the corresponding flow data entry from the flow information table according to the forward flow information carried by the IP message, and determine the reverse flow information according to the flow data entry, so as to directly modify the flow information field of the mirror CNP according to the reverse flow information in the forwarding chip to obtain the target CNP. There is no need to report the congestion information to the CPU to generate the CNP after the congestion occurs, which simplifies the steps of generating the CNP, shortens the response time of the feedback CNP, and improves the processing efficiency of message congestion.

[0046] like Figure 3 , which is a structural diagram of a message forwarding device provided in an embodiment of the present application. The message forwarding device 300 includes an interface board 310 and a switching network 320. The interface board 310 includes a forwarding chip 311 and a CPU 312. The forwarding chip 311 is coupled to the CPU 312.

[0047] Among them, the message forwarding device 300 can receive IP messages and send CNPs; the CPU 312 can generate CNPs and send them to the forwarding chip 311; the forwarding chip 311 can generate new CNPs based on the CNPs stored in the spare storage space and the forward flow information carried by the IP message when the sending queue is congested, and input the new CNPs into the receiving queue.

[0048] Exemplarily, the forwarding chip 311 can receive the IP packet 1 via the switching network 320, and when it detects that the sending queue is congested, it can generate a mirror CNP based on the backup CNP pre-issued by the CPU 312 in the pre-stored backup storage space 1, and then retrieve and determine the corresponding flow data entry from the flow information table based on the forward flow information carried by the IP packet 1, and determine the reverse flow information based on the flow data entry, modify the flow information field in the mirror CNP based on the reverse flow information, obtain the target CNP, and finally input the target CNP into the receiving queue and send the target CNP via the switching network 320.

[0049] Combine the following Figure 3 , refer to the following Figures 4 to 10 , describes the congestion notification method based on message mirroring provided in an embodiment of the present application.

[0050] Figure 4 A method flow chart of a congestion notification method based on message mirroring provided in an embodiment of the present application. The subject executing the method may be a forwarding chip or various devices / modules in the forwarding chip, such as an integrated circuit. The embodiment of the present application does not make any specific limitation on this.

[0051] For example, Figure 4 As shown, the congestion notification method based on message mirroring provided in the embodiment of the present application may include the following S401 to S404:

[0052] S401: Receive an IP message from a sending device.

[0053] The IP message is a RoCEv2 message, which is encapsulated with an IP message header, a UDP message header, and a BTH message header. The source IP address and destination IP address of the IP message header, the source port number and destination port number of the UDP message header, and the destination QPN in the BTH header in the message can be used as forward flow information.

[0054] In the embodiment of the present application, the sending end device may be a communication device with data processing capability, for example, the sending end device may be a NIC device.

[0055] In an embodiment of the present application, an IP message from a sending device may be received via a switching network.

[0056] Furthermore, after receiving the IP message, it is also necessary to determine the sending queue into which the IP message needs to be queued according to the quality of service (QoS) level of the IP message.

[0057] For example, the forwarding chip includes three sending queues (sending queue 1, sending queue 2, and sending queue 3). Among them, the QoS level corresponding to sending queue 1 is 1, the QoS level corresponding to sending queue 2 is 2, and the QoS level corresponding to sending queue 3 is 3. If the QoS level of the received IP message is 2, it can be determined that the IP message needs to be queued in sending queue 2.

[0058] S402: When the sending queue is detected to be congested, the corresponding flow direction data entry is retrieved and determined from the flow direction information table according to the forward flow direction information carried by the IP message, and the reverse flow direction information is determined according to the flow direction data entry.

[0059] Optionally, after determining the sending queue to be enqueued according to the QoS level of the IP message, it is also necessary to perform congestion judgment on the sending queue.

[0060] In the embodiment of the present application, weighted random early detection (WRED) can be used to monitor whether the sending queue is congested. For example, by configuring the three parameters of the high threshold, low threshold, and discard probability in WRED, when the queue depth of the sending queue does not reach the low threshold, the message will not be judged as congested when entering the queue. When the queue depth of the sending queue reaches the low threshold but does not reach the high threshold, there is a certain probability that the message will be judged as congested when entering the queue. When the queue depth reaches the high threshold, the message will be judged as congested when entering the queue.

[0061] For example, if the upper threshold / lower threshold is 1000KB / 500KB respectively and the discard probability is 100%, if the queue depth of the sending queue is 800KB when the message is queued, there is a probability of 60%=100%*(800-500) / (1000-500) that the message is judged as congested.

[0062] In an embodiment of the present application, the above-mentioned flow information table is a table maintained in the forwarding chip, and multiple flow data entries are stored in the above-mentioned flow information table, each flow data entry includes a dual-end IP address, a dual-end port number, and a dual-end QPN.

[0063] In an embodiment of the present application, when congestion of the sending queue is monitored, the flow data entry containing the parameters in the forward flow information can be retrieved and determined from the flow information table based on the source / destination IP address, source / destination port number, and destination QPN in the forward flow information.

[0064] For example, the flow direction information table includes flow direction data entry A, flow direction data entry B and flow direction data entry C. Among them, flow direction data entry A includes IPA1, IPA2, portA1, portA2, QPNA1 and QPNA2; flow direction data entry B includes IPB1, IPB2, portB1, portB2, QPNB1 and QPNB2; flow direction data entry C includes IPC1, IPC2, portC1, portC2, QPNC1 and QPNC2. If the forward flow direction information of the received IP message includes IPB1, IPB2, portB1, portB2, QPNB2, then flow direction data entry B can be determined as the flow direction data entry corresponding to the IP message.

[0065] In an embodiment of the present application, the reverse flow information may include source / destination IP addresses, source / destination port numbers, and destination QPN.

[0066] Exemplarily, taking the determined flow data entry corresponding to the IP packet as flow data entry B, which includes IPB1, IPB2, portB1, portB2, QPNB1 and QPNB2, IPB2, IPB1, portB2, portB1 and QPNB1 can be determined as reverse flow information.

[0067] Optionally, when it is determined that the sending queue where the IP message needs to be queued is not congested, the IP message is queued in the sending queue, and the IP message is sent serially to the receiving end device.

[0068] In the embodiment of the present application, the receiving device may be a communication device with data processing capabilities, for example, the receiving device may be a NIC device.

[0069] For example, when it is detected that the sending queue where IP packets need to be queued is not congested, IP packet 1 can be queued in the sending queue, and then all IP packets in the sending queue are sent to the receiving device in sequence according to the order in which the IP packets in the sending queue are queued.

[0070] S403: Generate a mirror CNP according to the spare congestion notification message CNP pre-stored in at least one spare storage space.

[0071] In the embodiment of the present application, the at least one spare storage space may include at least one of the following: a spare CNP queue and a spare CNP memory. Each of the at least one spare storage space stores a spare CNP.

[0072] In an optional implementation, the spare CNP may be generated through configuration.

[0073] In another optional implementation, the spare CNP may be generated in advance by the CPU and sent to the spare storage space.

[0074] Optionally, the spare CNP may include a general CNP or a dedicated CNP.

[0075] The general CNP may also be referred to as a CNP sample package, and the flow direction information carried by the CNP sample package is fixed.

[0076] In the embodiment of the present application, the flow direction information related fields in the general CNP are empty fields, and there is no corresponding relationship between the general CNP and the flow direction data entries in the flow direction information table. The flow direction information related fields in the general CNP are empty fields, which means that: the fields are filled with all 0s, or the fields are filled with all 1s.

[0077] Exemplarily, in the general CNP, the source IP address and destination IP address of the IP packet header, the source port number and destination port number of the UDP packet header, and the destination QPN in the BTH header can all be filled with 0.

[0078] In the embodiment of the present application, the flow direction information related fields in the dedicated CNP are determined according to the flow direction data entries in the flow direction information table, and there is a corresponding relationship between the dedicated CNP and the flow direction data entries in the flow direction information table.

[0079] Exemplarily, in a dedicated CNP, the source IP address and destination IP address of the IP packet header, the source port number and destination port number of the UDP packet header, and the destination queue number in the BTH header correspond to the flow data included in a flow data entry in the flow information table.

[0080] For example, the flow information table includes flow data entry A, flow data entry B, and flow data entry C, wherein flow data entry A includes IPA1, IPA2, portA1, portA2, QPNA1, and QPNA2. Then the source / destination IP address of the IP packet header of the dedicated CNP corresponding to flow data entry A is IPA2 / IPA1, the source / destination port number of the UDP packet header is portA2 / portA1, and the destination queue number in the BTH header is QPNA1.

[0081] In an optional implementation, when the spare CNP includes a general CNP, a spare storage space is pre-stored in the forwarding chip.

[0082] Exemplarily, when the standby CNP is a general CNP and congestion in the sending queue is detected, a mirror CNP is directly generated according to the general CNP in the standby storage space pre-stored in the forwarding chip.

[0083] In another optional implementation, when the spare CNP includes a dedicated CNP, one or more spare storage spaces are pre-stored in the forwarding chip.

[0084] In an embodiment of the present application, when the spare CNP includes a dedicated CNP, the generating of the mirror CNP according to the spare CNP in at least one pre-stored spare storage space may include: determining a second spare storage space corresponding to the flow data entry from at least one pre-stored spare storage space, and generating the mirror CNP according to the dedicated CNP in the second spare storage space.

[0085] Furthermore, in the case where the backup CNP is a dedicated CNP, after receiving an IP packet, it is possible to first determine the sending queue in which the IP packet needs to be queued based on the QoS information of the IP packet, and then determine whether the sending queue is congested. If the sending queue is congested, the corresponding flow direction data entry is retrieved and determined from the flow direction information table based on the forward flow direction information carried by the IP packet, and the corresponding backup storage space is determined based on the flow direction data entry, and then a mirror CNP is generated based on the dedicated CNP in the backup storage space.

[0086] For example, at least one spare storage space includes spare storage space A (corresponding to flow data entry A), spare storage space B (corresponding to flow data entry B), and spare storage space C (corresponding to flow data entry C). If flow data entry A is retrieved according to the forward flow information carried by the IP message, and flow data entry A corresponds to spare storage space A, spare storage space A is determined as the second spare storage space, and then according to the dedicated CNP in spare storage space A, a mirror CNP is generated.

[0087] S404: Modify the flow direction information related fields in the mirror CNP according to the reverse flow direction information to obtain the target CNP, and input the target CNP into the receiving queue.

[0088] The target CNP is used to indicate that congestion occurs during the transmission of IP packets.

[0089] Optionally, the target CNP may instruct the sending end device to reduce the frequency of sending IP packets carrying forward flow direction information.

[0090] In the embodiment of the present application, after the reverse flow direction information is obtained, the flow direction information related fields in the mirror CNP may be filled with the related fields in the reverse flow direction information to obtain the target CNP.

[0091] In an optional implementation, when the standby CNP is a general CNP, after the mirror CNP is generated, the flow direction information related fields in the mirror CNP are empty fields, then the related fields in the reverse flow direction information can be filled into the empty fields in the mirror CNP to obtain the target CNP.

[0092] For example, if the reverse flow information includes IPB2, IPB1, portB2, portB1 and QPNB1, if the flow information related fields in the mirrored CNP are all filled with 0, the source / destination IP address of the IP packet header can be filled with IPB2 / IPB1, the source / destination port number of the UDP packet header can be filled with portB2 / portB1, and the destination queue number in the BTH header can be filled with QPNB1 to obtain the target CNP.

[0093] In another optional implementation, when the standby CNP is a dedicated CNP, after the mirror CNP is generated, the flow direction information related fields in the mirror CNP are already the flow direction information related fields in the flow direction data entry corresponding to the forward flow direction information, and the mirror CNP can be directly used as the target CNP.

[0094] For example, the reverse flow information includes IPB2, IPB1, portB2, portB1 and QPNB1. At this time, since the flow information related fields in the mirror CNP are already IPB2, IPB1, portB2, portB1 and QPNB1, there is no need to modify the flow information related fields in the CNP, and the mirror CNP is directly used as the target CNP.

[0095] Furthermore, after the target CNP is input into the receiving queue, the outbound interface of the CNP can be determined by querying the forwarding information base (FIB), and then the CNP is forwarded to the interface board where the outbound interface is located through the switching network.

[0096] In the embodiment of the present application, the target CNP indicates that the message on the flow direction corresponding to the forward flow information carried by the IP message corresponding to the target CNP has a congestion problem during the transmission process. Therefore, after the target CNP is entered into the receiving queue, if the sending device receives the target CNP, it can be known that the message on the flow direction has congestion during the transmission process.

[0097] Optionally, the target CNP may be entered into a receiving queue with the highest priority to ensure that the target CNP is sent first.

[0098] In the congestion notification method based on message mirroring provided in the embodiment of the present application, by pre-storing at least one spare storage space in the forwarding chip, after receiving the IP message from the sending end device, if the forwarding chip detects that the transmission queue is congested, it can retrieve and determine the corresponding flow data entry from the flow information table according to the forward flow information carried by the IP message, and determine the reverse flow information according to the flow data entry, and generate a mirror CNP according to the spare CNP in the pre-stored at least one spare storage space, so as to directly modify the flow information field of the mirror CNP according to the reverse flow information in the forwarding chip to obtain the target CNP. There is no need to report the congestion information to the CPU to generate the CNP after the congestion occurs, which simplifies the steps of generating the CNP, shortens the response time of the feedback CNP, and thus improves the processing efficiency of message congestion.

[0099] The following is an exemplary description of the complete process of the congestion notification method based on message mirroring provided in an embodiment of the present application:

[0100] For example, Figure 5 As shown, the congestion notification method based on message mirroring provided in the embodiment of the present application may include the following S501 to S510:

[0101] S501. Receive an IP message via a switching network.

[0102] S502: Determine a target sending queue from multiple sending queues according to QoS information of the IP message.

[0103] S503: Determine whether the target sending queue is congested. If yes, execute S504; if no, execute S510.

[0104] S504: According to the forward flow direction information carried by the IP message, retrieve and determine the flow direction data entry from the flow direction information table.

[0105] S505: Determine reverse flow direction information according to the flow direction data entry.

[0106] S506: Generate a mirror CNP according to the spare CNP in at least one pre-stored spare storage space.

[0107] S507: According to the reverse flow information, modify the flow information related fields in the mirror CNP to obtain the target CNP.

[0108] S508: Input the target CNP into the receiving queue.

[0109] S509: Send the target CNP via the switching network.

[0110] S510: Input the IP message into the target sending queue.

[0111] In this way, by pre-storing at least one spare storage space in the forwarding chip, after receiving an IP message from a sending end device, if the forwarding chip detects that the sending queue is congested, it can generate a mirror CNP according to the spare CNP in the at least one spare storage space, and obtain the target CNP by modifying the message header operation. It is not necessary to report congestion information to the CPU to generate CNP after congestion occurs, which simplifies the steps of generating CNP, shortens the response time of feedback CNP, and improves the processing efficiency of message congestion.

[0112] As described in S403, in an optional implementation, when the spare CNP includes a general CNP, a spare storage space is pre-stored in the forwarding chip. Figure 5 , a solution is given in which a spare storage space is pre-stored in the forwarding chip.

[0113] In an embodiment of the present application, when the spare CNP includes a general CNP, a spare storage space can be pre-stored in the forwarding chip. When congestion of the sending queue is detected, the general CNP in the spare storage space can be directly mirrored to obtain a mirror CNP, and then the flow direction information related fields of the mirror CNP are modified to obtain the target CNP.

[0114] For example, Figure 6 As shown, a spare storage space 1 can be pre-stored in the forwarding chip, and a general CNP is stored in the spare storage space 1. After receiving IP packets 1 and IP packets 2, if it is detected that the sending queue is congested, the general CNP is mirrored to generate mirror CNP1 and mirror CNP2 respectively. At this time, the reverse flow information is determined by using the flow data entry corresponding to the forward flow information carried by IP packet 1, and then the flow information related fields in the mirror CNP1 are adjusted according to the reverse flow information to obtain the target CNP1, and the reverse flow information is determined by using the flow data entry corresponding to the forward flow information carried by IP packet 2, and then the flow information related fields in the mirror CNP2 are adjusted according to the reverse flow information to obtain the target CNP2, and then the target CNP1 and the target CNP2 are input into the receiving queue.

[0115] In this way, by storing the universal CNP, only one spare storage space is required in the forwarding chip, thereby reducing the consumption of storage resources.

[0116] As described in S403, in another optional implementation, when the spare CNP includes a dedicated CNP, one or more spare storage spaces are pre-stored in the forwarding chip. Figure 7 , a solution is provided in which one or more spare storage spaces are pre-stored in the forwarding chip.

[0117] In an embodiment of the present application, when the spare CNP includes a dedicated CNP, one or more spare storage spaces can be pre-stored in the forwarding chip. When congestion of the sending queue is detected, if multiple spare storage spaces are pre-stored in the forwarding chip, the spare storage space corresponding to the forwarding direction information can be first determined from the multiple spare storage spaces, and then the dedicated CNP in the spare storage space can be mirrored to obtain a mirrored CNP, and the mirrored CNP can be directly used as the target CNP.

[0118] For example, Figure 7 As shown, take the example of pre-storing spare storage space 1 and spare storage space 2 in the forwarding chip. Among them, the spare storage space 1 stores the dedicated CNP1, and the spare storage space 2 stores the dedicated CNP2. After receiving IP message 1 and IP message 2 in sequence, if the sending queue is detected to be congested, the spare storage space 1 corresponding to the forward flow information carried by IP message 1 is first determined, and the dedicated CNP1 in the spare storage space 1 is mirrored to generate the mirror CNP1, and then the mirror CNP1 is used as the target CNP1, and finally the target CNP1 is input into the receiving queue; then, the spare storage space 2 corresponding to the forward flow information carried by IP message 2 is determined, and the dedicated CNP2 in the spare storage space 2 is mirrored to generate the mirror CNP2, and then the mirror CNP2 is determined as the target CNP2, and finally the target CNP2 is input into the receiving queue.

[0119] In this way, by storing multiple dedicated CNPs, after congestion is detected, the corresponding dedicated CNP mirror can be used directly without modifying the flow information field in the mirror CNP, which further simplifies the CNP feedback steps and improves the CNP feedback efficiency.

[0120] As described in S403, in an optional implementation, the spare CNP can be generated by configuration. Figure 8 The illustrated embodiment provides a solution for configuring and generating a spare CNP.

[0121] For example, Figure 8 As shown, the congestion notification method based on message mirroring provided in the embodiment of the present application may also include the following S801 and S802:

[0122] S801: When the spare CNP includes a general CNP, obtain the general CNP and generate a first spare storage space.

[0123] The first spare storage space is a storage space in the at least one spare storage space.

[0124] In the embodiment of the present application, if the standby CNP is a general CNP, a CNP sample package can be obtained by configuration (such as writing code) and a standby storage space can be generated in the forwarding chip.

[0125] S802: Store the common CNP into the first spare storage space.

[0126] In this way, the CNP sample package is directly obtained through configuration without being generated by the CPU, thereby reducing the CPU load.

[0127] As described in S403, in another optional implementation, the spare CNP can be generated in advance by the CPU and sent to the spare storage space. Fig. 9 and Fig.10 The illustrated embodiment provides a solution for generating a spare CNP from a CPI and sending the CNP to a spare storage space.

[0128] Optionally, the standby CNP may be a CNP generated by the CPU according to configured flow direction information.

[0129] For example, Fig. 9 As shown, the congestion notification method based on message mirroring provided in the embodiment of the present application may also include the following S901 to S903:

[0130] S901. In a case where the standby CNP includes a dedicated CNP, receive at least one dedicated CNP from a CPU and a flow direction data entry corresponding to each dedicated CNP in the at least one dedicated CNP.

[0131] It should be noted that, for the relevant description of the flow direction data entry, reference may be made to the detailed description of the flow direction data entry in S403 above, which will not be repeated here.

[0132] In the embodiment of the present application, at least one dedicated CNP and a flow direction data entry corresponding to each dedicated CNP are generated by the CPU according to configured flow direction information, and the flow direction data entry corresponding to each dedicated CNP is different.

[0133] S902: Generate a third spare storage space for each dedicated CNP in at least one dedicated CNP.

[0134] The third spare storage space is a storage space in at least one spare storage space.

[0135] In the embodiment of the present application, after receiving the dedicated CNP sent by the CPU, a spare storage space may be generated for the dedicated CNP.

[0136] S903: Store the dedicated CNP into the third spare storage space, store the flow direction data entry into the flow direction information table, and establish a corresponding relationship between the flow direction data entry and the third spare storage space.

[0137] In an embodiment of the present application, after receiving a dedicated CNP and a flow direction data entry corresponding to the dedicated CNP, and generating a third spare storage space, the flow direction data entry can be stored in a flow direction information table, and a correspondence between the third spare storage space and the flow direction data entry corresponding to the dedicated CNP is constructed, and then the dedicated CNP is stored in the third spare storage space.

[0138] For example, the flow direction data entry 1 corresponding to the dedicated CNP includes IP1, IP2, port1, port2, QPN1, and QPN2. The flow direction data entry 1 can be stored in the flow direction information table, and IP1, IP2, port1, port2, QPN1, and QPN2 in the flow direction data entry 1 can be configured as the flow direction data entry corresponding to the third storage space, and then the dedicated CNP can be stored in the third storage space.

[0139] In this way, by constructing a corresponding relationship between the flow data entry corresponding to the dedicated CNP and the spare storage space, when the congestion of the IP packet carrying a certain forward flow information is subsequently monitored, the spare storage space can be directly determined, and the target CNP can be obtained based on the dedicated CNP in the spare storage space, ensuring that the congestion of the IP packet carrying the flow information can be accurately fed back to the sending device.

[0140] Optionally, the standby CNP may be a CNP generated by the CPU according to the forward flow direction information reported by the forwarding chip.

[0141] For example, Fig.10 As shown, the congestion notification method based on message mirroring provided in the embodiment of the present application may also include the following S1001 and S1004:

[0142] S1001. When the standby CNP includes a dedicated CNP and the flow information table does not include a flow data entry corresponding to the forward flow information carried by the IP message, send the forward flow information carried by the IP message to the CPU.

[0143] In an embodiment of the present application, after receiving an IP message, the flow information table can be retrieved to see whether there is a flow data entry corresponding to the forward flow information carried by the IP message. If not, the forward flow information carried by the IP message is sent to the CPU.

[0144] For example, the flow direction information table includes flow direction data entry 1, flow direction data entry 2, and flow direction data entry 3. If, according to the forward flow direction information carried by the received IP message, when searching the flow direction information table, no flow direction data entry 1 / 2 / 3 is matched, it indicates that there is no flow direction data entry corresponding to the forward flow direction information carried by the IP message in the flow direction information table, and at this time, the forward flow direction information carried by the IP message is sent to the CPU.

[0145] S1002: Receive a dedicated CNP and a flow direction data entry corresponding to the dedicated CNP from a CPU.

[0146] In the embodiment of the present application, the dedicated CNP and the flow direction data entry corresponding to the dedicated CNP are generated by the CPU according to the received forward flow direction information and the received reverse flow direction information.

[0147] The reverse flow information corresponds to the forward flow information, and the reverse flow information may be obtained by other forwarding chips receiving an IP message from a receiving device and reporting the reverse flow information carried in the IP message to the CPU.

[0148] For example, the forward flow information reported by forwarding chip 1 received by the CPU includes IP1, IP2, port1, port2, and QPN2. If the reverse flow information reported by forwarding chip 2 received by the CPU includes IP2, IP1, port2, port1, and QPN1, the forward flow information and the reverse flow information can be combined to form a complete flow data entry and sent to forwarding chip 1.

[0149] S1003: Generate a fourth spare storage space for the dedicated CNP.

[0150] The fourth spare storage space is a storage space in at least one spare storage space.

[0151] S1004: Store the dedicated CNP into the fourth spare storage space, store the flow direction data entry into the flow direction information table, and establish a corresponding relationship between the flow direction data entry and the fourth spare storage space.

[0152] It should be noted that the detailed description of S1002 to S004 can refer to the detailed description of S901 to S903 above, which will not be repeated here.

[0153] In this way, by reporting the forward flow information and reverse flow information carried by the IP message, the CPU is used to generate corresponding flow data entries and dedicated CNPs according to the forward flow information and the reverse flow information. When congestion of the IP message carrying the forward flow information is subsequently monitored, the dedicated CNP can be directly mirrored to ensure that the congestion of the IP message carrying the flow information can be accurately fed back to the sending device.

[0154] An embodiment of the present application provides a computer program product including instructions. When the computer program product is run on a computer, the computer is enabled to execute the congestion notification method based on message mirroring in the above method embodiment.

[0155] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the congestion notification method based on message mirroring in the method flow shown in the above method embodiment.

[0156] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read only memory (EPROM), a register, a hard disk, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above, or any other form of computer-readable storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In the embodiments of the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0157] An embodiment of the present invention provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to execute the following Figures 4 to 10 The congestion notification method based on message mirroring described in.

[0158] Since the computer-readable storage medium and computer program product in the embodiments of the present invention can be applied to the above method, the technical effects that can be obtained can also refer to the above method embodiments, and the embodiments of the present invention will not be described in detail here.

[0159] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A congestion notification method based on message mirroring, It is characterized in that A forwarding chip applied to a message forwarding device, wherein the message forwarding device further includes a central processing unit (CPU), the forwarding chip is coupled to the CPU, and the method includes: Receiving Internet Protocol IP messages from a sending device; When the sending queue is detected to be congested, the corresponding flow direction data entry is retrieved and determined from the flow direction information table according to the forward flow direction information carried by the IP message, and the reverse flow direction information is determined according to the flow direction data entry; Generate a mirror CNP according to a spare congestion notification message CNP pre-stored in at least one spare storage space, wherein the spare CNP is a message pre-sent by the CPU; The flow direction information related fields in the mirror CNP are modified according to the reverse flow direction information to obtain a target CNP, and the target CNP is input into a receiving queue, wherein the target CNP is used to indicate that congestion occurs during the transmission of the IP message.

2. The method according to claim 1, It is characterized in that The at least one spare storage space includes a spare CNP queue and / or a spare CNP memory.

3. The method according to claim 1 or 2, It is characterized in that The spare CNP includes a general CNP or a dedicated CNP: The flow direction information related field in the general CNP is an empty field, and there is no corresponding relationship between the general CNP and the flow direction data entry in the flow direction information table; The flow direction information related fields in the dedicated CNP are determined according to the flow direction data entries in the flow direction information table, and there is a corresponding relationship between the dedicated CNP and the flow direction data entries in the flow direction information table.

4. The method according to claim 3, It is characterized in that The method further comprises: In the case where the spare CNP includes a general CNP, acquiring the general CNP and generating a first spare storage space, where the first spare storage space is a storage space in the at least one spare storage space; The universal CNP is stored in the first spare storage space.

5. The method according to claim 3, It is characterized in that The standby CNP includes a dedicated CNP; The generating of the mirror CNP according to the spare CNP in at least one spare storage space pre-stored includes: Determining a second spare storage space corresponding to the flow direction data entry from the at least one spare storage space stored in advance; The mirror CNP is generated according to the dedicated CNP in the second spare storage space.

6. The method according to claim 3, It is characterized in that The method further comprises: In a case where the standby CNP includes a dedicated CNP, receiving at least one dedicated CNP from the CPU and a flow direction data entry corresponding to each dedicated CNP in the at least one dedicated CNP; For each dedicated CNP in the at least one dedicated CNP, generating a third spare storage space, the third spare storage space being a storage space in the at least one spare storage space; The dedicated CNP is stored in the third spare storage space, the flow direction data entry is stored in the flow direction information table, and a corresponding relationship between the flow direction data entry and the third spare storage space is established.

7. The method according to claim 6, It is characterized in that The method further comprises: In a case where the standby CNP includes a dedicated CNP and the flow information table does not include a flow data entry corresponding to the forward flow information carried by the IP message, the forward flow information carried by the IP message is sent to the CPU.

8. A chip, It is characterized in that include: A processor and a communication interface; the communication interface is coupled to the processor, and the processor is used to run a computer program or instruction to implement the method according to any one of claims 1 to 7.