Implementation of intelligent network card congestion control method

Through the congestion control method of the intelligent network card and the use of buffer pre-allocation, WRED policy and bandwidth management technologies, the network congestion problem is solved, the network traffic is efficiently adjusted and optimized, and the stability and smoothness of the network are ensured.

CN118612148APending Publication Date: 2024-09-06CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410863304.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-29
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Existing network technology is difficult to effectively deal with network congestion problems, especially congestion caused by network resource mismatch, unreasonable design, faults or malicious attacks, which affects network smoothness.

Method used

Adopt the congestion control method of the smart network card, through buffer pre-allocation, active discard method, port mapping and back-pressure flow control, output bandwidth management and congestion detection feedback, and use WRED policy and DWRR algorithm to identify packet priority and set loss Packet point and packet loss rate, adjust traffic rate and bandwidth allocation, and achieve effective control of network congestion.

Benefits of technology

Effectively alleviate network congestion, ensure the transmission of high-priority messages, improve egress bandwidth utilization, enhance network stability and flexibility, reduce the impact of faults, and improve network smoothness and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118612148A
    Figure CN118612148A
Patent Text Reader

Abstract

The invention discloses a method for implementing congestion control of an intelligent network card, which comprises the steps of buffer area pre-allocation, active discarding, port mapping and back pressure flow control, output bandwidth management and congestion detection feedback, and has the beneficial effects that: in the implementation of a WRED module of a network card MAC (Media Access Control) port, the flow from the MAC port ensures that messages with different priorities obtain different services, so that the congestion control of the intelligent network card is realized. The messages with high priorities and the real-time service bandwidth can be ensured to the greatest extent; by using an input and output port mapping table, a corresponding input port which causes congestion of an output port and an output port can be efficiently found, and back pressure is given, so that congestion is effectively relieved; the bandwidth utilization rate of the outlet can be greatly improved through congestion detection feedback, and meanwhile, a scheduler and a preceding-stage module can be timely notified when the outlet is congested; the scheme has independence and universality, is small in coupling with a service module, and is easy to transplant.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of high-performance network technology, and in particular to a method for implementing congestion control of an intelligent network card. Background Art

[0002] At present, computer network-based technologies and deployments play a very important role in people's lives. High-speed networks, mobile networks, and the Internet of Things have emerged and developed rapidly. The Internet and its various applications and services frequently appear in our daily lives. With the unprecedented dependence of human beings on the Internet, the smoothness of the network is extremely important.

[0003] With the popularization of the Internet and the rapid development of various online services and applications, global network traffic continues to grow. The transmission of large-capacity content such as video, audio, images and big data has brought tremendous pressure to the network. In addition, there are many reasons for network congestion, such as:

[0004] 1) Network resource mismatch: There is a mismatch between resources in different parts of the network (such as bandwidth, routers, switches, etc.). Some bottleneck nodes may become the bottleneck of the entire network, exacerbating network congestion.

[0005] 2) Improper network design: The design of network topology, routing algorithms, transmission protocols, etc. may not be efficient or flexible enough to adapt to the ever-changing network traffic demands, thus causing congestion problems.

[0006] 3) Network failure or malicious attack: Failure or malicious attack in the network may cause some network nodes or links to be paralyzed, making it impossible for data to flow normally, and eventually causing congestion.

[0007] In order to cope with network congestion, a method for implementing congestion control of smart network card is proposed. Summary of the invention

[0008] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.

[0009] The present invention has been proposed in view of the above-mentioned problems.

[0010] In order to solve the above technical problems, the present invention provides the following technical solutions: a method for implementing congestion control of a smart network card, comprising:

[0011] S1, buffer pre-allocation: divide the virtual space in the total message cache space according to the number of input ports, and each input port corresponds to a virtual space;

[0012] S2, active discard method: When the shared buffer is congested, the WRED policy is used to actively discard low-priority packets based on the packet priority and adjust the interface input traffic rate;

[0013] S3, port mapping, back pressure flow control: For the input part, set a virtual waterline and total back pressure mechanism for each input port. The virio interface does not perform packet loss back pressure, and the optical port uses the WRED packet loss policy. For the output part, the output traffic carries the input port information according to the mapping table. When the output module reaches the waterline, the back pressure scheduler performs back pressure on the corresponding input port.

[0014] S4, output bandwidth management: the network card controls network congestion by allocating bandwidth;

[0015] S5, congestion detection feedback: The network card converts the bandwidth into the effective bytes counted by the IP core of the MAC port, monitors the congestion of the output MAC port, and feeds back the congestion status to the internal speed limit module.

[0016] As a preferred solution for implementing a method for congestion control of an intelligent network card of the present invention, 2 specifically includes:

[0017] S21: Differentiate input messages into different colors according to their priority;

[0018] S22: Setting the starting packet loss point and packet loss rate for packets of different colors;

[0019] S24: Actively discard the messages in the queue according to a certain discard probability, and adjust the traffic rate input from the interface.

[0020] As a preferred solution for implementing a method for congestion control of an intelligent network card of the present invention, S3 is specifically implemented for the output part as follows: a mapping relationship table of input ports and output ports is established. When the bandwidth statistics of the output port reach 90% of the bandwidth, the port mapping table is queried to determine which input ports in the inlet direction mainly cause the back pressure, thereby applying back pressure to the corresponding input ports.

[0021] As a preferred solution for implementing a method for congestion control of an intelligent network card of the present invention, the process of determining the back pressure port is specifically as follows: the cumulative amount of message bytes forwarded from each input port to the output port is counted, and the maximum value is determined by pairwise comparison, thereby determining the input port that needs back pressure.

[0022] As a preferred solution for implementing a method for intelligent network card congestion control of the present invention, the WRED part specifically includes:

[0023] Packet parsing module: used to identify messages and add color labels;

[0024] Random number generation module: used to generate pseudo-random numbers to calculate the probability of packet loss;

[0025] WRED configuration module: used to set the parameters of the WRED algorithm, including queue length threshold and packet loss probability;

[0026] Random packet loss logic processing module: used to decide whether to discard data packets based on the calculated packet loss probability;

[0027] FIFO buffer: used to buffer and count data packets.

[0028] As a preferred solution for implementing a method for intelligent network card congestion control of the present invention, the specific implementation steps of the WRED part include:

[0029] Step 1: The packet is identified by the packet analysis module and a color label is added;

[0030] Step 2: The message enters the random packet loss logic processing module, which compares the queue length upper and lower waterlines and the queue length upper and lower nodes with the queue length input by the FIFO, calculates the packet loss rate generated by the packet loss probability, and determines whether the incoming network data packet is discarded. The calculation result transfers the message to the FIFO for caching, uses a counter to count the number of data in the FIFO, and then feeds the queue length information back to the random packet loss logic processing module;

[0031] Step 3: Take out the message in FIFO and send it to the subsequent module.

[0032] As a preferred solution for implementing a method for congestion control of an intelligent network card of the present invention, the method in which the random number generation module generates pseudo-random numbers is specifically to use a LFSR composed of 7 D flip-flops and 3 XOR gates to generate pseudo-random numbers, and the feedback equation is: x+x4+x5.

[0033] As a preferred solution for implementing a method for congestion control of an intelligent network card of the present invention, S4 specifically performs fair bandwidth allocation through a DWRR algorithm.

[0034] As a preferred solution for implementing a method for congestion control of an intelligent network card of the present invention, the speed limit strategy of the speed limit module includes: when the bandwidth utilization rate of the output MAC port is low, increasing the speed limit value to allow more traffic to be output.

[0035] As a preferred solution for implementing a method for congestion control of an intelligent network card of the present invention, the speed limiting strategy of the speed limiting module also includes: when the output MAC port exceeds the bandwidth, the mapping table is queried at the same time, the input port corresponding to the output message forwarded to the optical port is back-pressured, and the scheduling to the optical port is reduced.

[0036] Beneficial effects of the present invention:

[0037] 1. In the implementation of the WRED module of the MAC port of the network card, the traffic from the MAC port ensures that messages of different priorities receive different services, and the bandwidth of high-priority messages and real-time services can be guaranteed to the maximum extent.

[0038] 2. The use of the input and output port mapping table can efficiently find the corresponding input port that causes the output port congestion and apply back pressure, thereby effectively alleviating the congestion.

[0039] 3. Congestion detection feedback can greatly improve the bandwidth utilization of the export. At the same time, when congestion occurs at the export, the scheduler and the previous module can be notified in time.

[0040] 4. This solution is independent and universal, has little coupling with business modules, and is easy to transplant. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:

[0042] Figure 1 This is an implementation diagram of a method for intelligent network card congestion control of the present invention.

[0043] Figure 2 The present invention provides a WRED module discard probability curve diagram implemented by a method for intelligent network card congestion control.

[0044] Figure 3 The present invention is a WRED module implementation block diagram for a method for intelligent network card congestion control.

[0045] Figure 4 A pseudo-random number generation circuit diagram implemented by a method for congestion control of an intelligent network card according to the present invention.

[0046] Figure 5 A mapping relationship diagram of input ports and output ports implemented by a method for congestion control of an intelligent network card according to the present invention. DETAILED DESCRIPTION

[0047] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0048] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0049] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0050] Secondly, the present invention is described in detail with reference to the schematic diagram. When describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0051] Example 1

[0052] A method for implementing congestion control of a smart network card includes:

[0053] S1, buffer pre-allocation: divide the virtual space in the total message cache space according to the number of input ports, and each input port corresponds to a virtual space.

[0054] S2, active discard method: When the shared buffer is congested, the WRED policy is used to actively discard low-priority packets based on the packet priority and adjust the interface input traffic rate.

[0055] S3, port mapping, back pressure flow control: For the input part, a virtual waterline and total back pressure mechanism are set for each input port. The virio interface does not lose packet back pressure, and the optical port uses the WRED packet loss policy. For the output part, the output traffic carries the input port information according to the mapping table. When the output module reaches the waterline, the back pressure scheduler performs back pressure on the corresponding input port. The back pressure of each port effectively avoids the occurrence of head blocking problems.

[0056] The output part is specifically implemented as follows: establishing a mapping relationship table between input ports and output ports. When the bandwidth statistics of the output port reaches 90% of the bandwidth, querying the port mapping table, determining which input ports in the inlet direction mainly cause the back pressure, and then applying back pressure to the corresponding input ports. The specific determination process is as follows: taking statistics on the cumulative amount of message bytes forwarded from each input port to the output port, determining the maximum value by pairwise comparison, and thus determining the input port that needs back pressure;

[0057] For example Figure 5 As shown in the figure, when the output port mac0 becomes congested, the table is queried to determine that the main causes are the ingress MAC0 and HOST, so back pressure is initiated on the input ports MAC0 and HOST; when there are many input ports, such as in a switch scenario, the parallelism of the hardware can be fully utilized by dividing the input ports into several groups of two or four, performing intra-group comparison, and then comparing the maximum value within the group between groups, and so on, until the maximum value is found, thereby determining the input port and giving priority back pressure.

[0058] S4, output bandwidth management: The network card controls network congestion by allocating bandwidth. Specifically, it uses the DWRR algorithm to fairly allocate bandwidth to avoid some traffic occupying too much network resources and causing congestion;

[0059] S5, congestion detection feedback: The network card monitors the congestion of the output MAC port according to the bandwidth converted from the effective bytes counted by the IP core of the MAC port, and feeds back the congestion status to the internal rate limit module. The rate limit strategy of the rate limit module includes: when the bandwidth utilization of the output MAC port is low, increase the rate limit value to allow more traffic to be output; when the bandwidth of the output MAC port exceeds the limit, query the mapping table at the same time, perform back pressure on the input port corresponding to the output message forwarded to the optical port, and reduce the scheduling to the optical port;

[0060] Among them, S2 specifically includes:

[0061] S21: Differentiate input messages into different colors according to their priority;

[0062] S22: Setting the starting packet loss point and packet loss rate for packets of different colors;

[0063] S24: Actively discard the messages in the queue according to a certain discard probability, and adjust the traffic rate input from the interface.

[0064] In addition, the WRED part specifically includes:

[0065] Packet parsing module: used to identify messages and add color labels;

[0066] Random number generation module: used to generate pseudo-random numbers to calculate the packet loss probability. The random number generation module generates pseudo-random numbers by using an LFSR composed of 7 D flip-flops and 3 XOR gates to generate pseudo-random numbers. The feedback equation is x+x4+x5.

[0067] WRED configuration module: used to set the parameters of the WRED algorithm, including queue length threshold and packet loss probability;

[0068] Random packet loss logic processing module: used to decide whether to discard data packets based on the calculated packet loss probability;

[0069] FIFO buffer: used to buffer and count data packets.

[0070] Example 2

[0071] A method for implementing congestion control of an intelligent network card is implemented. Based on Example 1, the specific implementation steps of the WRED part include:

[0072] Step 1: The packet is identified by the packet analysis module and a color label is added;

[0073] For example, some special packets, such as arp, lldp, lacp, and ivmp, can be labeled green;

[0074] For example, relatively important businesses, relatively important businesses, and businesses with high real-time requirements are marked with yellow labels;

[0075] For example, ordinary network packets and miscellaneous packets with low real-time performance are marked with red labels.

[0076] Step 2: The message enters the random packet loss logic processing module, which compares the queue length upper and lower waterlines and the queue length upper and lower nodes with the queue length input by the FIFO, calculates the packet loss rate generated by the packet loss probability, and determines whether the incoming network data packet is discarded. The calculation result transfers the message to the FIFO for caching, uses a counter to count the number of data in the FIFO, and then feeds the queue length information back to the random packet loss logic processing module;

[0077] Step 3: Take out the message in FIFO and send it to the subsequent module.

[0078] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for implementing congestion control of a smart network card, It is characterized in that include: S1, buffer pre-allocation: divide the virtual space in the total message cache space according to the number of input ports, and each input port corresponds to a virtual space; S2, active discard method: When the shared buffer is congested, the WRED policy is used to actively discard low-priority packets based on the packet priority and adjust the interface input traffic rate; S3, port mapping, back pressure flow control: For the input part, set a virtual waterline and total back pressure mechanism for each input port. The virio interface does not perform packet loss back pressure, and the optical port uses the WRED packet loss policy. For the output part, the output traffic carries the input port information according to the mapping table. When the output module reaches the waterline, the back pressure scheduler performs back pressure on the corresponding input port. S4, output bandwidth management: the network card controls network congestion by allocating bandwidth; S5, congestion detection feedback: The network card converts the bandwidth into the effective bytes counted by the IP core of the MAC port, monitors the congestion of the output MAC port, and feeds back the congestion status to the internal speed limit module.

2. The method for controlling congestion of a smart network card according to claim 1 is implemented as follows: It is characterized in that S2 specifically includes: S21: Differentiate input messages into different colors according to their priority; S22: Setting the starting packet loss point and packet loss rate for packets of different colors; S24: Actively discard the messages in the queue according to a certain discard probability, and adjust the traffic rate input from the interface.

3. The method for controlling congestion of a smart network card according to claim 1 is implemented as follows: It is characterized in that The specific implementation of the output part in S3 is: establish a mapping relationship table between input ports and output ports. When the bandwidth statistics of the output port reach 90% of the bandwidth, query the port mapping table to determine which input ports in the inlet direction mainly cause the back pressure, so as to apply back pressure to the corresponding input ports.

4. The method for controlling congestion of a smart network card according to claim 3 is implemented as follows: It is characterized in that The process of determining the back pressure port is specifically as follows: the cumulative amount of message bytes forwarded from each input port to the output port is counted, and the maximum value is determined by pairwise comparison, so as to determine the input port that needs back pressure.

5. The method for controlling congestion of a smart network card according to claim 1 is implemented as follows: It is characterized in that The WRED part includes: Packet parsing module: used to identify messages and add color labels; Random number generation module: used to generate pseudo-random numbers to calculate the probability of packet loss; WRED configuration module: used to set the parameters of the WRED algorithm, including queue length threshold and packet loss probability; Random packet loss logic processing module: used to decide whether to discard data packets based on the calculated packet loss probability; FIFO buffer: used to buffer and count data packets.

6. The method for controlling congestion of a smart network card according to claim 5 is implemented as follows: Features: The specific steps to implement WRED are as follows: Step 1: The packet is identified by the packet analysis module and a color label is added; Step 2: The message enters the random packet loss logic processing module, which compares the queue length upper and lower waterlines and the queue length upper and lower nodes with the queue length input by the FIFO, calculates the packet loss rate generated by the packet loss probability, and determines whether the incoming network data packet is discarded. The calculation result transfers the message to the FIFO for caching, uses a counter to count the number of data in the FIFO, and then feeds the queue length information back to the random packet loss logic processing module; Step 3: Take out the message in FIFO and send it to the subsequent module.

7. A method for intelligent network card congestion control according to claim 5 or 6, Features: The method for generating pseudo-random numbers by the random number generation module is specifically to generate pseudo-random numbers by using an LFSR composed of 7 D flip-flops and 3 XOR gates, and the feedback equation is: x+x4+x5.

8. The method for controlling congestion of a smart network card according to claim 1 is implemented as follows: Features: S4 specifically uses the DWRR algorithm to fairly allocate bandwidth.

9. The method for controlling congestion of a smart network card according to claim 1 is implemented as follows: Features: The speed limit strategy of the speed limit module includes: when the bandwidth utilization rate of the output MAC port is low, increasing the speed limit value to allow more traffic to be output.

10. The method for controlling congestion of a smart network card according to claim 9 is implemented as follows: Features: The speed limiting strategy of the speed limiting module also includes: when the excess bandwidth of the output MAC port is reached, the mapping table is queried at the same time, back pressure is applied to the input port corresponding to the output message forwarded to the optical port, and scheduling to the optical port is reduced.

Citation Information

Cited By

  • Load balancing method and device of network card, electronic equipment and storage medium

    CN120583038A