Lossless network flow control method and device, network equipment and storage medium
Patent Information
- Application Number
- CN202211230951.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2042-09-30
AI Technical Summary
[0005]有鉴于此,本发明的目的在于提供一种无损网络流量控制方法、装置、网络设备和存储介质,以解决现有技术中当上游设备的PFC功能异常或者未开启时,上游设备的流量无法得到抑制,从而导致丢包的问题
[0033]本发明实施例提供的无损网络流量控制方法、装置、网络设备和存储介质,该方法在网络设备中存储PFC功能状态表,该PFC功能状态表用于记录网络设备的所有互联设备的PFC功能状态,当网络设备发生数据拥塞时,网络设备根据当前存储的PFC功能状态表,确定出网络设备的上游互联设备中的PFC功能异常设备和PFC功能正常设备,仅向PFC功能正常设备发送PFC反压报文,且不向PFC功能异常设备发送PFC反压报文,以抑制PFC功能正常设备的数据发送,并保持PFC功能异常设备的数据发送速率不变。通过只对PFC功能正常设备进行流量反压,加大了PFC功能正常设备的流量反压力度,确保网络设备能够正常转发上游互联设备的数据,从而实现数据零丢包传输的效果。
Smart Images

Figure CN115550266B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data communication, and more specifically, to a lossless network traffic control method, apparatus, network device, and storage medium. Background Technology
[0002] Data centers need to achieve a network environment characterized by "zero packet loss, low latency, and high throughput," with zero packet loss requiring flow control technology. Flow control, also known as link-level flow control, aims to suppress the rate at which data is sent from the uplink egress point so that the downlink ingress point can receive it in time, preventing packet loss from occurring on switch ports under congestion.
[0003] Priority-based flow control (PFC) is currently the most widely used flow control technology. For PFC-controlled queues, when congestion occurs in a downstream device, the upstream device will stop sending traffic to that queue, thus achieving zero packet loss transmission. For queues not controlled by PFC, the system does not perform backpressure processing and will directly discard packets when congestion occurs.
[0004] However, in lossless networks, when the PFC function of the upstream device is malfunctioning or not enabled, the traffic of the upstream device cannot be suppressed, resulting in packet loss. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a lossless network traffic control method, apparatus, network device and storage medium to solve the problem in the prior art that when the PFC function of the upstream device is abnormal or not enabled, the traffic of the upstream device cannot be suppressed, resulting in packet loss.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows:
[0007] In a first aspect, the present invention provides a lossless network traffic control method, the method comprising:
[0008] When data congestion occurs in a network device, the PFC function status table currently stored in the network device is used to determine the PFC function abnormal devices and PFC function normal devices among the upstream interconnection devices of the network device; the PFC function status table is used to record the PFC function status of all interconnection devices of the network device.
[0009] Send PFC backpressure messages to devices with normal PFC function, but do not send PFC backpressure messages to devices with abnormal PFC function, so as to suppress data transmission of devices with normal PFC function and keep the data transmission rate of devices with abnormal PFC function unchanged.
[0010] In an optional implementation, the method further includes:
[0011] Periodically send PFC probe messages to all interconnected devices of the network device;
[0012] If a PFC response message is received from the interconnected device based on the PFC probe message within a preset time, the PFC function status of the interconnected device is determined to be normal or abnormal based on the PFC response message.
[0013] If a PFC response message is not received from the interconnected device based on the PFC probe message within a preset time, the PFC function status of the interconnected device is determined to be abnormal.
[0014] Establish or update the PFC function status table based on the PFC function status of each interconnected device.
[0015] In an optional implementation, the PFC response message includes extended fields;
[0016] The step of determining whether the PFC function status of the interconnected device is normal or abnormal based on the PFC response message includes:
[0017] If the value of the preset byte in the extended field of the PFC response message is the first preset value, then the PFC function status of the interconnected device is determined to be normal.
[0018] If the value of the preset byte in the extended field of the PFC response message is the second preset value, then the PFC function status of the interconnected device is determined to be abnormal.
[0019] In an optional implementation, the step of establishing or updating the PFC functional status table based on the PFC functional status of each of the interconnected devices includes:
[0020] Based on the correspondence between the device identifiers of each interconnected device and the PFC functional status, a PFC functional status table is established or the PFC functional status table is updated.
[0021] In an optional implementation, the step of establishing or updating the PFC functional status table based on the PFC functional status of each of the interconnected devices includes:
[0022] If the PFC function of the interconnected device is in an abnormal state, then the port on the network device connected to the interconnected device is set to error mode; if the PFC function of the interconnected device is in a normal state, then the port on the network device connected to the interconnected device is set to normal mode.
[0023] Based on the device identifier of each interconnected device and the correspondence between the identifier and mode of the port on the network device connected to each interconnected device, a PFC functional status table is established or the PFC functional status table is updated.
[0024] Secondly, the present invention provides a lossless network traffic control device, the device comprising:
[0025] The determination module is used to determine, when data congestion occurs in a network device, the PFC function status table currently stored in the network device, the PFC function status table, and the PFC function status of the upstream interconnected devices of the network device.
[0026] The processing module is used to send PFC backpressure messages to the PFC functioning device with normal function, and not to send PFC backpressure messages to the PFC functioning device with abnormal function, so as to suppress the data transmission of the PFC functioning device with normal function and keep the data transmission rate of the PFC functioning device unchanged.
[0027] In an optional embodiment, the apparatus further includes:
[0028] The PFC detection module is used to periodically send PFC detection messages to all interconnected devices of the network device; if a PFC response message is received from the interconnected device based on the PFC detection message within a preset time, the PFC function status of the interconnected device is determined to be normal or abnormal based on the PFC response message; if a PFC response message is not received from the interconnected device based on the PFC detection message within the preset time, the PFC function status of the interconnected device is determined to be abnormal; a PFC function status table is established or updated based on the PFC function status of each interconnected device.
[0029] In an optional implementation, the PFC response message includes extended fields;
[0030] The PFC detection module is used to determine that the PFC function status of the interconnected device is normal if the value of the preset byte of the extended field of the PFC response message is a first preset value; and to determine that the PFC function status of the interconnected device is abnormal if the value of the preset byte of the extended field of the PFC response message is a second preset value.
[0031] Thirdly, the present invention provides a network device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the lossless network traffic control method as described in any of the foregoing embodiments.
[0032] Fourthly, the present invention provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the lossless network traffic control method as described in any of the foregoing embodiments.
[0033] This invention provides a lossless network traffic control method, apparatus, network device, and storage medium. The method stores a PFC (Power Factor Correction) functional status table in the network device. This table records the PFC functional status of all interconnected devices. When data congestion occurs in the network device, the network device, based on the currently stored PFC functional status table, identifies upstream interconnected devices with abnormal and normal PFC functions. It only sends PFC backpressure messages to devices with normal PFC functions and does not send PFC backpressure messages to devices with abnormal PFC functions, thereby suppressing data transmission from devices with normal PFC functions and maintaining the data transmission rate of devices with abnormal PFC functions unchanged. By only applying backpressure to devices with normal PFC functions, the backpressure intensity of these devices is increased, ensuring that the network device can forward data from upstream interconnected devices normally, thus achieving zero-packet-loss data transmission.
[0034] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 A schematic diagram of an application environment applicable to an embodiment of the present invention is shown;
[0037] Figure 2 This invention provides a schematic flowchart of a lossless network traffic control method.
[0038] Figure 3This paper illustrates another flowchart of the lossless network traffic control method provided in an embodiment of the present invention.
[0039] Figure 4 This is a schematic diagram illustrating the meaning of each field in a PFC message;
[0040] Figure 5 A schematic diagram of another application environment applicable to embodiments of the present invention is shown;
[0041] Figure 6 This diagram illustrates a functional block diagram of a lossless network traffic control device provided in an embodiment of the present invention.
[0042] Figure 7 This invention illustrates another functional block diagram of the lossless network traffic control device provided in an embodiment of the present invention;
[0043] Figure 8 A block diagram of a network device provided in an embodiment of the present invention is shown.
[0044] Icons: 100 - Network device; 200 - Server; 600 - Lossless network flow control device; 110 - Memory; 120 - Processor; 130 - Communication module; 610 - Determination module; 620 - Processing module; 630 - PFC detection module. Detailed Implementation
[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0046] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0047] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0048] In existing technologies, lossless networks are typically implemented using the Pre-Confirmation (PFC) mechanism. Under PFC, a network device's output port usually corresponds to eight queues, each used to buffer packets of a specific priority. Each of the eight queues has a corresponding PFC threshold. The process of implementing a lossless network using PFC involves: when the buffer usage of a queue exceeds the PFC threshold, the network device sends a PFC backpressure message to the upstream device (in the direction the packets in that queue are entering), notifying the upstream device to temporarily stop sending packets of that priority; when the upstream device's output port queue also becomes congested, it sends another PFC backpressure message to the corresponding upstream device, and so on, through a series of backpressure stages until the data sender, ultimately achieving zero-packet-loss data transmission.
[0049] However, in practical applications, when the PFC function of the upstream device in a lossless network is abnormal or not enabled, the upstream device will not be able to recognize and process the PFC messages of the downstream device. The downstream device expects the upstream device to be in a traffic suppression state, but the traffic of the upstream device cannot actually be suppressed. When data congestion occurs in the downstream device, data packet loss may occur in the lossless network, thus failing to achieve a truly "lossless" network.
[0050] Based on this, embodiments of the present invention propose a lossless network traffic control method, apparatus, network device, and storage medium. By storing a PFC (Power Factor Control) functional status table in the network device to record the PFC functional status of all interconnected devices, when data congestion occurs, the network device determines the upstream interconnected devices with abnormal PFC functions and those with normal PFC functions based on the currently stored PFC functional status table. By applying backpressure only to devices with normal PFC functions, the backpressure intensity of these devices is increased, ensuring that the network device can forward data from upstream interconnected devices normally, thereby achieving zero-packet-loss data transmission.
[0051] First, an application environment involved in the embodiments of the present invention will be introduced.
[0052] Please see Figure 1 This is a schematic diagram of an application environment applicable to an embodiment of the present invention. For example... Figure 1 As shown, multiple network devices 100 and multiple servers 200 are located in the network, which achieves lossless networking by employing the PFC mechanism. The network devices 100 can be devices such as switches and routers, and the servers 200 can be devices such as traffic servers.
[0053] Taking multiple network devices 100 as DUT1, DUT2, DUT3, and DUT4, and multiple servers 200 as Server1, Server2, Server3, Server4, Server5, and Server6 as an example, DUT1 is connected to DUT2, DUT3, and DUT4; Server1 and Server2 are connected to DUT2; Server3 and Server4 are connected to DUT3; and Server5 and Server6 are connected to DUT4.
[0054] It should be understood that, Figure 1 The number and connection relationship of network devices 100 and servers 200 shown are only an example. In actual applications, the number and connection relationship of network devices 100 and servers 200 can be set according to actual needs. This embodiment of the invention does not limit this.
[0055] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0056] Please refer to Figure 2 This is a schematic flowchart illustrating a lossless network traffic control method provided in an embodiment of the present invention. It should be noted that the lossless network traffic control method in this embodiment of the present invention does not rely on... Figure 2 The specific order described below is a limitation. It should be understood that in other embodiments, the order of some steps in the lossless network traffic control method of this invention can be interchanged according to actual needs, or some steps can be omitted or deleted. This lossless network traffic control method can be applied to the network device 100 described above. The following will describe... Figure 2 The specific process shown will be explained in detail.
[0057] Step S201: When data congestion occurs in the network device, determine the PFC function abnormal devices and PFC function normal devices among the upstream interconnected devices of the network device according to the PFC function status table currently stored in the network device; the PFC function status table is used to record the PFC function status of all interconnected devices of the network device.
[0058] In this embodiment, the interconnecting device can be understood as a device directly connected to the network device, including upstream and downstream interconnecting devices corresponding to the network device. Figure 1 For example, when the traffic flow is from server 200 to network device 100 (i.e., from bottom to top), the upstream interconnection devices of DUT1 include DUT2, DUT3, and DUT4, and the downstream interconnection devices are... Figure 1 The upstream interconnection devices of DUT2 include Server1 and Server2, and the downstream interconnection device includes DUT1; the upstream interconnection devices of DUT3 include Server3 and Server4, and the downstream interconnection device includes DUT1; the upstream interconnection devices of DUT4 include Server5 and Server6, and the downstream interconnection device includes DUT1.
[0059] Similarly, when the traffic flow is from network device 100 to server 200 (i.e., from top to bottom), the upstream interconnection device of DUT1 is... Figure 1 As not shown in the diagram, downstream interconnect devices include DUT2, DUT3, and DUT4; upstream interconnect devices for DUT2 include DUT1, and downstream interconnect devices include Server1 and Server2; upstream interconnect devices for DUT3 include DUT1, and downstream interconnect devices include Server3 and Server4; upstream interconnect devices for DUT4 include DUT1, and downstream interconnect devices include Server5 and Server6.
[0060] Because network devices store a PFC (Power-Off Function) status table that records the PFC status of all interconnected devices, when data congestion occurs, the network device can query the stored PFC status table to obtain the PFC status of all upstream interconnected devices. If the upstream interconnected device's PFC status is normal, it is identified as a PFC-enabled device; if its PFC status is abnormal, it is identified as a PFC-abnormal device. Specifically, an abnormal PFC status indicates that the interconnected device's PFC function itself is faulty or that the PFC function is not enabled. In other words, a PFC-abnormal device is either a device with a faulty PFC function or one where PFC is not enabled.
[0061] Step S202: Send a PFC backpressure message to devices with normal PFC function, but do not send a PFC backpressure message to devices with abnormal PFC function, so as to suppress the data transmission of devices with normal PFC function and keep the data transmission rate of devices with abnormal PFC function unchanged.
[0062] In this embodiment, since the PFC malfunctioning device is either due to a faulty PFC function or a device that has not enabled PFC, it cannot suppress traffic. When the network device sends PFC backpressure messages, it only sends them to devices with normal PFC function, excluding those with malfunctioning PFC. This reduces the data traffic sent to the network device by the devices with normal PFC function per unit time, while the data transmission rate of the devices with malfunctioning PFC remains unchanged. Because PFC backpressure messages are only sent to devices with normal PFC function and not to those with malfunctioning PFC, compared to traditional flow control methods that do not distinguish whether the PFC function of upstream interconnected devices is malfunctioning, the traffic suppression on devices with normal PFC function is increased, ultimately ensuring that data from all upstream interconnected devices can be forwarded normally.
[0063] In other words, when network devices experience data congestion, by filtering devices with abnormal PFC function, PFC backpressure messages are only sent to devices with normal PFC function to increase the backpressure on the normal PFC function and reduce its traffic. This reduces the data transmission rate of the normal PFC function devices to a level that allows the network devices to forward data from upstream interconnected devices normally, thus achieving the effect of zero packet loss data transmission.
[0064] As can be seen, the lossless network traffic control method provided in this embodiment of the invention stores a PFC (Power-For-Flight) functional status table in the network device. This table records the PFC functional status of all interconnected devices of the network device. When data congestion occurs in the network device, the network device determines the upstream interconnected devices with abnormal PFC functions and those with normal PFC functions based on the currently stored PFC functional status table. It only sends PFC backpressure messages to devices with normal PFC functions and does not send PFC backpressure messages to devices with abnormal PFC functions, thereby suppressing data transmission by devices with normal PFC functions and maintaining the data transmission rate of devices with abnormal PFC functions unchanged. By only applying backpressure to devices with normal PFC functions, the backpressure intensity of these devices is increased, ensuring that the network device can forward data from upstream interconnected devices normally, thus achieving zero-packet-loss data transmission.
[0065] Optionally, each network device 100 and server 200 is pre-configured with PFC and PFC detection functions. After enabling these functions, each device sends, receives, and analyzes PFC detection packets, and establishes and updates a PFC status table locally based on the collected information. When data congestion occurs in the network, the network devices filter out devices with abnormal PFC functions and only apply backpressure to devices with normal PFC functions. By increasing the backpressure intensity on devices with normal PFC functions, the overall effect of zero packet loss is achieved. Based on this, please refer to... Figure 3 The lossless network traffic control method provided in this embodiment of the invention may further include the following steps:
[0066] Step S301: Periodically send PFC probe messages to all interconnected devices of the network device.
[0067] In this embodiment, all network devices in the network periodically send PFC probe messages to all their corresponding interconnected devices and wait for PFC response messages from each interconnected device.
[0068] Step S302: If a PFC response message is received from the interconnected device based on the PFC probe message within a preset time, the PFC function status of the interconnected device is determined to be normal or abnormal based on the PFC response message.
[0069] In this embodiment, the preset time can be set according to actual needs. When the network device receives a PFC response message returned by the interconnected device based on the PFC probe message within the preset time, it indicates that the interconnected device can normally receive and process the PFC probe message and can sense whether its own PFC function is normal. Based on its own PFC function status, it generates a corresponding PFC response message and returns it to the network device. The network device can determine whether the PFC function status of the interconnected device is normal or abnormal by analyzing the received PFC response message.
[0070] It should be understood that in some scenarios, the PFC function of the interconnected device may only be partially abnormal. The interconnected device can receive and process PFC probe messages normally, but it cannot complete traffic backpressure, so it will determine that its own PFC function is in an abnormal state.
[0071] Step S303: If a PFC response message is not received from the interconnected device based on the PFC probe message within a preset time, the PFC function status of the interconnected device is determined to be abnormal.
[0072] In this embodiment, if the network device does not receive a PFC response message returned by the interconnect device based on the PFC probe message within a preset time, it indicates that the interconnect device may not have enabled the PFC function or all PFC functions may be abnormal. In this case, the interconnect device cannot receive and process the PFC probe message normally, and therefore cannot return the corresponding response message to the network device. In this situation, the network device will determine that the PFC function status of the interconnect device is abnormal.
[0073] Step S304: Establish or update the PFC function status table based on the PFC function status of each interconnected device.
[0074] In this embodiment, the network device determines the PFC functional status of each interconnected device by analyzing whether a PFC response message is received within a preset time. Then, a PFC functional status table is established or updated based on the PFC functional status of each interconnected device. It should be noted that steps S301 to S304 may be executed before or after any of steps S201 and S202, or simultaneously with any of steps S201 and S202. This embodiment of the invention does not impose any limitations on this.
[0075] In this way, when the PFC functional status of an interconnected device changes, such as from a normal state to an abnormal state, or vice versa, the network device can detect and update the PFC functional status table in a timely manner. When data congestion occurs in the network device, the network device determines the new PFC functionally abnormal device and the new PFC functionally normal device based on the updated PFC functional status table. It sends PFC backpressure messages to the new PFC functionally normal device but does not send PFC backpressure messages to the new PFC functionally abnormal device, thereby suppressing the data transmission of the new PFC functionally normal device and maintaining the data transmission rate of the new PFC functionally abnormal device unchanged.
[0076] Optionally, in this embodiment, extended fields defined in the standard PFC message can be used to represent PFC probe messages and PFC response messages.
[0077] In one implementation, both the PFC probe message and the PFC response message include extended fields. The step S302 above, which determines whether the PFC functional status of the interconnected device is normal or abnormal based on the PFC response message, may specifically include:
[0078] If the preset byte value of the extended field of the PFC response message is the first preset value, then the PFC function status of the interconnected device is determined to be normal; if the preset byte value of the extended field of the PFC response message is the second preset value, then the PFC function status of the interconnected device is determined to be abnormal.
[0079] like Figure 4 As shown, the Pad field (i.e., the extended field) of the PFC message is a 26-octets (bytes) reserved field. In this embodiment of the invention, the value of the m-th octets (preset byte) of the Pad field can be defined to represent the PFC function status of the interconnected device. When the value of the m-th octets is 01 (first preset value), it indicates that the PFC function is normal. When the value of the m-th octets is 10 (second preset value), it indicates that the PFC function is abnormal.
[0080] Thus, the m-th octets of the Pad field can be used to determine whether a received PFC message is a PFC response message and the PFC functional status. For example, when a network device receives a PFC message and the m-th octets of the Pad field of the PFC message is not empty, it is determined that the PFC message is a PFC response message, and the value of the m-th octets determines whether the PFC functional status of the interconnected device is normal or abnormal.
[0081] In this embodiment, the values of other set bytes in the extended field (different from the aforementioned preset bytes) can also be used to determine whether the received PFC message is a PFC probe message. For example, the value of the set byte of the Pad field (e.g., the nth octets) can be defined as a third preset value (e.g., 11), indicating that the PFC message is a PFC probe message.
[0082] Of course, in practical applications, the values of the nth and mth octets of the Pad field can also be combined to determine the PFC probe message and PFC response message, as well as the PFC functional status of the interconnected device.
[0083] For example, when an upstream interconnect device receives a PFC message from a network device, and the value of the nth octets in the Pad field of the PFC message is 11, and the value of the mth octets is empty, then the PFC message is determined to be a PFC probe message.
[0084] The upstream interconnect device generates a PFC response message corresponding to the PFC probe message based on its own PFC function status. When the upstream interconnect device's PFC function status is normal, the value of the nth octet in the Pad field of the generated PFC response message is 11, and the value of the mth octet is 01. When the upstream interconnect device's PFC function status is abnormal, the value of the nth octet in the Pad field of the generated PFC response message is 11, and the value of the mth octet is 10.
[0085] When a network device receives a PFC message returned by an upstream interconnect device, it finds that the value of the nth octets in the Pad field of the PFC message is 11 and the value of the mth octets is not empty. It then determines that the PFC message is a PFC response message corresponding to the PFC probe message. Based on the value of the mth octets, it determines whether the PFC function status of the upstream interconnect device is normal or abnormal.
[0086] In this embodiment, when the network device establishes the PFC functional status table locally, it can directly record the PFC functional status of each interconnected device in the PFC functional status table, or it can set the mode of each port connected to the interconnected device on the network device according to the PFC functional status of each interconnected device, and record the mode of each port on the network device in the PFC functional status table. The mode of each port represents the PFC functional status of each interconnected device. Based on this, the network device can establish and update the PFC functional status table in the following two ways.
[0087] In one implementation, step S304 may specifically include: establishing or updating a PFC function status table based on the correspondence between the device identifier of each interconnected device and the PFC function status.
[0088] For example, DUT1 actively detects the PFC functional status of all interconnected devices by periodically sending PFC probe messages. Then, it can establish a PFC functional status table based on the correspondence between the device identifier of each interconnected device and the PFC functional status, as shown in Table 1.
[0089] Table 1
[0090] DUT2 abnormal DUT3 normal DUT4 normal ... ...
[0091] If a change in the PFC functional status of an interconnected device is detected subsequently, Table 1 will be updated. For example, if the PFC functional status of device DUT3 is detected to become abnormal, Table 1 will be updated to obtain Table 2.
[0092] Table 2
[0093] DUT2 abnormal DUT3 abnormal DUT4 normal ... ...
[0094] In another implementation, step S304 may specifically include: if the PFC function status of the interconnected device is abnormal, then setting the port on the network device connected to the interconnected device to error mode; if the PFC function status of the interconnected device is normal, then setting the port on the network device connected to the interconnected device to normal mode; and establishing or updating the PFC function status table based on the device identifier of each interconnected device, the correspondence between the identifier and mode of the port on the network device connected to each interconnected device, and the PFC function status table.
[0095] For example, DUT1 actively detects the PFC functional status of all interconnected devices by periodically sending PFC probe messages. Based on the PFC functional status of the interconnected devices, it sets the mode of the ports connected to each interconnected device on the network device. When the PFC functional status of an interconnected device is abnormal, the mode of the port connected to that interconnected device is set to error mode; when the PFC functional status of an interconnected device is normal, the mode of the port connected to that interconnected device is set to normal mode. Finally, based on the device identifier of each interconnected device, the identifier of the port connected to each interconnected device on the network device, and the corresponding mode, a PFC functional status table as shown in Table 3 is established.
[0096] Table 3
[0097] DUT2 IF2 error DUT3 IF3 normal DUT4 IF4 normal ... ... ...
[0098] If a change in the PFC functional status of an interconnected device is detected subsequently, Table 3 will be updated. For example, if the PFC functional status of device DUT3 is detected to become abnormal, Table 3 will be updated to obtain Table 4.
[0099] Table 4
[0100] DUT2 IF2 error DUT3 IF3 error DUT4 IF4 normal ... ... ...
[0101] Below, in conjunction with Figure 5 The lossless network traffic control method provided in the embodiments of the present invention will be described in detail. Figure 5 As shown, DUT1 includes four ports: IF1, IF2, IF3, and IF4. IF1 is the outgoing interface of DUT1, IF2 is the port on DUT1 connecting to DUT2, IF3 is the port on DUT1 connecting to DUT3, and IF4 is the port on DUT1 connecting to DUT4. Traffic 2, traffic 3, and traffic 4 are data forwarded from DUT2, DUT3, and DUT4 to DUT1, respectively. After arriving at DUT1, traffic 2, traffic 3, and traffic 4 share a priority queue.
[0102] When DUT1 to DUT4 and the Server enable PFC and PFC probe functions, they will send, receive, and analyze PFC probe messages. When the values of the nth and mth octets in the Pad field of the PFC response message returned by the interconnected device are 11 and 01 respectively, the PFC function status of the interconnected device is recorded as normal. When the values of the nth and mth octets in the Pad field of the PFC response message returned by the interconnected device are 11 and 10 respectively, or when no PFC response message is received within a preset time, the PFC function status of the interconnected device is recorded as abnormal. A PFC function status table is established based on the collected PFC function status of the interconnected devices, and the mode of the port connected to the upstream interconnected device is set. For example, DUT1 records the PFC function status of DUT3 and DUT4 as normal, records the PFC function status of DUT2 as abnormal, and sets the IF2 port of DUT1 to PFC error mode (in this mode, it can still receive and process PFC probe messages, but when data congestion occurs, this port will not perform backpressure). When the device is congested, it will no longer send PFC backpressure messages.
[0103] When network devices experience data congestion, they send PFC backpressure messages to devices with normal PFC functionality according to the PFC function status table, reducing their data transmission rate and achieving zero packet loss. For example, if traffic 2, traffic 3, and traffic 4 are all at 5G, and the IF1 port of DUT1 has a rate of 10G, when the cache used by the priority queue shared by traffic 2, traffic 3, and traffic 4 exceeds the PFC threshold, DUT1 will experience traffic congestion. At this time, the PFC function status table is checked, and it is determined that the IF2 port is in PFC error mode. PFC backpressure messages are not sent to DUT2, traffic 2 is forwarded at full rate, and PFC backpressure messages are sent to DUT3 and DUT4, suppressing the rates of traffic 3 and traffic 4 to 2.5G. After traffic suppression, traffic 1 on the IF1 port of DUT1 is at the 5G rate of traffic 2, and traffic 3 and traffic 4 are each at the 2.5G rate, achieving the effect of zero packet loss in network traffic forwarding.
[0104] In one scenario, when an upstream device periodically sends PFC probe messages and detects that the PFC function status of an interconnected device has returned to normal, it updates the PFC function status table. When traffic congestion occurs, it resumes sending PFC backpressure messages to that interconnected device. For example, after DUT1 detects that the PFC function of DUT2 has returned to normal via PFC probe messages, DUT1 updates the PFC function status of DUT2 to normal and sends PFC backpressure messages to DUT2. The rates of traffic 2, traffic 3, and traffic 4 will generally be suppressed to 3.33G (the different traffic rates will vary, but the total rate of the three flows after suppression is 10G).
[0105] In another scenario, when an upstream device periodically sends PFC probe messages and detects a sudden abnormality in the PFC function status of an interconnected device, it will also update its PFC function status table, setting the corresponding port to PFC error mode. When traffic congestion occurs, it will not send PFC backpressure messages to that interconnected device. For example, if the PFC function of DUT3 suddenly malfunctions, DUT1 updates its PFC function status table and sets the PFC function status of DUT3 to an abnormal state. The IF3 port is set to PFC error mode, and no PFC backpressure messages are sent to DUT3. Traffic 3 is forwarded at full rate, while PFC backpressure messages are sent to DUT2 and DUT4, suppressing the rates of traffic 2 and traffic 4 to 2.5G. After this traffic suppression, traffic 1 on the IF1 port of DUT1 is at the 5G rate of traffic 3, while traffic 2 and traffic 4 are each at 2.5G rates, achieving the effect of no packet loss during network traffic forwarding.
[0106] It is evident that the design of this invention is universal and applicable to lossless networks. Without altering the user's original topology, it can proactively detect nodes with abnormal flow control functions in the network and then automatically adjust the allocation of device resources based on the device status, making the network more intelligent and achieving zero-packet loss data transmission even when some devices in the lossless network have abnormal flow control functions.
[0107] To perform the corresponding steps in the above embodiments and various possible methods, an implementation of a lossless network flow control device is given below. Please refer to... Figure 6 This is a functional block diagram of a lossless network traffic control device 600 provided in an embodiment of the present invention. It should be noted that the basic principle and technical effects of the lossless network traffic control device 600 provided in this embodiment are the same as those in the above embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments. The lossless network traffic control device 600 includes: a determining module 610 and a processing module 620.
[0108] The determination module 610 is used to determine, when data congestion occurs in the network device, the PFC function status table currently stored in the network device to identify the PFC function abnormal devices and the PFC function normal devices among the upstream interconnected devices of the network device; the PFC function status table is used to record the PFC function status of all interconnected devices of the network device.
[0109] It is understood that the determining module 610 can perform the above step S201.
[0110] The processing module 620 is used to send PFC backpressure messages to devices with normal PFC function and not to send PFC backpressure messages to devices with abnormal PFC function, so as to suppress the data transmission of devices with normal PFC function and keep the data transmission rate of devices with abnormal PFC function unchanged.
[0111] It is understood that the processing module 620 can perform the above step S202.
[0112] Alternatively, please refer to Figure 7 The lossless network flow control device 600 may further include a PFC probe module 630, which is used to periodically send PFC probe messages to all interconnected devices of the network device; if a PFC response message is received from an interconnected device based on the PFC probe message within a preset time, the PFC function status of the interconnected device is determined to be normal or abnormal based on the PFC response message; if a PFC response message is not received from an interconnected device based on the PFC probe message within a preset time, the PFC function status of the interconnected device is determined to be abnormal; and a PFC function status table is established or updated based on the PFC function status of each interconnected device.
[0113] It is understood that the PFC detection module 630 can perform the above steps S301 to S304.
[0114] Optionally, the PFC response message includes an extended field. Specifically, the PFC detection module 630 is used to determine that the PFC function status of the interconnected device is normal if the value of the preset byte of the extended field of the PFC response message is a first preset value, and to determine that the PFC function status of the interconnected device is abnormal if the value of the preset byte of the extended field of the PFC response message is a second preset value.
[0115] In one embodiment, the PFC detection module 630 can be specifically used to establish or update the PFC function status table based on the correspondence between the device identifier of each interconnected device and the PFC function status.
[0116] In one implementation, the PFC detection module 630 can be specifically used to set the port connected to the interconnecting device on the network device to error mode if the PFC function status of the interconnecting device is abnormal; and to set the port connected to the interconnecting device on the network device to normal mode if the PFC function status of the interconnecting device is normal; and to establish or update the PFC function status table according to the device identifier of each interconnecting device, the correspondence between the identifier of the port connected to each interconnecting device on the network device and the mode.
[0117] The lossless network traffic control device provided in this embodiment of the invention includes a determination module and a processing module. The determination module, when data congestion occurs in a network device, determines the upstream interconnected devices with abnormal PFC functionality and those with normal PFC functionality based on the PFC functional status table currently stored in the network device. The PFC functional status table records the PFC functional status of all interconnected devices. The processing module sends PFC backpressure messages to devices with normal PFC functionality but does not send PFC backpressure messages to devices with abnormal PFC functionality, thereby suppressing data transmission by devices with normal PFC functionality and maintaining the data transmission rate of devices with abnormal PFC functionality unchanged. By only applying backpressure to devices with normal PFC functionality, the backpressure intensity of these devices is increased, ensuring that the network device can forward data from upstream interconnected devices normally, thus achieving zero-packet-loss data transmission.
[0118] Please refer to Figure 8 This is a block diagram of a network device 100 provided in an embodiment of the present invention. The network device 100 includes a memory 110, a processor 120, and a communication module 130. The memory 110, processor 120, and communication module 130 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0119] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0120] The processor 120 is used to read / write data or programs stored in the memory 110 and perform corresponding functions. For example, when a computer program stored in the memory 110 is executed by the processor 120, the lossless network flow control method disclosed in the above embodiments can be implemented.
[0121] The communication module 130 is used to establish a communication connection between the network device 100 and other devices through the network, and to send and receive data through the network.
[0122] It should be understood that, Figure 8 The structure shown is only a schematic diagram of the network device 100. The network device 100 may also include components that are larger than... Figure 8 The more or fewer components shown, or having the same Figure 8 The different configurations shown. Figure 8 The components shown can be implemented using hardware, software, or a combination thereof.
[0123] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor 120, implements the lossless network traffic control method disclosed in the above embodiments.
[0124] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0125] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0126] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0127] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A lossless network traffic control method, characterized in that, The method includes: When data congestion occurs in a network device, the PFC (Power Flow Control) functional status table stored in the network device is used to determine the PFC-abnormal and PFC-normal devices among the upstream interconnected devices directly connected to the network device; the PFC functional status table is used to record the PFC functional status of all interconnected devices of the network device. Send PFC backpressure messages to the PFC functioning device with normal function, but do not send PFC backpressure messages to the PFC functioning device with abnormal function, so as to suppress the data transmission of the PFC functioning device with normal function and keep the data transmission rate of the PFC functioning device unchanged. Periodically send PFC probe messages to all interconnected devices of the network device; If a PFC response message is received from the interconnected device based on the PFC probe message within a preset time, the PFC function status of the interconnected device is determined to be normal or abnormal based on the PFC response message. If a PFC response message is not received from the interconnected device based on the PFC probe message within a preset time, the PFC function status of the interconnected device is determined to be abnormal. Establish or update the PFC function status table based on the PFC function status of each interconnected device.
2. The method according to claim 1, characterized in that, The PFC response message includes extended fields; The step of determining whether the PFC function status of the interconnected device is normal or abnormal based on the PFC response message includes: If the value of the preset byte in the extended field of the PFC response message is the first preset value, then the PFC function status of the interconnected device is determined to be normal. If the value of the preset byte in the extended field of the PFC response message is the second preset value, then the PFC function status of the interconnected device is determined to be abnormal.
3. The method according to claim 1, characterized in that, The step of establishing or updating the PFC function status table based on the PFC function status of each interconnected device includes: Based on the correspondence between the device identifiers of each interconnected device and the PFC functional status, a PFC functional status table is established or the PFC functional status table is updated.
4. The method according to claim 1, characterized in that, The step of establishing or updating the PFC function status table based on the PFC function status of each interconnected device includes: If the PFC function of the interconnected device is in an abnormal state, then the port on the network device connected to the interconnected device is set to error mode; if the PFC function of the interconnected device is in a normal state, then the port on the network device connected to the interconnected device is set to normal mode. Based on the device identifier of each interconnected device and the correspondence between the identifier and mode of the port on the network device connected to each interconnected device, a PFC functional status table is established or the PFC functional status table is updated.
5. A lossless network traffic control device, characterized in that, The device includes: The determination module is used to determine, when data congestion occurs in the network device, the PFC function status table currently stored in the network device, the PFC function abnormal devices and the PFC function normal devices among the upstream interconnected devices directly connected to the network device; the PFC function status table is used to record the PFC function status of all interconnected devices of the network device; The processing module is used to send PFC backpressure messages to the PFC function normal device and not send PFC backpressure messages to the PFC function abnormal device, so as to suppress the data transmission of the PFC function normal device and keep the data transmission rate of the PFC function abnormal device unchanged. The PFC detection module is used to periodically send PFC detection messages to all interconnected devices of the network device; if a PFC response message is received from the interconnected device based on the PFC detection message within a preset time, the PFC function status of the interconnected device is determined to be normal or abnormal based on the PFC response message; if a PFC response message is not received from the interconnected device based on the PFC detection message within the preset time, the PFC function status of the interconnected device is determined to be abnormal; a PFC function status table is established or updated based on the PFC function status of each interconnected device.
6. The apparatus according to claim 5, characterized in that, The PFC response message includes extended fields; The PFC detection module is used to determine that the PFC function status of the interconnected device is normal if the value of the preset byte of the extended field of the PFC response message is a first preset value; and to determine that the PFC function status of the interconnected device is abnormal if the value of the preset byte of the extended field of the PFC response message is a second preset value.
7. A network device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the lossless network flow control method as described in any one of claims 1-4.
8. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the lossless network flow control method as described in any one of claims 1-4.
Citation Information
Patent Citations
Auto-negotiation method and device based on priority flow control
CN112039798A