Descriptor-based DPU network card priority scheduling method, device, medium and terminal

By calculating the weight of the congestion control block in the DPU network card and using the token mechanism, combined with strict priority and DWRR algorithm, traffic scheduling is optimized, which solves the coupling problem of the internal resources of the network card and priority scheduling in the DCB scenario, and achieves efficient data Packet processing and flow control.

CN118301085BActive Publication Date: 2024-09-27CORE YUNSHENG (HANGZHOU) ELECTRONIC TECH CO LTD
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202410693910.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-27
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

In the DCB scenario, the coupling between the internal resources of the DPU network card and priority scheduling results in complex configuration and prone to congestion, making it difficult to implement lossless queuing.

Method used

Using the descriptor-based DPU network card priority scheduling method, by calculating the weight of the congestion control block, sending tokens and performing control checks based on the number of tokens, the sending or waiting operation of data packets is realized, combining the strict priority algorithm and the DWRR algorithm , optimize traffic scheduling.

Benefits of technology

Priority scheduling is added to the descriptor processing process of the DPU network card to reduce the backlog of messages, implement multiple quality of service functions, ensure flow control requirements, and solve the coupling problem between the internal resources of the network card and priority scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118301085B
    Figure CN118301085B
Patent Text Reader

Abstract

The present application provides a descriptor-based DPU network card priority scheduling method, device, terminal and medium, which implements priority scheduling inside the DPU network card by issuing a preset number of tokens to the congestion control block based on specific weights, and can also configure a variety of different flow control algorithms for a variety of service quality functions to ensure that in DCB scenarios or other flow control services, the message backlog inside the DPU network card is reduced, and the expected flow control requirements are met. This solves the problem of coupling between internal network card resources and priority scheduling in DCB scenarios and the difficulty in implementing lossless queues on network cards in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to a descriptor-based DPU network card priority scheduling method, device, medium and terminal. Background Art

[0002] DPU (Data Processing Unit) NIC is a NIC used for data processing and network acceleration, usually used in data centers and cloud computing environments. The host packet sending process of DPU NIC is usually as follows: the driver organizes the message descriptor and sends it to the NIC through multiple queues, the DPU NIC initiates a DMA request, and finally the NIC gets the real data packet, which can reduce the time the host spends processing DMA requests and improve data transmission efficiency. DPU NICs generally use the chip to cache data packets, but such cache resources are very scarce. Processing data packets of different priorities may require more logic and resources, which increases the complexity of the DPU NIC and further causes congestion.

[0003] DCB (Data Center Bridging) is a technology used in data center networks. It can achieve the coexistence and intercommunication of multiple different types of traffic (such as storage, management, virtualization, etc.) in the same physical network. The main goal of DCB technology is to provide higher bandwidth utilization, lower latency, better quality of service and higher reliability. DCB technology uses a series of standardized protocols and mechanisms, such as Priority Flow Control (PFC), Enhanced Transmission Selection (ETS), etc. DCB can assign different priorities and bandwidths to different types of traffic, and reduce transmission delays by setting up dedicated low-latency channels.

[0004] However, in existing DCB scenarios, since DCB can assign different priorities and bandwidths to different types of traffic, complex configuration is required to ensure that various types of traffic in the network can be properly prioritized. Configuration complexity may lead to configuration errors or inconsistencies, which may affect network performance and stability. In particular, traffic of different priorities may compete for network resources, causing low-priority traffic to be blocked by high-priority traffic for a long time, or high-priority traffic to be affected by insufficient resources. Summary of the invention

[0005] In view of the shortcomings of the prior art mentioned above, the purpose of the present application is to provide a descriptor-based DPU network card priority scheduling method, device, medium and terminal, which are used to solve the coupling between the internal resources of the network card and the priority scheduling in the DCB scenario and the difficulty in realizing the lossless queue of the network card.

[0006] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present application provides a descriptor-based DPU network card priority scheduling method, which is applied to a DPU network card, wherein the DPU network card contains one or more congestion control blocks, and the method comprises: calculating the weight of each congestion control block based on DCB scenario configuration information and internal congestion status information of the DPU network card; sending a corresponding number of tokens to each congestion control block according to the weight of each congestion control block and a preset control algorithm; encapsulating and storing data transmitted to the DPU network card in a corresponding driver descriptor queue, and sending each driver descriptor queue to a corresponding congestion control block; performing a control check according to the number of tokens of the current congestion control block, and based on the control check result, performing a corresponding sending operation or waiting operation on the driver descriptor queue; consuming corresponding tokens based on the message length of the driver descriptor queue to be sent and the preset control algorithm, and updating the number of tokens in the corresponding congestion control block according to the number of tokens remaining after consumption.

[0007] In some embodiments of the first aspect of the present application, a control check is performed according to the number of tokens in the current congestion control block, and based on the control check result, a process of executing a sending operation or a waiting operation on the driver descriptor queue includes: if the control check result is that the number of tokens contained in the current congestion control block is higher than the waterline, a sending operation is executed; if the control check result is that the number of tokens contained in the current congestion control block is lower than the waterline, a waiting operation is executed and the congestion state is maintained until a token is received.

[0008] In some embodiments of the first aspect of the present application, before calculating the weight of each congestion control block, the method is performed as follows: real-time monitoring of the internal congestion status information of the DPU network card is performed to calculate the weight of each congestion control block in real time according to the monitoring results.

[0009] In some embodiments of the first aspect of the present application, the DCB scenario configuration information includes: traffic scheduling algorithm configuration information, bandwidth ratio configuration information for different traffic categories, enhanced transmission selection configuration information, and priority-based traffic control configuration information.

[0010] In some embodiments of the first aspect of the present application, before sending a corresponding number of tokens to each congestion control block, the method is performed as follows: setting the sending frequency of each congestion control block according to the preset control algorithm, and periodically sending a corresponding number of tokens to the corresponding congestion control block according to the sending frequency.

[0011] In some embodiments of the first aspect of the present application, the preset control algorithm includes a strict priority algorithm and a DWRR algorithm, wherein each preset control algorithm includes a corresponding issuance algorithm and a consumption algorithm.

[0012] In some embodiments of the first aspect of the present application, the key value of each congestion control block includes: a port and a traffic category.

[0013] To achieve the above-mentioned purpose and other related purposes, the second aspect of the present application provides a descriptor-based DPU network card priority scheduling device, including: a congestion control block general management module: used to calculate the weight of each congestion control block based on DCB scenario configuration information and the internal congestion status information of the DPU network card; according to the weight of each congestion control block and the preset control algorithm, send a corresponding number of tokens to each congestion control block; a data encapsulation module: used to encapsulate the data transmitted to the DPU network card and store it in the corresponding driver descriptor queue, and send each driver descriptor queue to the corresponding congestion control block; a congestion control block checkpoint module: used to perform a control check according to the number of tokens of the current congestion control block, and based on the control check result, perform a sending operation or a waiting operation on the driver descriptor queue; a congestion control block consumption point module: used to consume the corresponding tokens based on the message length of the driver descriptor queue to be sent and the preset control algorithm, and update the number of tokens in the corresponding congestion control block according to the number of tokens consumed.

[0014] To achieve the above-mentioned purpose and other related purposes, the third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the descriptor-based DPU network card priority adjustment method in the DCB scenario is implemented.

[0015] To achieve the above-mentioned purpose and other related purposes, the fourth aspect of the present application provides an electronic terminal, including: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes the descriptor-based DPU network card priority adjustment method in the DCB scenario.

[0016] As described above, the descriptor-based DPU network card priority scheduling method, device, medium and terminal of the present application have the following beneficial effects: the present invention can add priority-based scheduling to the descriptor processing flow of the DPU network card at a very low cost, and can be flexibly combined with a variety of different traffic control algorithms to achieve a variety of service quality functions, so as to ensure that in the DCB scenario or other flow control services, the message backlog inside the DPU network card is reduced, and the expected flow control requirements are met at the same time. This solves the problem of coupling between the internal resources of the network card and priority scheduling in the DCB scenario in the prior art and the difficulty in realizing the lossless queue of the network card. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1Shown is a flow chart of an embodiment of a descriptor-based DPU network card priority scheduling method of the present application.

[0018] Figure 2 Shown is a flow chart of another embodiment of the descriptor-based DPU network card priority scheduling method of the present application.

[0019] Figure 3 Shown is a structural diagram of an embodiment of a descriptor-based DPU network card priority scheduling device of the present application.

[0020] Figure 4 Shown is a schematic diagram of the structure of an electronic terminal in an embodiment of the descriptor-based DPU network card priority scheduling of the present application. DETAILED DESCRIPTION

[0021] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0022] It should be noted that in the following description, with reference to the accompanying drawings, several embodiments of the present application are described in the accompanying drawings. It should be understood that other embodiments may also be used, and mechanical composition, structure, electrical and operational changes may be made without departing from the spirit and scope of the present application. The following detailed description should not be considered restrictive, and the scope of the embodiments of the present application is limited only by the claims of the published patents. The terms used here are only for describing specific embodiments and are not intended to limit the present application. Spatially related terms, such as "upper", "lower", "left", "right", "below", "below", "lower", "above", "upper", etc., may be used in the text to facilitate the description of the relationship between an element or feature shown in the figure and another element or feature.

[0023] In this application, unless otherwise clearly specified and limited, the terms "install", "connect", "connect", "fix", "hold" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0024] Furthermore, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless there is an indication to the contrary in the context. It should be further understood that the terms "comprise", "include" indicate the presence of the described features, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence or addition of one or more other features, operations, elements, components, items, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Therefore, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C". Exceptions to this definition will only occur when the combination of elements, functions or operations is inherently mutually exclusive in some way.

[0025] In order to solve the problems in the above-mentioned background technology, the present invention provides a descriptor-based DPU network card priority scheduling method, device, medium and terminal, aiming to solve the coupling between the internal resources of the network card and the priority scheduling in the DCB scenario and the problem that the lossless queue of the network card is difficult to implement. At the same time, in order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention is further described in detail through the following embodiments and in combination with the accompanying drawings. It should be understood that the specific embodiments described here are only used to explain the present invention and are not used to limit the invention.

[0026] Before further describing the present invention in detail, the nouns and terms involved in the embodiments of the present invention are explained. The nouns and terms involved in the embodiments of the present invention are applicable to the following interpretations:

[0027] <1> DCB scenario configuration information: DCB (Data Center Bridging) scenario configuration information is a mechanism used to configure communication between switches and servers in a data center network. By configuring DCB scenarios, you can optimize and manage different applications and traffic types.

[0028] <2> PFC configuration: PFC (Priority Flow Control) configuration is a flow control mechanism based on the IEEE 802.1Qbb standard, which is used to prioritize and schedule different types of traffic in a data center network.

[0029] <3> ETS configuration: ETS (Enhanced Transmission Selection) configuration is a bandwidth management mechanism based on the IEEE 802.1Qaz standard, which is used to allocate and manage bandwidth for different types of traffic in a data center network.

[0030] <4> DCBX configuration: DCBX (Data Center Bridging Exchange) configuration is a protocol used to configure communication between switches and servers. It is used to support the configuration and management of DCB scenarios and mechanisms such as PFC and ETS.

[0031] <5> QoS: QoS (Quality of Service) is a network technology used to prioritize and schedule different types of network traffic to ensure the quality and efficiency of network services.

[0032] <6> RoCE protocol: RoCE (RDMA over Converged Ethernet) protocol is a protocol used to implement RDMA (Remote Direct Memory Access) on Ethernet to support high-performance computing and storage applications.

[0033] <7> Port: In computer networks, port refers to a logical concept in network communication, used to identify different network applications and services.

[0034] <8> TC: TC (Traffic Class) is a mechanism for identifying different types of network traffic to support functions such as QoS and bandwidth management.

[0035] <9> Bandwidth ratio configuration information: Bandwidth ratio configuration information is a mechanism used to configure bandwidth ratios for different types of network traffic to implement functions such as bandwidth management and QoS.

[0036] <10> Strict priority algorithm: The strict priority algorithm is an algorithm used to implement QoS. It prioritizes and schedules different types of network traffic to ensure the transmission and service quality of high-priority traffic.

[0037] <11> DWRR algorithm: DWRR algorithm is an algorithm used to implement QoS. It implements bandwidth management and service quality assurance by weighting and scheduling different types of network traffic.

[0038] <12> Driver descriptor queue: Driver descriptor queue is a queue used to manage the sending and receiving of network data packets. It contains relevant information and processing instructions of the data packets and is used to guide the network card to send and receive data packets.

[0039] <13> Atomic operation: Atomic operation is a mechanism to ensure data consistency and security in a multi-threaded or concurrent environment. It avoids data competition and conflicts by locking or performing atomic operations on access to shared resources.

[0040] The embodiment of the present invention provides a descriptor-based DPU network card priority scheduling method, a system for the descriptor-based DPU network card priority scheduling method, and a storage medium storing an executable program for implementing the descriptor-based DPU network card priority scheduling method. As for the implementation of the descriptor-based DPU network card priority scheduling method, the embodiment of the present invention will illustrate an exemplary implementation scenario of the descriptor-based DPU network card priority scheduling.

[0041] It should be noted that the DCB scenario designed by the present invention refers to a DCB scenario at the technical level, that is, by using a series of technologies and protocols to ensure the reliability, performance and manageability of the network, so as to meet the needs of data center applications. These technologies and protocols include PFC (Priority Flow Control), ETS (Enhanced Transmission Selection) and DCBX (Data Center Bridging Exchange), etc. The DPU network card involved in the present invention refers to the intelligent implementation of QOS (Quality of Service) based on priority from the HOST host to the network card entrance. In some embodiments of the present invention, the present invention can be extended to any experimental scenario using PFC and ETS. For example, it can be extended to scenarios such as RoCE (RDMA over Converged Ethernet, Remote Direct Memory Access on Ethernet) protocol to solve the coupling between the internal resources of the network card and the priority scheduling and the difficulty in realizing the lossless queue of the network card.

[0042] like Figure 1 As shown, a flow chart of a descriptor-based DPU network card priority scheduling method in an embodiment of the present invention is shown. The descriptor-based DPU network card priority scheduling method in this embodiment mainly includes the following steps:

[0043] Step S11: Calculate the weight of each congestion control block based on the DCB scenario configuration information and the internal congestion status information of the DPU network card; send a corresponding number of tokens to each congestion control block according to the weight of each congestion control block and a preset control algorithm.

[0044] In one embodiment of the present invention, the DCB scenario configuration information includes but is not limited to: configuration of traffic class TC enablement to classify and manage different types of traffic through TC enablement configuration; configuration of disabling or turning off PFC protocol to configure or troubleshoot a specific network; configuration of ETS enhanced transmission selection to provide allocation and management of different types of traffic; configuration of TSA (Traffic Stream Attributes) and corresponding bandwidth ratio for a specified TC (Traffic Class) to control and manage the transmission of different types of traffic, etc. The above configuration information will be linked with the preset control algorithm to coordinately control the token issuance rate of the congestion control block.

[0045] Furthermore, in this embodiment, considering the line speed control of the DPU network card, no complex weight time slice is involved inside the DPU network card, and the priority between different descriptor tasks is reflected by the synergy of the congestion control block and the consumption algorithm. Therefore, the present invention is designed to issue a preset number of tokens to each congestion control block.

[0046] In one embodiment of the present invention, before calculating the weight of each congestion control block, the method is performed as follows: real-time monitoring of the congestion status information inside the DPU network card is performed to calculate the weight of each congestion control block in real time according to the monitoring result. Before sending a corresponding number of tokens to each congestion control block, the method is performed as follows: setting the sending frequency of each congestion control block according to the preset control algorithm, and periodically sending a corresponding number of tokens to the corresponding congestion control block according to the sending frequency.

[0047] Specifically, the method will monitor the local congestion status in real time, calculate the weight of each congestion control block based on the above DCB configuration and local congestion status, and finally send tokens periodically according to the corresponding weight. The weight refers to the bandwidth ratio based on the line speed. The bandwidth ratio configuration based on the line speed can realize the transmission control and management of different types of traffic by configuring the corresponding bandwidth ratio for different TC traffic categories and traffic flow attributes. For example, more bandwidth can be allocated to key applications to ensure the priority and reliability of their transmission. In addition, the bandwidth ratio configuration based on the line speed can also be used in conjunction with other technologies, such as QoS (Quality of Service) and ECN (Explicit Congestion Notification), to further improve the performance and reliability of the network. For example, QoS technology can be used to implement priority management of different types of traffic to avoid network congestion and performance degradation; ECN technology can be used to achieve rapid response and processing of network congestion to improve the reliability and stability of the network.

[0048] In an embodiment of the present invention, the DCB scenario configuration information includes: traffic scheduling algorithm configuration information, bandwidth ratio configuration information of different traffic categories, enhanced transmission selection configuration information, and priority-based traffic control configuration information.

[0049] In one embodiment of the present invention, the preset control algorithm includes a strict priority algorithm and a DWRR (Weighted Round-Robin) algorithm, wherein each preset control algorithm includes a corresponding issuance algorithm and a consumption algorithm. It should be noted that the DWRR algorithm focuses on achieving fair bandwidth allocation, which is based on weighted round-robin scheduling and introduces the concept of "deficit" to better handle data streams of different priorities. In the DWRR algorithm, each data stream is assigned a weight to represent its priority or bandwidth requirement, and the data streams are arranged into a queue according to the weight, and then scheduled in a round-robin manner.

[0050] Step S12: encapsulate the data transmitted to the DPU network card and store it in the corresponding driver descriptor queue, and send each driver descriptor queue to the corresponding congestion control block.

[0051] In one embodiment of the present invention, the key value of each congestion control block includes: port and traffic category. It should be noted that the content contained in the above key value includes but is not limited to port and traffic category, and the specific key value type can be customized according to a specific DCB scenario to realize the identification, classification and management functions of network traffic. Exemplarily, the content of the key value may also include VLAN identifier, MAC address, IP address and protocol type, etc., to further realize the refined management of network traffic.

[0052] Step S13: performing a control check according to the number of tokens of the current congestion control block, and based on the control check result, executing a corresponding sending operation or waiting operation on the drive descriptor queue.

[0053] In one embodiment of the present invention, a control check is performed according to the number of tokens in the current congestion control block, and based on the control check result, a process of executing a sending operation or a waiting operation on the driver descriptor queue includes: if the control check result is that the number of tokens contained in the current congestion control block is higher than the waterline, a sending operation is executed; if the control check result is that the number of tokens contained in the current congestion control block is lower than the waterline, a waiting operation is executed and the congestion state is maintained until the token is received.

[0054] It should be noted that the waterline described above for determining whether to perform a sending operation is a technology for managing the number of data packets in a buffer. The waterline is a mark used to indicate when the processing of a data packet should be triggered. Exemplarily, in this embodiment, when the number of tokens contained in the congestion control block is higher than the waterline, the system can trigger a corresponding flow control mechanism, such as starting a packet loss strategy or adjusting the processing priority of a data packet or sending data. The setting of the waterline can help the DPU network card to manage internal traffic, prevent buffer overflow or congestion, and ensure the normal operation of the DPU network card, thereby improving the stability and performance of the network. Step S14: Based on the message length of the driver descriptor queue to be sent and the preset control algorithm, the corresponding tokens are consumed, and the number of tokens in the corresponding congestion control block is updated according to the number of tokens remaining after consumption.

[0055] In one embodiment of the present invention, based on the parsed message length and the corresponding consumption algorithm, the updating of the corresponding token is achieved by accessing and modifying the operation through an atomic operation. The number of tokens is stored in the shared memory in the DPU network card. When a token issuance operation or a token consumption operation is required, it is only necessary to access a specific shared space to access and modify the shared resources. It should be noted that an atomic operation refers to an operation that will not be interrupted during execution. Atomic operations are usually used in a multi-threaded environment to ensure that access and modification of shared resources are thread-safe. In a multi-threaded environment, multiple threads may access and modify shared resources at the same time. If thread synchronization measures are not taken, data inconsistency or competition conditions may occur. The atomic operation used in the present invention can ensure that the access and modification of the token are atomic, that is, either all succeed or all fail, and there will be no partial success and partial failure. This can avoid the problems of competition conditions and data inconsistency, and ensure the correctness and reliability of the program in the multi-threaded environment inside the DPU network card.

[0056] It is worth noting that consuming tokens according to a preset control algorithm means that the DCB scenario can configure different scheduling algorithms according to different requirements, where the scheduling algorithms include but are not limited to the strict priority algorithm and the DWRR algorithm (Deficit Weighted Round Robin, DWRR). For example, when the strict priority algorithm is adopted, the congestion control block of each TC category will issue tokens according to the speed limit, and the high-priority TC category will first consume its own and all low-priority congestion control blocks' tokens, so that the low-priority TC category enters the congestion state first, so as to achieve the preemption effect of the high-priority TC category on the low-priority TC category.

[0057] The above describes the process of a descriptor-based DPU network card priority scheduling method in an embodiment of the present invention. Figure 2 A specific embodiment of the present invention is described.

[0058] Figure 2 The present invention is applied to the DPU network card end, wherein the DPU network card end includes a network card driver, a congestion control block general management module, a congestion control block checkpoint, and a congestion control block consumption point.

[0059] like Figure 2 As shown, in this embodiment, when the DPU network card receives a data packet sent by the host, the network card driver classifies the data packet to generate multiple driver descriptor sending queues. Subsequently, the multiple driver descriptor sending queues are mapped in the network card descriptor processing module through ports and traffic categories. When multiple congestion control block checkpoints set in the network card descriptor processing module receive the mapped driver descriptor sending queues, the driver descriptor sending queues are controlled according to the number of tokens contained in the current congestion control block checkpoint. It should be noted that the present invention does not limit the position of the congestion control block checkpoint, and the setting in the network card descriptor processing module here is only used for explanation.

[0060] Furthermore, in this embodiment, the issuance and consumption of the number of tokens in the congestion control block checkpoint are implemented through the control block bucket corresponding to the congestion control block. Specifically, the congestion control block general management module is used to respond to DCB configuration information, to respond to the suspension of an operation or program, to respond to local congestion conditions (DPU network card internal resource usage), to calculate the weight of each congestion control block, and to allocate a corresponding number of tokens to each congestion control block in each control block bucket according to the weight and issuance algorithm.

[0061] Subsequently, multiple congestion control block consumption points set at any point that satisfies the message sending process point perform message length analysis on the drive descriptor sending queue based on the drive descriptor sending queue to be sent, so as to update the number of tokens in the control block bucket according to the message length and the corresponding consumption algorithm, wherein the consumption algorithm and the issuance algorithm are in a corresponding relationship.

[0062] like Figure 3 As shown, a schematic diagram of the structure of a descriptor-based DPU network card priority scheduling device in an embodiment of the present invention is shown. In this embodiment, the descriptor-based DPU network card priority scheduling device 300 includes:

[0063] Congestion control block general management module 301: used to calculate the weight of each congestion control block based on DCB scenario configuration information and DPU network card internal congestion status information. According to the weight of each congestion control block and the preset control algorithm, send a corresponding number of tokens to each congestion control block.

[0064] Data encapsulation module 302: used to encapsulate the data transmitted to the DPU network card and store it in the corresponding driver descriptor queue, and send each driver descriptor queue to the corresponding congestion control block.

[0065] Congestion control block checkpoint module 303: used to perform a control check according to the number of tokens of the current congestion control block, and based on the control check result, perform a sending operation or a waiting operation on the drive descriptor queue.

[0066] The congestion control block consumption point module 304 is used to consume corresponding tokens based on the message length of the drive descriptor queue to be sent and the preset control algorithm, and update the number of tokens in the corresponding congestion control block according to the number of consumed tokens.

[0067] It should be noted that: the descriptor-based DPU network card priority scheduling device provided in the above embodiment only uses the division of the above program modules as an example when performing descriptor-based DPU network card priority scheduling. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the descriptor-based DPU network card priority scheduling device provided in the above embodiment and the descriptor-based DPU network card priority scheduling method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0068] The descriptor-based DPU network card priority scheduling method provided in the embodiment of the present invention can be implemented on the terminal side or the server side. As for the hardware structure of the descriptor-based DPU network card priority scheduling terminal, please refer to Figure 4 , is an optional hardware structure diagram of a descriptor-based DPU network card priority scheduling terminal 400 provided in an embodiment of the present invention. The terminal 400 may be a mobile phone, a computer device, a tablet device, a personal digital processing device, a factory background processing device, etc. The descriptor-based DPU network card priority scheduling terminal 400 includes: at least one processor 401, a memory 402, at least one network interface 404 and a user interface 406. The various components in the device are coupled together through a bus system 405. It can be understood that the bus system 405 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 405 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 4 In the specification, various buses are labeled as bus systems.

[0069] The user interface 406 may include a display, a keyboard, a mouse, a trackball, a click gun, keys, buttons, a touch pad or a touch screen.

[0070] It is understood that the memory 402 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM). The memory described in the embodiments of the present invention is intended to include but is not limited to these and any other suitable categories of memory.

[0071] The memory 402 in the embodiment of the present invention is used to store various categories of data to support the operation of the descriptor-based DPU network card priority scheduling terminal 400. Examples of these data include: any executable program used to operate on the descriptor-based DPU network card priority scheduling terminal 400, such as an operating system 4021 and an application 4022; the operating system 4021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application 4022 may include various applications, such as a media player (Media Player), a browser (Browser), etc., for implementing various application services. The descriptor-based DPU network card priority scheduling method provided in the embodiment of the present invention may be included in the application 4022.

[0072] The method disclosed in the above embodiment of the present invention can be applied to the processor 401, or implemented by the processor 401. The processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 401 or the instruction in the form of software. The above processor 401 may be a general processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 401 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present invention. The general processor 401 may be a microprocessor or any conventional processor, etc. In combination with the steps of the accessory optimization method provided in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0073] In an exemplary embodiment, the descriptor-based DPU network card priority scheduling terminal 400 can be used by one or more application-specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD) to execute the aforementioned descriptor-based DPU network card priority scheduling method.

[0074] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

[0075] In the embodiments provided in the present application, the computer readable and writable storage medium may include a read-only memory, a random access memory, an EEPROM, a CD-ROM or other optical disk storage device, a disk storage device or other magnetic storage device, a flash memory, a USB flash drive, a mobile hard disk, or any other medium that can be used to store the desired program code in the form of an instruction or data structure and can be accessed by a computer. In addition, any connection can be appropriately referred to as a computer-readable medium. For example, if the instruction is sent from a website, a server or other remote source using a coaxial cable, an optical fiber cable, a twisted pair, a digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, the coaxial cable, optical fiber cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of the medium. However, it should be understood that computer readable and writable storage media and data storage media do not include connections, carriers, signals, or other temporary media, but are intended to be non-temporary, tangible storage media. Disk and disc, as used in this application, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.

[0076] In summary, the present application provides a descriptor-based DPU network card priority scheduling method, device, terminal and medium. The present invention provides a method for improving the efficiency of descriptor-based DPU network card priority scheduling, adding priority-based scheduling to the descriptor processing flow of the DPU network card, and implementing the priority scheduling inside the DPU network card by issuing a preset number of tokens to the congestion control block based on specific weights. At the same time, a variety of different traffic control algorithms can be configured for a variety of service quality functions to ensure that in the DCB scenario or other flow control services, the message backlog inside the DPU network card is reduced, and the expected flow control requirements are met. Thereby solving the problem of coupling between the internal resources of the network card and priority scheduling in the DCB scenario in the prior art and the difficulty in realizing the lossless queue of the network card. Therefore, the present application effectively overcomes the various shortcomings in the prior art and has a high industrial utilization value.

[0077] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. A descriptor-based DPU network card priority scheduling method, characterized in that: The method is applied to a DPU network card, wherein the DPU network card contains one or more congestion control blocks, and the method includes: Based on the DCB scenario configuration information and the internal congestion status information of the DPU network card, the weight of each congestion control block is calculated; according to the weight of each congestion control block and the preset control algorithm, a corresponding number of tokens are sent to each congestion control block; The data transmitted to the DPU network card is encapsulated and stored in the corresponding driver descriptor queue, and each driver descriptor queue is sent to the corresponding congestion control block; before calculating the weight of each congestion control block, the method is performed as follows: the congestion status information inside the DPU network card is monitored in real time, so as to calculate the weight of each congestion control block in real time according to the monitoring result, and the DCB scenario configuration information includes: traffic scheduling algorithm configuration information, bandwidth ratio configuration information of different traffic categories, enhanced transmission selection configuration information and priority-based traffic control configuration information; before sending a corresponding number of tokens to each congestion control block, the method is performed as follows: the sending frequency of each congestion control block is set according to the preset control algorithm, and the corresponding number of tokens are periodically sent to the corresponding congestion control block according to the sending frequency; Performing a control check according to the number of tokens of the current congestion control block, and executing a corresponding sending operation or waiting operation on the drive descriptor queue based on the control check result; Based on the message length of the drive descriptor queue to be sent and the preset control algorithm, the corresponding tokens are consumed, and the number of tokens in the corresponding congestion control block is updated according to the number of tokens remaining after consumption.

2. The descriptor-based DPU network card priority scheduling method according to claim 1, characterized in that: The process of performing a control check according to the number of tokens of the current congestion control block and performing a sending operation or a waiting operation on the drive descriptor queue based on the control check result includes: If the control check result is that the number of tokens contained in the current congestion control block is higher than the waterline, the sending operation is performed; If the control check result is that the number of tokens contained in the current congestion control block is lower than the waterline, the waiting operation is performed and the congestion state is maintained until the token is received.

3. The descriptor-based DPU network card priority scheduling method according to claim 1, characterized in that: The preset control algorithms include a strict priority algorithm and a DWRR algorithm, wherein each preset control algorithm includes a corresponding issuance algorithm and consumption algorithm.

4. The descriptor-based DPU network card priority scheduling method according to claim 1, characterized in that: The key values ​​of each congestion control block include: port and traffic class.

5. A descriptor-based DPU network card priority scheduling device, characterized in that: include: Congestion control block management module: used to calculate the weight of each congestion control block based on DCB scenario configuration information and DPU network card internal congestion status information; According to the weight of each congestion control block and the preset control algorithm, a corresponding number of tokens are sent to each congestion control block; Before calculating the weight of each congestion control block, the congestion status information inside the DPU network card is monitored in real time, so as to calculate the weight of each congestion control block in real time according to the monitoring result, and the DCB scenario configuration information includes: traffic scheduling algorithm configuration information, bandwidth ratio configuration information of different traffic categories, enhanced transmission selection configuration information and priority-based traffic control configuration information; before sending a corresponding number of tokens to each congestion control block, the sending frequency of each congestion control block is set according to the preset control algorithm, and the corresponding number of tokens are periodically sent to the corresponding congestion control block according to the sending frequency; Data encapsulation module: used to encapsulate the data transmitted to the DPU network card and store it in the corresponding driver descriptor queue, and send each driver descriptor queue to the corresponding congestion control block; A congestion control block checkpoint module: used for performing a control check according to the number of tokens of the current congestion control block, and performing a sending operation or a waiting operation on the drive descriptor queue based on the control check result; Congestion control block consumption point module: used to consume corresponding tokens based on the message length of the drive descriptor queue to be sent and the preset control algorithm, and update the number of tokens in the corresponding congestion control block according to the number of consumed tokens.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the descriptor-based DPU network card priority scheduling method described in any one of claims 1 to 4 is implemented.

7. An electronic terminal, characterized in that: include: Processor and memory; The memory is used to store computer programs; The processor is used to execute the computer program stored in the memory, so that the terminal executes the descriptor-based DPU network card priority scheduling method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Communication data processing method, device and equipment

    CN110022269A

  • Method, device and system for controlling network congestion

    CN111355669A

  • Congestion control method and device based on token scheduling

    CN113543209A

  • Token updating system and method for traffic shaper

    CN113645147A

  • Method for improving network service quality in high-speed network card / DPU

    CN113676416A