Method, device and equipment for supporting ECN (Error Correction Network) under mixed insertion condition of exchange board cards, and medium

By analyzing and modifying the ECN field while the switching board is mixed, the problem that the switching board cannot directly modify the ECN field of the IP packet is solved, and fine-grained congestion state transmission is realized, improving the congestion control capability of network equipment.

CN120455412APending Publication Date: 2025-08-08YUNHE ZHIWANG (SHANGHAI) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510784252.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the case of mixed plug-in of the switch board, the switch board cannot directly modify the ECN field of the IP message, resulting in the inability to pass the fine-grained congestion state, and flow control can only be performed through PFC.

Method used

By skipping the custom message header on the switch board port, parsing the original Ethernet message and extracting the ECN field, recording the original ECN value using the incoming ACL rule, and generating the ECN mark CE signal when the switching chip queue is congested, modifying the ECN field of the IP header and the congestion status field of the custom message header.

Benefits of technology

It realizes supporting ECN when switching boards and cards are mixed, avoids flow control only through PFC, and improves the fine-grained transmission of congestion state.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455412A_ABST
    Figure CN120455412A_ABST
Patent Text Reader

Abstract

The invention discloses a method, device, equipment and medium for supporting ECN under the condition of switching board card mixed insertion, and the method comprises the steps: S1, when an original Ethernet message is received, skipping a user-defined message header with a specified length at a switching board card port according to preset configuration so as to analyze the original Ethernet message, and extracting an ECN field in an IP header; s2, matching the ECN field in an incoming ACL rule, recording a value of an original ECN, and transmitting the value to an outgoing ACL; s3, when the switching chip queue is congested, generating a signal of an ECN mark CE according to the ECN field, and modifying the ECN field of the IP header into the CE; and S4, when the ECN field in the outbound ACL rule matching IP header is CE and the value of the original ECN is a specified value, modifying the ECN field to be the specified value, and modifying the congestion state field in the custom message header to be congestion. According to the invention, the whole network equipment can support the ECN, and the problem that the switching board card can only carry out flow control through PFC is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network technology, and in particular to a method, device, equipment and medium for supporting ECN in the case of mixed insertion of switching boards. Background Art

[0002] Chassis-based network equipment typically consists of multiple service cards (or line cards) and switch cards. When Ethernet packets are forwarded between the switch chips on the service cards and the switch chips on the switch cards, a vendor-defined message header, such as Broadcom's HiGig and HiGig2, is inserted before or after the Ethernet packet header. During a gradual upgrade of network equipment, such as upgrading to a new switch card, if the corresponding manufacturer has discontinued switch chip development and updates, and the switch card needs to be replaced with a switch card made with a different vendor's switch chip, existing service cards and the new switch card can be mixed. The new switch card needs to recognize the custom message header sent by the service card to forward the packet.

[0003] However, when congestion occurs on mixed switch cards, the ECN field in the IP packet cannot be directly modified because it is unknown whether the outbound port of the service card has ECN (Explicit Congestion Notification) enabled. As a result, the switch card can only perform flow control by generating PFC (Priority Flow Control), and does not support fine-grained congestion status transmission. Summary of the Invention

[0004] In view of the above problems, the embodiment of the present invention aims to provide a method, apparatus, device and medium for supporting ECN in the case of mixed insertion of switch boards, so as to improve the above problems.

[0005] An embodiment of the present invention provides a method for supporting ECN in a mixed insertion situation of switch boards, which includes:

[0006] S1, when receiving the original Ethernet message, skips the custom message header of the specified length at the switch card port according to the preset configuration to parse the original Ethernet message and extract the ECN field in the IP header;

[0007] S2, matches the ECN field in the inbound ACL rule, records the original ECN value, and passes it to the outbound ACL;

[0008] S3: When congestion occurs in the switch chip queue, an ECN mark CE signal is generated based on the ECN field, and the ECN field in the IP header is modified to CE;

[0009] S4: When the ECN field in the IP header matches the outgoing ACL rule and is CE, and the original ECN value is the specified value, the ECN field is modified to the specified value, and the congestion status field in the custom message header is modified to congested.

[0010] Preferably, in step S2, the inbound ACL rule of the switching chip is used to match the ECN field, the internal label field of the switching chip is set, and the label field is passed to the outbound ACL; wherein, when the ECN field is Not-ECT (2b'00), the internal label field is set to 0; when the ECN field is ECT (1) (2b'01), the internal label field is set to 1; when the ECN field is ECT (0) (2b'10), the internal label field is set to 2; when the ECN field is CE (2b'11), the internal label field is set to 3.

[0011] Preferably, in step S3, when congestion occurs in the switching chip queue, if the value of the ECN field is ECT(0) or ECT(1), indicating that both ends of the protocol support ECN, a signal marked as ECN CE is generated, and the ECN field of the IP header is modified to CE; when the value of the ECN field is Not-ECT or CE, no signal marked as ECN CE is generated, and the value of the ECN field is not modified.

[0012] Preferably, in step S4, the outgoing ACL rule matches the ECN field in the IP header as CE, and decides whether to modify the ECN field in the IP header and the congestion status field in the custom message header according to the value of the internal label field.

[0013] Preferably, if the internal label field is 0, indicating that the original Ethernet message does not support ECN, the ECN field of the IP header is modified to Not-ECT (2b'00);

[0014] If the internal label field is 1, the ECN field of the IP header is modified to ECT(1)(2b'01), and the congestion status field of the custom message header is set to congested;

[0015] If the internal label field is 2, the ECN field of the IP header is modified to ECT(0)(2b'10), and the congestion status field of the custom message header is set to congested;

[0016] If the inner label field is 3, the ECN field in the IP header remains unchanged and the Congestion Status field in the custom message header is set to Congested.

[0017] Preferably, in step S4:

[0018] If the outbound ACL rule of the switch chip supports matching ECN marked as CE signal, it does not match the ECN field in the IP header as CE;

[0019] If the switch chip is in a congested state, it only passes the signal marked with ECN as CE, and modifies the ECN field in the IP header to CE after the outbound ACL. In this way, the outbound ACL can cancel the signal marked with ECN as CE. That is, the outbound ACL only needs to set the congestion status field in the custom message header to congested based on the signal marked with ECN as CE, thus keeping the ECN field in the IP header unchanged.

[0020] An embodiment of the present invention further provides a device for supporting ECN in the case of mixed insertion of switch boards, comprising:

[0021] The extraction unit is configured to, when receiving an original Ethernet message, skip the custom message header of a specified length at the switch card port according to a preset configuration to parse the original Ethernet message and extract the ECN field in the IP header;

[0022] a recording unit, configured to match the ECN field when an inbound ACL rule matches the ECN field, record the original ECN value, and pass it to the outbound ACL;

[0023] The field modification unit is used to generate an ECN mark CE signal according to the ECN field when congestion occurs in the switching chip queue, and modify the ECN field of the IP header to CE;

[0024] The state modification unit is configured to modify the ECN field to the specified value and modify the congestion state field in the user-defined message header to congested when the ECN field in the IP header matched by the outgoing ACL rule is CE and the original ECN value is the specified value.

[0025] An embodiment of the present invention also provides a device that supports ECN in the case of mixed insertion of switch boards, which includes a memory and a processor. The memory stores a computer program, and the computer program can be executed by the processor to implement the method of supporting ECN in the case of mixed insertion of switch boards as described above.

[0026] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which can be executed by a processor of a device where the computer-readable storage medium is located to implement the method of supporting ECN in the case of mixed insertion of switching boards as described above.

[0027] In summary, this embodiment, when switching cards are mixed, leverages the switching chip's ability to skip custom message headers and begin parsing the original Ethernet message. By matching the ECN field of the original message in the inbound ACL rule, the original ECN value is recorded and passed to the outbound ACL for use. When congestion occurs on the switching card, a signal marked with CE is generated. The subsequent pipeline of the switching chip modifies the message's ECN field to CE based on the signal. The outbound ACL rule of the switching card matches the ECN field, and based on the original ECN value of the inbound mark, the outbound ACL rule restores the message's ECN field to its original value and sets the congestion status field in the vendor-defined message header to "congested." This enables the congestion status to be carried to the outbound service card without modifying the original Ethernet message. The outbound service card then independently decides whether to modify the message's ECN field, enabling ECN support for the entire device and avoiding the situation where the switching card is solely responsible for flow control through PFC. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the implementation. Obviously, the drawings described below are only some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0029] Figure 1 It is a flowchart of a method for supporting ECN in the case of mixed insertion of switch boards provided by the first embodiment of the present invention.

[0030] Figure 2 It is a hardware topology diagram of network equipment boards.

[0031] Figure 3 This is a diagram for skipping custom message headers of a specified length.

[0032] Figure 4 This is a structural diagram of a method and apparatus for supporting ECN in the case of mixed insertion of switch boards provided by a second embodiment of the present invention. DETAILED DESCRIPTION

[0033] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0034] In order to enhance understanding of the present invention, some technical terms involved in the present invention are explained below.

[0035] See also Figure 1 The first embodiment of the present invention provides a method for supporting ECN in the case of mixed insertion of switch boards, which can be executed by a network device to implement the following steps:

[0036] S1, when receiving the original Ethernet message, skips the custom message header of the specified length at the switch card port according to the preset configuration to parse the original Ethernet message and extract the ECN field in the IP header.

[0037] In this embodiment, the board hardware topology diagram of the network device is as follows: Figure 2 As shown in the figure, the service line cards use fabric-mode ports (multiple ports are bundled to form a fabric path, referred to as a path) to connect to the switch line cards' regular Ethernet ports (multiple ports are bundled to form a link aggregation group, referred to as a LAG). The switch line cards' switching chipsets are from different vendors. When the switch line cards receive Ethernet packets carrying custom headers from the service line cards, they typically forward them using ACL rules based on the custom headers. Custom headers are also parsed in the order of L2, L3, and L4.

[0038] In this embodiment, in particular, Figure 3 As shown in the figure, the switching chip of the switch card is set to skip the specified length and start parsing the original Ethernet message when receiving the message carrying the custom message header. If the original Ethernet message has an IP header, the ECN field is extracted.

[0039] S2, matches the ECN field in the inbound ACL rule, records the original ECN value, and passes it to the outbound ACL.

[0040] In this embodiment, specifically, in step S2, the ECN field is matched against the inbound ACL rule of the switch chip, and the internal label field of the switch chip is set and passed to the outbound ACL. Specifically, when the ECN field is Not-ECT (2b'00), the internal label field is set to 0; when the ECN field is ECT (1) (2b'01), the internal label field is set to 1; when the ECN field is ECT (0) (2b'10), the internal label field is set to 2; and when the ECN field is CE (2b'11), the internal label field is set to 3.

[0041] S3: When congestion occurs in the switch chip queue, an ECN mark CE signal is generated according to the ECN field, and the ECN field of the IP header is modified to CE.

[0042] In this embodiment, specifically, if congestion occurs in the switch chip queue, if the value of the ECN field is ECT(0) or ECT(1), indicating that both ends of the protocol support ECN, an ECN-marked-CE signal is generated, and the ECN field of the IP header is modified to CE. If the value of the ECN field is Not-ECT or CE, no ECN-marked-CE signal is generated, and the value of the ECN field is not modified.

[0043] S4: When the ECN field in the IP header matches the outgoing ACL rule and is CE, and the original ECN value is the specified value, the ECN field is modified to the specified value, and the congestion status field in the custom message header is modified to congested.

[0044] In this embodiment, if the outbound ACL rule matches the ECN field in the IP header as CE, the value of the internal label field will be used to determine whether to modify the ECN field in the IP header and the congestion status field in the custom message header. Specifically:

[0045] If the internal label field is 0, indicating that the packet does not support ECN, the ECN field of the IP header is modified to Not-ECT (2b'00);

[0046] If the internal label field is 1, the ECN field of the IP header is modified to ECT(1)(2b'01), and the congestion status field of the custom message header is set to congested;

[0047] If the internal label field is 2, the ECN field of the IP header is modified to ECT(0)(2b'10), and the congestion status field of the custom message header is set to congested;

[0048] If the inner label field is 3, the ECN field in the IP header remains unchanged and the Congestion Status field in the custom message header is set to Congested.

[0049] Furthermore, if the outbound ACL rules on the switch chip support matching ECN-marked CE signals, matching the ECN field in the IP header with CE is not necessary. If the switch chip is congested and only passes ECN-marked CE signals, and then changes the ECN field in the IP header to CE after the outbound ACL is executed, the outbound ACL can cancel the ECN-marked CE signals. In this case, the outbound ACL only needs to set the congestion status field in the custom message header to "congested" based on the ECN-marked CE signals, leaving the ECN field in the IP header unchanged.

[0050] In summary, this embodiment, when switching cards are mixed, leverages the switching chip's ability to skip custom message headers and begin parsing the original Ethernet message. By matching the ECN field of the original message in the inbound ACL rule, the original ECN value is recorded and passed to the outbound ACL for use. When congestion occurs on the switching card, a signal marked with CE is generated. The subsequent pipeline of the switching chip modifies the message's ECN field to CE based on the signal. The outbound ACL rule of the switching card matches the ECN field, and based on the original ECN value of the inbound mark, the outbound ACL rule restores the message's ECN field to its original value and sets the congestion status field in the vendor-defined message header to "congested." This enables the congestion status to be carried to the outbound service card without modifying the original Ethernet message. The outbound service card then independently decides whether to modify the message's ECN field, enabling ECN support for the entire device and avoiding the situation where the switching card is solely responsible for flow control through PFC.

[0051] See also Figure 4 The second embodiment of the present invention further provides a device for supporting ECN in the case of mixed insertion of switch boards, which includes:

[0052] The extraction unit 210 is configured to, when receiving an original Ethernet message, skip a custom message header of a specified length at the switch card port according to a preset configuration to parse the original Ethernet message and extract the ECN field in the IP header;

[0053] The recording unit 220 is configured to match the ECN field in the inbound ACL rule, record the original ECN value, and pass it to the outbound ACL;

[0054] The field modification unit 230 is configured to generate an ECN mark CE signal according to the ECN field when congestion occurs in the switch chip queue, and modify the ECN field of the IP header to CE;

[0055] The state modifying unit 240 is configured to modify the ECN field to the specified value and modify the congestion state field in the user-defined message header to congested when the ECN field in the IP header matched by the outgoing ACL rule is CE and the original ECN value is the specified value.

[0056] The third embodiment of the present invention also provides a device that supports ECN in the case of mixed insertion of switch boards, which includes a memory and a processor. The memory stores a computer program, and the computer program can be executed by the processor to implement the method of supporting ECN in the case of mixed insertion of switch boards as described above.

[0057] The fourth embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which can be executed by a processor of the device where the computer-readable storage medium is located to implement the method of supporting ECN in the case of mixed insertion of switching boards as described above.

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

[0059] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0060] If the functions are implemented in the form of software modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, electronic device, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks. It should be noted that, in this document, the terms "comprise," "include," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements but also other elements not explicitly listed, or also includes elements inherent to such process, method, article, or device. Without further constraints, an element defined by the phrase "comprises a..." does not preclude the existence of additional identical elements in the process, method, article or apparatus that includes the element.

[0061] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "an", "the" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.

[0062] It should be understood that the term "and / or" as used herein is merely a description of the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.

[0063] The word "if," as used herein, may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.

[0064] The references to "first" and "second" in the embodiments merely distinguish similar objects and do not represent a specific ordering of the objects. It is understood that the specific order or precedence of "first" and "second" can be interchanged where appropriate. It should be understood that the objects distinguished by "first" and "second" can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.

[0065] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A method for supporting ECN in the case of mixed insertion of switch boards, characterized in that: include: S1, when receiving the original Ethernet message, skips the custom message header of the specified length at the switch card port according to the preset configuration to parse the original Ethernet message and extract the ECN field in the IP header; S2, matches the ECN field in the inbound ACL rule, records the original ECN value, and passes it to the outbound ACL; S3: When congestion occurs in the switch chip queue, an ECN mark CE signal is generated based on the ECN field, and the ECN field in the IP header is modified to CE; S4: When the ECN field in the IP header matches the outgoing ACL rule and is CE, and the original ECN value is the specified value, the ECN field is modified to the specified value, and the congestion status field in the custom message header is modified to congested.

2. The method for supporting ECN in the case of mixed insertion of switch boards according to claim 1, characterized in that: In step S2, the ECN field is matched using the inbound ACL rule of the switching chip, the internal label field of the switching chip is set, and the label field is passed to the outbound ACL; wherein, when the ECN field is Not-ECT (2b'00), the internal label field is set to 0; when the ECN field is ECT (1) (2b'01), the internal label field is set to 1; when the ECN field is ECT (0) (2b'10), the internal label field is set to 2; when the ECN field is CE (2b'11), the internal label field is set to 3.

3. The method for supporting ECN in the case of mixed insertion of switch boards according to claim 1, characterized in that: In step S3, when congestion occurs in the switching chip queue, if the value of the ECN field is ECT(0) or ECT(1), indicating that both ends of the protocol support ECN, a signal marked as ECN CE is generated, and the ECN field of the IP header is modified to CE; when the value of the ECN field is Not-ECT or CE, no signal marked as ECN CE is generated, and the value of the ECN field is not modified.

4. The method for supporting ECN in the case of mixed insertion of switch boards according to claim 2, characterized in that: In step S4, the outbound ACL rule matches the ECN field in the IP header as CE, and decides whether to modify the ECN field in the IP header and the congestion status field in the custom message header according to the value of the internal label field.

5. The method for supporting ECN in case of mixed insertion of switch boards according to claim 4, characterized in that: If the internal label field is 0, indicating that the original Ethernet packet does not support ECN, the ECN field of the IP header is modified to Not-ECT (2b'00); If the internal label field is 1, the ECN field of the IP header is modified to ECT(1)(2b'01), and the congestion status field of the custom message header is set to congested; If the inner label field is 2, the ECN field of the IP header is modified to ECT(0)(2b'10), and the congestion status field of the custom message header is set to congested; If the inner label field is 3, the ECN field in the IP header remains unchanged and the congestion status field in the custom message header is set to congested.

6. The method for supporting ECN in the case of mixed insertion of switch boards according to claim 4, characterized in that: In step S4: If the outbound ACL rule of the switch chip supports matching ECN marked as CE signal, it does not match the ECN field in the IP header as CE; If the switch chip is in a congested state, it only passes the signal marked with ECN as CE, and modifies the ECN field in the IP header to CE after the outbound ACL. In this way, the outbound ACL can cancel the signal marked with ECN as CE. That is, the outbound ACL only needs to set the congestion status field in the custom message header to congested based on the signal marked with ECN as CE, thus keeping the ECN field in the IP header unchanged.

7. A device that supports ECN in the case of mixed insertion of switch boards, characterized in that: include: The extraction unit is configured to, when receiving an original Ethernet message, skip the custom message header of a specified length at the switch card port according to a preset configuration to parse the original Ethernet message and extract the ECN field in the IP header; a recording unit, configured to match the ECN field when an inbound ACL rule matches the ECN field, record the original ECN value, and pass it to the outbound ACL; The field modification unit is used to generate an ECN mark CE signal according to the ECN field when congestion occurs in the switching chip queue, and modify the ECN field of the IP header to CE; The state modification unit is configured to modify the ECN field to the specified value and modify the congestion state field in the user-defined message header to congested when the ECN field in the IP header matched by the outgoing ACL rule is CE and the original ECN value is the specified value.

8. A device that supports ECN in the case of mixed insertion of switch boards, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement the method for supporting ECN in the case of mixed insertion of switching boards as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that A computer program is stored, and the computer program can be executed by a processor of the device where the computer-readable storage medium is located to implement the method for supporting ECN in the case of mixed insertion of switch boards as described in any one of claims 1 to 7.