CN114785741B - Data stream classification device - Google Patents

Data stream classification device Download PDF

Info

Publication number
CN114785741B
CN114785741B CN202110088571.5A CN202110088571A CN114785741B CN 114785741 B CN114785741 B CN 114785741B CN 202110088571 A CN202110088571 A CN 202110088571A CN 114785741 B CN114785741 B CN 114785741B
Authority
CN
China
Prior art keywords
data stream
circuit
elephant
queue
characteristic value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110088571.5A
Other languages
Chinese (zh)
Other versions
CN114785741A (en
Inventor
吕国正
魏明章
刘俊明
颜光裕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Realtek Semiconductor Corp
Original Assignee
Realtek Semiconductor Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Realtek Semiconductor Corp filed Critical Realtek Semiconductor Corp
Priority to CN202110088571.5A priority Critical patent/CN114785741B/en
Publication of CN114785741A publication Critical patent/CN114785741A/en
Application granted granted Critical
Publication of CN114785741B publication Critical patent/CN114785741B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A data stream classifying device includes a forwarding circuit and a setting circuit. The forwarding circuit queries a lookup table according to identification information of an input data stream to obtain the classification of the input data stream, marks the packets according to the classification, and outputs the packets to a buffer circuit; if the identification information of the input data stream is not included in the lookup table, the forwarding circuit marks the packet of the input data stream according to a default classification and outputs the packet, and adds the identification information of the input data stream into the lookup table. The setting circuit determines an elephant flow threshold according to the queue length of the buffer circuit and a target length. The setting circuit further obtains the flow rates of the data streams according to the flow rate information of the plurality of data streams recorded in the lookup table by the forwarding circuit, determines the classification of the data streams according to the comparison between the flow rates of the data streams and the elephant flow threshold, and stores the classification of the data streams in the lookup table. These data streams include the input data streams.

Description

Data stream classification device
Technical Field
The present invention relates to a sorting apparatus, and more particularly to a data stream sorting apparatus.
Background
Buffer expansion (bufferblaat) refers to the phenomenon that a forwarding device buffers packets excessively, resulting in high forwarding delay and delay variation of the network. To solve this problem, the most common solutions are the following three:
(1) Class of Service (CoS) queue scheduling: classifying packets, associating the packets of different classifications with different queues, and giving different service classes to the different queues by using a scheduling mechanism.
(2) Active queue management (Active Queue Management; AQM): packets are not classified, but are actively discarded according to a probability before the queue of packets is not full, so as to reduce the average queue length of the queue.
(3) Weight type AQM: classifying packets, giving different packets of different classifications different packet dropping rates to drop low-priority packets preferentially, and reserving buffer space for high-priority packets.
However, how to classify packets is always a big problem, and the most common way is to let the user set up by himself, but this way is not only inconvenient for the user, but also difficult to accurately classify packets. While the AQM approach of unclassified packets reduces the average delay, it discards high-priority packets and low-priority packets with the same probability because the packets are not classified, which affects the traffic of high-priority packets (e.g., voice over internet protocol (VoIP) packets, real-time video streaming packets, game packets) equally and affects the user experience.
Disclosure of Invention
It is an object of the present invention to provide a data stream classification device, which can avoid the problems of the prior art.
An embodiment of a data stream classification device of the present application includes a forwarding circuit and a setting circuit. Each of the forwarding circuit and the setting circuit may be implemented in hardware, or in hardware executing software and/or firmware.
The forwarding circuit comprises a recording circuit, a classifying circuit and a data stream information supplementing circuit. The recording circuit is used for calculating the flow rate of each of a plurality of data streams to obtain flow rate information of the plurality of data streams, and comprises a lookup table. The lookup table includes identification information of the plurality of data streams, traffic information of the plurality of data streams, and classifications of the plurality of data streams. The sorting circuit is coupled to a data stream input end and the recording circuit and is used for receiving a first data stream from the data stream input end so as to inquire the identification information of the plurality of data streams included in the lookup table according to the first identification information of the first data stream. When the lookup table comprises the first identification information, the classification circuit uses the lookup table to determine the classification of the first data stream and outputs the first data stream to a buffer circuit; when the lookup table does not include the first identification information, the classification circuit classifies the first data stream into a default classification and outputs the first data stream to the buffer circuit. The data stream information supplementing circuit is coupled with the recording circuit and the classifying circuit; when the lookup table does not include the first identification information, the data stream information supplementing circuit obtains at least a portion of the first data stream to obtain the first identification information, and then the data stream information supplementing circuit adds the first identification information to the lookup table as a portion of the identification information of the plurality of data streams, wherein the recording circuit calculates a flow rate of the first data stream to obtain first flow rate information as a portion of the flow rate information of the plurality of data streams.
The setting circuit comprises an elephant flow threshold adjusting circuit and a classification decision circuit. The elephant flow threshold adjusting circuit is coupled to the buffer circuit for determining an elephant flow threshold according to a change of a relationship between a target queue characteristic value (e.g. a queue length or a queue delay) and a current queue characteristic value (e.g. a queue length or a queue delay) of the buffer circuit. The classification decision circuit is coupled to the elephant flow threshold adjustment circuit and the recording circuit, and is configured to determine classifications of the plurality of data flows included in the lookup table according to a change of a relationship between flow information of the plurality of data flows and the elephant flow threshold.
As described above, the present embodiment classifies more/less data streams as elephant streams by controlling the elephant stream flow threshold, so that the buffer circuit can avoid buffer expansion by reducing the transmission priority of the elephant streams or discarding the packets of the elephant streams.
The features, implementation and effects of the present invention are described in detail below with reference to the preferred embodiments of the present invention in conjunction with the accompanying drawings.
Drawings
FIG. 1 shows an embodiment of a data stream classification apparatus of the present application;
FIG. 2 shows an embodiment of the forwarding circuit of FIG. 1;
FIG. 3 shows an embodiment of the setting circuit of FIG. 1;
FIG. 4 shows an embodiment of how the elephant flow threshold adjustment circuit of FIG. 3 determines the state of the buffer circuit;
FIG. 5 shows another embodiment of how the elephant flow threshold adjustment circuit of FIG. 3 determines the state of the buffer circuit;
FIG. 6 illustrates one embodiment of how the elephant flow threshold adjustment circuit of FIG. 3 adjusts the elephant flow threshold;
FIG. 7 shows an example of how the classification decision circuit of FIG. 3 decides the classification of the first data stream;
FIG. 8 shows another example of how the classification decision circuit of FIG. 3 decides the classification of the first data stream;
FIG. 9 shows a further example of how the classification decision circuit of FIG. 3 decides the classification of the first data stream;
FIG. 10 shows another embodiment of a data stream classification apparatus of the present application;
FIG. 11 shows an embodiment of the forwarding circuit of FIG. 10; and
FIG. 12 shows an embodiment of the setting circuit of FIG. 10.
Detailed Description
The present application includes a data stream classification device capable of classifying a plurality of data streams based on a comparison between the flow rate of the data streams and an elephant flow rate (eleuthawow) threshold. When the queue characteristic (e.g., queue length or queue delay) of a back-end buffer circuit is longer (or shorter) than a target threshold, the data stream classifying device of the present application can correspondingly decrease (increase) the traffic threshold of the elephant stream to classify more (less) data streams as the elephant stream, so that the back-end buffer circuit can avoid buffer expansion by decreasing the transmission priority of the elephant stream or discarding the packets of the elephant stream. The data flow classification device can be applied to a network packet forwarding device (such as a switch), wherein the data flow is formed by continuous packets and/or discontinuous packets; for ease of understanding, the following description is presented in terms of a network packet forwarding application, but is not intended to limit the practice of the present invention.
Fig. 1 shows an embodiment of a data stream classification apparatus according to the present application. The data stream sorting apparatus 100 of fig. 1 includes a forwarding circuit 110 and a setting circuit 120. The forwarding circuit 110 is configured to receive and classify a data stream, and forward the classified data stream to a buffer circuit 10; the forwarding circuit 110 further provides the traffic information of the data stream to the setting circuit 120. The setting circuit 120 is configured to determine the class of the data stream according to the queue information and the traffic information of the buffer circuit 10, and provide the class of the data stream to the forwarding circuit 110. Forwarding circuit 110 or setup circuit 120 may be implemented in hardware or by hardware executing software and/or firmware.
Fig. 2 shows an embodiment of forwarding circuit 110 of fig. 1. The forwarding circuit 110 of fig. 2 includes a recording circuit 210, a sorting circuit 220 and a data stream information supplementing circuit 230, wherein the recording circuit 210 and the sorting circuit 220 can be integrated into a lookup table circuit (not shown), which is not a limitation of the present invention.
Please refer to fig. 1 and 2. Recording circuit 210 is configured to calculate a flow rate for each of a plurality of data streams to obtain flow rate information for the plurality of data streams. For example, the recording circuit 210 knows the identity of a data stream according to the identification information of the data stream, and then counts the number of packets and/or bytes of the data stream to obtain the traffic information of the data stream. The recording circuit 210 further includes (or stores) a lookup table 212, wherein the lookup table 212 includes identification information of the plurality of data streams, traffic information of the plurality of data streams, and classification of the plurality of data streams. In an implementation example, the identification information of each of the plurality of data streams is a set of values, for example, a five-value set (5-tuple), including a destination address (destination IP address), a source address (source IP address), a protocol (protocol), a destination port (destination port), and a source port (source port), which is not a limitation of the implementation of the present invention; where implemented as feasible, any information that can be used to identify the identity of the data stream can be used as the identification information. Since the counting of the number of packets/bytes and the implementation of the lookup table can be implemented by known or self-developed techniques, details thereof are omitted here.
Please refer to fig. 1 and 2. The sorting circuit 220 is coupled to a data stream input end (i.e. the start end of the arrow of "data stream" shown in the figure) and the recording circuit 210, and is configured to receive a first data stream from the data stream input end, so as to query the identification information of the plurality of data streams recorded in the lookup table 212 according to the first identification information of the first data stream, wherein the term "first" is used for convenience of description and has no specific meaning; in other words, the first data stream may be any data stream received at the data stream input. When the lookup table 212 includes the first identification information, the lookup table 212 also includes the classification of the first data stream associated with the first identification information, and thus the classification circuit 220 uses the lookup table 212 to determine the classification of the first data stream and outputs the first data stream to the buffer circuit 10. When the lookup table 212 does not include the first identification information, the classification circuit 220 classifies the first data stream as a default classification and outputs the first data stream to the buffer circuit 10. It should be noted that when the lookup table 212 does not include the first identification information, the sorting circuit 220 may enable the data stream information supplementing circuit 230 to obtain at least a portion of the first data stream from the output of the sorting circuit 220 (e.g., the "sorted data stream") or the data stream input (not shown) by sending a signal or other known/self-developed means (e.g., control of a switch), so that the data stream information supplementing circuit 230 can selectively update the lookup table 212 according to the at least a portion of the first data stream. It should be noted that the buffer circuit 10 shown in fig. 1 may be included in the data stream classification device 100 or may be independent from the data stream classification device 100.
In one implementation example, the classifications of the plurality of data streams included in the lookup table 212 include an elephant stream type and a non-elephant stream (e.g., mouse stream) type; the flow rate of any data stream of the elephant flow type is higher than the flow rate of any data stream of the non-elephant flow type; in operation of buffer circuit 10, an elephant flow transmission priority associated with the elephant flow type is lower than a non-elephant flow transmission priority associated with the non-elephant flow type, or an elephant flow packet dropping rate associated with the elephant flow type is higher than a non-elephant flow packet dropping rate associated with the non-elephant flow type; the foregoing presets are classified as the non-elephant flow type. In one implementation example, the object stream types include a first type and a second type; the traffic of any data stream of the first type is higher than the traffic of any data stream of the second type; in operation of the buffer circuit 10, a first transmission priority associated with the first type is lower than a second transmission priority associated with the second type, or a first packet drop rate associated with the first type is higher than a second packet drop rate associated with the second type. The elephant flow types may include more types, depending on implementation requirements.
In an implementation example, each packet of the first data stream includes the first identification information, and the classification circuit 220 is configured to query the identification information of the plurality of data streams included in the lookup table 212 according to the first identification information included in each packet of the first data stream. When the lookup table 212 includes the first identification information, the lookup table 212 also includes the classification of the first data stream, so that the classification circuit 220 can mark each packet of the first data stream according to the classification of the first data stream included in the lookup table 212, and then the buffer circuit 10 can know whether the packet is an elephant stream packet or a non-elephant stream packet according to the mark of each packet. In one implementation example, the classification circuit 220 marks the classification of the packets by determining a value of metadata (e.g., color description metadata) for each packet of the first data stream. Since the label packet can be implemented by known/self-developed techniques, details thereof are omitted herein.
Please refer to fig. 1 and 2. The data stream information supplement circuit 230 is coupled to the recording circuit 210 and the sorting circuit 220. When the look-up table 212 does not include the first identification information, the data stream information supplementing circuit 230 selectively retrieves at least a portion of the first data stream from the output of the sorting circuit 220 or the data stream input to obtain the first identification information, and then the data stream information supplementing circuit 230 adds the first identification information to the look-up table 212 as a portion of the identification information of the plurality of data streams, and the recording circuit 210 calculates the traffic of the first data stream to obtain first traffic information as a portion of the traffic information of the plurality of data streams. If the lookup table 212 is full before the first identification information and the first traffic information are added, the data stream information supplementing circuit 230 removes the information of a certain data stream (e.g., a data stream determined by the least recently used (least recently used; LRU) policy) in the lookup table 212, which is not a limitation of the present invention. In one implementation example, considering the limited size of the lookup table 212, the data stream information enrichment circuit 230 performs a sampling operation with a default probability (p%, where P is a number between 0 and 100), so the probability that the data stream information enrichment circuit 230 obtains the at least one portion of the first data stream is the default probability (i.e., the data stream information enrichment circuit 230 may not sample each data stream and record identification information and traffic). Since both the sampling operation and the operation of obtaining specific information of the packet can be implemented by known/self-developed techniques, details thereof are omitted herein.
FIG. 3 shows an embodiment of the setting circuit 120 of FIG. 1. The setting circuit 120 of fig. 3 includes an elephant flow threshold adjustment circuit 310 and a classification decision circuit 320.
Please refer to fig. 1 to 3. The elephant flow threshold adjustment circuit 310 is coupled to the buffer circuit 10 for determining an elephant flow threshold (ELE_TH) according to a change of a relationship between a target queue characteristic value (e.g. a fixed queue length or a fixed queue delay) and a current queue characteristic value (e.g. a variable queue length or a variable queue delay) of the buffer circuit 10; in other words, the elephant flow threshold may dynamically change with the current queue characteristic value. In one implementation example, after the current queue feature value (curr_ql) is greater than the Target queue feature value (target_ql) by N times, the elephant flow threshold adjustment circuit 310 determines that the state of the buffer circuit 10 changes from a non-congested state to a congested state (as shown in fig. 4 and 5), and decreases the elephant flow threshold at least once to find more likely data flows of the elephant flow, so that the buffer circuit 10 can alleviate congestion by discarding at least a portion of the elephant flow, wherein N is a positive integer (e.g., an integer greater than one).
In one implementation, the buffer circuit 10 may employ a known/self-developed Weighted active queue management (Weighted active queue management; weighted AQM) technique to discard packets of the queue with a certain probability; in the case where the buffer circuit 10 is in the congestion state, after the current queue characteristic value is less than K-th of the target queue characteristic value by M times, the elephant flow threshold adjustment circuit 310 determines that the buffer circuit 10 is returning to the non-congestion state (as shown in fig. 4), and increases the elephant flow threshold at least once, so as to reduce the chance that the data flow is determined as an elephant flow; the K and the M are positive integers determined according to implementation requirements (for example, the K and the M are integers greater than one).
In one implementation, the buffer circuit 10 employs a known/self-developed class of service (CoS) queue scheduling technique to respectively assign different classes of service to packets of different queues; the buffer circuit 10 includes a non-elephant stream buffer queue and at least one elephant stream buffer queue (e.g., a first elephant stream buffer queue and a second elephant stream buffer queue, wherein the first elephant stream buffer queue has a lower transmission priority or a higher packet drop rate than the second elephant stream buffer queue), the current queue characteristic value is a current queue characteristic value (e.g., currG_QL of FIG. 5) of the non-elephant stream buffer queue; a non-elephant flow transmission priority associated with the non-elephant flow buffer queue is higher than any elephant flow transmission priority associated with the at least one elephant flow buffer queue, or a non-elephant flow packet discarding rate associated with the non-elephant flow buffer queue is lower than any elephant flow packet discarding rate associated with the at least one elephant flow buffer queue; in the case where the buffer circuit 10 is in the congestion state, after each current queue characteristic value (e.g., curry_ql and currr_ql of fig. 5) of the at least one elephant flow buffer queue is less than K times the target queue characteristic value by M times, the elephant flow threshold adjustment circuit 310 determines that the buffer circuit 10 is back to the non-congestion state (as shown in fig. 5), and increases the elephant flow threshold at least once to reduce the chance that the data flow is determined to be an elephant flow; the K and the M are positive integers determined according to implementation requirements (for example, the K and the M are integers greater than one). It should be noted that the settings of "N times", "M times", and "K times" in the above embodiments are used to control the judging sensitivity of the elephant flow threshold adjusting circuit 310 to the congestion state or the non-congestion state of the buffer circuit 10, so as to avoid the frequent switching of the states, and these values can be flexibly set according to the application situation.
Fig. 6 is a flow chart illustrating one embodiment of how the elephant flow threshold adjustment circuit 310 adjusts the elephant flow threshold (ELE _ TH) during a congestion condition. The steps of fig. 6 may be repeatedly performed, including:
s610: the elephant flow threshold adjustment circuit 310 determines that the buffer circuit 10 is in a congested state.
S620: the elephant flow threshold adjustment circuit 310 determines whether the current queue feature value (curr_ql) is greater than the Target queue feature value (target_ql); if yes, go to step S632; if not, the process advances to step S634.
S632: the elephant flow threshold adjustment circuit 310 determines that the congestion state is not relaxed, and proceeds to step S642.
S634: the elephant flow threshold adjustment circuit 310 determines that the congestion state has been relaxed, and proceeds to step S644.
S642: the elephant flow threshold adjustment circuit 310 determines whether the current queue feature value (curr_ql) is greater than a previous queue feature value (old_ql); if yes, go to step S652; if not, the process advances to step S654. In this step, a queue characteristic value (e.g., queue length or queue delay) of the buffer circuit 10 at a current time point is the current queue characteristic value; the queue characteristic value of the buffer circuit 10 at a previous point in time is the previous queue characteristic value.
S644: the elephant flow threshold adjustment circuit 310 determines whether the current queue feature value (curr_ql) is greater than a previous queue feature value (old_ql); if yes, go to step S654; if not, the process advances to step S656. In this step, a queue characteristic value (e.g., queue length or queue delay) of the buffer circuit 10 at a current time point is the current queue characteristic value; the queue characteristic value of the buffer circuit 10 at a previous point in time is the previous queue characteristic value.
S652: the elephant flow threshold adjustment circuit 310 determines that the congestion state becomes more serious, and proceeds to step S662.
S654: the elephant flow threshold adjustment circuit 310 determines that the congestion status does not change much, and proceeds to step S664.
S656: the elephant flow threshold adjustment circuit 310 maintains the elephant flow threshold unchanged.
S662: the elephant flow threshold adjustment circuit 310 adjusts the elephant flow threshold down by an adjustment value. For example, since the background of step S662 is that the congestion state becomes more serious (step S652) and the background of step S664 is that the congestion state does not change much (step S654), the adjustment value of step S662 may be larger than the adjustment value of step S664.
S664: the elephant flow threshold adjustment circuit 310 adjusts the elephant flow threshold down by an adjustment value.
In one implementation example, the adjustment value (rate_adj) of steps S662 and S664 of fig. 6 can be determined by the following formula:
Rate_adj=A×(Curr_QL-Target_QL)+B×(Curr_QL-Old_QL)
where A, B is a constant that is adjustable as required by the implementation, to increase or decrease the adjustment amplitude of the elephant flow threshold (ele_th) (e.g., ele_th=ele_th-rate_adj, and ele_th is not less than 0), if A, B is 0, the elephant flow threshold is maintained unchanged. Additionally, the adjustment value may be selectively varied with the level of the elephant flow threshold, as shown in the example of Table 1 below; however, the practice of the invention is not so limited.
TABLE 1
ELE_TH Rate_adj
ELE_TH<1Mbps Rate_adj=Rate_adj/128
ELE_TH<2Mbps Rate_adj=Rate_adj/64
ELE_TH<4Mbps Rate_adj=Rate_adj/32
ELE_TH<8Mbps Rate_adj=Rate_adj/16
ELE_TH<16Mbps Rate_adj=Rate_adj/8
ELE_TH<32Mbps Rate_adj=Rate_adj/4
ELE_TH<64Mbps Rate_adj=Rate_adj/2
ELE_TH≥64Mbps Rate_adj=Rate_adj
As described above, when the elephant flow threshold adjustment circuit 310 determines that the buffer circuit 10 is returning to the non-congested state (as shown in fig. 4 and 5), the elephant flow threshold adjustment circuit 310 adjusts the elephant flow threshold higher. In one implementation, the elephant flow threshold has an upper limit, and in the case that the elephant flow threshold does not reach the upper limit, the elephant flow threshold (ele_th) may be determined by the following formula:
the above formulas are merely examples, and one of ordinary skill in the art would modify the formulas according to the needs of an implementation.
Please refer to fig. 1 to 3. The classification decision circuit 320 is coupled to the elephant flow threshold adjustment circuit 310 and the recording circuit 210. The classification decision circuit 320 obtains the flow information of the plurality of data streams from the recording circuit 210, and decides the classifications of the plurality of data streams included in the lookup table 212 according to the change of the relationship between the flow information of the plurality of data streams and the elephant flow threshold; in other words, the classification of the plurality of data streams may be a function of the traffic information of the plurality of data streams and the elephant flow threshold. For example, the classification decision circuit 320 calculates the traffic of the first data stream according to the first traffic information (for example, the packet number or the byte number of the first data stream counted by the recording circuit 210 in a counting period) (for example, dividing the packet number/the byte number indicated by the first traffic information by the counting period), and then determines whether the traffic of the first data stream is greater than the elephant flow threshold; when the traffic of the first data stream is greater than the elephant stream traffic threshold, the classification decision circuit 320 decides that the classification of the first data stream is an elephant stream type; when the traffic of the first data stream is less than the elephant stream traffic threshold, the classification decision circuit 320 decides that the first data stream is classified as a non-elephant stream type.
Fig. 7 shows an example of how the classification decision circuit 320 decides the classification of the first data stream, wherein the horizontal axis represents the Flow Rate (Flow i. Rate) of the data stream, and each vertical arrow line represents a data stream. As shown in FIG. 7, the elephant flow threshold is higher than a first threshold (RED_MIN [ i ]), and therefore, the classification decision circuit 320 determines the elephant flow type as a first type; when the first data stream has a flow rate greater than the elephant flow rate threshold, the classification decision circuit 320 decides that the first data stream is classified into the first type (two data streams to the right of ELE TH in the figure); when the traffic of the first data stream is less than the elephant stream traffic threshold, the classification decision circuit 320 decides that the first data stream is classified as the non-elephant stream type (seven data streams to the left of ELE TH in the figure). Fig. 8 shows another example of how the classification decision circuit 320 decides the classification of the first data stream. As shown in fig. 8, the elephant flow threshold is less than the first threshold (red_min [ i ]) but greater than a second threshold (yes_min [ i ]), wherein the first threshold is greater than the second threshold, and therefore, the classification decision circuit 320 determines that the elephant flow type comprises the first type and a second type; if the traffic of the first data stream is greater than the first threshold, the classification decision circuit 320 decides that the first data stream is classified into the first type (three data streams on the right side of red_min [ i ] in the figure); if the first data stream flow is less than the first threshold but greater than the elephant stream flow threshold, the classification decision circuit 320 decides that the first data stream is classified into the second type (two data streams between red_min [ i ] and ele_th in the figure); if the traffic of the first data stream is less than the elephant flow threshold, the classification decision circuit 320 decides that the first data stream is classified as the non-elephant flow type (four data streams to the left of ELE TH in the figure). Fig. 9 shows another example of how the classification decision circuit 320 decides the classification of the first data stream. As shown in fig. 9, the elephant flow threshold is lower than the second threshold (yes_min [ i ]), and therefore, the classification decision circuit 320 decides that the elephant flow type comprises the first type and a second type; if the traffic of the first data stream is greater than the first threshold (RED_MIN [ i ]), the classification decision circuit 320 decides that the first data stream is classified into the first type (three data streams on the right side of RED_MIN [ i ]); if the traffic of the first data stream is less than the first threshold and greater than the second threshold and greater than the elephant flow threshold, the classification decision circuit 320 determines that the first data stream is classified into the second type (two data streams between red_min [ i ] and yel_min [ i ]); if the traffic of the first data stream is smaller than the second threshold, the classification decision circuit 320 decides that the first data stream is classified into the non-elephant stream type (four data streams on the left side of YEL_MIN [ i ] in the figure), that is, the elephant stream traffic threshold is adjusted to be lower than the second threshold (YEL_MIN [ i ]), the second threshold is used as the criterion for judging the non-elephant stream, and any data stream smaller than the second threshold is judged as the non-elephant stream type. It should be noted that, the setting of the first threshold and/or the second threshold may be changed according to the classification of the data stream according to the implementation requirements; the first threshold and/or the second threshold may be stored in the classification decision circuit 320 or may be input to the classification decision circuit 320 by an external circuit (not shown).
In an implementation example, the classification decision circuit 320 may further determine whether the first data stream belongs to a special data stream group (e.g., peer-to-peer (P2P) data stream group) according to the identification information of the multiple data streams and the traffic information of the multiple data streams, wherein the special data stream group may include multiple data streams according to implementation requirements. For example, the traffic information of the plurality of data flows may include packet length information and packet interval time information; if the traffic information of the plurality of data streams indicates that the average packet length is greater than X Bytes (e.g., 500 Bytes) and/or the average packet interval time is less than Y milliseconds (e.g., 1 ms), wherein X and Y are positive numbers greater than 0, the classification decision circuit 320 determines that the first data stream belongs to a P2P data stream group. It should be noted that the present invention is mainly determined by using the traffic statistics of the data stream, and the foregoing examples are not limitations of the present invention, for example, the characteristics of packet interval variation may also be used. If the first data stream belongs to the special data stream group, the classification decision circuit 320 decides the classification of the first data stream according to the total traffic of the special data stream group (i.e. the sum of the traffic of all the data streams included in the special data stream group) and the elephant flow threshold; more specifically, the classification decision circuit 320 determines the first data stream as an elephant stream (i.e., determines that all data streams in the data stream group are elephant streams) if the total traffic of the data stream group to which the first data stream belongs is greater than the elephant stream traffic threshold, even though the traffic of the first data stream is less than the elephant stream traffic threshold.
Fig. 10 shows another embodiment of the data stream classification apparatus of the present application. The data stream sorting apparatus 1000 of fig. 10 includes a rotating circuit 1010 and a setting circuit 1020. Each of the forwarding circuit 1010 and the setting circuit 1020 may be implemented in hardware, or implemented in hardware executing software and/or firmware. Although both the embodiments of fig. 1 and 10 are used to classify data streams, the forwarding circuit 110 of fig. 1 includes functionality to obtain traffic information (e.g., number of packets/bytes) for a data stream, the forwarding circuit 1010 of fig. 10 need not include such functionality; the setting circuit 120 of fig. 1 need not include a function of recording traffic information (e.g., packet sequence number and corresponding packet acquisition time) of the data stream, but the setting circuit 1020 of fig. 10 includes such a function. In short, the setting circuit 120 of fig. 1 may optionally have fewer functions, and the forwarding circuit 1010 of fig. 10 may optionally have fewer functions, so that the inventor can employ the architecture of fig. 1 or fig. 10 according to his/her needs. It should be noted that, those skilled in the art can refer to the application of the embodiment of fig. 1 to understand details and variations of the embodiment of fig. 10, which means that the technical features of the embodiment of fig. 1 may be applied to the embodiment of fig. 10 in a reasonable manner, so the description of the embodiment of fig. 10 is not repeated in principle from the already described portion of the embodiment of fig. 1.
Fig. 11 shows an embodiment of the forwarding circuit 1010 of fig. 10. The forwarding circuit 1010 of fig. 11 includes a first memory circuit 1110, a sorting circuit 1120, and a data stream information obtaining circuit 1130, wherein the first memory circuit 1110 and the sorting circuit 1120 can be integrated into a lookup table circuit (not shown), which is not a limitation of the implementation of the present invention.
Please refer to fig. 10 and 11. The first memory circuit 1110 is configured to store a lookup table 1112. The lookup table 1112 includes identification information of various data streams and classifications of the various data streams. In one implementation example, the identification information of each of the plurality of data streams is, for example, five-value set (5-tuple), which is not a limitation of the present invention; where implemented as feasible, any information that can be used to identify the identity of the data stream can be used as the identification information.
Please refer to fig. 10 and 11. The sorting circuit 1120 is coupled to a data stream input end (i.e. the start end of the arrow of "data stream" shown in the figure) and the first storage circuit 1110, and is configured to receive a first data stream from the data stream input end, so as to query the identification information of the plurality of data streams recorded in the lookup table 1112 according to the first identification information of the first data stream, wherein the first data stream may be any data stream received by the data stream input end. One embodiment of the manner in which classification circuit 1120 queries look-up table 1112 is the same as the manner in which classification circuit 220 of FIG. 2 queries look-up table 212. When the lookup table 1112 includes the first identification information, the classification circuit 1120 uses the lookup table 1112 to determine the classification of the first data stream, and outputs the first data stream to a buffer circuit 11; one embodiment of the way the classification circuit 1120 determines the classification of the first data stream is the same as the way the classification circuit 220 of fig. 2 determines the classification of the first data stream. When the lookup table 1112 does not include the first identification information, the classification circuit 1120 classifies the first data stream into a default classification (e.g., non-elephant stream type) and outputs the first data stream to the buffer circuit 11. It should be noted that the buffer circuit 11 may be included in the data stream sorting apparatus 1000 or may be independent from the data stream sorting apparatus 1000.
In one implementation example, an example of the classification of the plurality of data streams included in the lookup table 1112 is the same as the classification of the plurality of data streams included in the lookup table 212 of fig. 2 (i.e., the plurality of classifications include both types of elephant stream and types of elephant stream), and the buffer circuit 11 and the buffer circuit 10 are similar to each other, and each packet of the data streams of different classifications is given different transmission priorities or packet dropping rates. In an implementation example, when the lookup table 1112 includes the first identification information, the lookup table 1112 also includes the classification of the first data flow associated with the first identification information, so that the classification circuit 1120 can mark each packet of the first data flow according to the classification of the first data flow included in the lookup table 1112, and then the buffer circuit 90 can learn the classification of the packet according to the mark of each packet.
Please refer to fig. 10 and 11. The data stream information obtaining circuit 1130 is configured to obtain at least a portion of the first data stream from the data stream input or the output of the sorting circuit 1120, so as to obtain and output first identification information (e.g., the aforementioned five-value set) and first traffic information (e.g., the sequence number and sampling time of the packet) of the first data stream. It is noted that in this embodiment, the data stream information obtaining circuit 1130 is configured to obtain at least a portion of the first data stream regardless of whether the lookup table 1112 includes the first identification information. In an implementation example, the data stream information obtaining circuit 1130 performs a sampling operation according to a default probability to try to obtain the at least one portion of the first data stream, so as to obtain the first identification information and the first traffic information; in other words, the probability that the data stream information supplement circuit 1130 obtains the at least one portion of the first data stream is the default probability, and therefore, the data stream information supplement circuit 1130 may not sample packets of some data streams.
FIG. 12 shows an embodiment of the setting circuit 1020 of FIG. 10. The setting circuit 1020 of fig. 12 includes a second memory circuit 1210, an elephant flow threshold adjustment circuit 1220 and a classification decision circuit 1230.
Please refer to fig. 10 to fig. 12. The second memory circuit 1210 is coupled to the data stream information obtaining circuit 1130 for storing a data stream information table 1212. The data stream information table 1212 is used for storing identification information and traffic information of the plurality of data streams from the data stream information obtaining circuit 1130, wherein the identification information of the plurality of data streams includes the first identification information, and the traffic information of the plurality of data streams includes the first traffic information.
Please refer to fig. 10 to fig. 12. The elephant flow threshold adjusting circuit 1220 is coupled to the buffer circuit 11 for determining an elephant flow threshold according to a change of a relationship between a target queue characteristic (e.g. a fixed queue length or a fixed queue delay) and a current queue characteristic (e.g. a variable queue length or a variable queue delay) of the buffer circuit 11. An embodiment of the elephant flow threshold adjustment circuit 1220 is similar to the elephant flow threshold adjustment circuit 310 of fig. 3, and details are provided in fig. 3-6 and related description thereof.
Please refer to fig. 10 to fig. 12. The classification decision circuit 1230 is coupled to the elephant flow threshold adjustment circuit 1220, the second memory circuit 1210 and the first memory circuit 1110. The classification decision circuit 1230 is configured to determine the classification of the plurality of data streams included in the lookup table 1112 of the first storage circuit 1110 according to a change in a relationship between the traffic information of the plurality of data streams and the elephant stream traffic threshold. For example, the classification decision circuit 1230 calculates the traffic of the first data stream according to the first traffic information of the first data stream included in the data stream information table 1212, decides the classification of the first data stream according to the traffic of the first data stream and the traffic threshold of the elephant stream, and updates the classification of the first data stream in the lookup table 1112 accordingly. One embodiment of the manner in which the classification decision circuit 1230 determines the classification of the first data stream is the same as the manner in which the classification decision circuit 320 determines the classification of the first data stream.
In one implementation example, when a packet protocol of the first data stream is Transmission Control Protocol (TCP), the data stream information obtaining circuit 1130 performs a sampling operation according to a default probability to obtain a previous packet and a current packet of the first data stream, and then the classification decision circuit 1230 obtains the traffic of the first data stream according to the sequence numbers of the two packets and the sampling time of the two packets. For example, the sequence number (pre_sn) and the sampling Time (pre_time) of the previous packet are stored in the second storage circuit 1210, the sequence number (cur_sn) and the sampling Time (cur_time) of the current packet are provided in real Time by the data Flow information obtaining circuit 1130, and the classification decision circuit 1230 divides a sequence number difference (deltasn=cur_sn-pre_sn) of the sequence number of the two packets by an interval Time (deltatime=cur_time-pre_time) of the sampling Time of the two packets to obtain the Flow (Flow [ i ]. Rate) of the first data Flow, as shown in the following formula:
It should be noted that the latest packet sequence number and sampling time provided by the data stream information obtaining circuit 1130 are used to update the previous packet sequence number and sampling time.
In an implementation example, when a packet protocol of the first data stream is not a transmission control protocol, the data stream information obtaining circuit 1130 performs a sampling operation according to a default probability to obtain two packets of the first data stream including a previous packet and a current packet, and then the classification decision circuit 1230 obtains the traffic of the first data stream according to the length of the current packet, the default probability and the sampling time of the two packets. For example, the sampling Time (pre_time) of the previous packet is stored in the second storage circuit 1210, the sampling Time (cur_time) and the Length (cur_length) of the current packet are provided by the data stream information obtaining circuit 1130 in real Time, and the classification decision circuit 1230 divides the Length of the current packet by the predetermined probability (P%), and then divides the current packet by an interval (deltatime=cur_time-pre_time) of the sampling Time of the two packets to estimate the Flow (Flow [ i ]. Rate) of the first data stream, as shown in the following formula:
In an implementation example, the classification decision circuit 1230 can further determine whether the first data stream belongs to a special data stream group (e.g., peer-to-peer (P2P) data stream group) according to the identification information of the multiple data streams and the traffic information of the multiple data streams, and the classification decision circuit 1230 and the classification decision circuit 320 determine whether the first data stream belongs to a special data stream group in the same manner.
It should be noted that, where possible, one of ordinary skill in the art may selectively implement some or all of the features of any one of the embodiments described above, or may selectively implement some or all of the features of a plurality of the embodiments described above, thereby increasing the flexibility in implementing the present invention.
In summary, the present invention can classify a plurality of data streams according to the comparison between the flow rate of the data streams and an elephant flow rate threshold, thereby avoiding the problems of the prior art.
Although the embodiments of the present invention have been described above, these embodiments are not intended to limit the present invention, and those skilled in the art may make variations to the technical features of the present invention according to the explicit or implicit disclosure of the present invention, and all variations may fall within the scope of the present invention, that is, the scope of the present invention should be defined by the claims.
Description of the reference numerals
100 data stream classification device
110-forwarding circuit
120, setting circuit
10 buffer circuit
210 recording circuit
212 look-up table
220 sorting circuit
230 data stream information supplementing circuit
310 elephant flow threshold regulating circuit
320 classification decision circuitry
ELE_TH, elephant flow threshold
Curr_QL current queue characteristic value
target_QL Target queue characteristic value
Current queue characteristic value of CurrG_QL non-elephant flow buffer queue
Current queue characteristic value of Current_QL of elephant flow buffer queue
Current queue characteristic value of Current-class buffer queue
S610-S664 steps
old_QL previous queue characteristic value
Flow [ i ] Rate: flow of data Flow
RED_MIN [ i ] is a first threshold
YEL_MIN [ i ] second threshold
1000 data stream classifying device
1010, forwarding circuit
1020 setting circuit
11 buffer circuit
1110 first memory circuit
1112 look-up table
1120 sorting circuit
1130 data stream information acquisition circuit
1210 a second memory circuit
1212 data stream information table
1220 elephant flow threshold regulating circuit
1230 Classification decision circuit

Claims (10)

1. A data stream classification device, comprising:
a forwarding circuit, comprising:
a recording circuit for calculating the flow rate of each of a plurality of data streams to obtain flow rate information of the plurality of data streams, and including a lookup table including identification information of the plurality of data streams, flow rate information of the plurality of data streams, and classification of the plurality of data streams;
The classifying circuit is coupled with a data stream input end and the recording circuit and is used for receiving a first data stream from the data stream input end, inquiring the identification information of the plurality of data streams included in the lookup table according to the first identification information of the first data stream, determining the classification of the first data stream by using the lookup table when the lookup table comprises the first identification information, outputting the first data stream to a buffer circuit, classifying the first data stream into a default classification when the lookup table does not comprise the first identification information, and outputting the first data stream to the buffer circuit; and
a data stream information supplementing circuit coupled to the recording circuit and the classifying circuit, wherein when the lookup table does not include the first identification information, the data stream information supplementing circuit obtains at least a portion of the first data stream to obtain the first identification information, and then the data stream information supplementing circuit adds the first identification information to the lookup table as a portion of the identification information of the plurality of data streams, wherein the recording circuit calculates a flow of the first data stream to obtain first flow information as a portion of the flow information of the plurality of data streams; and
A setting circuit, comprising:
an elephant flow threshold adjusting circuit, coupled to the buffer circuit, for determining an elephant flow threshold according to a change in a relationship between a target queue characteristic value and a current queue characteristic value of the buffer circuit; and
and the classification decision circuit is coupled with the elephant flow threshold adjustment circuit and the recording circuit and is used for determining the classification of the multiple data flows included in the lookup table according to the change of the relation between the flow information of the multiple data flows and the elephant flow threshold.
2. The data stream sorting apparatus of claim 1, wherein each packet of the first data stream includes the first identification information, the sorting circuit is configured to query the identification information of the plurality of data streams included in the lookup table according to the first identification information included in each packet of the first data stream, and when the lookup table includes the first identification information, the lookup table also includes the sorting of the first data stream associated with the first identification information, and the sorting circuit marks each packet of the first data stream according to the sorting of the first data stream included in the lookup table.
3. The data stream sorting apparatus of claim 1, wherein the data stream information supplement circuit performs a sampling operation with a default probability such that the data stream information supplement circuit obtains a probability of the at least a portion of the first data stream as the predetermined probability.
4. The data stream sorting apparatus of claim 1 wherein said elephant stream flow threshold adjustment circuit determines that said buffer circuit is in a congested state and lowers said elephant stream flow threshold at least once after said current queue characteristic value is greater than said target queue characteristic value by N times, said N being a positive integer.
5. The data stream sorting apparatus of claim 4, wherein a queue characteristic value of the buffer circuit at a current point in time is the current queue characteristic value, and the queue characteristic value of the buffer circuit at a previous point in time is a previous queue characteristic value; the characteristic value of the queue is a queue length or a queue time delay; and under the condition that the buffer circuit is judged to be in the congestion state by the elephant flow threshold adjusting circuit, if the current queue characteristic value is larger than the target queue characteristic value, the elephant flow threshold adjusting circuit further adjusts the elephant flow threshold according to the change of the relation between the current queue characteristic value and the previous queue characteristic value.
6. The data stream sorting apparatus of claim 4, wherein a queue characteristic value of the buffer circuit at a current point in time is the current queue characteristic value, and the queue characteristic value of the buffer circuit at a previous point in time is a previous queue characteristic value; the characteristic value of the queue is a queue length or a queue time delay; and under the condition that the buffer circuit is judged to be in the congestion state by the elephant flow threshold adjusting circuit, if the current queue characteristic value is smaller than the target queue characteristic value, the elephant flow threshold adjusting circuit further adjusts the elephant flow threshold or maintains the elephant flow threshold unchanged according to the change of the relation between the current queue characteristic value and the previous queue characteristic value.
7. The data flow classification device of claim 4 wherein said elephant flow threshold adjustment circuit determines that said buffer circuit is in a non-congested state and increases said elephant flow threshold at least once after said current queue characteristic value is less than K-th of said target queue characteristic value by up to M times; and K and M are positive integers.
8. The data stream sorting apparatus of claim 4, wherein said buffer circuit comprises a non-elephant stream buffer queue and at least one elephant stream buffer queue, said current queue characteristic value being a queue characteristic value of said non-elephant stream buffer queue; a non-elephant flow transmission priority associated with the non-elephant flow buffer queue is higher than any elephant flow transmission priority associated with the at least one elephant flow buffer queue, or a non-elephant flow packet discarding rate associated with the non-elephant flow buffer queue is lower than any elephant flow packet discarding rate associated with the at least one elephant flow buffer queue; after each current queue characteristic value of the at least one elephant flow buffer queue is less than one K times of the target queue characteristic value for M times, the elephant flow threshold adjusting circuit judges that the buffer circuit is in a non-congestion state and increases the elephant flow threshold at least once; and K and M are positive integers.
9. The data stream classification apparatus of claim 1, wherein said classification decision circuit determines that said first data stream is classified as an elephant stream type when said classification decision circuit determines that the flow of said first data stream is greater than said elephant stream flow threshold based on said first flow information; when the classification decision circuit judges that the flow of the first data flow is smaller than the elephant flow threshold according to the first flow information, the classification decision circuit decides that the first data flow is classified into a non-elephant flow type.
10. The data stream classification apparatus according to claim 1, wherein the classification decision circuit determines whether the first data stream belongs to a specific data stream group according to the identification information of the plurality of data streams and the traffic information of the plurality of data streams; if the first data stream belongs to the special data stream group, the classification decision circuit decides the classification of the first data stream according to the total flow of the special data stream group and the elephant flow threshold.
CN202110088571.5A 2021-01-22 2021-01-22 Data stream classification device Active CN114785741B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110088571.5A CN114785741B (en) 2021-01-22 2021-01-22 Data stream classification device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110088571.5A CN114785741B (en) 2021-01-22 2021-01-22 Data stream classification device

Publications (2)

Publication Number Publication Date
CN114785741A CN114785741A (en) 2022-07-22
CN114785741B true CN114785741B (en) 2024-04-16

Family

ID=82407731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110088571.5A Active CN114785741B (en) 2021-01-22 2021-01-22 Data stream classification device

Country Status (1)

Country Link
CN (1) CN114785741B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105659543A (en) * 2013-10-07 2016-06-08 瑞典爱立信有限公司 Downlink flow management

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9124515B2 (en) * 2010-11-22 2015-09-01 Hewlett-Packard Development Company, L.P. Elephant flow detection in a computing device
US9882832B2 (en) * 2013-09-10 2018-01-30 Robin Systems, Inc. Fine-grained quality of service in datacenters through end-host control of traffic flow
US10277476B2 (en) * 2014-01-06 2019-04-30 Cisco Technology, Inc. Optimizing network parameters based on a learned network performance model
US10601714B2 (en) * 2016-06-28 2020-03-24 Mellanox Technologies Tlv Ltd. Adaptive flow prioritization
US10887240B2 (en) * 2018-02-26 2021-01-05 Marvell Israel (M.I.S.L) Ltd. Automatic flow learning in network devices
US11575609B2 (en) * 2019-07-19 2023-02-07 Intel Corporation Techniques for congestion management in a network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105659543A (en) * 2013-10-07 2016-06-08 瑞典爱立信有限公司 Downlink flow management

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Design and Provision of Traffic Grooming for Optical Wireless Data Center Networks;Abdulkadir Celik et al;《IEEE》;20181209;第第67卷卷(第第3期期);第2245-2259页 *
软件定义网络中可扩展的流表项处理机制;朱向阳;陈兵;;计算机技术与发展;20161128;26(12);第12-16页 *

Also Published As

Publication number Publication date
CN114785741A (en) 2022-07-22

Similar Documents

Publication Publication Date Title
US10230645B1 (en) Dynamic adjustment of quality of service parameters
US8665892B2 (en) Method and system for adaptive queue and buffer control based on monitoring in a packet network switch
US6252848B1 (en) System performance in a data network through queue management based on ingress rate monitoring
US9185015B2 (en) Application aware elephant flow identification
US8761012B2 (en) Packet relay apparatus and method of relaying packet
US8125904B2 (en) Method and system for adaptive queue and buffer control based on monitoring and active congestion avoidance in a packet network switch
US7106731B1 (en) Router with class of service mapping
US20140237118A1 (en) Application Aware Elephant Flow Management
Abbas et al. Fairness-driven queue management: A survey and taxonomy
TWI763261B (en) Data flow classification device
WO2002062013A2 (en) Methods and systems providing fair queuing and priority scheduling to enhance quality of service in a network
US20060187835A1 (en) Apparatus and method for adjusting adaptive service bandwidth in quality of service guaranteed network
CN1297098C (en) System flow controlling method
CN114500394B (en) Congestion control method for differentiated services
CN114785741B (en) Data stream classification device
US11463370B2 (en) Scalable deterministic services in packet networks
CN107404454B (en) Call quality adjusting method and device
TWI739706B (en) Data flow classification device
CN114827042A (en) Data flow classification device
CN114629847B (en) Coupled multi-stream TCP congestion control method based on available bandwidth allocation
CN112787919B (en) Message transmission method and device and readable medium
Irawan et al. Performance evaluation of queue algorithms for video-on-demand application
US11182205B2 (en) Multi-processor queuing model
KR100458707B1 (en) Adaptation packet forwarding method and device for offering QoS in differentiated service network
CN112152939B (en) Double-queue cache management method for inhibiting non-response flow and service differentiation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant