Elephant flow level-to-level management chip and method and electronic equipment

Through the elephant stream hierarchical management chip, the elephant stream is identified and processed in a hierarchical manner, network congestion and resource inequalities caused by elephant streams are solved, and network performance and computing power utilization are improved.

CN120416183APending Publication Date: 2025-08-01SUZHOU CENTEC COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510640684.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

Elephant streams occupy a large amount of bandwidth, cause network link congestion, affect the service quality of other traffic, increase latency and jitter, and cause unfair resource allocation.

Method used

The elephant stream hierarchical management chip is adopted to identify the elephant stream and manage it according to the flow rate by combining the message transfer module, the identification module, the QoS policy module and the message transfer module. The elephant stream is identified and managed according to the flow rate, and different levels of water lines and queues are set, and messages of high-level classification tags are discarded, and messages of low-level classification tags are given priority.

Benefits of technology

It effectively solves the problems of resource competition and congestion caused by elephant flow, affecting service quality and unfairness, and improves the network experience and computing power utilization rate, especially in smart computing networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120416183A_ABST
    Figure CN120416183A_ABST
Patent Text Reader

Abstract

The invention provides an elephant stream level-to-level management chip, an elephant stream level-to-level management method and electronic equipment. A message transfer-in module sends a received first type of messages to an elephant stream identification module; when the elephant flow identification module receives a first type of message, the elephant flow identification module adds a classification label to the first type of message according to a target flow rate and sends the first type of message to the QoS strategy module; if the length of the messages stored in the target queue exceeds the target waterline, discarding the first type of messages, and if the length does not exceed the target waterline, storing the first type of messages in the target queue; and the QoS strategy module transmits the first type of messages in the M queues to the message transfer-out module according to a preset priority rule. As the waterline corresponding to the high-level classification label is lower, the high-level classification label is easier to discard, the occupation of the message on the cache space can be prevented, the influence on the message of the low-level classification label is reduced, and the forwarding time delay and efficiency of the message of the low-level classification label are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chips, and in particular, to an elephant flow hierarchical management chip, a method, and an electronic device. Background Art

[0002] Elephant Flow refers to data flows with large transmission volumes and long durations, such as big data migrations, video streams, and storage replications. The characteristics of elephant flows are that they occupy a large amount of bandwidth and may have a negative impact on network performance. Specifically, the harms of elephant flows mainly include the following aspects.

[0003] Resource contention and congestion. Elephant flows occupy a large amount of network bandwidth for a long time, which may lead to congestion of the network link. This congestion will affect other flows, especially latency-sensitive Mouse Flows, such as real-time communication, resulting in a decline in the performance of these applications.

[0004] Impact on Quality of Service (QoS). Since elephant flows may occupy too many resources, it is difficult to ensure the QoS commitment to other types of flows in the network, especially for critical business flows that require low latency and high reliability.

[0005] Increased latency and jitter. When elephant flows exist, all packets passing through the same link may experience greater latency and more unstable transmission times (i.e., jitter). This is particularly disadvantageous for applications with high requirements for real-time performance and consistency.

[0006] Unfairness. The existence of elephant flows may lead to unfairness in resource allocation, that is, a small number of elephant flows occupy most of the bandwidth resources, while most mouse flows can only be allocated the remaining small amount of bandwidth, thus reducing the overall network efficiency and service level. Summary of the Invention

[0007] The purpose of the present invention is to provide an elephant flow hierarchical management chip, a method, and an electronic device to improve the above problems.

[0008] To achieve the above purpose, the technical solutions adopted in the embodiments of the present invention are as follows:

[0009] In a first aspect, an embodiment of the present invention provides an elephant flow hierarchical management chip, which includes a message transfer-in module, an elephant flow identification module, a QoS policy module, and a message transfer-out module connected in sequence. M queues are set in the QoS policy module;

[0010] The message transfer-in module is configured to send a first type of message to the elephant flow identification module when it identifies that the received first type of message is a message that needs to be managed; wherein, the first type of message is a message that needs to be managed.

[0011] The elephant flow identification module is used to add classification labels to the first type of packets when receiving them, according to the target flow rate and N gradually increasing flow rate thresholds, and send the first type of packets with added classification labels to the QoS policy module;

[0012] Among them, the target flow rate is the flow rate corresponding to the flow to which the received first type of packet belongs. When the target flow rate is greater than or equal to the nth flow rate threshold, the classification label is the (n + 1)th level, 1 ≤ n ≤ N. When the target flow rate is less than the first flow rate threshold, the classification label is the first level;

[0013] The QoS policy module is used to discard the first type of packets when receiving them if the length of the packets stored in the target queue has exceeded the target waterline, and store the first type of packets in the target queue if it has not exceeded the target waterline;

[0014] Among them, the target waterline is the waterline corresponding to the classification label carried by the first type of packet, and the waterlines corresponding to the classification labels from the first level to the (N + 1)th level gradually decrease. The target queue is any one of the M queues;

[0015] The QoS policy module is also used to transmit the first type of packets in the M queues to the packet transfer module according to the preset priority rules.

[0016] Optionally, the elephant flow identification module is used to determine whether the target flow rate is less than the first flow rate threshold when receiving the first type of packet. If so, it determines that its corresponding classification label is the first level;

[0017] The elephant flow identification module is also used to determine whether the target flow rate is less than the jth flow rate threshold when the target flow rate is greater than or equal to the first flow rate threshold. If not, it determines that its corresponding classification label is the (j + 1)th level, and the initial value of j is N; if not, it makes j = j - 1 and repeats to determine whether the target flow rate is less than the jth flow rate threshold.

[0018] Optionally, the elephant flow identification module is used to determine the target flow management entry corresponding to the flow to which the received first type of packet belongs according to the identification information therein, and add the length of the first type of packet to the target flow management entry;

[0019] The elephant flow identification module is used to determine the current flow rate corresponding to the current period according to the total packet length in the target flow management entry at a preset periodic interval;

[0020] The elephant flow identification module is used to perform weighted operations on the current flow rate and the historical flow rate to determine the comprehensive flow rate corresponding to the target flow management entry.

[0021] Optionally, the elephant flow hierarchical management chip further includes a reporting module, which is arranged between the elephant flow identification module and the QoS policy module;

[0022] The elephant flow identification module is further configured to extract the five-tuple information from the received first-class packets when receiving the first-class packets, add a meta-information tag to the first-class packets, and send the first-class packets with the classification tag and the meta-information tag added to the reporting module;

[0023] Wherein, the meta-information tag includes the five-tuple information corresponding to the first-class packets;

[0024] When the reporting module is in an enabled state, the reporting module is configured to report the classification tag and the meta-information tag corresponding to the first-class packets to the CPU when the classification tag corresponding to the received first-class packets is not the first level;

[0025] The reporting module is further configured to transmit the received first-class packets to the backend.

[0026] Optionally, the elephant flow hierarchical management chip further includes an ACL policy module, which is arranged between the elephant flow identification module and the QoS policy module, or between the reporting module and the QoS policy module;

[0027] The ACL policy module is configured to determine whether it hits any ACL behavior in the ACL behavior list according to the corresponding classification tag and the first-class monitoring field when the classification tag corresponding to the received first-class packets is not the first level. If it hits, execute the hit ACL behavior;

[0028] If the hit ACL behavior does not include the behavior of discarding packets, after executing the ACL behavior, the ACL policy module is configured to transmit the first-class packets to the QoS policy module.

[0029] Optionally, the ACL behavior list includes any one or more of the behaviors of redirecting packet egress, discarding packets, modifying packet priority, modifying packet cache queue, and load balancing.

[0030] Optionally, the packet transfer-in module is further connected to the packet transfer-out module;

[0031] The packet transfer-in module is configured to send the received second-class packets to the packet transfer-out module when identifying that it has received the second-class packets; wherein, the second-class packets are other packets other than the first-class packets.

[0032] Optionally, the QoS policy module is configured to determine a target queue for the first type of packet based on the outgoing port and priority corresponding to the first type of packet when receiving the first type of packet.

[0033] In a second aspect, an embodiment of the present invention provides an elephant flow classification management method, which is applied to the above-mentioned elephant flow classification management chip. The method includes:

[0034] When the packet recognition transfer module receives the first type of packet, it sends the first type of packet to the elephant flow recognition module; where the first type of packet is a packet that needs to be managed.

[0035] When the elephant flow recognition module receives the first type of packet, according to the target flow rate and N sequentially increasing flow rate thresholds, add a classification label to the first type of packet, and send the first type of packet with the added classification label to the QoS policy module;

[0036] Wherein, the target flow rate is the flow rate corresponding to the flow to which the received first type of packet belongs. When the target flow rate is greater than or equal to the nth flow rate threshold, the classification label is the (n + 1)th level, 1 ≤ n ≤ N. When the target flow rate is less than the first flow rate threshold, the classification label is the first level;

[0037] When the QoS policy module receives the first type of packet, if the length of the packet stored in the target queue has exceeded the target waterline, discard the first type of packet. If it has not exceeded the target waterline, store the first type of packet in the target queue;

[0038] Wherein, the target waterline is the waterline corresponding to the classification label carried by the first type of packet. The waterlines corresponding to the classification labels from the first level to the (N + 1)th level gradually decrease. The target queue is any one of the M queues;

[0039] Transmit the first type of packet in the M queues in the QoS policy module to the packet transfer-out module according to a preset priority rule.

[0040] In a third aspect, an embodiment of the present invention provides an electronic device, including the above-mentioned elephant flow classification management chip.

[0041] Compared with the prior art, for an elephant flow hierarchical management chip, method and electronic device provided by an embodiment of the present invention, a message transfer module sends the received first-class messages to an elephant flow identification module; when receiving the first-class messages, the elephant flow identification module adds classification labels to the first-class messages according to the target flow rate and sends them to a QoS policy module; when receiving the first-class messages, if the length of the messages stored in the target queue has exceeded the target waterline, the QoS policy module discards the first-class messages, and if not, stores the first-class messages in the target queue; the QoS policy module transfers the first-class messages in M queues to a message transfer module according to a preset priority rule. Since the waterline corresponding to the high-level classification label is lower and it is more likely to be discarded, it can prevent the messages with high-level classification labels from occupying the cache space and reduce the impact on the messages with low-level classification labels, thus solving the above problems, ensuring the forwarding delay and efficiency of the messages with low-level classification labels, greatly improving the network experience, especially in the intelligent computing network, and improving the computing power utilization rate.

[0042] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following specifically enumerates preferred embodiments and, in conjunction with the accompanying drawings, makes a detailed description as follows. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other relevant drawings can also be obtained based on these drawings.

[0044] Figure 1 It is a schematic diagram of the architecture of the elephant flow hierarchical management chip provided by the embodiment of the present invention.

[0045] Figure 2 It is a schematic diagram of the architecture of the QoS policy module provided by the embodiment of the present invention.

[0046] Figure 3 It is a schematic diagram of the processing flow of the elephant flow identification module provided by the embodiment of the present invention.

[0047] Figure 4 It is a schematic diagram of the architecture of the management table in the elephant flow identification module provided by the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0048] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and illustrated herein generally can be arranged and designed in a variety of different configurations.

[0049] Therefore, the detailed description of the embodiments of the present invention provided in the drawings below is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of the present invention.

[0050] It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive distinction and cannot be construed as indicating or implying relative importance.

[0051] It should be noted that in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variation thereof is intended to cover a non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the presence of additional identical elements in the process, method, article, or device that includes the element.

[0052] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "upper", "lower", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings or the orientation or positional relationship in which the inventive product is customarily placed during use. It is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be construed as a limitation on the present invention.

[0053] In the description of the present invention, it should also be noted that unless otherwise clearly defined and limited, the terms "set" and "connect" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.

[0054] The following will describe in detail some embodiments of the present invention with reference to the accompanying drawings. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[0055] To solve the problems such as resource contention and congestion caused by elephant flows, affecting the quality of service (QoS), increasing latency and jitter, and unfairness, the embodiments of the present invention provide an elephant flow hierarchical management chip. This elephant flow hierarchical management chip can be applied to Ethernet environments with high requirements for data transmission real-time but large traffic bursts, such as data center networks, general computing networks, and intelligent computing networks.

[0056] Please refer to Figure 1 , Figure 1 , which is a schematic diagram of the architecture of the elephant flow hierarchical management chip provided by the embodiments of the present invention. The elephant flow hierarchical management chip includes a packet transfer-in module, an elephant flow identification module, a QoS policy module, and a packet transfer-out module connected in sequence. There are M queues set in the QoS policy module. Among them, the QoS policy module is also called the quality of service policy module, and the full name of QoS is Quality of Service.

[0057] The packet transfer-in module is used to send the first type of packet to the elephant flow identification module when it identifies that the first type of packet is received; among them, the first type of packet is the packet that needs to be managed.

[0058] Optionally, when the input port of the first type of packet is the monitored port in the monitoring list, and / or, the second type of monitoring field in the first type of packet is the same as the monitoring field in the monitoring list, it can be determined that it is the first type of packet. The second type of monitoring field can be but is not limited to any one or more of the five-tuple information. For example, the destination IP address. Of course, it can also be other fields set in advance.

[0059] The elephant flow identification module is used to add a classification label to the first type of packet according to the target flow rate and N sequentially increasing flow rate thresholds when the first type of packet is received, and send the first type of packet with the added classification label to the QoS policy module.

[0060] The first type of packet with the added classification label can be sent to the QoS policy module through Figure 1 the path 1 shown.

[0061] Among them, the flow rate threshold of the i-th flow is less than that of the (i + 1)-th flow, where 1 ≤ i ≤ N - 1. The target flow rate is the flow rate corresponding to the flow to which the first type of packet belongs. The classification label includes N + 1 levels. When the target flow rate is greater than or equal to the flow rate threshold of the n-th flow, the classification label is the (n + 1)-th level, where 1 ≤ n ≤ N. When the target flow rate is less than the flow rate threshold of the first flow, the classification label is the first level.

[0062] Optionally, the packets corresponding to the first-level classification label are mouse flow packets, not elephant flow packets, and they do not carry an elephant flow mark. The packets corresponding to the second-level to (N + 1)-th level classification labels are all elephant flow packets and carry an elephant flow mark. The higher the classification label level, the greater the corresponding target flow rate.

[0063] The QoS policy module is used to discard the first type of packet when the (valid) packet length stored in the target queue has exceeded the target waterline when receiving the first type of packet, and store the first type of packet in the target queue if it has not exceeded the target waterline.

[0064] Among them, the target waterline is the waterline corresponding to the classification label carried by the first type of packet. The waterlines corresponding to the first-level to (N + 1)-th level classification labels gradually decrease. The target queue is any one of the M queues.

[0065] Please refer to Figure 2 , Figure 2 which is the schematic architecture diagram of the QoS policy module provided by the embodiment of the present invention. Figure 2 Taking M = 8 as an example, but not limited thereto. In the Figure 2 QoS policy module shown, a total of 8 queues are set, namely queue 1 to queue 8.

[0066] Optionally, when receiving the first type of packet, the QoS policy module determines the target queue of the first type of packet according to the output port and priority corresponding to the first type of packet.

[0067] After determining the target queue of the first type of packet, if the QoS policy module does not enable the elephant flow classification management function and there is still remaining space in the target queue, the first type of packet can be directly stored in the target queue. In this way, when giant elephant flow packets occupy too much cache space in the target queue, it will cause the situation that mouse flow or packets corresponding to low-level classification labels cannot occupy the cache space, resulting in problems such as resource contention and congestion, affecting the quality of service (QoS), increasing latency and jitter, and unfairness. Giant elephant flow packets are packets corresponding to high-level classification labels, such as packets corresponding to the (N + 1)-th level classification label.

[0068] When the QoS policy module enables the elephant flow hierarchical management function, the QoS policy module does not directly write the received first-class packets into the target queue. Instead, it compares the (valid) packet length stored in the target queue with the target waterline. If the (valid) packet length stored in the target queue has exceeded the target waterline, the first-class packets are discarded. If it has not exceeded the target waterline, the first-class packets are stored in the target queue.

[0069] In the embodiment of the present invention, the waterlines corresponding to the classification labels from the first level to the N+1 level gradually decrease, that is, the N+1 waterline to the first waterline shown in the figure gradually decrease. The (discarding) waterline corresponding to the first-level classification label of the mouse flow packet (the N+1 waterline shown in the figure) is set to 10,000 bytes, and the (discarding) waterline corresponding to the second-level classification label of the elephant flow packet with the lowest flow rate range (the N waterline shown in the figure) is set to 9,000 bytes, and then decreases in turn. The (discarding) waterline corresponding to the N+1-level classification label of the elephant flow packet with the highest flow rate range (the first waterline shown in the figure) is set to 2,000 bytes.

[0070] Because the (discarding) waterline corresponding to the higher-level classification label is lower and it is more likely to be discarded, it can prevent the packets with higher-level classification labels from occupying the cache space and reduce the impact on the packets with lower-level classification labels, thus solving the above problems, ensuring the forwarding delay and efficiency of the packets with lower-level classification labels, greatly improving the network experience, especially in the intelligent computing network, and improving the computing power utilization rate.

[0071] In an optional implementation manner, the (discarding) waterline settings of different queues can be different.

[0072] The QoS policy module is also used to transmit the first-class packets in the M queues to the packet transfer-out module according to the preset priority rules for it to transfer backward.

[0073] Optionally, the priorities of the M queues are different. The QoS policy module selects the priority output queue according to the preset priority rules and transmits the packets in it for backward transfer.

[0074] During the process of packet transmission, the mouse flow packets account for the majority. In this case, in order to improve the efficiency of adding classification labels, the embodiment of the present invention also provides an optional implementation manner. Please refer to Figure 3 , Figure 3 which is the schematic diagram of the processing flow of the elephant flow recognition module provided by the embodiment of the present invention.

[0075] The elephant flow recognition module is used to determine whether the target flow rate is less than the first flow rate threshold when receiving the first-class packets. If so, it determines that the corresponding classification label is the first level.

[0076] The elephant flow recognition module is further configured to determine whether the target flow rate is less than the j-th flow rate threshold when the target flow rate is greater than or equal to the first flow rate threshold. If not, it determines that the corresponding classification label is the (j + 1)-th level, where the initial value of j is N; if so, it sets j = j - 1 and repeats the determination of whether the target flow rate is less than the j-th flow rate threshold.

[0077] Based on the foregoing, with regard to how to accurately obtain the target flow rate, an optional implementation manner is further provided in an embodiment of the present invention. Please refer to Figure 4 , Figure 4 which is a schematic diagram of the architecture of the management table in the elephant flow recognition module provided in an embodiment of the present invention.

[0078] When receiving the first type of message, the elephant flow recognition module determines the target flow management entry (which can be any entry in the management table) corresponding to the flow to which it belongs according to the recognition information therein (which can be, but is not limited to, any one or more of the five-tuple information), and adds the length of the first type of message to the target flow management entry.

[0079] The elephant flow recognition module is configured to determine the current flow rate corresponding to the current period according to the total length of the messages in the target flow management entry at a preset periodic interval, and then clear the length data in the target flow management entry and start counting again.

[0080] Optionally, the periodic interval is T seconds (which can actually reach the microsecond level). Within this periodic interval, if the total length of the messages in the target flow management entry is L bytes, the current flow rate corresponding to the current period is Rate_cur = L × 8 / T (pbs). It should be noted that since sampling is continuously performed, the current flow rate Rate_cur corresponding to the current period can be used as the historical flow rate Rate_his of the next period.

[0081] The elephant flow recognition module is configured to perform a weighted operation according to the current flow rate and the historical flow rate corresponding to the previous period to determine the comprehensive flow rate corresponding to the target flow management entry.

[0082] The historical flow rate is the flow rate corresponding to the target flow management entry in the previous period.

[0083] Optionally, through a timing sampling mechanism, using an algorithm such as Exponentially Weighted Moving Average (EWMA), the rate of each flow is obtained. The formula for the comprehensive flow rate corresponding to the target flow management entry is:

[0084] Rate_final = Rate_cur × a + Rate_his × (1 - a), where a is the weight factor and its value range is [0, 1].

[0085] It should be understood that when the first type of packet belongs to the target flow management entry, its corresponding target flow rate is the integrated flow rate corresponding to the target flow management entry.

[0086] The target flow rate Rate_final is compared with the pre-set elephant flow rate threshold Rate_eleph (the first flow rate threshold). If Rate_final < Rate_eleph, it is considered not an elephant flow and the subsequent process is skipped. If Rate_final >= Rate_eleph, it is considered an elephant flow.

[0087] Please continue to refer to Figure 1 In an alternative embodiment, the elephant flow hierarchical management chip further includes a reporting module, and the reporting module is arranged between the elephant flow identification module and the QoS policy module.

[0088] The elephant flow identification module is further configured to extract the five-tuple information from the received first type of packet, add a meta-information tag to the first type of packet, and send the first type of packet with the classification tag and the meta-information tag added to the reporting module.

[0089] Among them, the meta-information tag includes the five-tuple information corresponding to the first type of packet.

[0090] When the reporting module is in the enabled state, the reporting module is configured to report the classification tag and the meta-information tag corresponding to the received first type of packet (by means of DMA) to the central processing unit (Central Processing Unit, abbreviated as CPU) when the classification tag corresponding to the received first type of packet is not the first level (the first level is for mouse flows and does not need to be reported).

[0091] The CPU can make other flexible software policies based on the classification tag and the meta-information tag corresponding to the received first type of packet, or can perform visual display, or can encapsulate the five-tuple information and the elephant flow level N and other information into a private header and send it to the analyzer for convenient operation and maintenance.

[0092] The reporting module is further configured to transmit the received first type of packet to the backend.

[0093] Regardless of whether it is in the enabled state, it is necessary to transmit to the backend. It can be to the QoS policy module through path 2, or directly to the ACL policy module. Or, the elephant flow identification module can transmit the first type of packet to the reporting module and at the same time transmit it to the QoS policy module at the backend through path 1, or to the ACL policy module through path 3.

[0094] Please continue to refer to Figure 1, in an alternative embodiment, the elephant flow hierarchical management chip further includes an ACL policy module, which is disposed between the elephant flow identification module and the QoS policy module, or between the reporting module and the QoS policy module.

[0095] The ACL policy module is configured to, when the classification label corresponding to the received first type of packet is not the first level (the first level is for mouse flows and does not require performing ACL actions and directly passes it to the QoS policy module at the backend), determine whether it hits any ACL action in the ACL action list according to its corresponding classification label and the first type of monitoring field (which can be but is not limited to five-tuple fields, and different types of monitoring fields in the embodiments of the present invention can cross-repeat). If it hits, the hit ACL action is performed.

[0096] If the hit ACL action does not include the action of discarding packets, after performing the ACL action, the ACL policy module is configured to transmit the first type of packet to the QoS policy module.

[0097] Optionally, the ACL action list includes any one or more of the actions of redirecting the packet export (adjusting from export A to export B, or adjusting to the CPU), discarding the packet, modifying the packet priority, modifying the packet cache queue (i.e., the queue in the QoS policy module), and load balancing (triggering load balancing between the transmissions corresponding to the packet, which can be adjusted to per-packet dynamic load balancing).

[0098] In an alternative embodiment, the packet transfer-in module is further connected to the packet transfer-out module.

[0099] The packet transfer-in module is configured to, when it identifies that it has received a second type of packet, send it to the packet transfer-out module; wherein, the second type of packet is other packets other than the first type of packet.

[0100] Optionally, the packet transfer-in module further checks the forwarding table entry to obtain the routing information including the export and sends the routing information to the packet transfer-out module together so that it can be transmitted backward.

[0101] The elephant flow hierarchical management chip provided by the embodiments of the present invention finely divides the elephant flow into N levels and binds it with the ACL policy and the QoS policy, providing flexible and diverse management methods. At the same time, it also enriches the mechanism of uploading to the CPU, which can upload the entire packet or upload the key information to the CPU through DMA.

[0102] The embodiments of the present invention also provide an elephant flow hierarchical management method, which is applied to the above-mentioned elephant flow hierarchical management chip. The elephant flow hierarchical management method includes: S101, S102, S103, and S104, which are specifically described as follows.

[0103] S101. When the recognition message transfer module receives a first type of message, it sends the message to the elephant flow recognition module. Among them, the first type of message is the message that needs to be managed.

[0104] S102. When the elephant flow recognition module receives a first type of message, according to the target flow rate and N gradually increasing flow rate thresholds, add a classification label to the first type of message, and send the first type of message with the added classification label to the QoS policy module.

[0105] Among them, the target flow rate is the flow rate corresponding to the flow to which the received first type of message belongs. When the target flow rate is greater than or equal to the nth flow rate threshold, the classification label is the (n + 1)th level, 1 ≤ n ≤ N. When the target flow rate is less than the first flow rate threshold, the classification label is the first level.

[0106] S103. When the QoS policy module receives a first type of message, if the length of the message stored in the target queue has exceeded the target waterline, discard the first type of message. If it has not exceeded the target waterline, store the first type of message in the target queue.

[0107] Among them, the target waterline is the waterline corresponding to the classification label carried by the first type of message. The waterlines corresponding to the classification labels from the first level to the (N + 1)th level gradually decrease. The target queue is any one of the M queues.

[0108] S104. According to the preset priority rule, transfer the first type of message in the M queues in the QoS policy module to the message transfer module.

[0109] It should be noted that the elephant flow hierarchical management method provided in this embodiment can perform the functions and uses shown in the above elephant flow hierarchical management chip embodiment to achieve the corresponding technical effects. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding content in the above embodiment.

[0110] The embodiment of the present invention also provides an electronic device, including the above-mentioned elephant flow hierarchical management chip. The electronic device can be, but is not limited to, a mobile phone, a computer, a server, an operation center, etc.

[0111] In summary, the embodiments of the present invention provide a chip, method, and electronic device for hierarchical management of elephant flows. The message transfer module receives first-class messages and sends them to the elephant flow identification module. Upon receiving the first-class messages, the elephant flow identification module adds a classification tag to the first-class messages based on the target flow rate and sends the tags to the QoS policy module. Upon receiving the first-class messages, the QoS policy module discards the first-class messages if the message length stored in the target queue exceeds the target waterline, and stores the first-class messages in the target queue if the length does not exceed the target waterline. The QoS policy module transmits the first-class messages in M queues to the message transfer module according to preset priority rules. Because higher-level classification tags correspond to lower waterlines and are more likely to be discarded, this prevents messages with higher-level classification tags from occupying cache space and reduces their impact on messages with lower-level classification tags. This solves the aforementioned problem, ensures forwarding latency and efficiency for messages with lower-level classification tags, and significantly improves network experience, particularly in intelligent computing networks, by increasing computing power utilization.

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

[0113] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.

Claims

1. An elephant flow hierarchical management chip, characterized in that The elephant flow hierarchical management chip includes a message transfer-in module, an elephant flow identification module, a QoS policy module, and a message transfer-out module that are connected in sequence. There are M queues set in the QoS policy module; The message transfer-in module is used to send the first type of message it receives to the elephant flow identification module when it identifies the first type of message; among them, the first type of message is the message that needs to be managed; The elephant flow identification module is used to add a classification label to the first type of message according to the target flow rate and N gradually increasing flow rate thresholds when receiving the first type of message, and send the first type of message with the classification label added to the QoS policy module; Among them, the target flow rate is the flow rate corresponding to the flow to which the received first type of message belongs. When the target flow rate is greater than or equal to the nth flow rate threshold, the classification label is the (n + 1)th level, 1 ≤ n ≤ N. When the target flow rate is less than the first flow rate threshold, the classification label is the first level; The QoS policy module is used to discard the first type of message if the length of the message stored in the target queue has exceeded the target waterline when receiving the first type of message, and store the first type of message in the target queue if it has not exceeded the target waterline; Among them, the target waterline is the waterline corresponding to the classification label carried by the first type of message, and the waterlines corresponding to the classification labels from the first level to the (N + 1)th level gradually decrease. The target queue is any one of the M queues; The QoS policy module is also used to transmit the first type of message in the M queues to the message transfer-out module according to a preset priority rule.

2. The elephant flow hierarchical management chip according to claim 1, wherein The elephant flow identification module is used to determine whether the target flow rate is less than the first flow rate threshold when receiving the first type of message. If so, it determines that its corresponding classification label is the first level; The elephant flow identification module is also used to determine whether the target flow rate is less than the jth flow rate threshold when the target flow rate is greater than or equal to the first flow rate threshold. If not, it determines that its corresponding classification label is the (j + 1)th level, and the initial value of j is N; if not, it makes j = j - 1 and repeats to determine whether the target flow rate is less than the jth flow rate threshold.

3. The elephant flow hierarchical management chip according to claim 1, wherein The elephant flow identification module is used to determine the target flow management entry corresponding to the flow to which the first type of message belongs according to the identification information therein, and add the length of the first type of message to the target flow management entry; The elephant flow identification module is used to determine the current flow rate corresponding to the current period according to the total length of the messages in the target flow management entry at a preset periodic interval; The elephant flow identification module is used to perform a weighted operation according to the current flow rate and the historical flow rate to determine the comprehensive flow rate corresponding to the target flow management entry.

4. The elephant flow hierarchical management chip according to claim 1, characterized in that The elephant flow hierarchical management chip further includes a reporting module, and the reporting module is arranged between the elephant flow identification module and the QoS policy module; The elephant flow identification module is also used to extract the five-tuple information from the received first-type packets, add a meta-information tag to the first-type packets, and send the first-type packets with the classification tag and the meta-information tag added to the reporting module; Wherein, the meta-information tag includes the five-tuple information corresponding to the first-type packets; When the reporting module is in the enabled state, the reporting module is used to report the classification tag and the meta-information tag corresponding to the first-type packets to the CPU when the classification tag corresponding to the received first-type packets is not the first level; The reporting module is also used to forward the received first-type packets to the backend.

5. The elephant flow hierarchical management chip according to claim 4, characterized in that, The elephant flow hierarchical management chip further includes an ACL policy module, and the ACL policy module is arranged between the elephant flow identification module and the QoS policy module, or between the reporting module and the QoS policy module; The ACL policy module is used to determine whether it hits any ACL behavior in the ACL behavior list according to the corresponding classification tag and the first-type monitoring field when the classification tag corresponding to the received first-type packets is not the first level. If it hits, the hit ACL behavior is executed; If the hit ACL behavior does not include the behavior of discarding packets, after executing the ACL behavior, the ACL policy module is used to transmit the first-type packets to the QoS policy module.

6. The elephant flow hierarchical management chip according to claim 5, characterized in that, The ACL behavior list includes any one or more of the behaviors of redirecting packet egress, discarding packets, modifying packet priority, modifying packet cache queue, and load balancing.

7. The elephant flow hierarchical management chip according to claim 1, characterized in that, The packet transfer-in module is also connected to the packet transfer-out module; The packet transfer-in module is used to send the second-type packets to the packet transfer-out module when it identifies that it has received the second-type packets; wherein, the second-type packets are other packets other than the first-type packets.

8. The elephant flow hierarchical management chip according to claim 1, wherein The QoS policy module is used to determine the target queue of the first-type packets according to the egress port and priority corresponding to the first-type packets when it receives the first-type packets.

9. A method for hierarchical management of elephant flow, characterized in that, Applied to the elephant flow hierarchical management chip according to any one of claims 1-8, the method includes: When it is identified that the packet transfer-in module has received the first-type packets, send them to the elephant flow identification module; wherein, the first-type packets are packets that need to be managed; When the elephant flow identification module receives the first-type packets, add a classification tag to the first-type packets according to the target flow rate and N sequentially increasing flow rate thresholds, and send the first-type packets with the classification tag added to the QoS policy module; Wherein, the target flow rate is the flow rate corresponding to the flow to which the received first-type packets belong. When the target flow rate is greater than or equal to the nth flow rate threshold, the classification tag is the (n + 1)th level, 1 ≤ n ≤ N. When the target flow rate is less than the first flow rate threshold, the classification tag is the first level; When receiving the first type of packets by the QoS policy module, if the length of the packets stored in the target queue has exceeded the target waterline, the first type of packets will be discarded; if not, the first type of packets will be stored in the target queue. Among them, the target waterline is the waterline corresponding to the classification label carried by the first type of packets, and the waterlines corresponding to the classification labels from the 1st level to the N+1th level gradually decrease. The target queue is any one of the M queues. According to the preset priority rules, the first type of packets in the M queues within the QoS policy module are transmitted to the packet transfer-out module.

10. An electronic device, characterized in that, It includes the elephant flow hierarchical management chip according to any one of claims 1-8.