Load balancing method, device and equipment for data packets

By marking the logical frame end flag (EOP) in the flow table, the problem of logical frames not ending in time is solved, the efficiency of load balancing and packet forwarding is improved, and the reordering complexity of downlink line cards is reduced.

CN119520427BActive Publication Date: 2025-11-18RUIJIE NETWORKS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311075384.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-24
Publication Date
2025-11-18
Estimated Expiration
2043-08-24

AI Technical Summary

Technical Problem

Existing load balancing schemes based on logical frames cannot mark the end of logical frames (EOP) in a timely manner under low-speed or interrupted flow conditions, resulting in high complexity and low efficiency of downlink line card reordering.

Method used

The sequence number (SN) of the current logical frame is determined by the flow table, and the logical frame end flag (EOP) is marked according to the data packet length and preset conditions. An EOP signaling message is generated to ensure that the logical frame length has a clear upper bound and to end data packet forwarding in a timely manner.

Benefits of technology

It reduces the data length difference between logical frames, improves load balancing and packet forwarding efficiency, and reduces the reordering complexity of downlink line cards and end-to-end packet forwarding latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520427B_ABST
    Figure CN119520427B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of communication, and discloses a data packet load balancing method, device and equipment, to solve the problem of low reordering efficiency of a downlink card caused by large reordering complexity of the downlink card in a load balancing method in the related art. In the embodiment of the application, a plurality of data packets are divided into different logical frames according to the lengths of the data packets, and the data packets meeting the conditions are marked with a sequence number of the logical frame and an end of logical frame (EOP) flag, so that the data length difference between the logical frames is reduced, the upper bound of the logical frame length is ensured, the load balancing effect is improved, and the applicability of implementation in different scenes and hardware is improved. In addition, through the EOP flag, the downlink card can determine whether the forwarding of the data packets in the logical frame is completed in time, the data packet forwarding efficiency is improved, the end-to-end data packet forwarding delay in the equipment is reduced, the reordering complexity of the downlink card is reduced, and the reordering efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a method, apparatus and device for load balancing data packets. Background Technology

[0002] Currently, mainstream routers and switches typically adopt the Clos architecture, a parallel forwarding structure composed of multiple switching elements that provides high scalability and flexibility. The Clos architecture consists of interconnected input modules (IM), central modules (CM), and output modules (OM). Under this architecture, load balancing methods are typically based directly on data packets, physical packet framing, or packet segmentation.

[0003] In related technologies, a load balancing scheme based on logical frames has emerged. In this scheme, multiple data packets are grouped into a logical frame at the sending end according to a certain strategy (the forwarding of each data packet is handled separately, and multiple data packets are not actually concatenated into a physical frame). Each logical frame is logically regarded as a frame, and load balancing is performed by following the same path according to certain rules. At the receiving end, multiple logical frames are reordered.

[0004] Currently, load balancing schemes based on logical frames have the following problems:

[0005] Multiple data packets are divided into different logical frames based on time windows. After the time window ends, the data packets are marked with a logical frame end flag (EOP). For low-speed or stopped flows, the logical frame end flag (EOP) is not marked on the data packets. Because there are cases where logical frames do not contain the logical frame end flag (EOP), the downlink line card cannot determine in a timely manner whether the forwarding of data packets within a logical frame has ended, increasing the reordering complexity of the downlink line card and resulting in low reordering efficiency. Summary of the Invention

[0006] The purpose of this application is to provide a data packet load balancing method, apparatus, and device to solve the problem that the reordering complexity of downlink line cards in related load balancing methods is large, resulting in low reordering efficiency of downlink line cards.

[0007] Firstly, this application provides a data packet load balancing method applied to an uplink line card, the method comprising:

[0008] Receive at least one data packet; for each data packet, perform the following operations:

[0009] Query the flow table to determine the sequence number (SN) of the current logical frame;

[0010] If the sum of the length of the forwarded data packet, the length of the current data packet, and the minimum length of the preset data packet in the current logical frame is not greater than the maximum length of the preset logical frame, then the sequence number of the logical frame to which the current data packet belongs is marked as the sequence number SN of the current logical frame through the flow table;

[0011] If the sum of the length of the forwarded data packet in the current logical frame, the length of the current data packet, and the preset minimum data packet length is greater than the preset maximum length of the logical frame, and the sum of the length of the forwarded data packet in the current logical frame and the length of the current data packet is not greater than the preset maximum length of the logical frame, then the sequence number of the logical frame to which the current data packet belongs is marked as the sequence number SN of the current logical frame through the flow table, the logical frame end flag EOP is marked for the current data packet, and the sequence number of the current logical frame in the flow table is updated to SN+1;

[0012] The tagged data packets are forwarded to the switching network interface card.

[0013] In one possible implementation, the method further includes:

[0014] If the sum of the length of the forwarded data packet in the current logical frame and the length of the current data packet is greater than the preset maximum length of the logical frame, then an EOP signaling message corresponding to the current logical frame is generated through the flow table, and the EOP signaling message is sent to the switching network card. The EOP signaling message is used to indicate that the forwarding of the data packet in the current logical frame has ended.

[0015] Mark the sequence number of the logical frame to which the current data packet belongs as the sequence number SN+1 of the next logical frame, and update the sequence number of the current logical frame in the flow table to SN+1.

[0016] In one possible implementation, the method further includes:

[0017] If the forwarding duration of the current logical frame is greater than the maximum duration, an EOP signaling message corresponding to the current logical frame is generated through the flow table, and the EOP signaling message is sent to the switching network card. The EOP signaling message is used to indicate that the forwarding of the data packets in the current logical frame has ended.

[0018] Mark the sequence number of the logical frame to which the current data packet belongs as the sequence number SN+1 of the next logical frame, and update the sequence number of the current logical frame in the flow table to SN+1.

[0019] In one possible implementation, the method further includes, during the process of forwarding the tagged data packets to the switching network interface card:

[0020] If the congestion status of the uplink card queue has not reached the packet loss waterline, the marked data packet will be forwarded to the switching network card.

[0021] If the congestion state of the uplink network card queue reaches the packet loss waterline, then packets that do not contain EOP will be discarded, packets that contain EOP will be trimmed to obtain header messages containing EOP, and the header messages containing EOP will be forwarded to the switching network card.

[0022] In one possible implementation, the packet loss waterline includes a first packet loss waterline corresponding to low-priority packets and a second packet loss waterline corresponding to high-priority packets, wherein the second packet loss waterline is higher than the first packet loss waterline, and the method further includes:

[0023] When the congestion state of the uplink card queue reaches the first packet loss waterline, the dropping and pruning of low-priority data packets are triggered.

[0024] When the congestion state of the uplink card queue reaches the second packet loss waterline, high-priority data packets are dropped and pruned.

[0025] Secondly, this application provides a data packet load balancing device applied to an uplink line card, the device comprising:

[0026] The data packet receiving module is configured to receive at least one data packet; for each data packet, the following operations are performed:

[0027] The sequence number determination module is configured to query the flow table to determine the sequence number (SN) of the current logical frame;

[0028] The sequence number marking module is configured to mark the sequence number SN of the logical frame to which the current data packet belongs by using the flow table if the sum of the length of the forwarded data packet, the length of the current data packet, and the preset minimum length of the data packet in the current logical frame is not greater than the preset maximum length of the logical frame.

[0029] The logical frame end flag marking module is configured to mark the sequence number of the logical frame to which the current data packet belongs as the sequence number SN of the current logical frame through the flow table, mark the logical frame end flag EOP for the current data packet, and update the sequence number of the current logical frame in the flow table to SN+1 if the sum of the length of the forwarded data packet in the current logical frame, the length of the current data packet, and the minimum length of the preset data packet are greater than the maximum length of the preset logical frame, and the sum of the length of the forwarded data packet in the current logical frame and the length of the current data packet are not greater than the maximum length of the preset logical frame.

[0030] The packet forwarding module is configured to forward tagged packets to the switching network interface card.

[0031] In one possible implementation, the device further includes:

[0032] The EOP signaling message generation module is configured to generate an EOP signaling message corresponding to the current logical frame through the flow table if the sum of the length of the forwarded data packet in the current logical frame and the length of the current data packet is greater than the preset maximum length of the logical frame, and send the EOP signaling message to the switching network card. The EOP signaling message is used to indicate that the forwarding of the data packet in the current logical frame has ended.

[0033] Mark the sequence number of the logical frame to which the current data packet belongs as the sequence number SN+1 of the next logical frame, and update the sequence number of the current logical frame in the flow table to SN+1.

[0034] In one possible implementation, the EOP signaling message generation module is further configured to:

[0035] If the forwarding duration of the current logical frame is greater than the maximum duration, an EOP signaling message corresponding to the current logical frame is generated through the flow table, and the EOP signaling message is sent to the switching network card. The EOP signaling message is used to indicate that the forwarding of the data packets in the current logical frame has ended.

[0036] Mark the sequence number of the logical frame to which the current data packet belongs as the sequence number SN+1 of the next logical frame, and update the sequence number of the current logical frame in the flow table to SN+1.

[0037] In one possible implementation, during the forwarding of tagged data packets to the switching network interface card, the device further includes a congestion monitoring module configured to:

[0038] If the congestion status of the uplink card queue has not reached the packet loss waterline, the marked data packet will be forwarded to the switching network card.

[0039] If the congestion state of the uplink network card queue reaches the packet loss waterline, then packets that do not contain EOP will be discarded, packets that contain EOP will be trimmed to obtain header messages containing EOP, and the header messages containing EOP will be forwarded to the switching network card.

[0040] In one possible implementation, the packet loss waterline includes a first packet loss waterline corresponding to low-priority packets and a second packet loss waterline corresponding to high-priority packets, wherein the second packet loss waterline is higher than the first packet loss waterline, and the congestion state monitoring module is further configured to:

[0041] When the congestion state of the uplink card queue reaches the first packet loss waterline, the dropping and pruning of low-priority data packets are triggered.

[0042] When the congestion state of the uplink card queue reaches the second packet loss waterline, high-priority data packets are dropped and pruned.

[0043] Thirdly, this application provides an electronic device, comprising:

[0044] Processor and memory;

[0045] The memory is used to store executable instructions of the processor;

[0046] The processor is configured to execute the executable instructions to implement the data packet load balancing method as described in the first aspect above.

[0047] Fourthly, this application provides a computer-readable storage medium that, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the data packet load balancing method described in the first aspect above.

[0048] Fifthly, this application provides a computer program product, including a computer program:

[0049] When the computer program is executed by the processor, it implements the data packet load balancing method as described in the first aspect above.

[0050] The technical solutions provided by the embodiments of this application bring at least the following beneficial effects:

[0051] In this embodiment, multiple data packets are divided into different logical frames according to their length, and logical frame end flags (EOP) are marked for data packets that meet the conditions. This reduces the difference in data length between logical frames, ensures that the length of logical frames has a clear upper bound, improves the load balancing effect and the applicability of implementation in different scenarios and hardware. Moreover, by using the logical frame end flag (EOP), the downlink line card can promptly determine whether the forwarding of data packets within a logical frame has ended, improving data packet forwarding efficiency, reducing end-to-end data packet forwarding latency within the device, reducing the reordering complexity of the downlink line card, and improving reordering efficiency.

[0052] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0053] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1A schematic diagram illustrating the framework of the data packet load balancing method provided in the embodiments of this application;

[0055] Figure 2 This is a schematic diagram of the internal structure of the uplink card provided in the embodiments of this application;

[0056] Figure 3 A schematic diagram of the overall process of the data packet load balancing method in this application is provided for the embodiments of this application;

[0057] Figure 4 This is another flowchart illustrating the data packet load balancing method provided in the embodiments of this application;

[0058] Figure 5 This is another flowchart illustrating the data packet load balancing method provided in the embodiments of this application;

[0059] Figure 6 A schematic diagram illustrating the process of determining whether to drop or prune data packets by monitoring the congestion status of the uplink card queue, as provided in this embodiment of the application.

[0060] Figure 7 This is a schematic diagram of the internal structure of the switching network card provided in the embodiments of this application;

[0061] Figure 8 This is a schematic diagram of the internal structure of the downlink card provided in an embodiment of this application;

[0062] Figure 9 This is a schematic diagram of the structure of the data packet load balancing device 900 provided in the embodiments of this application.

[0063] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0064] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. The described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0065] Furthermore, in the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.

[0066] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined with "first" and "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0067] Current mainstream chassis-based devices primarily employ a CLOS architecture for packet forwarding between different line cards. Any uplink line card reaches any downlink line card via a switching network card. For example... Figure 1 As shown, packets travel from the uplink NIC (IM) via the switching NIC (CM) to the downlink NIC (OM). Based on mainstream implementations, in the CLOS architecture, traffic from different uplink NICs is organized into independent deordering queues according to the downlink destination NIC. Packets within these queues are sequentially numbered for deordering at the downlink NIC. Deordering is a device-specific implementation and can be performed outside of a single uplink and downlink NIC combination; for example, deordering can be performed for VOQ packets or for 5-tuple packets.

[0068] In related technologies, a load balancing scheme based on logical frames has emerged. In this scheme, multiple data packets are grouped into a logical frame at the sending end according to a certain strategy (the forwarding of each data packet is handled separately, and multiple data packets are not actually concatenated into a physical frame). Each logical frame is logically regarded as a frame, and load balancing is performed by following the same path according to certain rules. At the receiving end, multiple logical frames are reordered.

[0069] Currently, load balancing schemes based on logical frames have the following problems:

[0070] Multiple data packets are divided into different logical frames based on time windows. After the time window ends, the data packets are marked with a logical frame end flag (EOP). For low-speed or stopped flows, the logical frame end flag (EOP) is not marked on the data packets. Because there are cases where logical frames do not contain the logical frame end flag (EOP), the downlink line card cannot determine in a timely manner whether the forwarding of data packets within a logical frame has ended, increasing the reordering complexity of the downlink line card and resulting in low reordering efficiency.

[0071] In view of this, this application provides a data packet load balancing method, apparatus, and device to solve the problem that the downlink line card reordering complexity in related load balancing methods is large, resulting in low reordering efficiency of the downlink line card.

[0072] The inventive concept of this application can be summarized as follows: First, the sequence number SN of the current logical frame is determined according to the flow table; if the sum of the length of the forwarded data packet, the length of the current data packet, and the preset minimum data packet length in the current logical frame is not greater than the preset maximum length of the logical frame, then the sequence number of the logical frame to which the current data packet belongs is marked as the sequence number SN of the current logical frame; if the sum of the length of the forwarded data packet, the length of the current data packet, and the preset minimum data packet length in the current logical frame is greater than the preset maximum length of the logical frame, and the sum of the length of the forwarded data packet and the length of the current data packet in the current logical frame is not greater than the preset maximum length of the logical frame, then the sequence number of the logical frame to which the current data packet belongs is marked as the sequence number SN of the current logical frame, and the logical frame end flag EOP is marked for the current data packet; finally, the marked data packet is forwarded to the switching network card. This application embodiment divides multiple data packets into different logical frames based on the length of the data packets, and marks the logical frame end flag (EOP) for data packets that meet the conditions. This reduces the difference in data length between logical frames, ensures that the logical frame length has a clear upper bound, improves the load balancing effect and the applicability of implementation in different scenarios and hardware. Moreover, by using the logical frame end flag (EOP), the downlink line card can promptly determine whether the forwarding of data packets within a logical frame has ended, improving data packet forwarding efficiency, reducing end-to-end data packet forwarding latency within the device, reducing the reordering complexity of the downlink line card, and improving reordering efficiency.

[0073] After introducing the main inventive concepts of the embodiments of this application, the following is a brief description of the application scenarios to which the technical solutions of the embodiments of this application are applicable. It should be noted that the application scenarios described below are only for illustrating the embodiments of this application and are not intended to limit the scope. In specific implementation, the technical solutions provided by the embodiments of this application can be flexibly applied according to actual needs.

[0074] To facilitate understanding of the data packet load balancing method provided in the embodiments of this application, further explanation will be provided below with reference to the accompanying drawings.

[0075] In one possible implementation, the internal structure of the uplink card in the input module (IM) is as follows: Figure 2 As shown, it includes multiple functional modules such as flow table, flow identification, sequence number (SN) and logical frame end marker (EOP) generator, load balancing logic, packet dropping and trimming, IM queue and congestion status monitoring. This uplink line card receives data packets from the network and forwards the corresponding data packets to the switching network card in the central module (CM) after load balancing processing.

[0076] This application provides a data packet load balancing method, applicable to, for example... Figure 2 The process of the uplink card shown is as follows: Figure 3 As shown, it includes the following:

[0077] In step 301, at least one data packet is received.

[0078] For each data packet, perform the following operations:

[0079] In step 302, the flow table is queried to determine the sequence number SN of the current logical frame.

[0080] In step 303, if the sum of the length of the forwarded data packet, the length of the current data packet, and the preset minimum length of the data packet in the current logical frame is not greater than the preset maximum length of the logical frame, then the sequence number of the logical frame to which the current data packet belongs is marked as the sequence number SN of the current logical frame through the flow table.

[0081] In step 304, if the sum of the length of the forwarded data packet in the current logical frame, the length of the current data packet, and the preset minimum data packet length is greater than the preset maximum length of the logical frame, and the sum of the length of the forwarded data packet in the current logical frame and the length of the current data packet is not greater than the preset maximum length of the logical frame, then the sequence number of the logical frame to which the current data packet belongs is marked as the sequence number SN of the current logical frame through the flow table, the logical frame end flag EOP is marked for the current data packet, and the sequence number of the current logical frame in the flow table is updated to SN+1.

[0082] In step 305, the tagged data packet is forwarded to the switching network card.

[0083] For example, when the uplink card receives a data packet, it determines the sequence number (SN) of the current logical frame as logical frame 1 according to the flow table. The preset maximum length of a logical frame is 500 bytes, and the preset minimum length of a data packet is 60 bytes. If the length of the forwarded data packet in the current logical frame is 300 bytes, and the length of the current data packet is 100 bytes, then the sum of the length of the forwarded data packet, the length of the current data packet, and the preset minimum length of the data packet in the current logical frame is 460 bytes, which is less than 500 bytes. In this embodiment, the sequence number of the logical frame to which the current data packet belongs is marked as logical frame 1 using the flow table. If the current logical frame... If the length of the forwarded data packet in the current logical frame is 380B and the length of the current data packet is 100B, then the sum of the length of the forwarded data packet, the length of the current data packet, and the preset minimum data packet length in the current logical frame is 540B, which is greater than 500B. However, the sum of the length of the forwarded data packet and the length of the current data packet in the current logical frame is 480B, which is less than 500B. In this embodiment of the application, the sequence number of the logical frame to which the current data packet belongs is marked as logical frame 1 through the flow table, the logical frame end flag EOP is marked for the current data packet, and the sequence number of the current logical frame in the flow table is updated to logical frame 2.

[0084] It should be noted that after the uplink line card receives a data packet, it identifies the de-sorting flow to which the data packet belongs based on the source device and destination device. Each de-sorting flow has a dedicated entry in the flow table, including the current logical frame number (SN) and the arrival time of the first packet of the logical frame. The above steps of constructing de-sorting flows based on the source and destination devices minimize the size of the sender's flow table and the receiver's reordering engine, reducing the implementation complexity of reordering; reducing the number of de-sorting flows reduces the probability of load balancing conflicts on a single port, thus improving the load balancing effect.

[0085] In one possible implementation, the data packet load balancing method in this application embodiment is as follows: Figure 4 As shown, it also includes the following:

[0086] In step 401, if the sum of the length of the forwarded data packets in the current logical frame and the length of the current data packet is greater than the preset maximum length of the logical frame, an EOP signaling message corresponding to the current logical frame is generated through the flow table, and the EOP signaling message is sent to the switching network interface card. The EOP signaling message indicates that the forwarding of data packets within the current logical frame has ended.

[0087] In step 402, the sequence number of the logical frame to which the current data packet belongs is marked as the sequence number SN+1 of the next logical frame, and the sequence number of the current logical frame in the flow table is updated to SN+1.

[0088] For example, when the uplink card receives a data packet, it determines the sequence number (SN) of the current logical frame as logical frame 1 according to the flow table. The preset maximum length of the logical frame is 500 bytes, and the preset minimum length of the data packet is 60 bytes. If the length of the forwarded data packet in the current logical frame is 500 bytes and the length of the current data packet is 100 bytes, then the sum of the length of the forwarded data packet and the length of the current data packet in the current logical frame is 600 bytes, which is less than 500 bytes. In this embodiment, the EOP signaling message corresponding to logical frame 1 is generated through the flow table, and the EOP signaling message is sent to the switching network card. The sequence number of the logical frame to which the current data packet belongs is marked as logical frame 2, and the sequence number of the current logical frame in the flow table is updated to logical frame 2.

[0089] In one possible implementation, due to the presence of low-speed flow or flow interruption, the data packet load balancing method in this embodiment is as follows: Figure 5 As shown, it also includes the following:

[0090] In step 501, if the forwarding duration of the current logical frame is greater than the maximum duration, an EOP signaling message corresponding to the current logical frame is generated through the flow table, and the EOP signaling message is sent to the switching network card.

[0091] In step 502, the sequence number of the logical frame to which the current data packet belongs is marked as the sequence number SN+1 of the next logical frame, and the sequence number of the current logical frame in the flow table is updated to SN+1.

[0092] For example, the uplink card determines the sequence number SN of the current logical frame as logical frame 1 according to the flow table. The preset maximum duration is 10us. If the forwarding duration of the current logical frame is 15us, which is greater than the maximum duration of 10us, that is, the length of the data packets forwarded in the current logical frame within 10us is less than the preset maximum length of the logical frame, this embodiment generates the EOP signaling message corresponding to logical frame 1 through the flow table, sends the EOP signaling message to the switching network card, marks the sequence number of the logical frame to which the current data packet belongs as logical frame 2, and updates the sequence number of the current logical frame in the flow table to logical frame 2.

[0093] In another possible implementation, during the forwarding of tagged data packets to the switching network card, if a switching network card failure leads to insufficient switching network bandwidth, there may be a short period of uplink network card queue congestion, resulting in uplink network card queue packet loss. This embodiment of the application monitors the congestion status of the uplink network card queue to determine whether data packets should be dropped or clipped. Figure 6 As shown, it includes the following:

[0094] In step 601, if the congestion status of the uplink card queue has not reached the packet loss waterline, the marked data packets are forwarded to the switching network card.

[0095] In step 602, if the congestion state of the uplink card queue reaches the packet loss waterline, then the data packets that do not contain EOP are discarded, the data packets that contain EOP are trimmed to obtain the header message containing EOP, and the header message containing EOP is forwarded to the switching network card.

[0096] It should be added that packet dropping and pruning are performed in situations such as... Figure 2 The packet dropping and clipping function is performed by the uplink card's packet dropping and clipping module. When the uplink card queue reaches the recovery waterline, the packet dropping and clipping function module stops the corresponding action.

[0097] In another possible implementation, the aforementioned packet loss waterline includes a first packet loss waterline corresponding to low-priority data packets and a second packet loss waterline corresponding to high-priority data packets, wherein the second packet loss waterline is higher than the first packet loss waterline. This application embodiment determines whether data packets should be dropped and clipped on the uplink line card, including the following:

[0098] When the congestion state of the uplink card queue reaches the first packet loss waterline, the dropping and pruning of low-priority data packets are triggered.

[0099] When the congestion level of the uplink card queue reaches the second packet loss watermark, high-priority data packets are dropped and pruned. This embodiment of the application reduces the probability of high-priority data packet loss and protects high-priority data packets by setting different packet loss watermarks for high-priority and low-priority data packets.

[0100] In one possible implementation, the internal structure of the switching network interface card in the central module (CM) is as follows: Figure 7 As shown, it includes multiple functional modules such as load balancing logic, packet dropping and trimming, CM queue and congestion status monitoring. The switching network card receives data packets from the uplink line card and forwards the corresponding data packets to the downlink line card in the output module (OM) after load balancing processing.

[0101] This application provides a data packet load balancing method, applicable to, for example... Figure 7 The network interface card shown includes the following:

[0102] Receive at least one data packet from the uplink line card; for each data packet, perform the following operations:

[0103] If the congestion level of the switching network card queue has not reached the packet loss waterline, the data packet is forwarded to the downlink card.

[0104] If the congestion state of the switching network card queue reaches the packet loss waterline, packets that do not contain EOP will be dropped, packets that contain EOP will be trimmed to obtain headers containing EOP, and then the headers containing EOP will be forwarded to the downlink card.

[0105] In one possible implementation, the switching network card also receives a header message containing EOP or an EOP signaling message corresponding to the current logical frame from the uplink line card, and forwards the header message containing EOP or the EOP signaling message corresponding to the current logical frame to the downlink line card.

[0106] In another possible implementation, the packet loss waterline of the switching network interface card (NIC) queue includes a first packet loss waterline corresponding to low-priority packets and a second packet loss waterline corresponding to high-priority packets, wherein the second packet loss waterline is higher than the first packet loss waterline. This application embodiment determines whether to drop or prune packets using the switching NIC, including the following:

[0107] When the congestion state of the uplink card queue reaches the first packet loss waterline, the dropping and pruning of low-priority data packets are triggered.

[0108] When the congestion level of the uplink card queue reaches the second packet loss waterline, high-priority data packets are dropped and pruned.

[0109] In one possible implementation, the switching network typically uses pull scheduling. When push scheduling is also present, using SP scheduling between different IM queues or CM queues may compromise the pull scheduling guarantee or reduce the push scheduling latency performance, increase latency differences and reordering complexity. The embodiments of this application adopt an EOP anti-packet loss mechanism to ensure the latency throughput of pull and the latency of push, while reducing the reordering overhead of downlink line cards.

[0110] In one possible implementation, the internal structure of the downlink card in the output module (OM) is as follows: Figure 8 As shown, it includes multiple functional modules such as reordering, scheduling and forwarding logic, and OM queue. The downlink card receives data packets from the switching network card and forwards the corresponding data packets to the target network after reordering.

[0111] This application provides a data packet load balancing method, applicable to, for example... Figure 8 The following is shown in the downlink:

[0112] Receive at least one data packet from the switching network interface card; for each data packet, perform the following operations:

[0113] If it is determined that the logical frame to which the current data packet belongs is a logical frame with the expected sequence number, the data packet is forwarded to the target network;

[0114] If it is determined that the logical frame to which the current data packet belongs is not the logical frame with the expected sequence number, the data packet is buffered until all data packets of the logical frame with the expected sequence number are forwarded to the target network.

[0115] In one possible implementation, the embodiment of this application further receives a header message containing EOP or an EOP signaling message corresponding to the current logical frame from the switching network card on the downlink line card.

[0116] In summary, this application embodiment divides multiple data packets into different logical frames based on the length of the data packets, and marks the logical frame end flag (EOP) for data packets that meet the conditions. This reduces the difference in data length between logical frames, ensures that the logical frame length has a clear upper bound, improves the load balancing effect and the applicability of implementation in different scenarios and hardware. Moreover, by using the logical frame end flag (EOP), the downlink line card can promptly determine whether the forwarding of data packets within a logical frame has ended, improving data packet forwarding efficiency, reducing end-to-end data packet forwarding latency within the device, reducing the reordering complexity of the downlink line card, and improving reordering efficiency.

[0117] Based on the same inventive concept, embodiments of this application also provide a data packet load balancing device, applied to an uplink line card, such as... Figure 9 As shown, the device 900 includes:

[0118] The data packet receiving module 901 is configured to receive at least one data packet; for each data packet, the following operations are performed:

[0119] The sequence number determination module 902 is configured to query the flow table to determine the sequence number SN of the current logical frame;

[0120] The sequence number marking module 903 is configured to mark the sequence number of the logical frame to which the current data packet belongs as the sequence number SN of the current logical frame if the sum of the length of the forwarded data packet, the length of the current data packet, and the preset minimum length of the data packet in the current logical frame is not greater than the preset maximum length of the logical frame.

[0121] The logical frame end flag marking module 904 is configured to mark the sequence number of the logical frame to which the current data packet belongs as the sequence number SN of the current logical frame through the flow table, mark the logical frame end flag EOP of the current data packet, and update the sequence number of the current logical frame in the flow table to SN+1 if the sum of the length of the forwarded data packet, the length of the current data packet, and the preset minimum data packet length in the current logical frame are greater than the preset maximum length of the logical frame, and the sum of the length of the forwarded data packet and the length of the current data packet in the current logical frame are not greater than the preset maximum length of the logical frame.

[0122] The packet forwarding module 905 is configured to forward tagged packets to the switching network interface card.

[0123] In one possible implementation, the device further includes:

[0124] The EOP signaling message generation module is configured to generate an EOP signaling message corresponding to the current logical frame through the flow table if the sum of the length of the forwarded data packet in the current logical frame and the length of the current data packet is greater than the preset maximum length of the logical frame, and send the EOP signaling message to the switching network card. The EOP signaling message is used to indicate that the forwarding of the data packet in the current logical frame has ended.

[0125] Mark the sequence number of the logical frame to which the current data packet belongs as the sequence number SN+1 of the next logical frame, and update the sequence number of the current logical frame in the flow table to SN+1.

[0126] In one possible implementation, the EOP signaling message generation module is further configured to:

[0127] If the forwarding duration of the current logical frame is greater than the maximum duration, an EOP signaling message corresponding to the current logical frame is generated through the flow table, and the EOP signaling message is sent to the switching network card. The EOP signaling message is used to indicate that the forwarding of the data packets in the current logical frame has ended.

[0128] Mark the sequence number of the logical frame to which the current data packet belongs as the sequence number SN+1 of the next logical frame, and update the sequence number of the current logical frame in the flow table to SN+1.

[0129] In one possible implementation, during the forwarding of tagged data packets to the switching network interface card, the device further includes a congestion monitoring module configured to:

[0130] If the congestion status of the uplink card queue has not reached the packet loss waterline, the marked data packet will be forwarded to the switching network card.

[0131] If the congestion state of the uplink network card queue reaches the packet loss waterline, then packets that do not contain EOP will be discarded, packets that contain EOP will be trimmed to obtain header messages containing EOP, and the header messages containing EOP will be forwarded to the switching network card.

[0132] In one possible implementation, the packet loss waterline includes a first packet loss waterline corresponding to low-priority packets and a second packet loss waterline corresponding to high-priority packets, wherein the second packet loss waterline is higher than the first packet loss waterline, and the congestion state monitoring module is further configured to:

[0133] When the congestion state of the uplink card queue reaches the first packet loss waterline, the dropping and pruning of low-priority data packets are triggered.

[0134] When the congestion state of the uplink card queue reaches the second packet loss waterline, high-priority data packets are dropped and pruned.

[0135] like Figure 10 As shown, the electronic device 130 is presented in the form of a general-purpose electronic device. The components of the electronic device 130 may include, but are not limited to: at least one processor 131, at least one memory 132, and a bus 133 connecting different system components (including memory 132 and processor 131).

[0136] Bus 133 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the various bus structures.

[0137] The memory 132 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 1321 and / or cache memory 1322, and may further include read-only memory (ROM) 1323.

[0138] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0139] Electronic device 130 can also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), and with one or more devices that enable a user to interact with electronic device 130, and / or with any device that enables electronic device 130 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 135. Furthermore, electronic device 130 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 136. As shown, network adapter 136 communicates with other modules used in electronic device 130 via bus 133. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0140] In an exemplary embodiment, this application also provides a computer-readable storage medium including instructions, such as a memory 132 including instructions, which can be executed by a processor 131 of an electronic device 130 to complete the aforementioned data packet load balancing method. Optionally, the computer-readable storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.

[0141] In an exemplary embodiment, a computer program product is also provided, including a computer program that, when executed by a processor 131, implements the data packet load balancing method provided in this application.

[0142] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0143] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0144] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0145] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0146] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A data packet load balancing method, characterized in that, Applied to an uplink card, the method includes: Receive at least one data packet; for each data packet, perform the following operations: Query the flow table to determine the sequence number (SN) of the current logical frame; If the sum of the length of the forwarded data packet, the length of the current data packet, and the minimum length of the preset data packet in the current logical frame is not greater than the maximum length of the preset logical frame, then the sequence number of the logical frame to which the current data packet belongs is marked as the sequence number SN of the current logical frame through the flow table; If the sum of the length of the forwarded data packet in the current logical frame, the length of the current data packet, and the preset minimum data packet length is greater than the preset maximum length of the logical frame, and the sum of the length of the forwarded data packet in the current logical frame and the length of the current data packet is not greater than the preset maximum length of the logical frame, then the sequence number of the logical frame to which the current data packet belongs is marked as the sequence number SN of the current logical frame through the flow table, the logical frame end flag EOP is marked for the current data packet, and the sequence number of the current logical frame in the flow table is updated to SN+1; The tagged data packets are forwarded to the switching network interface card.

2. The method according to claim 1, characterized in that, The method further includes: If the sum of the length of the forwarded data packet in the current logical frame and the length of the current data packet is greater than the preset maximum length of the logical frame, then an EOP signaling message corresponding to the current logical frame is generated through the flow table, and the EOP signaling message is sent to the switching network card. The EOP signaling message is used to indicate that the forwarding of the data packet in the current logical frame has ended. Mark the sequence number of the logical frame to which the current data packet belongs as the sequence number SN+1 of the next logical frame, and update the sequence number of the current logical frame in the flow table to SN+1.

3. The method according to claim 1, characterized in that, The method further includes: If the forwarding duration of the current logical frame is greater than the maximum duration, an EOP signaling message corresponding to the current logical frame is generated through the flow table, and the EOP signaling message is sent to the switching network card. The EOP signaling message is used to indicate that the forwarding of the data packets in the current logical frame has ended. Mark the sequence number of the logical frame to which the current data packet belongs as the sequence number SN+1 of the next logical frame, and update the sequence number of the current logical frame in the flow table to SN+1.

4. The method according to claim 1, characterized in that, The method further includes the following steps during the forwarding of tagged data packets to the switching network interface card: If the congestion status of the uplink card queue has not reached the packet loss waterline, the marked data packet will be forwarded to the switching network card. If the congestion state of the uplink network card queue reaches the packet loss waterline, then packets that do not contain EOP will be discarded, packets that contain EOP will be trimmed to obtain header messages containing EOP, and the header messages containing EOP will be forwarded to the switching network card.

5. The method according to claim 4, characterized in that, The packet loss waterline includes a first packet loss waterline corresponding to low-priority data packets and a second packet loss waterline corresponding to high-priority data packets, wherein the second packet loss waterline is higher than the first packet loss waterline, and the method further includes: When the congestion state of the uplink card queue reaches the first packet loss waterline, the dropping and pruning of low-priority data packets are triggered. When the congestion state of the uplink card queue reaches the second packet loss waterline, high-priority data packets are dropped and pruned.

6. A data packet load balancing device, characterized in that, Applied to an uplink card, the device includes: The data packet receiving module is configured to receive at least one data packet; for each data packet, the following operations are performed: The sequence number determination module is configured to query the flow table to determine the sequence number (SN) of the current logical frame; The sequence number marking module is configured to mark the sequence number SN of the logical frame to which the current data packet belongs by using the flow table if the sum of the length of the forwarded data packet, the length of the current data packet, and the preset minimum length of the data packet in the current logical frame is not greater than the preset maximum length of the logical frame. The logical frame end flag marking module is configured to mark the sequence number of the logical frame to which the current data packet belongs as the sequence number SN of the current logical frame through the flow table, mark the logical frame end flag EOP for the current data packet, and update the sequence number of the current logical frame in the flow table to SN+1 if the sum of the length of the forwarded data packet in the current logical frame, the length of the current data packet, and the minimum length of the preset data packet are greater than the maximum length of the preset logical frame, and the sum of the length of the forwarded data packet in the current logical frame and the length of the current data packet are not greater than the maximum length of the preset logical frame. The packet forwarding module is configured to forward tagged packets to the switching network interface card.

7. The apparatus according to claim 6, characterized in that, The device further includes: The EOP signaling message generation module is configured to generate an EOP signaling message corresponding to the current logical frame through the flow table if the sum of the length of the forwarded data packet in the current logical frame and the length of the current data packet is greater than the preset maximum length of the logical frame, and send the EOP signaling message to the switching network card. The EOP signaling message is used to indicate that the forwarding of the data packet in the current logical frame has ended. Mark the sequence number of the logical frame to which the current data packet belongs as the sequence number SN+1 of the next logical frame, and update the sequence number of the current logical frame in the flow table to SN+1.

8. The apparatus according to claim 6, characterized in that, The EOP signaling message generation module is also configured to: If the forwarding duration of the current logical frame is greater than the maximum duration, an EOP signaling message corresponding to the current logical frame is generated through the flow table, and the EOP signaling message is sent to the switching network card. The EOP signaling message is used to indicate that the forwarding of the data packets in the current logical frame has ended. Mark the sequence number of the logical frame to which the current data packet belongs as the sequence number SN+1 of the next logical frame, and update the sequence number of the current logical frame in the flow table to SN+1.

9. The apparatus according to claim 6, characterized in that, During the forwarding of tagged data packets to the switching network interface card, the device also includes a congestion monitoring module, configured to: If the congestion status of the uplink card queue has not reached the packet loss waterline, the marked data packet will be forwarded to the switching network card. If the congestion state of the uplink network card queue reaches the packet loss waterline, then packets that do not contain EOP will be discarded, packets that contain EOP will be trimmed to obtain header messages containing EOP, and the header messages containing EOP will be forwarded to the switching network card.

10. The apparatus according to claim 9, characterized in that, The packet loss waterline includes a first packet loss waterline corresponding to low-priority packets and a second packet loss waterline corresponding to high-priority packets, wherein the second packet loss waterline is higher than the first packet loss waterline. The congestion state monitoring module is further configured to: When the congestion state of the uplink card queue reaches the first packet loss waterline, the dropping and pruning of low-priority data packets are triggered. When the congestion state of the uplink card queue reaches the second packet loss waterline, high-priority data packets are dropped and pruned.

11. A device, characterized in that, include: Processor and memory; The memory is used to store the processor-executable instructions; The processor is configured to execute the instructions to implement the packet load balancing method as described in any one of claims 1-5.

12. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the device, the device is enabled to perform the data packet load balancing method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Load balancing method and forwarding apparatus

    CN102447638A

  • Data packet transmission method and device

    CN108881062A