Data packet load balancing method, device and equipment

By querying the flow table in the load balancing method to determine the logical frame sequence number and marking the logical frame end flag EOP, the problem that the downlink line card cannot determine the end of packet forwarding in time is solved, and the load balancing effect and packet forwarding efficiency are improved.

CN119520427AActive Publication Date: 2025-02-25RUIJIE NETWORKS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the load balancing method based on logical frames, the downlink line card cannot determine whether the forwarding of data packets in the logical frame is completed in time, resulting in high reordering complexity and low reordering efficiency.

Method used

By querying the flow table, determine the sequence number SN of the current logical frame, and mark the logical frame sequence number to which the data packet belongs and whether it is the logical frame end flag EOP, update the flow table and forward the marked data packet according to the packet length and the preset length relationship.

Benefits of technology

This reduces the data length difference between logical frames, ensures a clear upper bound on the logical frame length, improves load balancing effect and packet forwarding efficiency, and reduces the reordering complexity of downlink line cards and the end-to-end packet forwarding delay in the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and discloses a load balancing method, device and equipment for a data packet, which are used for solving the problem of low reordering efficiency of a downlink line card caused by high reordering complexity of the downlink line card in a load balancing method in the related technology. In the embodiment of the invention, the plurality of data packets are divided into different logic frames according to the lengths of the data packets, and the serial numbers of the logic frames and the logic frame end marks EOP are marked for the data packets meeting the conditions, so that the data length difference between the logic frames is reduced, the clear upper bound of the length of the logic frames is ensured, and the data transmission efficiency is improved. The load balancing effect and the applicability in different scenes and hardware are improved, the downlink line card can timely determine whether forwarding of the data packet in the logic frame is ended or not through the logic frame end mark EOP, the data packet forwarding efficiency is improved, the end-to-end data packet forwarding time delay in the device is reduced, the rearrangement complexity of the downlink line card is reduced, and the user experience is improved. And the reordering efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, device and equipment for load balancing data packets. Background Art

[0002] Currently, mainstream routers and switches usually adopt Clos architecture, which is a parallel forwarding structure composed of multiple switching elements, which can provide high scalability and flexibility. Clos architecture consists of multiple input modules (IM), central modules (CM), and output modules (OM) interconnected. Under this architecture, load balancing methods based directly on data packets, physical framing of data packets, or data packet cutting are usually adopted.

[0003] In the related technology, a load balancing solution based on logical frames has emerged. Under this solution, multiple data packets are assigned to one logical frame according to a certain strategy at the sending end (the forwarding of each data packet is processed separately, and multiple data packets are not actually spliced ​​into one physical frame). Each logical frame is logically regarded as a frame, and load balancing is performed along the same path according to certain rules, and reordering is performed between multiple logical frames at the receiving end.

[0004] Currently, the load balancing solution based on logical frames has the following problems:

[0005] According to the time window, multiple data packets are divided into different logical frames. After the time window ends, the data packets are marked with the logical frame end mark EOP. In the case of low-speed flow or stopped flow, the logical frame end mark EOP is not marked on the data packet. Since there are cases where the logical frame does not contain the logical frame end mark EOP, the downstream line card cannot determine whether the forwarding of the data packet in the logical frame has ended in time, which increases the reordering complexity of the downstream line card and leads to low reordering efficiency of the downstream line card. Summary of the invention

[0006] The purpose of the present application is to provide a method, device and equipment for load balancing of data packets, so as to solve the problem that the reordering efficiency of the downstream line cards is low due to the large reordering complexity of the downstream line cards in the load balancing method in the related art.

[0007] In a first aspect, the present application provides a method for load balancing of data packets, which is applied to an uplink line card, and the method includes:

[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 forwarded data packet length, the current data packet length and the preset minimum data packet length in the current logical frame is not greater than the preset maximum logical frame length, 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 length of the data packet 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 mark 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] Forward the marked data packets to the switching network card.

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

[0014] If the sum of the length of the forwarded data packet and the length of the current data packet in the current logical frame 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 card, and the EOP signaling message is used to indicate that the forwarding of the data packet in the current logical frame has ended;

[0015] 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.

[0016] In a 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, where the EOP signaling message is used to indicate that the forwarding of the data packet in the current logical frame has ended;

[0018] 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.

[0019] In a possible implementation manner, in the process of forwarding the marked data packet to the switching network card, the method further includes:

[0020] If the congestion state of the upstream line card queue does not reach the packet loss waterline, forwarding the marked data packet to the switching network card;

[0021] If the congestion state of the upstream line card queue reaches the packet loss waterline, the data packets not containing EOP are discarded, the data packets containing EOP are trimmed to obtain the header message containing EOP, and the header message containing EOP is forwarded to the switching network card.

[0022] In a possible implementation, the packet loss watermark includes a first packet loss watermark corresponding to a low priority data packet and a second packet loss watermark corresponding to a high priority data packet, the second packet loss watermark is higher than the first packet loss watermark, and the method further includes:

[0023] When the congestion state of the upstream line card queue reaches the first packet loss waterline, the discarding and trimming of low priority data packets is triggered;

[0024] When the congestion state of the upstream line card queue reaches the second packet loss watermark, discarding and trimming of high priority data packets is triggered.

[0025] In a second aspect, the present application provides a load balancing device for data packets, 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, perform the following operations respectively:

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

[0028] A sequence number 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 a flow table if the sum of the forwarded data packet length, the current data packet length 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 mark 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 mark 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 preset minimum length of the data packet 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;

[0030] The data packet forwarding module is configured to forward the marked data packet to the switching network card.

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

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

[0033] 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.

[0034] In a possible implementation manner, 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, where the EOP signaling message is used to indicate that the forwarding of the data packet in the current logical frame has ended;

[0036] 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.

[0037] In a possible implementation manner, in the process of forwarding the marked data packet to the switching network card, the device further includes a congestion status monitoring module configured to:

[0038] If the congestion state of the upstream line card queue does not reach the packet loss waterline, forwarding the marked data packet to the switching network card;

[0039] If the congestion state of the upstream line card queue reaches the packet loss waterline, the data packets not containing EOP are discarded, the data packets containing EOP are trimmed to obtain the header message containing EOP, and the header message containing EOP is forwarded to the switching network card.

[0040] In a possible implementation, the packet loss watermark includes a first packet loss watermark corresponding to a low priority data packet and a second packet loss watermark corresponding to a high priority data packet, the second packet loss watermark is higher than the first packet loss watermark, and the congestion status monitoring module is further configured to:

[0041] When the congestion state of the upstream line card queue reaches the first packet loss waterline, the discarding and trimming of low priority data packets is triggered;

[0042] When the congestion state of the upstream line card queue reaches the second packet loss watermark, discarding and trimming of high priority data packets is triggered.

[0043] In a third aspect, the present application provides an electronic device, including:

[0044] Processor and memory;

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

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

[0047] In a fourth aspect, the present application provides a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the load balancing method for data packets as described in the first aspect above.

[0048] In a fifth aspect, the present application provides a computer program product, including a computer program:

[0049] When the computer program is executed by a processor, the method for load balancing of data packets as described in the first aspect above is implemented.

[0050] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:

[0051] In the embodiment of the present application, multiple data packets are divided into different logical frames according to the length of the data packets, and the logical frame end flag EOP is marked for the qualified data packets, thereby reducing the data length difference between the logical frames, ensuring that the logical frame length has a clear upper limit, improving the load balancing effect and the applicability of implementation in different scenarios and hardware, and through the logical frame end flag EOP, the downstream line card can promptly determine whether the forwarding of the data packet in the logical frame is completed, thereby improving the data packet forwarding efficiency, reducing the end-to-end data packet forwarding delay within the device, reducing the reordering complexity of the downstream line card, and improving the reordering efficiency.

[0052] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings introduced below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0054] Figure 1A schematic diagram of a framework of a method for load balancing of data packets provided in an embodiment of the present application;

[0055] Figure 2 A schematic diagram of the internal structure of an uplink line card provided in an embodiment of the present application;

[0056] Figure 3 A schematic diagram of the overall flow of the method for load balancing of data packets in the present application provided in an embodiment of the present application;

[0057] Figure 4 Another flow chart of the method for load balancing of data packets provided in an embodiment of the present application;

[0058] Figure 5 Another flow chart of the method for load balancing of data packets provided in an embodiment of the present application;

[0059] Figure 6 A flow chart of determining whether to discard and trim a data packet by monitoring the congestion status of an uplink line card queue provided in an embodiment of the present application;

[0060] Figure 7 A schematic diagram of the internal structure of a switching network card provided in an embodiment of the present application;

[0061] Figure 8 A schematic diagram of the internal structure of a downlink line card provided in an embodiment of the present application;

[0062] Fig. 9 A schematic diagram of the structure of a load balancing device 900 for data packets provided in an embodiment of the present application.

[0063] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Among them, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0065] Furthermore, in the description of the embodiments of the present application, unless otherwise specified, “ / ” means or. For example, A / B can mean A or B. The “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0066] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more.

[0067] The mainstream frame-type devices in the industry currently mainly use the CLOS architecture to forward messages between different line cards. Any uplink line card reaches any downlink line card through the switching network card. Figure 1 As shown, the message is sent from the upstream line card IM to the downstream line card OM via the switching network card CM. Based on the mainstream implementation, the traffic of different upstream line cards under the CLOS architecture will form independent de-sequencing queues according to the downstream destination line cards. The messages in the queues are numbered in sequence for de-sequencing at the downstream line cards. De-sequencing is a private implementation of the device, and de-sequencing can also be performed without combining an upstream line card and a downstream line card, such as de-sequencing for VOQ and de-sequencing for quintuples.

[0068] In the related technology, a load balancing solution based on logical frames has emerged. Under this solution, multiple data packets are assigned to one logical frame according to a certain strategy at the sending end (the forwarding of each data packet is processed separately, and multiple data packets are not actually spliced ​​into one physical frame). Each logical frame is logically regarded as a frame, and load balancing is performed along the same path according to certain rules, and reordering is performed between multiple logical frames at the receiving end.

[0069] Currently, the load balancing solution based on logical frames has the following problems:

[0070] According to the time window, multiple data packets are divided into different logical frames. After the time window ends, the data packets are marked with the logical frame end mark EOP. In the case of low-speed flow or stopped flow, the logical frame end mark EOP is not marked on the data packet. Since there are cases where the logical frame does not contain the logical frame end mark EOP, the downstream line card cannot determine whether the forwarding of the data packet in the logical frame has ended in time, which increases the reordering complexity of the downstream line card and leads to low reordering efficiency of the downstream line card.

[0071] In view of this, the present application provides a method, apparatus and device for load balancing data packets to solve the problem that the reordering efficiency of the downstream line cards is low due to the large reordering complexity of the downstream line cards in the load balancing method in the related art.

[0072] The inventive concept of the present application can be summarized as follows: first, determine the serial number SN of the current logical frame according to the flow table; if the sum of the length of the forwarded data packets, the length of the current data packets and the preset minimum length of the data packets in the current logical frame is not greater than the preset maximum length of the logical frame, then mark the serial number of the logical frame to which the current data packet belongs as the serial number SN of the current logical frame; if the sum of the length of the forwarded data packets, the length of the current data packets and the preset minimum length of the data packets 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 packets 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 mark the serial number of the logical frame to which the current data packet belongs as the serial number SN of the current logical frame, and mark the current data packet with the logical frame end flag EOP, and finally, forward the marked data packet to the switching network card. The embodiment of the present application divides multiple data packets into different logical frames according to the length of the data packets, and marks the logical frame end flag EOP for the qualified data packets, thereby reducing the data length difference between the logical frames, ensuring that the logical frame length has a clear upper limit, improving the load balancing effect and the applicability of implementation in different scenarios and hardware, and through the logical frame end flag EOP, the downstream line card can promptly determine whether the forwarding of the data packet in the logical frame is completed, thereby improving the data packet forwarding efficiency, reducing the end-to-end data packet forwarding delay within the device, reducing the reordering complexity of the downstream line card, and improving the reordering efficiency.

[0073] After introducing the main inventive ideas of the embodiments of the present application, the following briefly introduces the application scenarios to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and are not limited. In specific implementation, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.

[0074] In order to facilitate understanding of the load balancing method for data packets provided in the embodiment of the present application, it is further explained below with reference to the accompanying drawings.

[0075] In a possible implementation, the internal structure of the uplink line 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 mark EOP generator, load balancing logic, packet discard and clipping, IM queue and congestion status monitoring. The uplink line card receives data packets from the network and forwards the corresponding data packets to the switching network card in the middle module (central module, CM) after load balancing processing.

[0076] The present application provides a method for load balancing of data packets, which is applied to Figure 2 The process of the uplink line card shown is as follows Figure 3 As shown, including the following:

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

[0078] For each 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 forwarded data packet length, the current data packet length and the preset minimum data packet length in the current logical frame is not greater than the preset maximum logical frame length, 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 packets in the current logical frame, the length of the current data packet and the preset minimum length of the data packet is greater than the preset maximum length of the logical frame, and the sum of the length of the forwarded data packets 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 mark 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 marked data packet is forwarded to the switching network card.

[0083] For example, the uplink line card receives a data packet and determines, according to the flow table, that the serial number SN of the current logical frame is logical frame 1, wherein the preset maximum length of the logical frame is 500B, and the preset minimum length of the data packet is 60B. If the length of the forwarded data packet in the current logical frame is 300B, and the length of the current data packet is 100B, then 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 length of the data packet is 460B, which is less than 500B. In this embodiment of the present application, the serial number of the logical frame to which the current data packet belongs is marked as logical frame 1 through the flow table; if the current logical frame The length of the forwarded data packet in the logical frame is 380B, and the length of the current data packet is 100B. 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 540B, which is greater than 500B, 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 480B, which is less than 500B. In the embodiment of the present application, the serial 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 serial 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 the data packet, it identifies the de-order flow to which the data packet belongs according to [source device, destination device]. Each de-order flow has a special entry in the flow table, including the current logical frame SN, the arrival time of the first packet of the logical frame, etc. The above steps of constructing the de-order flow according to the source device and the destination device minimize the scale of the flow table at the sending end and the reordering engine at the receiving end, and reduce the implementation complexity of the reordering; reduce the number of de-order flows, reduce the probability of load sharing conflicts to one port, and improve the load sharing effect.

[0085] In a possible implementation manner, the load balancing method for data packets in the embodiment of the present application 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 packet and the length of the current data packet in the current logical frame 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 card. The EOP signaling message is used to indicate that the forwarding of the data packet in 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, the uplink line card receives a data packet, and determines according to the flow table that the serial number SN of the current logical frame is logical frame 1, wherein the preset maximum length of the logical frame is 500B, and the preset minimum length of the data packet is 60B. If the length of the forwarded data packet in the current logical frame is 500B, and the length of the current data packet is 100B, 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 600B, which is less than 500B. The embodiment of the present application generates an EOP signaling message corresponding to logical frame 1 through the flow table, and sends the EOP signaling message to the switching network card, marks the serial number of the logical frame to which the current data packet belongs as logical frame 2, and updates the serial number of the current logical frame in the flow table to logical frame 2.

[0089] In a possible implementation manner, due to the existence of a low-speed flow or a stopped flow, the load balancing method for data packets in the embodiment of the present application 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 line card determines that the serial number SN of the current logical frame is logical frame 1 according to the flow table, wherein the preset maximum duration is 10us. If the forwarding duration of the current logical frame is 15us, which is greater than the maximum duration 10us, that is, the length of the forwarded data packet in the current logical frame within 10us is less than the preset maximum length of the logical frame, the embodiment of the present application generates an EOP signaling message corresponding to logical frame 1 through the flow table, and sends the EOP signaling message to the switching network card, marks the serial number of the logical frame to which the current data packet belongs as logical frame 2, and updates the serial number of the current logical frame in the flow table to logical frame 2.

[0093] In another possible implementation, in the process of forwarding the marked data packet to the switching network card, when the switching network card fails and causes insufficient switching network bandwidth, there may be a short period of congestion in the upstream line card queue, thereby causing packet loss in the upstream line card queue. The embodiment of the present application monitors the congestion state of the upstream line card queue to determine whether to discard and trim the data packet, such as Figure 6 As shown, including the following:

[0094] In step 601, if the congestion state of the upstream line card queue does not reach the packet loss watermark, the marked data packet is forwarded to the switching network card.

[0095] In step 602, if the congestion state of the upstream line card queue reaches the packet loss waterline, the data packets not containing EOP are discarded, the data packets containing 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 the packet dropping and trimming is done in such a way that Figure 2 The packet discarding and trimming function module of the upstream line card is used for this purpose. When the queue of the line card reaches the recovery waterline, the packet discarding and trimming function module stops the corresponding action.

[0097] In another possible implementation, the packet loss watermark includes a first packet loss watermark corresponding to a low priority data packet and a second packet loss watermark corresponding to a high priority data packet, wherein the second packet loss watermark is higher than the first packet loss watermark. In the embodiment of the present application, determining whether to discard and trim a data packet on an uplink line card includes the following contents:

[0098] When the congestion status of the upstream line card queue reaches the first packet loss watermark, the discarding and trimming of low-priority data packets is triggered;

[0099] When the congestion state of the upstream line card queue reaches the second packet loss watermark, the discarding and trimming of high priority data packets is triggered. The embodiment of the present application reduces the probability of packet loss of high priority data packets and protects high priority data packets by setting different packet loss watermarks for high priority and low priority data packets.

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

[0101] The present application provides a method for load balancing of data packets, which is applied to Figure 7 The switching network card shown includes the following:

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

[0103] If the congestion status of the switching network card queue does not reach the packet loss waterline, the data packet is forwarded to the downstream line card;

[0104] If the congestion state of the switching network card queue reaches the packet loss waterline, the data packets not containing EOP will be discarded, the data packets containing EOP will be trimmed to obtain the header message containing EOP, and the header message containing EOP will be forwarded to the downstream line card.

[0105] In a possible implementation manner, the switching network card further receives a header message containing EOP or an EOP signaling message corresponding to the current logical frame from the upstream line card, and forwards the header message containing EOP or the EOP signaling message corresponding to the current logical frame to the downstream line card.

[0106] In another possible implementation, the packet loss watermark of the switching network card queue includes a first packet loss watermark corresponding to a low priority data packet and a second packet loss watermark corresponding to a high priority data packet, wherein the second packet loss watermark is higher than the first packet loss watermark. In the embodiment of the present application, the switching network card determines whether to discard and trim a data packet, including the following contents:

[0107] When the congestion status of the upstream line card queue reaches the first packet loss watermark, the discarding and trimming of low-priority data packets is triggered;

[0108] When the congestion state of the upstream line card queue reaches the second packet loss watermark, the discarding and trimming of high-priority data packets is triggered.

[0109] In one possible implementation, the switching network usually adopts Pull scheduling. When Push scheduling exists at the same time, if SP scheduling is used between different IM queues or CM queues, it may lead to the destruction of Pull scheduling guarantee or reduce Push scheduling delay performance, increase delay difference and reordering complexity. The embodiment of the present application adopts EOP anti-packet loss mechanism to ensure the delay throughput of Pull and the delay of Push, while reducing the reordering overhead of the downstream line card.

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

[0111] The present application provides a method for load balancing of data packets, which is applied to Figure 8 The following line is shown, including the following:

[0112] Receive at least one data packet from the switch network 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 the 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 of the expected sequence number, the data packet is cached until all data packets of the logical frame of the expected sequence number are forwarded to the target network.

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

[0116] In summary, the embodiment of the present application divides multiple data packets into different logical frames according to the length of the data packets, and marks the logical frame end flag EOP for the qualified data packets, thereby reducing the data length difference between the logical frames, ensuring that the logical frame length has a clear upper limit, improving the load balancing effect and the applicability of implementation in different scenarios and hardware, and through the logical frame end flag EOP, the downstream line card can promptly determine whether the forwarding of the data packet in the logical frame is completed, thereby improving the data packet forwarding efficiency, reducing the end-to-end data packet forwarding delay within the device, reducing the reordering complexity of the downstream line card, and improving the reordering efficiency.

[0117] Based on the same inventive concept, the embodiment of the present application also provides a data packet load balancing device, which is applied to an uplink line card, such as Fig. 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, perform the following operations respectively:

[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 through the flow table if the sum of the forwarded data packet length, the current data packet length and the preset minimum data packet length in the current logical frame is not greater than the preset maximum length of the logical frame;

[0121] The logical frame end mark 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 mark 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 preset minimum length of the data packet 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;

[0122] The data packet forwarding module 905 is configured to forward the marked data packet to the switching network card.

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

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

[0125] 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.

[0126] In a possible implementation manner, 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, where the EOP signaling message is used to indicate that the forwarding of the data packet in the current logical frame has ended;

[0128] 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.

[0129] In a possible implementation manner, in the process of forwarding the marked data packet to the switching network card, the device further includes a congestion status monitoring module configured to:

[0130] If the congestion state of the upstream line card queue does not reach the packet loss waterline, forwarding the marked data packet to the switching network card;

[0131] If the congestion state of the upstream line card queue reaches the packet loss waterline, the data packets not containing EOP are discarded, the data packets containing EOP are trimmed to obtain the header message containing EOP, and the header message containing EOP is forwarded to the switching network card.

[0132] In a possible implementation, the packet loss watermark includes a first packet loss watermark corresponding to a low priority data packet and a second packet loss watermark corresponding to a high priority data packet, the second packet loss watermark is higher than the first packet loss watermark, and the congestion status monitoring module is further configured to:

[0133] When the congestion state of the upstream line card queue reaches the first packet loss waterline, the discarding and trimming of low priority data packets is triggered;

[0134] When the congestion state of the upstream line card queue reaches the second packet loss watermark, discarding and trimming of high priority data packets is triggered.

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

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

[0137] The memory 132 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1321 and / or a cache memory 1322 , and may further include a 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, such program modules 1324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0139] The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboards, pointing devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 130, and / or communicate with any device that enables the electronic device 130 to communicate with one or more other electronic devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 135. Furthermore, the electronic device 130 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 136. As shown, the network adapter 136 communicates with other modules for the electronic device 130 via a bus 133. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the 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, the present application further provides a computer-readable storage medium including instructions, such as a memory 132 including instructions, and the above instructions can be executed by the processor 131 of the electronic device 130 to complete the load balancing method of the above data packet. Optionally, the computer-readable storage medium can be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0141] In an exemplary embodiment, a computer program product is also provided, including a computer program, and when the computer program is executed by the processor 131, the load balancing method for data packets provided in the present application is implemented.

[0142] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0143] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0144] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0145] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0146] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for load balancing of data packets, characterized in that: Applied to an uplink line 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 forwarded data packet length, the current data packet length and the preset minimum data packet length in the current logical frame is not greater than the preset maximum logical frame length, 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 length of the data packet 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 mark 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; Forward the marked data packets to the switching network card.

2. The method according to claim 1, characterized in that The method further comprises: If the sum of the length of the forwarded data packet and the length of the current data packet in the current logical frame 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 card, and the EOP signaling message is used to indicate that the forwarding of the data packet in the current logical frame has ended; 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.

3. The method according to claim 1, characterized in that The method further comprises: 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, where the EOP signaling message is used to indicate that the forwarding of the data packet in the current logical frame has ended; 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.

4. The method according to claim 1, characterized in that: In the process of forwarding the marked data packet to the switching network card, the method further includes: If the congestion state of the upstream line card queue does not reach the packet loss waterline, forwarding the marked data packet to the switching network card; If the congestion state of the upstream line card queue reaches the packet loss waterline, the data packets not containing EOP are discarded, the data packets containing EOP are trimmed to obtain the header message containing EOP, and the header message containing EOP is forwarded to the switching network card.

5. The method according to claim 4, characterized in that The packet loss watermark includes a first packet loss watermark corresponding to a low priority data packet and a second packet loss watermark corresponding to a high priority data packet, the second packet loss watermark being higher than the first packet loss watermark, and the method further includes: When the congestion state of the upstream line card queue reaches the first packet loss waterline, the discarding and trimming of low priority data packets is triggered; When the congestion state of the upstream line card queue reaches the second packet loss watermark, discarding and trimming of high priority data packets is triggered.

6. A load balancing device for data packets, characterized in that: Applied to an uplink line card, the device comprises: The data packet receiving module is configured to receive at least one data packet; for each data packet, perform the following operations respectively: A sequence number determination module is configured to query the flow table to determine the sequence number SN of the current logical frame; A sequence number 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 a flow table if the sum of the forwarded data packet length, the current data packet length 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 mark 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 mark 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 preset minimum length of the data packet 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; The data packet forwarding module is configured to forward the marked data packet to the switching network card.

7. The device according to claim 6, characterized in that The device also includes: An EOP signaling message generation module is configured to generate an EOP signaling message corresponding to the current logical frame through a flow table if the sum of the length of the forwarded data packet and the length of the current data packet in the current logical frame is greater than the preset maximum length of the logical frame, and send the EOP signaling message to the switching network card, wherein the EOP signaling message is used to indicate that the forwarding of the data packet in the current logical frame has ended; 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.

8. The device according to claim 6, characterized in that The EOP signaling message generation module is further 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, where the EOP signaling message is used to indicate that the forwarding of the data packet in the current logical frame has ended; 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.

9. The device according to claim 6, characterized in that In the process of forwarding the marked data packet to the switching network card, the device further includes a congestion status monitoring module configured to: If the congestion state of the upstream line card queue does not reach the packet loss waterline, forwarding the marked data packet to the switching network card; If the congestion state of the upstream line card queue reaches the packet loss waterline, the data packets not containing EOP are discarded, the data packets containing EOP are trimmed to obtain the header message containing EOP, and the header message containing EOP is forwarded to the switching network card.

10. The device according to claim 9, characterized in that The packet loss watermark includes a first packet loss watermark corresponding to a low priority data packet and a second packet loss watermark corresponding to a high priority data packet, the second packet loss watermark is higher than the first packet loss watermark, and the congestion status monitoring module is further configured as follows: When the congestion state of the upstream line card queue reaches the first packet loss waterline, the discarding and trimming of low priority data packets is triggered; When the congestion state of the upstream line card queue reaches the second packet loss watermark, discarding and trimming of high priority data packets is triggered.

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 load balancing method for data packets according to any one of claims 1 to 5.

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

Citation Information

Patent Citations

  • Load balancing method and forwarding apparatus

    CN102447638A

  • Data packet transmission method and device

    CN108881062A

  • Load balancing method and device and electronic equipment

    CN114244845A

  • Load Balancing Method and System

    US20170005935A1