WO2018113426A1 - 一种流量控制方法及交换设备 - Google Patents

一种流量控制方法及交换设备 Download PDF

Info

Publication number
WO2018113426A1
WO2018113426A1 PCT/CN2017/109376 CN2017109376W WO2018113426A1 WO 2018113426 A1 WO2018113426 A1 WO 2018113426A1 CN 2017109376 W CN2017109376 W CN 2017109376W WO 2018113426 A1 WO2018113426 A1 WO 2018113426A1
Authority
WO
WIPO (PCT)
Prior art keywords
switching device
flow
critical
critical flow
stream
Prior art date
Application number
PCT/CN2017/109376
Other languages
English (en)
French (fr)
Inventor
沈利
周洪
刘和洋
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP17885290.1A priority Critical patent/EP3547627A4/en
Publication of WO2018113426A1 publication Critical patent/WO2018113426A1/zh
Priority to US16/448,730 priority patent/US11032205B2/en

Links

Images

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/11Identifying congestion
    • 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/26Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
    • H04L47/266Stopping or restarting the source, e.g. X-on or X-off
    • 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/26Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
    • H04L47/263Rate modification at the source after receiving feedback
    • 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
    • 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/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • H04L47/2433Allocation of priorities to traffic types
    • 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/2483Traffic characterised by specific attributes, e.g. priority or QoS involving identification of individual flows
    • 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/25Flow control; Congestion control with rate being modified by the source upon detecting a change of network conditions
    • 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/26Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
    • 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/30Flow control; Congestion control in combination with information about buffer occupancy at either end or at transit nodes
    • 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/41Flow control; Congestion control by acting on aggregated flows or links

Definitions

  • the present invention relates to the field of network technologies, and in particular, to a flow control method and a switching device.
  • Flow control can effectively prevent the impact of large amounts of data on the network in an instant, and ensure that the user network runs efficiently and stably.
  • Priority-based flow control also known as priority-based pause (English: class based flow control, CBFC for short) Is an enhancement to the existing Ethernet Pause mechanism.
  • the sending end is provided with a plurality of sending queues of different priorities, and the receiving end is provided with a receiving queue corresponding to the sending queue.
  • the receiving end can be controlled by a separate back pressure frame, which is also called a Pause frame.
  • a backpressure frame is sent to the sending end (such as device A), and device A is notified to suspend the sending priority of 7.
  • Send data frames in the queue when the receiving queue of priority 7 in the receiving end (such as device B) is congested, a backpressure frame is sent to the sending end (such as device A), and device A is notified to suspend the sending priority of 7.
  • Send data frames in the queue when the receiving queue of priority 7 in the receiving end (such as device B) is congested, a backpressure frame is sent to the sending end (such as device A), and device A is notified to suspend the sending priority of
  • the device B may send a cancel backpressure frame to the device A, and notify the device A to normally send the data frame in the sending queue with the priority of 7.
  • the device B may send a cancel backpressure frame to the device A, and notify the device A to normally send the data frame in the sending queue with the priority of 7.
  • other transmit queues and receive queues are not affected.
  • the device A feeds back the pause frame to all the input ports that cause the port 3 to be congested. Based on the pause frame fed back by device A, device B suspends sending all data from port 3. Even if the data to be sent in port 3 of device B is not sent to port 3 of device A, device B pauses to transmit this part of the data, forming a head block.
  • the downstream switching device sends a back-pressure frame to the upstream switching device, causing a large number of switching devices in the network to suspend the transmission of packets, causing congestion to spread, resulting in a decrease in throughput and an increase in average delay, which in turn leads to degradation of the performance of the entire network.
  • the invention provides a flow control method and a switching device, which can effectively alleviate congestion and avoid packet loss, and can effectively control congestion diffusion, thereby improving data exchange performance of the network.
  • the first aspect provides a flow control method, including: when the first switching device detects congestion, determining a critical flow from a plurality of data flows according to a preset condition, and generating a backpressure message including a flow attribute value of the critical flow, The backpressure message is sent to the upstream device of the critical flow, which indicates that the upstream device of the critical flow pauses to send the critical flow, and the backpressure message does not affect the upstream device of the critical flow to send other data flows except the critical flow.
  • the upstream device of the critical flow is connected to the first switching device.
  • the network device only delays transmission of critical flows. Since the critical stream contains more stream attributes, the granularity is smaller, and compared with all the data streams corresponding to the prior art pause priority, the congestion spread can be reduced, thereby improving the data exchange performance of the network.
  • the first switching device before generating the backpressure message including the value of the flow attribute of the critical flow, creates a critical flow virtual channel for the critical flow, and the subsequent packet belonging to the critical flow
  • the cached address of the subsequent packet is added to the critical stream virtual channel, and the subsequent packet of the other data stream is added to the sending queue corresponding to the other data stream.
  • the subsequent packet is a packet received by the first switching device and not added to the sending queue.
  • the switching device can separate the critical flow and the non-critical flow, and does not affect the transmission of the non-critical flow message while suspending the transmission of the critical flow.
  • the first switching device when the amount of packet data in the sending queue corresponding to the critical flow does not exceed the first preset threshold, the first switching device buffers the corresponding virtual channel from the virtual channel. The area extracts the packets of the critical flow and adds the extracted packets to the sending queue. In accordance with this, the first switching device can continue to forward the critical stream when it is detected that it is no longer congested.
  • the first switching device After the packet address of the subsequent packet belonging to the critical flow is added to the critical flow virtual channel, the amount of packet data in the buffer corresponding to the critical flow virtual channel exceeds the first
  • the first switching device After the threshold is preset, the first switching device generates a backpressure message including the stream attribute value of the critical stream. It can be seen that the switch can perform the back pressure process under different trigger conditions.
  • the first switching device when the amount of packet data in the buffer corresponding to the critical flow virtual channel does not exceed the second preset threshold, the first switching device generates a cancel back pressure message, and the reverse is cancelled.
  • the press message is sent to the second switching device.
  • the second preset threshold is less than or equal to the first preset threshold. It can be seen that the switch can perform the decompression process under different trigger conditions.
  • the preset condition is a preset traffic threshold
  • determining the critical flow from the multiple data flows according to the preset condition may be: the first switching device detects the sending queue. When the amount of the packet data exceeds the second preset threshold, the data flow in the plurality of data flows whose traffic is greater than the preset traffic threshold is used as the critical flow; or the first switching device determines that the transmission queue is congested, and determines the sending queue. The amount of data for each data stream, with the most data stream as the key stream.
  • the second aspect provides a flow control method, including: receiving, by the second switching device, a back pressure message sent by the first switching device, determining a critical flow in the multiple data flows according to the value of the flow attribute included in the backpressure message, and suspending the first
  • the switching device sends a critical flow.
  • the second switching device suspends sending the critical flow, and the first switching device can forward the data flow by using the pause time to solve the congestion problem.
  • the second switching device determines the critical flows in the multiple data flows according to the value of the flow attribute, the virtual flow virtual channel is created for the critical flow, and the subsequent packets belonging to the critical flow or subsequent The cached address of the packet is added to the critical flow channel.
  • the subsequent packets that are not in the critical flow are added to the send queue.
  • the subsequent packets are received by the second switching device and are not added to the send queue.
  • the second switching device extracts the packet of the critical flow from the buffer corresponding to the virtual flow virtual channel, and adds the extracted packet to the sending queue.
  • the second switching device can separate the critical flow and the non-critical flow, and does not affect the transmission of the non-critical flow message while suspending the transmission of the critical flow.
  • the second switching device after the second switching device receives the backpressure message sent by the first switching device, the second switching device starts the timer according to the back pressure message; when the timer duration is not less than When the preset time is long, the second switching device extracts the packets of the critical flow from the buffer corresponding to the virtual flow virtual channel. According to this implementation, the second switching device continues to send the critical flow to the first switching device without receiving the cancel backpressure message. Even if the cancel backpressure frame is lost during transmission, the second switching device can continue to send the critical stream to the first switching device.
  • the second switching device when the second switching device receives the sending by the first switching device When the backpressure message is canceled, the second switching device extracts the packets of the critical flow from the buffer corresponding to the virtual flow virtual channel. According to this implementation, the second switching device may continue to send the critical flow to the first switching device when receiving the cancel backpressure message.
  • the third aspect provides a switching device having the function of a first switching device implementing the flow control method provided by the first aspect.
  • This function can be implemented in hardware or in hardware by executing the corresponding software.
  • the above hardware or software includes one or more modules corresponding to the above functions.
  • the fourth aspect provides a switching device having the function of a second switching device implementing the flow control method provided by the second aspect.
  • This function can be implemented in hardware or in hardware by executing the corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the critical flow causing congestion may be determined from multiple data flows, and then multiple attribute values of the critical flow are sent to the upstream device of the critical flow.
  • the upstream device of the flow may suspend sending the critical flow to the first switching device.
  • critical flows are the main cause of congestion, they can effectively alleviate congestion and avoid packet loss.
  • Stream-based flow control is less granular than priority-based flow control. Delayed transmission of only critical flows can reduce congestion spread and improve data exchange performance of the network compared to all data flows corresponding to the prior art pause priority.
  • FIG. 1 is a schematic flow chart of a flow control method in the prior art
  • FIG. 3 is a schematic structural diagram of an application scenario in an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a flow control method according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a flow control method according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a key stream virtual channel and a transmission queue according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a key stream virtual channel according to an embodiment of the present invention.
  • FIG. 8 is another schematic diagram of a key stream virtual channel according to an embodiment of the present invention.
  • FIG. 9 is another schematic flowchart of a flow control method according to an embodiment of the present invention.
  • FIG. 10 is another schematic flowchart of a flow control method according to an embodiment of the present invention.
  • FIG. 11 is another schematic flowchart of a flow control method according to an embodiment of the present invention.
  • FIG. 12 is another schematic flowchart of a flow control method according to an embodiment of the present invention.
  • FIG. 13 is another schematic flowchart of a flow control method according to an embodiment of the present invention.
  • FIG. 14 is a schematic structural diagram of a switching device according to an embodiment of the present invention.
  • 15 is another schematic structural diagram of a switching device according to an embodiment of the present invention.
  • 16 is another schematic structural diagram of a switching device according to an embodiment of the present invention.
  • FIG. 17 is another schematic structural diagram of a switching device according to an embodiment of the present invention.
  • FIG. 18 is another schematic structural diagram of a switching device according to an embodiment of the present invention.
  • FIG. 19 is another schematic structural diagram of a switching device according to an embodiment of the present invention.
  • FIG. 20 is another schematic structural diagram of a switching device according to an embodiment of the present invention.
  • the invention discloses a flow control method, and the communication network applied by the method may be a network constructed by Ethernet or infiniband technology.
  • This Ethernet refers to standard Ethernet, Fast Ethernet or a subsequently evolved Ethernet.
  • the communication network is introduced.
  • the communication network includes a host, a switching device, and a server.
  • the number of hosts, switching devices, and servers can be one or more.
  • the switching device can be a switch or a bridge device.
  • a switch is a network device used to convert an illuminating signal or an electrical signal. It can provide an exclusive electrical or optical signal path for any two network nodes of the access switch.
  • the host can be a mobile terminal (including but not limited to a notebook, a mobile phone, a tablet, a palmtop computer, a POS machine, an MP3, a navigator), a fixed terminal (including but not limited to a desktop, a printer, a fax machine, a digital projection, a digital television) or A device such as a wireless access terminal.
  • a mobile terminal including but not limited to a notebook, a mobile phone, a tablet, a palmtop computer, a POS machine, an MP3, a navigator
  • a fixed terminal including but not limited to a desktop, a printer, a fax machine, a digital projection, a digital television
  • a device such as a wireless access terminal.
  • a server is a device that provides computing services.
  • it is divided into a file server, a database server , an application server, a WEB server, and the like.
  • the core idea of the flow control method applied to the communication network shown in FIG. 3 is that the main data stream causing congestion in the network is delayed by the back pressure frame, thereby solving the congestion problem. Since only the critical stream is not affected, the network device that does not transmit the critical stream is still affected, and the packet can still be sent normally, so the congestion spread can be effectively reduced.
  • an embodiment of the flow control method provided by the present invention includes:
  • Step 401 The first switching device determines a data flow to which the received packet belongs, and collects traffic of each data flow.
  • the switching device may determine, according to the attribute value of one or more flow attributes, the data flow to which the received message belongs, and the flow attribute includes a source Internet protocol (English: Internet Protocol, IP address), a destination IP address, Protocol number, source port number, destination port number, and packet priority. Based on determining the flow attribute of the data flow, the first switching device creates a flow table, and separately counts the traffic of each data flow.
  • the method for determining the data flow can be specifically referred to the following embodiments:
  • the first switching device determines different data flows according to the source IP address and the value of the packet priority. For each data stream, the source IP address and packet priority of the packets included are the same. In another optional embodiment, the first switching device determines different data flows according to the values of the source IP address, the destination IP address, and the packet priority. In another optional embodiment, the first switching device determines different data streams according to the source IP address, the destination IP address, the protocol number, the source port number, and the destination port number. In another alternative embodiment, the first switching device determines different data streams based on the source IP address and the destination IP address.
  • Step 402 When detecting the congestion, the first switching device determines the critical flow from the plurality of data flows according to the preset condition.
  • the sending queue may refer to a sending queue of a certain port of the first switching device.
  • the determining, by the first switching device, the critical flows from the multiple data flows according to the preset conditions may be implemented in multiple manners. For details, refer to the following embodiments:
  • the first switching device separately collects traffic of each of the plurality of data flows sent by the sending queue in the configured duration, and the traffic in the multiple data flows is greater than a preset traffic threshold.
  • the data stream acts as the key stream.
  • the flow device is configured with a flow table, where the flow table includes a flow entry corresponding to each data flow, and each flow entry is used to record that the switch device sends the corresponding flow entry corresponding to the flow entry.
  • data flow The number of bytes of the message.
  • the switching device performs statistics on the number of bytes of each data stream sent within the configured duration according to the flow table.
  • the i-th indicates The data stream is a big data stream, which is easy to cause congestion and determines that the data stream is a critical stream. If the number of bytes of a certain data stream sent within the configuration time does not exceed the preset traffic threshold, it indicates that the data stream is not easy to cause congestion, and it is determined that it is not a critical stream.
  • the above method is also called an elephant stream detection method.
  • the preset traffic threshold is used to measure whether the data flow is a critical flow, and its value can be set according to the sending capability of the switching device.
  • the switching device when detecting that a certain sending queue is congested, the switching device separately counts the data volume of each data stream in the sending queue, and uses the data stream with the largest amount of data as the critical stream; Wherein, the amount of data is represented by the number of bytes.
  • a flow table is configured in the switching device, where the flow table includes a flow entry corresponding to each data flow, the flow entry records a queue corresponding to the data flow, and a number of bytes entering the queue .
  • the switching device searches for the flow table before scheduling the packet to the sending queue. If the flow entry corresponding to the data flow to which the packet belongs is found, the number of bytes recorded in the flow entry is added. The number of bytes of the message.
  • the switching device creates the data flow to which the packet belongs in the flow table.
  • a flow entry records the number of bytes of the packet in the flow entry. When the message leaves the sending queue, the number of bytes of the message is subtracted from the number of bytes recorded in the flow entry of the data flow to which the message belongs. If the number of bytes recorded in a flow entry is 0, the flow entry is invalidated and the flow entry is released.
  • Step 403 The first switching device generates a backpressure message including a flow attribute value of the critical flow.
  • the stream attribute value is the attribute value of the multi-stream attribute of the critical stream.
  • the back pressure message can be a back pressure frame.
  • the first switching device may generate a backpressure message only according to the flow attribute value of the critical flow with the largest traffic. In this way, the critical flow with the largest flow rate is back-pressured, and the critical flow with the largest flow rate can be suspended. If the first switching device is still in a congested state, the first switching device generates another backpressure message according to the flow attribute of the critical traffic with the largest traffic in the remaining critical flows, and continues to backpressure the remaining critical flows until the first switching device Congestion relief.
  • the partial fields included in the back pressure frame of the present invention can be as shown in the following table:
  • Step 404 The first switching device sends a backpressure message to the second switching device.
  • the second switching device is an upstream device of the critical flow for the first switching device.
  • Step 405 The second switching device determines, according to the value of the flow attribute included in the backpressure message, a critical flow in the plurality of data flows, and suspends transmitting the critical flow to the first switching device.
  • the upstream device of the critical flow is a second switching device connected to the first switching device.
  • the backpressure message is used to instruct the second switching device to suspend the transmission of the critical flow, which can effectively alleviate congestion and avoid packet loss.
  • the backpressure message does not affect the second switching device to send other data streams than the critical stream. Therefore, the embodiment of the present invention can accurately control all or part of the data stream. Compared with the prior art, the embodiment of the present invention controls the traffic more accurately and more flexibly.
  • steps 401 to 405 are the back pressure flow of the first switching device and the second switching device.
  • the second switching device When the second switching device is congested, it can continue to send the pause frame to the upstream device of the critical flow, and other switching devices can be deduced by analogy. It can be seen that the embodiment of the present invention can solve the congestion problem and keep no packet loss, and can effectively reduce the degree of congestion spread.
  • Step 406 When the data volume of the packet in the sending queue corresponding to the critical flow does not exceed the first preset threshold, the first switching device generates a cancel backpressure message.
  • the first preset threshold is less than or equal to the second preset threshold.
  • step 407 may be triggered.
  • Step 407 The first switching device sends a cancel backpressure message to the second switching device.
  • Step 408 The second switching device sends the critical flow to the first switching device.
  • the second switching device when the second switching device receives the cancel back pressure message from the first switching device, it is determined that the preset cancel back pressure condition is met, and the critical flow is sent to the first switching device.
  • the second switching device starts a timer when receiving the back pressure message; when the timer duration of the timer is not less than the preset duration, the critical flow is sent to the first switching device.
  • steps 406 to 408 are to cancel the back pressure flow.
  • the second switching device can continue to send the critical flow to the first switching device, and the second switching device can send the cancel back pressure to the upstream device of the critical flow. Frames, other switching devices can be deduced by analogy.
  • the switching device provided by the present invention can also create a critical stream virtual channel for critical flows to schedule critical flows.
  • another embodiment of the flow control method provided by the present invention includes:
  • Step 501 The first switching device determines a data flow to which the received packet belongs, and collects traffic of each data flow.
  • Step 502 The first switching device determines a critical flow from the plurality of data flows according to a preset condition when congestion is detected. Step 501 to step 502 are similar to steps 401 to 402.
  • Step 503 After determining the critical flow from the plurality of data flows according to the preset condition, the first switching device creates a critical flow virtual channel for the critical flow, and adds the cached address of the subsequent packet or the subsequent packet belonging to the critical flow to the critical flow.
  • a channel adds a subsequent packet of another data stream to a sending queue corresponding to the other data stream, and the other data stream is another data stream different from the critical stream.
  • the subsequent packet is a packet received by the first switching device and not added to the sending queue.
  • the sending queue corresponding to the another data stream may be the same as or different from the sending queue corresponding to the critical stream.
  • the switching device creates a critical flow virtual channel for the critical flow, which refers to a virtual channel that stores the address of the key flow message.
  • the key stream channel stores the packet address, and the packet is still stored in the buffer of the switching device, as shown in Figure 6.
  • the key imaginary channel can be implemented in the following manner: As shown in Figure 7, the first mode stores only the first packet entering the virtual channel and the packet in the virtual channel. The statistics of the number of bytes, the message address of subsequent messages is connected by the pointer of the message. The second mode is as shown in Figure 8.
  • Each location of the critical stream virtual channel stores a packet address and counts the number of bytes in the critical stream virtual channel.
  • the first switching device schedules subsequent messages. If the packet is a critical stream, the packet is processed into the data stream (such as table lookup, encapsulation, etc.), and then the packet address of the packet is added to the critical stream virtual channel, or the packet is reported. The text address is directly added to the key stream virtual channel. If the packet does not belong to the critical flow, the packet is added to the port sending queue after being processed by the data plane.
  • the data stream such as table lookup, encapsulation, etc.
  • Step 504 When the amount of packet data in the buffer corresponding to the virtual flow virtual channel exceeds the first preset threshold, it indicates that the buffer corresponding to the virtual flow virtual channel is difficult to accommodate more packets, and the preset back pressure condition is determined.
  • a switching device generates a backpressure message including the value of the stream attribute of the critical stream.
  • the stream attribute value is the attribute value of the multi-stream attribute of the critical stream.
  • the back pressure message can be a back pressure frame.
  • the key stream channel In addition to storing the packet address of the key stream packet, the key stream channel also reserves the headroom to receive the in-flight packet from the upstream device of the critical stream.
  • the in-flight packet indicates the key from the key stream.
  • the flow back pressure frame is sent to the upstream device to receive subsequent messages within the time period.
  • Step 505 The first switching device sends a backpressure message to the second switching device. Wherein step 505 is similar to step 404.
  • Step 506 The second switching device determines, according to the value of the flow attribute included in the backpressure message, a critical flow in the plurality of data flows, and suspends transmitting the critical flow to the first switching device.
  • the critical flow is created for the critical flow, and the cached address of the subsequent packet or the subsequent packet of the critical flow is added to the critical flow of the second switching device.
  • a channel adds a subsequent packet of another data stream to a sending queue corresponding to the other data stream.
  • Another data stream refers to other data streams that are different from the critical stream.
  • Step 507 When it is detected that the data volume of the packet in the buffer corresponding to the critical flow virtual channel does not exceed the second preset threshold, the first switching device generates a cancel backpressure message.
  • the first switching device when the amount of packet data in the sending queue corresponding to the critical flow does not exceed the first preset threshold, the first switching device is in a non-congested state, and the first switching device receives the packet according to the packet address of the critical stream virtual channel.
  • the corresponding buffer is used to extract the packet, and the extracted packet is added to the sending queue.
  • the second preset threshold is not less than the first preset threshold.
  • Step 508 The first switching device sends a cancel backpressure message to the second switching device.
  • Step 509 The second switching device sends the critical flow to the first switching device.
  • the second switching device when the second switching device receives the cancel back pressure message sent by the first switching device, determining that the preset cancel back pressure condition is met, the second switching device extracts the buffer address according to the packet address in the critical flow virtual channel. The packet is added to the sending queue.
  • the second switching device starts a timer when receiving the backpressure message; when the timer duration of the timer is not less than the preset duration, the second switching device buffers the key stream according to the packet address in the critical stream virtual channel. The area extracts the packets of the critical flow, and adds the extracted packets of the critical flow to the sending queue.
  • FIG. 9 Another embodiment of the flow control method provided by the present invention includes:
  • Step 901 The first switching device determines a data flow to which the received packet belongs, and collects traffic of each data flow.
  • Step 902 The first switching device determines a critical flow from the plurality of data flows according to a preset condition when congestion is detected.
  • Step 903 The first switching device generates a backpressure message including a flow attribute value of the critical flow.
  • the stream attribute value is the attribute value of the multi-stream attribute of the critical stream.
  • the back pressure message can be a back pressure frame.
  • Step 901 to step 903 are similar to steps 401 to 403.
  • Step 904 The first switching device sends a backpressure message to the server.
  • the backpressure message is used to instruct the server to suspend the sending of the critical stream, wherein the backpressure message does not affect the server to send other data streams than the critical stream.
  • the upstream device of the critical flow is a server connected to the first switching device.
  • the first switching device converts the back pressure frame in the embodiment of FIG. 4 into a PAUSE frame of a standard PFC and sends the PAUSE frame to the server.
  • the server network card does not need to support the back pressure frame of the present invention.
  • the trigger back pressure process can also be achieved.
  • Step 905 The server determines a critical flow in the multiple data flows according to the flow attribute value, and pauses sending the critical flow to the first switching device.
  • the server may schedule the critical flow packet at the application layer.
  • the scheduling method may be to suspend the sending of the key stream message, or to reduce the sending rate of the key stream message.
  • Step 906 When the data volume of the packet in the sending queue corresponding to the critical flow does not exceed the first preset threshold, the first switching device generates a cancel backpressure message. When the data volume of the packet in the sending queue corresponding to the critical flow does not exceed the first preset threshold, it indicates that the sending queue is in a non-congested state, and has the capability of continuing to send more data, and the first switching device generates the canceling reverse. Press the message to trigger step 907.
  • Step 907 The first switching device sends a cancel backpressure message to the server.
  • Step 908 The server sends the critical flow to the first switching device.
  • the server when the server receives the cancel back pressure message from the first switching device, it is determined that the preset cancel back pressure condition is met, and the critical flow is sent to the first switching device.
  • the server starts a timer when receiving the back pressure message; when the timer duration of the timer is not less than the preset duration, it is determined that the preset cancel back pressure condition is met, and the critical flow is sent to the first switching device.
  • the switching device provided by the present invention can also create a critical stream virtual channel for critical flows to schedule critical flows.
  • another embodiment of the flow control method provided by the present invention includes:
  • Step 1001 The first switching device determines a data flow to which the received packet belongs, and collects traffic of each data flow.
  • Step 1002 The first switching device determines a critical flow from the plurality of data flows according to a preset condition when congestion is detected.
  • Step 1003 After determining the critical flow from the multiple data flows according to the preset condition, the first switching device creates a critical flow virtual channel for the critical flow, and adds the cache address of the subsequent packet or subsequent packet belonging to the critical flow to the critical flow.
  • a virtual channel adds a subsequent packet of another data stream to a sending queue corresponding to the other data stream.
  • the other data stream is a different data stream than the critical stream.
  • the subsequent packet is a packet received by the first switching device and not added to the sending queue.
  • Step 1004 When the amount of packet data in the buffer corresponding to the critical flow virtual channel exceeds the first preset threshold, the first switching device generates a backpressure message including the flow attribute value of the critical flow.
  • the stream attribute value is the attribute value of the multi-stream attribute of the critical stream.
  • the back pressure message can be a back pressure frame. Steps 1001 to 1004 are similar to steps 501 to 504.
  • Step 1005 The first switching device sends a backpressure message to the server.
  • the upstream device of the critical flow is a server connected to the first switching device.
  • the first switching device will be in the embodiment shown in FIG.
  • the backpressure frame is converted into a standard PFC PAUSE frame and sent to the server. In this way, the server network card does not need to support the backpressure frame of the present invention to trigger the backpressure process.
  • Step 1006 The server determines a critical flow in the multiple data flows according to the flow attribute value included in the backpressure message, and pauses to send the critical flow to the first switching device.
  • the server schedules the critical flow packets at the application layer.
  • the scheduling method may be to suspend the transmission of the critical flow, or to reduce the transmission rate of the critical flow message.
  • Step 1007 When it is detected that the packet data volume in the buffer corresponding to the critical flow virtual channel does not exceed the second preset threshold, the first switching device generates a cancel backpressure message. Step 1007 is similar to step 507.
  • Step 1008 The first switching device sends a cancel backpressure message to the server.
  • Step 1009 The server sends the critical flow to the first switching device.
  • Steps 1008 to 1009 are similar to steps 907 to 908.
  • the sending of the critical flow described in the embodiment of the present invention refers to sending a packet belonging to a critical flow.
  • Switch A has four ports: port 1, port 2, port 3, and port 4, each with a transmit queue. Create a flow table.
  • the flow table attributes are the source IP address, destination IP address, and priority, and the queue number is saved.
  • the configuration duration is 1 ms. Calculate the amount of data sent within the configured length (such as 1ms) and calculate the traffic of each stream.
  • Manner 1 When the number of bytes in the send queue of port 3 of switch A exceeds the preset threshold, port 3 is congested. At this time, the flow of the queue includes flow 1, flow 2, ..., flow n. If the traffic of the i th flow exceeds the preset traffic threshold, the i th flow is a critical flow.
  • Manner 2 When the number of packets in the send queue of port 3 of switch A exceeds the preset threshold, the flow of the queue at this time includes flow 1, flow 2, ..., flow n. If the i-th stream has the largest number of bytes in the queue, the i-th stream is a critical stream.
  • Switch A adds the packet address of the i-th stream in the buffer to the send queue, but joins the key stream virtual channel. The packets of other flows continue to be added to the send queue of port 3.
  • Switch A queries the upstream device of the critical flow according to the routing table. Take Switch B as an example. Switch A sends a backpressure frame to switch B.
  • the backpressure frame includes the active destination IP address pair and the priority.
  • the source IP address pair takes x.x.x.3 and x.x.x.100 as an example, and the priority is 3 as an example.
  • the switch B determines the source IP address as xxx3 according to the source IP address pair (ie, xxx3 and xxx100) and the priority (ie, 3) included in the backpressure frame.
  • a traffic with an IP address of xxx100 and a priority of 3 is a critical flow.
  • the packet address of the subsequent packets of the critical flow is added to the critical flow virtual channel of Switch B. If the number of packets in the buffer corresponding to the critical flow channel of the switch B exceeds the preset threshold, the device sends a backpressure frame to the upstream device of the critical flow.
  • switch A can send a cancel back pressure frame to switch B.
  • switch B takes the report from the buffer corresponding to the virtual flow virtual channel. Text join The send queue of switch B.
  • the back pressure frame is sent to all the senders of the message in the send queue, such as switch B, switch C, and switch D.
  • switch B, switch C, and switch D pause the corresponding Priority queue.
  • the present invention only sends the back pressure frame to the switch B.
  • the switch B After receiving the back pressure frame, the switch B only pauses the critical flow, and the packets that are not the critical flow are still sent normally. This is equivalent to delaying the transmission of large data streams in the network and transmitting the small data streams normally. Therefore, the present invention can not only reduce congestion spread but also solve head congestion problems on the basis of achieving congestion mitigation and no packet loss.
  • the present invention normally transmits a small data stream whose delay is not affected.
  • the flow control method is introduced above.
  • the following describes the switching device that implements the flow control method.
  • switching device 1400 that can implement the functions of the first switching device in the embodiment shown in FIG. 4, FIG. 5, FIG. 9, or FIG.
  • One embodiment of switching device 1400 includes:
  • a determining module 1401 configured to determine a critical flow from the plurality of data streams according to a preset condition when congestion is detected
  • a first generation module 1402 configured to generate a backpressure message including a flow attribute value of the critical flow
  • the sending module 1403 is configured to send a backpressure message to the upstream device of the critical flow, where the backpressure message is used to indicate that the upstream device of the critical flow pauses to send the critical flow, and the upstream device of the critical flow is connected to the first switching device, where the backpressure message is sent.
  • the upstream device that does not affect the critical flow sends other data streams than the critical flow.
  • the switching device 1400 further includes: a scheduling module 1501, configured to be a key before the first generating module 1402 generates a backpressure message including the stream attribute value of the critical stream.
  • the flow creates a critical flow virtual channel, and adds the cached address of the subsequent packet or the subsequent packet of the critical flow to the critical flow virtual channel, and adds the subsequent packet of the other data flow to the transmission queue corresponding to the other data flow.
  • the scheduling module 1501 is further configured to: when the amount of packet data in the sending queue corresponding to the critical flow does not exceed the first preset threshold, extract the key from the buffer corresponding to the virtual stream virtual channel. The streamed packet adds the extracted packet to the sending queue.
  • the first generating module 1402 is specifically configured to: when the amount of packet data in the buffer corresponding to the critical stream virtual channel exceeds the first preset threshold, generate a stream attribute value including the critical stream. Back pressure message.
  • the switching device 1400 further includes: a second generating module 1601, configured to: when the scheduling module 1501 determines the amount of packet data in the buffer corresponding to the critical stream virtual channel When the second preset threshold is not exceeded, a cancel back pressure message is generated;
  • the sending module 1403 is further configured to send the cancel backpressure message to the second switching device, where the second preset threshold is less than or equal to the first preset threshold.
  • the determining module 1401 is specifically configured to: when detecting that the amount of packet data in the sending queue exceeds a second preset threshold, the data flow in the plurality of data streams that is greater than the preset traffic threshold As a key stream; or specifically, when detecting that congestion occurs in the sending queue, determining the data volume of each data stream in the sending queue, and using the data stream with the largest amount of data as the critical stream.
  • switching device 1700 which can implement the functions of the second switching device in the embodiment shown in FIG. 4 or 5.
  • One embodiment of switching device 1700 includes:
  • the receiving module 1701 is configured to receive a backpressure message sent by the first switching device, where the backpressure message includes a stream attribute value;
  • a determining module 1702 configured to determine a critical flow in the plurality of data streams according to the flow attribute value
  • the sending module 1703 is configured to suspend sending the critical flow to the first switching device.
  • the switching device 1700 further includes: a scheduling module 1801, configured to create a critical flow virtual channel for the critical flow, and cache the subsequent packets or subsequent messages belonging to the critical flow. Adding a critical flow channel, adding a subsequent packet that is not a critical flow to the sending queue, and the subsequent packet is a packet that is received by the second switching device and is not added to the sending queue.
  • the scheduling module 1801 is further configured to: when the detection information meets the preset cancellation backpressure condition, extract the packet of the critical flow from the buffer corresponding to the virtual flow virtual channel, and add the extracted packet to the sending queue.
  • the switching device 1700 further includes:
  • a timing module 1901 configured to start a timer according to the back pressure message
  • the scheduling module 1801 is specifically configured to: when the timer duration of the timer is not less than the preset duration, extract the packet of the critical stream from the buffer corresponding to the virtual stream virtual channel.
  • the scheduling module 1801 is specifically configured to: when the receiving module 1701 receives the cancel backpressure message sent by the first switching device, extract the packet of the critical flow from the buffer corresponding to the virtual channel virtual channel.
  • the present invention provides a switching device 2000.
  • a switching device 2000 provided by the present invention includes one or more network interfaces 2001, one or more processors 2002, and one or more memories 2003.
  • the network interface 2001, the processor 2002, and the memory 2003 communicate with each other via a bus.
  • the processor 2002 may include a central processing unit (English: central processing unit, CPU for short), a network processor (English: network processor, referred to as NP), and the like; or a digital signal processor (English: digital signal processor, referred to as DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic devices.
  • a central processing unit English: central processing unit, CPU for short
  • a network processor English: network processor, referred to as NP
  • DSP digital signal processor
  • ASIC application-specific integrated circuit
  • FPGA field-programmable gate array
  • the memory 2003 may include a random access memory (English: random access memory, RAM for short), and a read-only memory (English: read-only memory, abbreviated as: ROM) may also include a non-volatile memory (English: non-volatile memory, Referred to as NVM), for example, at least one disk storage.
  • a random access memory (English: random access memory, RAM for short)
  • a read-only memory (English: read-only memory, abbreviated as: ROM) may also include a non-volatile memory (English: non-volatile memory, Referred to as NVM), for example, at least one disk storage.
  • NVM non-volatile memory
  • the memory 2003 is used to store data and operation instructions.
  • the processor 2002 can execute the method performed by the first switching device in the embodiment or the alternative embodiment shown in FIG. 4, FIG. 5, FIG. 9 or FIG. 10, and can also perform FIG. 4 Or the method performed by the second switching device in the embodiment or the alternative embodiment shown in FIG. 5.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the above units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.

Abstract

本发明公开了一种流量控制方法,包括:第一交换设备在检测到拥塞时从多个数据流中确定关键流,生成包括所述关键流的流属性值的反压消息,将反压消息发送给关键流的上游设备,关键流的上游设备暂停发送关键流,其中反压消息不影响关键流的上游设备发送除关键流之外的其他数据流。本发明还提供一种可以实现上述流量控制方法的交换设备。本发明能够有效缓解拥塞以及避免丢包,并且能够有效控制拥塞扩散,从而提高网络的数据交换性能。

Description

一种流量控制方法及交换设备
本申请要求于2016年12月23日提交中国专利局、申请号为201611204785.X、发明名称为“一种流量控制方法及交换设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及网络技术领域,尤其涉及一种流量控制方法及交换设备。
背景技术
流量控制可以有效的防止由于瞬间的大量数据对网络带来的冲击,保证用户网络高效而稳定地运行。
基于优先级的流量控制(英文:priority-based flow control,简称PFC),也称为基于优先级暂停(英文:per priority pause)或基于类的流量控制(英文:class based flow control,简称CBFC),是对现有以太Pause机制的增强。在PFC机制中,发送端设置有若干不同优先级的发送队列,接收端设置有与发送队列对应的接收队列。对于不同优先级的发送队列,接收端可以通过单独的反压帧(back pressure frame)进行控制,反压帧也称为Pause帧。如图1所示,当接收端(如设备B)中优先级为7的接收队列发生拥塞时,则向发送端(如设备A)发送反压帧,通知设备A暂停发送优先级为7的发送队列中的数据帧。当优先级为7的接收队列的数据容量低于一定门限时,设备B可以向设备A发送取消反压帧,通知设备A正常发送优先级为7的发送队列中的数据帧。上述反压过程中,其他发送队列和接收队列不受影响。
如图2所示,当设备A的输出端口3拥塞时,设备A向使端口3拥塞的全部输入端口反馈pause帧。根据设备A反馈的pause帧,设备B暂停从端口3发送所有数据。即使设备B的端口3中待发送数据不是发往设备A的端口3,设备B也暂停发送这部分数据,形成头部阻塞。在PFC机制下,下游交换设备向上游交换设备发送反压帧,使得网络中大量交换设备暂停发送报文,造成拥塞扩散,导致吞吐率下降和平均时延增加,进而导致整个网络的性能下降。
发明内容
本发明提供了一种流量控制方法以及交换设备,能够有效缓解拥塞以及避免丢包,并且能够有效控制拥塞扩散,从而提高网络的数据交换性能。
第一方面提供了一种流量控制方法,包括:第一交换设备在检测到拥塞时根据预设条件从多个数据流中确定关键流,生成包括关键流的流属性值的反压消息,将反压消息发送给关键流的上游设备,该反压消息指示关键流的上游设备暂停发送关键流,反压消息不影响关键流的上游设备发送除关键流之外的其他数据流。其中,关键流的上游设备与第一交换设备相连。依此实施,网络设备仅对关键流进行延迟发送。由于关键流包含的流属性更多,因此粒度更小,与现有技术暂停优先级对应的全部数据流相比,可以降低拥塞扩散,从而提高网络的数据交换性能。
在第一方面的一种可能实现方式中,在生成包括所述关键流的流属性值的反压消息之前,第一交换设备为关键流创建关键流虚通道,将属于关键流的后续报文或后续报文的缓存地址加入关键流虚通道,将另一数据流的后续报文加入该另一数据流对应的发送队列。后续报文为第一交换设备接收且未加入发送队列的报文。依此实施,交换设备可以分离关键流和非关键流,在暂停发送关键流的同时,不影响非关键流报文的发送。
进一步的,在第一方面的另一种可能实现方式中,当关键流对应的发送队列中的报文数据量不超过第一预设阈值时,第一交换设备从关键流虚通道对应的缓冲区提取关键流的报文,将提取的报文加入发送队列。依此实施,当检测到不再拥塞时,第一交换设备可继续转发关键流。
在第一方面的另一种可能实现方式中,在将属于关键流的后续报文的报文地址加入关键流虚通道之后,当关键流虚通道对应的缓冲区中报文数据量超过第一预设门限时,第一交换设备生成包括所述关键流的流属性值的反压消息。由此可见,交换机可以在不同的触发条件下执行反压流程。
在第一方面的另一种可能实现方式中,当关键流虚通道对应的缓冲区中的报文数据量不超过第二预设门限时,第一交换设备生成取消反压消息,将取消反压消息发送给第二交换设备。第二预设门限小于或等于第一预设门限。由此可见,交换机可以在不同的触发条件下执行取消反压流程。
在第一方面的另一种可能实现方式中,预设条件为预设流量阈值,根据预设条件从多个数据流中确定关键流具体可以为:第一交换设备在检测到发送队列中的报文数据量超过第二预设阈值时,将多个数据流中流量大于预设流量阈值的数据流作为关键流;或,第一交换设备在检测到发送队列发生拥塞时,确定发送队列中每个数据流的数据量,将数据量最多的数据流作为关键流。
第二方面提供一种流量控制方法,包括:第二交换设备接收第一交换设备发送的反压消息,根据反压消息包括的流属性值确定多个数据流中的关键流,暂停向第一交换设备发送关键流。依此实施,第二交换设备暂停发送关键流,第一交换设备可以利用暂停时间转发数据流,以解决拥塞问题。
在第二方面的一种可能实现方式中,第二交换设备根据流属性值确定多个数据流中的关键流后,为关键流创建关键流虚通道,将属于关键流的后续报文或后续报文的缓存地址加入关键流虚通道,将不属于关键流的后续报文加入发送队列,后续报文为第二交换设备接收且未加入发送队列的报文。当检测信息满足预设取消反压条件时,第二交换设备从关键流虚通道对应的缓冲区提取关键流的报文,将提取的报文加入发送队列。依此实施,第二交换设备可以分离关键流和非关键流,在暂停发送关键流的同时,不影响非关键流报文的发送。
在第二方面的另一种可能实现方式中,在第二交换设备接收第一交换设备发送的反压消息后,第二交换设备根据反压消息启动定时器;当定时器的计时时长不小于预设时长时,第二交换设备从关键流虚通道对应的缓冲区提取关键流的报文。依此实施,第二交换设备在没有收到取消反压消息的情况下,继续向第一交换设备发送关键流。即使取消反压帧在传输过程中丢失,第二交换设备可继续向第一交换设备发送关键流。
在第二方面的另一种可能实现方式中,当第二交换设备接收到第一交换设备发送的 取消反压消息时,第二交换设备从关键流虚通道对应的缓冲区提取关键流的报文。依此实施,第二交换设备在收到取消反压消息时,可继续向第一交换设备发送关键流。
第三方面提供了一种交换设备,该交换设备具有实现第一方面提供的流量控制方法的第一交换设备的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。以上硬件或软件包括一个或多个与上述功能相对应的模块。
第四方面提供了一种交换设备,该交换设备具有实现第二方面提供的流量控制方法的第二交换设备的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。
从本发明实施例可以看出,第一交换设备检测到拥塞时,可从多个数据流中确定引起拥塞的关键流,然后将关键流的多项属性值发送给关键流的上游设备,关键流的上游设备可以暂停向第一交换设备发送该关键流。对于整个网络来说,通过向上游设备传递反压帧,可使整个网络中的相关设备暂停发送所述关键流。由于关键流是引起拥塞的主要原因,因此能够有效缓解拥塞以及避免丢包。与基于优先级的流控相比,基于数据流的流控粒度更小。仅对关键流进行延迟发送,与现有技术暂停优先级对应的全部数据流相比,可以降低拥塞扩散,从而提高网络的数据交换性能。
附图说明
图1为现有技术中流量控制方法的一个流程示意图;
图2为现有技术中流量控制方法的另一个流程示意图;
图3为本发明实施例中应用场景的架构示意图;
图4为本发明实施例中流量控制方法的一个流程示意图;
图5为本发明实施例中流量控制方法的一个流程示意图;
图6为本发明实施例中关键流虚通道以及发送队列的一个示意图;
图7为本发明实施例中关键流虚通道的一个示意图;
图8为本发明实施例中关键流虚通道的另一个示意图;
图9为本发明实施例中流量控制方法的另一个流程示意图;
图10为本发明实施例中流量控制方法的另一个流程示意图;
图11为本发明实施例中流量控制方法的另一个流程示意图;
图12为本发明实施例中流量控制方法的另一个流程示意图;
图13为本发明实施例中流量控制方法的另一个流程示意图;
图14为本发明实施例中交换设备的一个结构示意图;
图15为本发明实施例中交换设备的另一个结构示意图;
图16为本发明实施例中交换设备的另一个结构示意图;
图17为本发明实施例中交换设备的另一个结构示意图;
图18为本发明实施例中交换设备的另一个结构示意图;
图19为本发明实施例中交换设备的另一个结构示意图;
图20为本发明实施例中交换设备的另一个结构示意图。
具体实施方式
本发明公开了一种流量控制方法,该方法所应用的通信网络可以是以太网或者无限带宽技术(infiniband)构造的网络。该以太网是指标准以太网,快速以太网或后续演进的以太网。首先对通信网络进行介绍,请参阅图3,该通信网络包括主机、交换设备以及服务器。主机、交换设备和服务器的数量可以是一个或多个。交换设备可以为交换机或桥接设备。交换机是用于转发光信号或电信号的网络设备。它可以为接入交换机的任意两个网络节点提供独享的电信号通路或光信号通路。
主机可以是移动终端(包括但不限于笔记本、手机、平板、掌上电脑、POS机、MP3、导航仪)、固定终端(包括但不限于台式机、打印机、传真机、数投、数字电视)或无线接入终端等设备。
服务器是提供计算服务的设备。在网络环境下,根据服务器提供的服务类型不同,分为文件服务器,数据库服务器,应用程序服务器,WEB服务器等。
本发明提供的应用于图3所示通信网络的流量控制方法,其核心思想是通过反压帧,将网络中引起拥塞的主要数据流延迟发送,从而解决拥塞问题。由于仅针对关键流,没有传输关键流的网络设备不受影响,仍然可以正常发送报文,因此能够有效降低拥塞扩散。
首先对交换设备间的流量控制方法进行介绍,请参阅图4,本发明提供的流量控制方法的一个实施例包括:
步骤401、第一交换设备确定接收的报文所属的数据流,统计每个数据流的流量。
本实施例中,交换设备可以基于一个或多个流属性的属性值确定接收的报文所属的数据流,流属性包括源因特网协议(英文:Internet Protocol,简称:IP)地址、目的IP地址、协议号、源端口号、目的端口号及报文优先级等。基于确定数据流的流属性,第一交换设备创建流表,分别统计各数据流的流量。确定数据流的方法具体可参阅以下实施例:
在一个可选实施例中,第一交换设备根据源IP地址和报文优先级的取值确定不同的数据流。对于每个数据流,其包括的报文的源IP地址和报文优先级均相同。在另一个可选实施例中,第一交换设备根据源IP地址、目的IP地址和报文优先级的取值确定不同的数据流。在另一个可选实施例中,第一交换设备根据源IP地址、目的IP地址、协议号、源端口号和目的端口号确定不同的数据流。在另一个可选实施例中,第一交换设备根据源IP地址和目的IP地址确定不同的数据流。
步骤402、第一交换设备在检测到拥塞时,根据预设条件从多个数据流中确定关键流。
具体的,当检测到第一交换设备的发送队列中的报文数据量超过第二预设阈值时,可确定第一交换设备发生拥塞。该发送队列可以是指第一交换设备的某个端口的发送队列。第一交换设备根据预设条件从多个数据流中确定关键流可以通过多种方式实现,具体请参阅以下实施例:
在一个可选实施例中,第一交换设备分别统计在配置时长内通过发送队列发送的多个数据流中每个数据流的流量,并将所述多个数据流中流量大于预设流量阈值的数据流作为所述关键流。具体的,在交换设备中设置有流表,所述流表包括每个数据流对应的流表项,每个流表项用于记录交换设备在配置时长内发送的属于该流表项对应的数据流 的报文的字节数。交换设备根据所述流表对在配置时长内发送的每个数据流的字节数进行统计,若配置时长内发送的第i个数据流的字节数超过预设流量阈值,则表明第i个数据流为大数据流,容易引起拥塞,确定该数据流为关键流。若配置时长内发送的某个数据流的字节数不超过该预设流量阈值,则表明该数据流不容易引起拥塞,确定其不是关键流,以上方法也称为大象流检测方法。预设流量阈值用来衡量数据流是否为关键流,其取值可以根据交换设备的发送能力来设定。
在另一个可选实施例中,交换设备在检测到某个发送队列发生拥塞时,分别统计该发送队列中每个数据流的数据量,并将数据量最多的数据流作为所述关键流;其中,所述数据量用字节数表示。具体的,在交换设备中设置有流表,所述流表包括每个数据流对应的流表项,所述流表项记录所述数据流对应的队列,以及进入所述队列的字节数。交换设备在将报文调度到发送队列之前,先查找所述流表,如果能查到所述报文所属的数据流对应的流表项,则在该流表项记录的字节数上加上所述报文的字节数。如果查不到所述报文所属的数据流对应的流表项,说明所述报文所属的数据流不在任何一个发送队列中,交换设备在该流表中为该报文所属的数据流创建流表项,将所述报文的字节数记录在所述流表项中。当所述报文离开发送队列时,从所述报文所属的数据流的流表项中记录的字节数中减去所述报文的字节数。如果某个流表项中记录的字节数为0,将该流表项设置为无效,释放该流表项。预设数据量用来衡量数据流是否为关键流,其取值可以根据发送队列的数据总容量以及拥塞比例确定,例如,预设数据量=发送队列的数据总容量×拥塞比例,拥塞比例可以为大于50%且小于100%的任意一个百分比。
步骤403、第一交换设备生成包括所述关键流的流属性值的反压消息。流属性值为关键流的多项流属性的属性值。反压消息可以是反压帧。
需要说明的是,若存在多个关键流,则第一交换设备可以仅根据流量最大的关键流的流属性值,生成反压消息。这样首先对流量最大的关键流进行反压,能够暂停发送流量最大的关键流。如果第一交换设备仍然处于拥塞状态,那么第一交换设备根据剩余关键流中流量最大的关键流的流属性,生成另一反压消息,继续对剩余关键流进行反压,直至第一交换设备的拥塞缓解。
举例来说,本发明的反压帧包括的部分字段可以如下表所示:
Figure PCTCN2017109376-appb-000001
循环冗余校验(Cyclic Redundancy Check,简称CRC)。
步骤404、第一交换设备将反压消息发送给第二交换设备。
其中第二交换设备为对于所述第一交换设备来说,所述关键流的上游设备。
步骤405、第二交换设备根据反压消息包括的流属性值确定多个数据流中的关键流,暂停向第一交换设备发送所述关键流。
具体的,关键流的上游设备为与第一交换设备相连的第二交换设备。反压消息用于指示第二交换设备暂停发送关键流,能够有效缓解拥塞以及避免丢包。其中反压消息不影响第二交换设备发送除关键流之外的其他数据流。因此本发明实施例能够对数据流的全部或部分进行准确控制,相比于现有技术,本发明实施例对流量的控制更为精确,也更灵活。
可以理解的是,步骤401至步骤405为第一交换设备与第二交换设备的反压流程。第二交换设备拥塞时,可继续向关键流的上游设备发送暂停帧,其他交换设备可依此类推。可见,本发明实施例可以解决拥塞问题和保持不丢包,并且能够有效降低拥塞扩散程度。
步骤406、当所述关键流对应的发送队列中报文的数据量不超过第一预设阈值时,第一交换设备生成取消反压消息。第一预设阈值小于或等于第二预设阈值。当所述关键流对应的发送队列中报文的数据量不超过第一预设阈值时,表明所述发送队列处于不拥塞状态,具有继续发送更多数据的能力,此时可触发步骤407。
步骤407、第一交换设备将取消反压消息发送给第二交换设备。
步骤408、第二交换设备向第一交换设备发送所述关键流。
具体的,当第二交换设备从第一交换设备收到取消反压消息时,确定满足预设的取消反压条件,向第一交换设备发送关键流。或者,第二交换设备从收到反压消息时启动定时器;当定时器的计时时长不小于预设时长时,向第一交换设备发送关键流。
本实施例中,步骤406至步骤408为取消反压流程。在暂停发送关键流一段时间后,在第一交换设备处于不拥塞状态时,第二交换设备能够继续向第一交换设备发送关键流,第二交换设备可向关键流的上游设备发送取消反压帧,其他交换设备可依此类推。
本发明提供的交换设备还可以为关键流创建关键流虚通道,以调度关键流。请参阅图5,本发明提供的流量控制方法的另一个实施例包括:
步骤501、第一交换设备确定接收的报文所属的数据流,统计每个数据流的流量。
步骤502、第一交换设备在检测到拥塞时根据预设条件从多个数据流中确定关键流。步骤501至步骤502,与步骤401至步骤402相似。
步骤503、第一交换设备在根据预设条件从多个数据流中确定关键流后为关键流创建关键流虚通道,将属于关键流的后续报文或后续报文的缓存地址加入关键流虚通道,将另一数据流的后续报文加入所述另一数据流对应的发送队列,另一数据流为不同于关键流的其他数据流。后续报文为第一交换设备接收且未加入发送队列的报文。所述另一数据流对应的发送队列与所述关键流对应的发送队列可以相同也可以不同。
本实施例中,交换设备为关键流创建关键流虚通道,其是指存储关键流报文地址的虚通道。关键流虚通道存储的是报文地址,报文仍然存放在交换设备的缓冲区(buffer)中,如图6所示。关键流虚通道可以通过以下方式实现:第一种方式如图7所示,在关键流虚通道中只存放第一个进入该关键流虚通道的报文地址和关键流虚通道中报文的 字节数的统计结果,后续报文的报文地址通过报文的指针相连。第二种方式如图8所示,关键流虚通道的每个位置都存放一个报文地址,并且对关键流虚通道中报文的字节数进行统计。
当确定关键流之后,第一交换设备对后续报文进行调度。如果报文属于关键流,那么将该报文进行数据面处理(如查表、封装等操作)之后,再将该报文的报文地址加入关键流虚通道,或者,将该报文的报文地址直接加入关键流虚通道。如果报文不属于关键流,那么将该报文进行数据面处理之后,加入端口发送队列。
步骤504、当关键流虚通道对应缓冲区中的报文数据量超过第一预设门限时,表明关键流虚通道对应的缓冲区难以容纳更多报文,确定满足预设反压条件,第一交换设备生成包括所述关键流的流属性值的反压消息。流属性值为关键流的多项流属性的属性值。反压消息可以是反压帧。关键流虚通道除了存储关键流报文的报文地址之外,还要预留头部空间(headroom)接收来自关键流的上游设备的in-flight报文,in-flight报文表示从该关键流反压帧发送到上游设备收到并起作用时间内的后续报文。
步骤505、第一交换设备将反压消息发送给第二交换设备。其中,步骤505与步骤404相似。
步骤506、第二交换设备根据反压消息包括的流属性值确定多个数据流中的关键流,暂停向第一交换设备发送所述关键流。
在一个可选实施例中,第二交换设备确定关键流后,为关键流创建关键流虚通道,将属于关键流的后续报文或后续报文的缓存地址加入第二交换设备的关键流虚通道,将另一数据流的后续报文加入该另一数据流对应的发送队列。另一数据流是指不同于关键流的其他数据流。
步骤507、当检测到关键流虚通道对应的缓冲区中报文的数据量不超过第二预设门限时,第一交换设备生成取消反压消息。
具体的,当关键流对应的发送队列中报文数据量不超过第一预设阈值时,表明第一交换设备处于不拥塞状态,第一交换设备根据关键流虚通道的报文地址从关键流对应的缓冲区提取报文,将提取的报文加入发送队列,第二预设阈值不小于第一预设阈值。当检测到关键流虚通道对应的缓冲区中的报文数据量不超过第二预设门限时,表明关键流虚通道对应的缓冲区可以容纳更多报文,确定满足预设取消反压条件,第一交换设备生成取消反压消息。
步骤508、第一交换设备向第二交换设备发送取消反压消息。
步骤509、第二交换设备向第一交换设备发送所述关键流。
具体的,当第二交换设备接收到第一交换设备发送的取消反压消息时,确定满足预设的取消反压条件,第二交换设备根据关键流虚通道中的报文地址从缓冲区提取报文,将提取的报文加入发送队列。或者,第二交换设备从收到反压消息时启动定时器;当定时器的计时时长不小于预设时长时,第二交换设备根据关键流虚通道中的报文地址从关键流对应的缓冲区提取关键流的报文,将提取的关键流的报文加入发送队列。
以上对交换设备间的流量控制方法进行了介绍,下面对交换设备与服务器间的流量控制方法进行介绍。请参阅图9,本发明提供的流量控制方法的另一个实施例包括:
步骤901、第一交换设备确定接收的报文所属的数据流,统计每个数据流的流量;
步骤902、第一交换设备在检测到拥塞时根据预设条件从多个数据流中确定关键流。
步骤903、第一交换设备生成包括所述关键流的流属性值的反压消息。流属性值为关键流的多项流属性的属性值。反压消息可以是反压帧。步骤901至步骤903,与步骤401至步骤403相似。
步骤904、第一交换设备将反压消息发送给服务器。反压消息用于指示服务器暂停发送关键流,其中反压消息不影响服务器发送除关键流之外的其他数据流。
其中,关键流的上游设备为与第一交换设备相连的服务器。在一个可选实施例中,第一交换设备将图4实施例中的反压帧转换成标准PFC的PAUSE帧,发送给服务器,通过这种方式,服务器网卡不需要支持本发明的反压帧也能达到触发反压流程。
步骤905、服务器根据流属性值确定多个数据流中的关键流,暂停向第一交换设备发送所述关键流。
本实施例中,服务器接收反压消息后,可在应用层对关键流报文进行调度。调度方法可以是暂停发送关键流报文,也可以是降低关键流报文的发送速率。
步骤906、当所述关键流对应的发送队列中报文的数据量不超过第一预设阈值时,第一交换设备生成取消反压消息。当所述关键流对应的发送队列中报文的数据量不超过第一预设阈值时,表明所述发送队列处于不拥塞状态,具有继续发送更多数据的能力,第一交换设备生成取消反压消息,触发步骤907。
步骤907、第一交换设备将取消反压消息发送给服务器。
步骤908、服务器向第一交换设备发送所述关键流。
具体的,当服务器从第一交换设备收到取消反压消息时,确定满足预设的取消反压条件,向第一交换设备发送关键流。或者,服务器从收到反压消息时启动定时器;当定时器的计时时长不小于预设时长时,确定满足预设取消反压条件,向第一交换设备发送关键流。
本发明提供的交换设备还可以为关键流创建关键流虚通道,以调度关键流。请参阅图10,本发明提供的流量控制方法的另一个实施例包括:
步骤1001、第一交换设备确定接收的报文所属的数据流,统计每个数据流的流量。
步骤1002、第一交换设备在检测到拥塞时根据预设条件从多个数据流中确定关键流。
步骤1003、第一交换设备在根据预设条件从多个数据流中确定关键流后,为关键流创建关键流虚通道,将属于关键流的后续报文或后续报文的缓存地址加入关键流虚通道,将另一数据流的后续报文加入所述另一数据流对应的发送队列。另一数据流为不同于关键流的其他数据流。后续报文为第一交换设备接收且未加入发送队列的报文。
步骤1004、当关键流虚通道对应缓冲区中的报文数据量超过第一预设门限时,第一交换设备生成包括所述关键流的流属性值的反压消息。流属性值为关键流的多项流属性的属性值。反压消息可以是反压帧。步骤1001至步骤1004,与步骤501至步骤504相似。
步骤1005、第一交换设备将反压消息发送给服务器。其中,关键流的上游设备为与第一交换设备相连的服务器。在一个可选实施例中,第一交换设备将图4所示实施例中 的反压帧转换成标准PFC的PAUSE帧,发送给服务器,通过这种方式,服务器网卡不需要支持本发明的反压帧也能触发反压流程。
步骤1006、服务器根据反压消息包括的流属性值确定多个数据流中的关键流,暂停向第一交换设备发送所述关键流。
具体的,服务器收到反压帧后,在应用层对关键流报文进行调度。调度方法可以是暂停发送关键流,也可以是降低关键流报文的发送速率。
步骤1007、当检测到关键流虚通道对应的缓冲区中报文数据量不超过第二预设门限时,第一交换设备生成取消反压消息。步骤1007与步骤507相似。
步骤1008、第一交换设备向服务器发送取消反压消息。
步骤1009、服务器向第一交换设备发送所述关键流。
步骤1008至步骤1009,与步骤907至步骤908相似。
可以理解的是,本发明实施例所描述的发送关键流是指发送属于关键流的报文。
为便于理解,下面以一个具体应用场景对本发明提供的流量控制方法进行介绍:
交换机A有4个端口:端口1、端口2、端口3和端口4,每个端口设有发送队列。创建流表,流表属性为源IP地址、目的IP地址以及优先级,并保存队列号。配置时长以1ms为例。统计配置时长(如1ms)内发送的数据量,计算每条流的流量。
请参阅图11,下面介绍从一个发送队列中选取关键流的两种方式:
方式1:当交换机A的端口3的发送队列中报文字节数超过预设阈值时,表明端口3拥塞,此时队列的流包括流1,流2,…,流n。如果第i个流的流量超过预设流量阈值,则第i个流为关键流。
方式2:当交换机A的端口3的发送队列中报文字节数超过预设阈值时,此时队列的流包括流1,流2,…,流n。如果队列中第i个流的字节数最多,则第i个流为关键流。
交换机A将缓冲区中的第i个流的报文地址不加入发送队列,而是加入关键流虚通道,其他流的报文继续加入端口3的发送队列。
当关键流虚通道对应缓冲区中报文的数据量超过预设门限时,交换机A根据路由表查询关键流的上游设备,以交换机B为例。交换机A向交换机B发送反压帧,反压帧包括有源目IP地址对和优先级,源目IP地址对以x.x.x.3和x.x.x.100为例,优先级以3为例。
如图12所示,交换机B接收反压帧之后,根据反压帧包括的源目IP地址对(即x.x.x.3和x.x.x.100)和优先级(即3),确定源IP地址为x.x.x.3、目的IP地址为x.x.x.100和优先级为3的流属于关键流,将关键流的后续报文的报文地址加入交换机B的关键流虚通道。如果交换机B的关键流虚通道对应缓冲区中报文字节数超过预设阈值,则继续向关键流的上游设备发送反压帧。
如图13所示,如果交换机A中端口3的发送队列的报文字节数小于预设阈值,表明端口3恢复正常,那么根据关键流虚通道对应的缓冲区取出报文加入端口3的发送队列。
当关键流虚通道中报文字节数低于预设门限时,交换机A可以向交换机B发送取消反压帧,交换机B接收取消反压帧之后,从关键流虚通道对应的缓冲区取出报文加入 交换机B的发送队列。
在现有技术中,反压帧会发送给发送队列中报文的全部发送端,例如交换机B、交换机C和交换机D,交换机B、交换机C和交换机D接收反压帧后,会暂停对应的优先级队列。从以上举例可见,本发明仅将反压帧发送给交换机B,交换机B接收反压帧后,仅对关键流进行暂停,不属于关键流的报文仍然正常发送。这样相当于在网络中将大数据流延迟发送,将小数据流正常发送,因此本发明在实现缓解拥塞以及不丢包的基础上,不仅可以降低拥塞扩散,还可以解决头部拥塞问题。并且,由于小数据流对时延敏感,本发明正常发送小数据流,其时延不受影响。
以上对流量控制方法进行了介绍,下面对实现流量控制方法的交换设备进行介绍。
请参阅图14,本发明提供一种交换设备1400,可以实现图4、图5、图9或图10所示实施例中第一交换设备的功能。交换设备1400的一个实施例包括:
确定模块1401,用于在检测到拥塞时根据预设条件从多个数据流中确定关键流;
第一生成模块1402,用于生成包括所述关键流的流属性值的反压消息;
发送模块1403,用于将反压消息发送给关键流的上游设备,反压消息用于指示关键流的上游设备暂停发送关键流,关键流的上游设备与第一交换设备相连,其中反压消息不影响关键流的上游设备发送除关键流之外的其他数据流。
在另一个可选实施例中,如图15所示,交换设备1400还包括:调度模块1501,用于在第一生成模块1402生成包括所述关键流的流属性值的反压消息之前为关键流创建关键流虚通道,将属于关键流的后续报文或后续报文的缓存地址加入关键流虚通道,将另一数据流的后续报文加入所述另一数据流对应的发送队列。
进一步的,在另一个可选实施例中,调度模块1501还用于当关键流对应的发送队列中报文数据量不超过第一预设阈值时,从关键流虚通道对应的缓冲区提取关键流的报文,将提取的报文加入发送队列。
在另一个可选实施例中,第一生成模块1402具体用于当关键流虚通道对应的缓冲区中报文数据量超过第一预设门限时,生成包括所述关键流的流属性值的反压消息。
进一步的,如图16所示,在另一个可选实施例中,交换设备1400还包括:第二生成模块1601,用于当调度模块1501确定关键流虚通道对应的缓冲区中报文数据量不超过第二预设门限时,生成取消反压消息;
发送模块1403,还用于将取消反压消息发送给第二交换设备,第二预设门限小于或等于第一预设门限。
在另一个可选实施例中,确定模块1401具体用于在检测到发送队列中报文数据量超过第二预设阈值时,将多个数据流中流量大于所述预设流量阈值的数据流作为关键流;或,具体用于在检测到发送队列发生拥塞时,确定所述发送队列中每个数据流的数据量,将数据量最多的数据流作为所述关键流。
请参阅图17,本发明提供另一种交换设备1700,可以实现图4或图5所示实施例中第二交换设备的功能。交换设备1700的一个实施例包括:
接收模块1701,用于接收第一交换设备发送的反压消息,反压消息包括流属性值;
确定模块1702,用于根据流属性值确定多个数据流中的关键流;
发送模块1703,用于暂停向第一交换设备发送关键流。
在另一个可选实施例中,请参阅图18,交换设备1700还包括:调度模块1801,用于为关键流创建关键流虚通道,将属于关键流的后续报文或后续报文的缓存地址加入关键流虚通道,将不属于关键流的后续报文加入发送队列,后续报文为所述第二交换设备接收且未加入所述发送队列的报文;
调度模块1801,还用于当检测信息满足预设取消反压条件时,从关键流虚通道对应的缓冲区提取关键流的报文,将提取的所述报文加入发送队列。
在另一个可选实施例中,如图19所示,交换设备1700还包括:
计时模块1901,用于根据所述反压消息启动定时器;
调度模块1801具体用于当定时器的计时时长不小于预设时长时,从关键流虚通道对应的缓冲区提取关键流的报文。
在另一个可选实施例中,调度模块1801具体用于当接收模块1701接收第一交换设备发送的取消反压消息时,从关键流虚通道对应的缓冲区提取关键流的报文。
请参阅图20,本发明提供一种交换设备2000。本发明提供的交换设备2000的一个实施例包括:一个或多个网络接口2001、一个或多个处理器2002以及一个或多个存储器2003。网络接口2001、处理器2002和存储器2003通过总线相互连接通信。
其中,处理器2002可以包括中央处理器(英文:central processing unit,简称CPU)、网络处理器(英文:network processor,简称NP)等;还可以是数字信号处理器(英文:digital signal processor,简称DSP)、专用集成电路(英文:application-specific integrated circuit,简称ASIC)、现场可编程门阵列(英文:field-programmable gate array,简称FPGA)或者其他可编程逻辑器件等。
存储器2003可以包括随机存取存储器(英文:random access memory,简称RAM),只读存储器(英文:read-only memory,简称:ROM)也可能包括非易失性存储器(英文:non-volatile memory,简称NVM),例如至少一个磁盘存储器。
具体的,存储器2003用于存储数据以及操作指令。通过调用存储器2003存储的操作指令,处理器2002可以执行图4、图5、图9或图10所示实施例或可选实施例中的第一交换设备所执行的方法,也可执行图4或图5所示实施例或可选实施例中第二交换设备所执行的方法。
在本发明所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (20)

  1. 一种流量控制方法,其特征在于,包括:
    第一交换设备在检测到拥塞时根据预设条件从多个数据流中确定关键流;
    所述第一交换设备生成包括所述关键流的流属性值的反压消息;
    所述第一交换设备将所述反压消息发送给所述关键流的上游设备,所述反压消息用于指示所述关键流的上游设备暂停发送所述关键流,所述关键流的上游设备与所述第一交换设备相连,其中所述反压消息不影响所述关键流的上游设备发送除所述关键流之外的其他数据流。
  2. 根据权利要求1所述的方法,其特征在于,所述生成包括所述关键流的流属性值的反压消息之前,所述方法还包括:
    所述第一交换设备为所述关键流创建关键流虚通道,将属于所述关键流的后续报文或所述后续报文的缓存地址加入所述关键流虚通道,将另一数据流的后续报文加入所述另一数据流对应的发送队列。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    当所述关键流对应的发送队列中的报文数据量不超过第一预设阈值时,所述第一交换设备从所述关键流虚通道对应的缓冲区提取所述关键流的报文,将提取的所述报文加入所述发送队列。
  4. 根据权利要求2或3所述的方法,其特征在于,所述生成包括所述关键流的流属性值的反压消息包括:
    当所述关键流虚通道对应的缓冲区中报文数据量超过第一预设门限时,第一交换设备生成包括所述关键流的流属性值的反压消息。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    当所述关键流虚通道对应的缓冲区中的报文数据量不超过第二预设门限时,第一交换设备生成取消反压消息,将所述取消反压消息发送给所述第二交换设备,所述第二预设门限小于或等于所述第一预设门限。
  6. 根据权利要求1-5中任意一项所述的方法,其特征在于,所述预设条件为预设流量阈值,所述根据预设条件从多个数据流中确定关键流包括:
    所述第一交换设备在检测到发送队列中的报文数据量超过第二预设阈值时,将所述多个数据流中流量大于所述预设流量阈值的数据流作为所述关键流;
    或所述第一交换设备在检测到发送队列发生拥塞时,确定所述发送队列中每个数据流的数据量,将数据量最多的数据流作为所述关键流。
  7. 一种流量控制方法,其特征在于,包括:
    第二交换设备接收第一交换设备发送的反压消息,所述反压消息包括流属性值;
    所述第二交换设备根据所述流属性值确定多个数据流中的关键流;
    所述第二交换设备暂停向所述第一交换设备发送所述关键流。
  8. 根据权利要求7所述的方法,其特征在于,在所述第二交换设备根据所述流属性值确定多个数据流中的关键流之后,所述方法还包括:
    所述第二交换设备为所述关键流创建关键流虚通道,将属于所述关键流的后续报文 或所述后续报文的缓存地址加入所述关键流虚通道,将不属于所述关键流的后续报文加入发送队列,后续报文为所述第二交换设备接收且未加入所述发送队列的报文;
    当满足预设取消反压条件时,所述第二交换设备从所述关键流虚通道对应的缓冲区提取所述关键流的报文,将提取的所述报文加入所述发送队列。
  9. 根据权利要求8所述的方法,其特征在于,第二交换设备接收第一交换设备发送的反压消息后,所述方法还包括:
    所述第二交换设备根据所述反压消息启动定时器;
    所述当满足预设取消反压条件时,所述第二交换设备从所述关键流虚通道对应的缓冲区提取所述关键流的报文包括:
    当所述定时器的计时时长不小于预设时长时,所述第二交换设备从所述关键流虚通道对应的缓冲区提取所述关键流的报文。
  10. 根据权利要求8所述的方法,其特征在于,当满足预设取消反压条件时,所述第二交换设备从所述关键流虚通道对应的缓冲区提取所述关键流的报文包括:
    当所述第二交换设备接收到所述第一交换设备发送的取消反压消息时,所述第二交换设备从所述关键流虚通道对应的缓冲区提取所述关键流的报文。
  11. 一种交换设备,其特征在于,所述交换设备作为第一交换设备,所述交换设备包括:
    确定模块,用于在检测到拥塞时根据预设条件从多个数据流中确定关键流;
    第一生成模块,用于生成包括所述关键流的流属性值的反压消息;
    发送模块,用于将所述反压消息发送给所述关键流的上游设备,所述反压消息用于指示所述关键流的上游设备暂停发送所述关键流,所述关键流的上游设备与所述第一交换设备相连,其中所述反压消息不影响所述关键流的上游设备发送除所述关键流之外的其他数据流。
  12. 根据权利要求11所述的交换设备,其特征在于,所述交换设备还包括:调度模块,用于在所述第一生成模块生成包括所述关键流的流属性值的反压消息之前为所述关键流创建关键流虚通道,将属于所述关键流的后续报文或所述后续报文的缓存地址加入所述关键流虚通道,将另一数据流的后续报文加入所述另一数据流对应的发送队列。
  13. 根据权利要求12所述的交换设备,其特征在于,所述调度模块还用于当所述关键流对应的发送队列中报文数据量不超过第一预设阈值时,从所述关键流虚通道对应的缓冲区提取所述关键流的报文,将提取的所述报文加入所述发送队列。
  14. 根据权利要求12或13所述的交换设备,其特征在于,所述第一生成模块具体用于当所述关键流虚通道对应的缓冲区中报文数据量超过第一预设门限时,生成包括所述关键流的流属性值的反压消息。
  15. 根据权利要求14所述的交换设备,其特征在于,所述交换设备还包括:第二生成模块,用于当所述关键流虚通道对应的缓冲区中的报文数据量不超过第二预设门限时,生成取消反压消息;
    所述发送模块,还用于将所述取消反压消息发送给所述第二交换设备,所述第二预设门限小于或等于所述第一预设门限。
  16. 根据权利要求11-15中任意一项所述的交换设备,其特征在于,所述确定模块 具体用于在检测到发送队列中报文数据量超过第二预设阈值时,将多个数据流中流量大于所述预设流量阈值的数据流作为关键流;
    或,具体用于在检测到发送队列发生拥塞时,确定所述发送队列中每个数据流的数据量,将数据量最多的数据流作为所述关键流。
  17. 一种交换设备,其特征在于,所述交换设备作为第二交换设备,所述交换设备包括:
    接收模块,用于接收第一交换设备发送的反压消息,所述反压消息包括流属性值;
    处理模块,用于根据所述流属性值确定多个数据流中的关键流;
    发送模块,用于暂停向所述第一交换设备发送所述关键流。
  18. 根据权利要求17所述的交换设备,其特征在于,所述交换设备还包括:调度模块,用于为所述关键流创建关键流虚通道,将属于所述关键流的后续报文或所述后续报文的缓存地址加入所述关键流虚通道,将不属于所述关键流的后续报文加入发送队列,所述后续报文为所述第二交换设备接收且未加入所述发送队列的报文;
    所述调度模块,还用于当检测信息满足预设取消反压条件时,从所述关键流虚通道对应的缓冲区提取所述关键流的报文,将提取的所述报文加入所述发送队列。
  19. 根据权利要求18所述的交换设备,其特征在于,所述交换设备还包括:
    计时模块,用于根据所述反压消息启动定时器;
    所述调度模块具体用于当所述定时器的计时时长不小于预设时长时,从所述关键流虚通道对应的缓冲区提取所述关键流的报文。
  20. 根据权利要求18所述的交换设备,其特征在于,所述调度模块具体用于当所述接收模块接收到所述第一交换设备发送的取消反压消息时,从所述关键流虚通道对应的缓冲区提取所述关键流的报文。
PCT/CN2017/109376 2016-12-23 2017-11-03 一种流量控制方法及交换设备 WO2018113426A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP17885290.1A EP3547627A4 (en) 2016-12-23 2017-11-03 FLOW CONTROL METHOD AND SWITCHING DEVICE
US16/448,730 US11032205B2 (en) 2016-12-23 2019-06-21 Flow control method and switching device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611204785.X 2016-12-23
CN201611204785.XA CN108243116B (zh) 2016-12-23 2016-12-23 一种流量控制方法及交换设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/448,730 Continuation US11032205B2 (en) 2016-12-23 2019-06-21 Flow control method and switching device

Publications (1)

Publication Number Publication Date
WO2018113426A1 true WO2018113426A1 (zh) 2018-06-28

Family

ID=62624527

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/109376 WO2018113426A1 (zh) 2016-12-23 2017-11-03 一种流量控制方法及交换设备

Country Status (4)

Country Link
US (1) US11032205B2 (zh)
EP (1) EP3547627A4 (zh)
CN (1) CN108243116B (zh)
WO (1) WO2018113426A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022242170A1 (zh) * 2021-05-21 2022-11-24 华为技术有限公司 一种数据处理方法以及相关设备

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6926953B2 (ja) * 2017-10-31 2021-08-25 富士通株式会社 情報処理装置、情報処理方法及びプログラム
CN110708255B (zh) * 2018-07-09 2021-11-19 华为技术有限公司 一种报文控制方法及节点设备
CN109218308A (zh) * 2018-09-14 2019-01-15 上海赋华网络科技有限公司 一种基于智能网卡的数据高速安全交换方法
CN111431811A (zh) * 2019-01-10 2020-07-17 华为技术有限公司 一种报文传输控制方法、装置和网络设备
CN112054964B (zh) * 2019-06-05 2023-11-28 中兴通讯股份有限公司 队列拥塞控制方法、装置、设备及存储介质
CN113132246B (zh) * 2019-12-30 2024-04-26 华为技术有限公司 一种流量控制方法及相关设备
CN113141311A (zh) * 2020-01-19 2021-07-20 华为技术有限公司 一种用于获取转发信息的方法及装置
CN113452471A (zh) * 2020-03-26 2021-09-28 伊姆西Ip控股有限责任公司 用于数据处理的方法、电子设备以及计算机程序产品
CN114868370A (zh) * 2020-11-20 2022-08-05 柏思科技有限公司 用于减少网络时延的方法和系统
EP4236254A4 (en) * 2020-11-30 2023-11-22 Huawei Technologies Co., Ltd. MESSAGE PROCESSING METHOD AND APPARATUS
US11824792B2 (en) * 2021-08-24 2023-11-21 Hewlett Packard Enterprise Development Lp Method and system for dynamic quota-based congestion management
CN115022243B (zh) * 2022-06-28 2023-05-26 绿盟科技集团股份有限公司 数据流量控制方法、装置、系统、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854402A (zh) * 2010-05-31 2010-10-06 中兴通讯股份有限公司 接口转换装置及流控实现方法
CN102469492A (zh) * 2010-11-12 2012-05-23 中兴通讯股份有限公司 一种无线通信网络中接纳控制的方法及装置
US20120254483A1 (en) * 2010-11-12 2012-10-04 Huawei Technologies Co., Ltd. Data transmission method, device and system
CN103997465A (zh) * 2014-05-27 2014-08-20 华为技术有限公司 一种生成cnm的方法及设备

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6108713A (en) * 1997-02-11 2000-08-22 Xaqti Corporation Media access control architectures and network management systems
CA2285167C (en) * 1998-10-12 2004-12-07 Jinoo Joung Flow control method in packet switched network
US7239636B2 (en) * 2001-07-23 2007-07-03 Broadcom Corporation Multiple virtual channels for use in network devices
US7474616B2 (en) * 2002-02-19 2009-01-06 Intel Corporation Congestion indication for flow control
US20050089054A1 (en) * 2003-08-11 2005-04-28 Gene Ciancaglini Methods and apparatus for provisioning connection oriented, quality of service capabilities and services
US7649843B2 (en) * 2004-02-09 2010-01-19 Transwitch Corporation Methods and apparatus for controlling the flow of multiple signal sources over a single full duplex ethernet link
US7859996B2 (en) * 2004-10-29 2010-12-28 Broadcom Corporation Intelligent congestion feedback apparatus and method
US20090300209A1 (en) * 2008-06-03 2009-12-03 Uri Elzur Method and system for path based network congestion management
JP5652388B2 (ja) * 2009-03-06 2015-01-14 日本電気株式会社 通信レート制御方法、送信装置および通信システム
US8873392B1 (en) * 2011-06-09 2014-10-28 Marvell International Ltd. Method and apparatus for controlling the flow of packets in a data network
EP2875635B1 (en) * 2012-07-18 2019-09-04 Performance and Privacy Ireland Ltd. Just-in-time distributed video cache
US9769074B2 (en) 2013-03-15 2017-09-19 International Business Machines Corporation Network per-flow rate limiting
US10063481B1 (en) * 2015-11-10 2018-08-28 U.S. Department Of Energy Network endpoint congestion management
WO2017146621A1 (en) * 2016-02-25 2017-08-31 Telefonaktiebolaget Lm Ericsson (Publ) Back-pressure control in a telecommunications network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854402A (zh) * 2010-05-31 2010-10-06 中兴通讯股份有限公司 接口转换装置及流控实现方法
CN102469492A (zh) * 2010-11-12 2012-05-23 中兴通讯股份有限公司 一种无线通信网络中接纳控制的方法及装置
US20120254483A1 (en) * 2010-11-12 2012-10-04 Huawei Technologies Co., Ltd. Data transmission method, device and system
CN103997465A (zh) * 2014-05-27 2014-08-20 华为技术有限公司 一种生成cnm的方法及设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3547627A4

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022242170A1 (zh) * 2021-05-21 2022-11-24 华为技术有限公司 一种数据处理方法以及相关设备

Also Published As

Publication number Publication date
EP3547627A4 (en) 2019-10-16
EP3547627A1 (en) 2019-10-02
US11032205B2 (en) 2021-06-08
US20190312816A1 (en) 2019-10-10
CN108243116A (zh) 2018-07-03
CN108243116B (zh) 2021-09-14

Similar Documents

Publication Publication Date Title
WO2018113426A1 (zh) 一种流量控制方法及交换设备
JP6938766B2 (ja) パケット制御方法およびネットワーク装置
US20200280518A1 (en) Congestion management techniques
US11233746B2 (en) Congestion control method and network device
US7817558B2 (en) Flow based flow control in an ethernet switch backplane
Kumar et al. PicNIC: predictable virtualized NIC
US9819590B2 (en) Method and apparatus for notifying network abnormality
US20060203730A1 (en) Method and system for reducing end station latency in response to network congestion
US20220303217A1 (en) Data Forwarding Method, Data Buffering Method, Apparatus, and Related Device
CN112104562B (zh) 拥塞控制方法及装置、通信网络、计算机存储介质
US10419370B2 (en) Hierarchical packet buffer system
US20210359952A1 (en) Technologies for protocol-agnostic network packet segmentation
WO2016202092A1 (zh) 基于多层队列流控反压的传送方法及装置
US20190306088A1 (en) Technologies for packet forwarding on ingress queue overflow
US20230139633A1 (en) Data Packet Sending Method and Apparatus
WO2022242170A1 (zh) 一种数据处理方法以及相关设备
WO2022028342A1 (zh) 一种拥塞流的处理方法及设备
US20190044867A1 (en) Technologies for controlling jitter at network packet egress
WO2018133784A1 (zh) 报文处理方法、设备及系统
Le et al. SFC: Near-source congestion signaling and flow control
US11924106B2 (en) Method and system for granular dynamic quota-based congestion management
US11824792B2 (en) Method and system for dynamic quota-based congestion management
WO2023226603A1 (zh) 一种抑制拥塞队列产生的方法及装置
Li et al. A content store-based module for congestion control algorithms of named data networking
Mukund et al. Improving RED for reduced UDP packet-drop

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17885290

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017885290

Country of ref document: EP

Effective date: 20190627