A DPU-based intelligent network card network task offloading method and system
By integrating DPU into the smart network card, dynamically offloading network tasks to the DPU processing, the performance bottleneck problem caused by traditional smart network card dependence on CPU is solved, and efficient and flexible network task processing and performance optimization are achieved.
Patent Information
- Application Number
- CN202411189958.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-08-28
AI Technical Summary
In traditional server network architecture, smart network cards rely on CPU when handling complex network tasks, resulting in performance bottlenecks and lack flexibility and scalability, making it difficult to meet high-performance network needs.
Integrate the DPU into the smart network card, monitor network traffic in real time, identify task types and characteristics, dynamically decide whether to uninstall tasks to the DPU for processing, and send task information to the DPU through the smart network card driver, and use the DPU's hardware acceleration function to process, continuously Monitor performance metrics to adjust the uninstall strategy.
It improves network performance and efficiency, releases CPU resources, enhances the flexibility and scalability of the system, and realizes efficient processing and optimization of network tasks.
Smart Images

Figure CN118714101B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of server networks, and in particular relates to a DPU-based intelligent network card network task offloading method and system. Background Art
[0002] As data centers continue to grow in size and complexity, server networks are facing increasing performance challenges. In traditional server network architectures, network tasks, such as packet processing, routing decisions, and security policy implementation, are mostly performed by the central processing unit (CPU). However, as network traffic increases and tasks become increasingly complex, the CPU has gradually become a performance bottleneck, limiting the improvement of key indicators such as network throughput.
[0003] To alleviate this challenge, the industry has begun to explore ways to offload network tasks to other processing units. Among them, using smart network cards to offload some network tasks is a common method. For details, see Figure 2 Smart NIC is a hardware device that integrates multiple network processing functions and can perform some network tasks independently of the CPU. These tasks may include packet parsing, traffic shaping, protocol processing, etc.
[0004] Although Smart NICs have improved network performance to a certain extent, they still rely on the CPU for complex task decision-making and data processing. In addition, as network technology continues to develop, new task types and requirements continue to emerge, making it more difficult to fully meet the needs of high-performance networks by relying solely on Smart NICs, which lack sufficient flexibility. Traditional network task offloading solutions are often limited to specific hardware platforms and software architectures, which makes them limited in scalability. As the scale of data centers continues to expand, this limitation becomes more obvious.
[0005] Therefore, how to improve the existing technology that relies on smart network cards and is more difficult to fully meet the needs of high-performance networks and lacks sufficient flexibility and scalability is a technical problem that urgently needs to be solved. Summary of the invention
[0006] The purpose of the present invention is to provide a method for intelligently offloading network tasks to the DPU, further releasing CPU resources, improving network performance and efficiency, achieving more efficient task offloading, improving flexibility and scalability, and optimizing performance monitoring and scheduling.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:
[0008] In a first aspect, a DPU-based smart network card network task offloading method is provided, comprising the following steps:
[0009] S1: Integrate the DPU into the smart network card and monitor network traffic in real time to analyze and identify the task types and characteristics in the network;
[0010] S2: Based on the identification results of the task types and characteristics in the network, determine whether it is necessary to offload the network task to the DPU. If so, execute step S3;
[0011] S3: Send task related information to DPU through the SmartNIC driver;
[0012] S4: After receiving the task, the DPU uses its built-in hardware acceleration function to process the received task;
[0013] S5: After the DPU completes the processing of the received network task, it returns the processing result to the smart network card driver;
[0014] S6: Continuously monitor network performance and DPU offloading efficiency, and collect specified performance indicator data of the DPU; and dynamically adjust the offloading strategy based on the DPU performance indicator data.
[0015] Preferably, the specific process in step S1 is as follows:
[0016] S11: Integrate DPU into SmartNIC;
[0017] S12: monitor network traffic in real time and parse information of network data packets from the network traffic, where the information of the data packets includes arrival rate, size and protocol type;
[0018] S13: Identify tasks that need to be processed, including routing lookup, firewall rule matching, and encryption and decryption.
[0019] Preferably, step S2 includes the following specific process:
[0020] S21: Obtaining identification results of task types and characteristics in the network;
[0021] S22: Determine whether the network traffic is greater than a set threshold, or whether the task is complex. If the network traffic is greater than or equal to the set threshold or the task is complex, execute step S23. If the network traffic is less than the set threshold, the CPU continues to execute the current task.
[0022] S23: offloading the designated tasks to the DPU for processing.
[0023] Preferably, while in step S21, the loads of the CPU and DPU are monitored in real time. If the real-time load of the CPU is greater than or equal to the set CPU load threshold, and the load of the DPU is less than the set DPU load threshold, the specified task in the CPU is offloaded to the DPU for processing.
[0024] Preferably, in step S3, the smart network card driver sends the task and related information to the DPU, wherein the task related information includes a data packet, a processing requirement and a context.
[0025] Preferably, step S4 includes the following specific process:
[0026] S41: The DPU receives the task and related information and sets the priority of the task;
[0027] S42: Process the tasks in sequence according to the set priority order.
[0028] Preferably, the process of setting the priority of the received task in step S41 is as follows:
[0029] S411: After receiving the tasks, the DPU determines the urgency and importance of each task, and establishes a first-level priority according to the urgency and importance of the tasks;
[0030] S412: Analyze the delay sensitivity of each task, and set the second-level priority for some tasks with the same urgency and importance according to the task delay sensitivity, and set a higher priority for the task with high delay sensitivity;
[0031] S413: Calculate the computing resources required for processing each task, set the third-level priority for some tasks with the same task delay sensitivity according to the required computing resources, and set a higher priority for tasks requiring less computing resources;
[0032] S414: Marking the set priority of the third level priority to all tasks;
[0033] S415: Create a task queue for all marked tasks.
[0034] Preferably, the processing result in step S5 includes the modified data packet, processing status information, and log. After receiving the processing result, the smart network card driver incorporates it into the subsequent network processing process, and the subsequent network processing process includes data packet forwarding, upper layer protocol processing, and application response.
[0035] Preferably, the specified performance indicator data of the DPU collected in step S6 includes latency, throughput and error rate, and the dynamic adjustment of the offloading strategy includes updating the driver, adjusting the DPU configuration and optimizing task scheduling.
[0036] In a second aspect, a DPU-based intelligent network card network task offloading system is provided, including a network traffic monitoring module, an offloading decision module, an intelligent network card driver, a DPU, and a priority setting module, wherein the network traffic monitoring module is connected to the offloading decision module, the offloading decision module is connected to the priority setting module, the priority setting module is connected to the intelligent network card driver, and the intelligent network card driver is connected to the DPU;
[0037] The network traffic monitoring module is used to monitor and analyze network traffic in real time;
[0038] The offloading decision module is used to determine whether the network task needs to be offloaded to the DPU based on the analysis result of the network traffic;
[0039] The smart network card driver is used to send task-related information to the DPU when the offload decision module determines that the network task needs to be offloaded to the DPU, and the task-related information includes data packets, processing requirements, and context;
[0040] The DPU is used to process the received task to be processed using a built-in hardware acceleration function;
[0041] The priority setting module is used to set the processing priority of the task according to the urgency and importance of the task, delay sensitivity and required computing resources.
[0042] The beneficial effects of the present invention include:
[0043] The DPU-based smart network card network task offloading method and system provided by the present invention integrate the DPU into the smart network card, monitor network traffic in real time, and analyze network task types and characteristics; determine whether it is necessary to offload the network task to the DPU, and if so, send task-related information to the DPU through the smart network card driver; after the DPU receives the task, it uses its built-in hardware acceleration function to process the received task; after the DPU completes the processing of the received network task, it returns the processing result to the smart network card driver; continuously monitors network performance and DPU offloading efficiency, and collects specified performance indicator data of the DPU; and dynamically adjusts the offloading strategy based on the performance indicator data of the DPU.
[0044] First, by integrating the DPU into the Smart NIC to offload network tasks and leveraging its powerful hardware acceleration capabilities to offload network tasks, network task processing is made more efficient while reducing the CPU load.
[0045] Secondly, the intelligent network card driver is used to realize intelligent decision-making and scheduling of network tasks. This includes analyzing network traffic, identifying task types, deciding on offloading strategies, and managing task scheduling to ensure efficient processing of network tasks.
[0046] Thirdly, after receiving the task through DPU, the urgency and importance of each task are determined, and the first-level priority is established according to the urgency and importance of the task; the delay sensitivity of each task is analyzed, and for some tasks with the same urgency and importance, the second-level priority is set according to the task delay sensitivity, and a higher priority is set for tasks with high delay sensitivity; the computing resources required for processing each task are calculated, and for some tasks with the same task delay sensitivity, the third-level priority is set according to the required computing resources, and a higher priority is set for tasks requiring less computing resources; the priority after the third-level priority is set is marked on all tasks; the process of establishing a task queue for all marked tasks establishes a multi-level priority, so that each task can be executed according to the created queue according to demand, thereby ensuring the effective execution of each task.
[0047] Finally, by continuously monitoring network performance and DPU offloading efficiency, performance data can be collected and analyzed. Based on this data, the system can dynamically adjust the offloading strategy and task scheduling mechanism to optimize network performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 The figure is a flow chart of the DPU-based intelligent network card network task offloading method of the present invention.
[0049] Figure 2 The figure is a schematic diagram of the principle of the network task offloading method in the prior art.
[0050] Figure 3 It is a schematic diagram of the composition of the DPU-based smart network card network task offloading system of the present invention. DETAILED DESCRIPTION
[0051] The following is combined with Figure 1 The present invention is further described in detail:
[0052] See also Figure 1 , a DPU-based smart network card network task offloading method, comprising the following steps:
[0053] S1: Integrate the DPU into the smart network card and monitor network traffic in real time to analyze and identify the task types and characteristics in the network;
[0054] S2: Based on the identification results of the task types and characteristics in the network, determine whether it is necessary to offload the network task to the DPU. If so, execute step S3;
[0055] S3: Sending task related information to the DPU through the SmartNIC driver, where the task related information includes data packets, processing requirements, and context;
[0056] S4: After receiving the task, the DPU uses its built-in hardware acceleration function to process the received task;
[0057] S5: After the DPU completes the processing of the received network task, it returns the processing result to the smart network card driver, and the processing result includes the modified data packet, processing status information, and log;
[0058] S6: Continuously monitor network performance and DPU offloading efficiency, and collect specified performance indicator data of the DPU; and dynamically adjust the offloading strategy based on the DPU performance indicator data.
[0059] In the existing server architecture, some network tasks are offloaded through smart network cards. Although smart network cards have improved network performance to a certain extent, they still rely on the CPU for complex task decisions and data processing. And with the continuous development of network technology, new task types and requirements continue to emerge, resulting in new performance bottlenecks in the processing of existing network tasks by existing smart network cards. This application integrates NPU in the existing smart network card and utilizes the hardware acceleration function and intelligent scheduling mechanism of DPU to achieve efficient processing and optimization of network tasks.
[0060] First, the DPU is integrated into the smart network card, and the network traffic is monitored in real time, the task types and characteristics in the network are analyzed and identified, and the results of the network traffic analysis are used to determine whether some network tasks need to be offloaded to the NPU for processing. The judgment here is based on the computational complexity of the current task, the current load of the CPU and DPU, and the changes in network traffic to determine the necessity of offloading tasks to the NPU for processing.
[0061] When it is determined that some network tasks need to be offloaded to the DPU for processing based on the current task status and the CPU and DPU load conditions, the task and task-related information are sent to the DPU through the smart network card driver. After receiving the task, the DPU first judges the task and sets the corresponding priority for the task, and then processes the tasks in sequence according to the set priority. After the DPU processes the received task, it returns the processed result to the smart network card driver. The monitoring process of network performance and DPU will continue, and the offloading strategy will be dynamically adjusted based on the performance indicators of the DPU.
[0062] Dynamic adjustment of the offloading strategy based on the performance indicators of the DPU includes real-time monitoring of the performance indicators of the DPU. If the current performance indicators of the DPU integrated in the smart network card are relatively poor and new tasks can no longer be processed effectively and quickly, then the network tasks will be stopped from being offloaded to the corresponding DPU for processing. If it is really necessary to offload the tasks at this time, some tasks in the CPU will be sent to the horizontal local server for processing, or to other lower-level servers for processing.
[0063] In the above scheme, the specific process in step S1 is as follows:
[0064] S11: Integrate DPU into SmartNIC;
[0065] S12: monitor network traffic in real time and parse information of network data packets from the network traffic, where the information of the data packets includes arrival rate, size and protocol type;
[0066] S13: Identify tasks that need to be processed, including routing lookup, firewall rule matching, and encryption and decryption.
[0067] Step S2 includes the following specific processes:
[0068] S21: Obtaining identification results of task types and characteristics in the network;
[0069] S22: Determine whether the network traffic is greater than a set threshold, or whether the task is complex. If the network traffic is greater than or equal to the set threshold or the task is complex, execute step S23. If the network traffic is less than the set threshold, the CPU continues to execute the current task.
[0070] S23: offloading the designated tasks to the DPU for processing.
[0071] Based on the results of the network traffic and task analysis, the offloading decision module determines whether the network task needs to be offloaded to the DPU. The basis for the decision includes the computational complexity of the task, the load of the CPU and DPU, the change of network traffic, etc. When the network traffic is large or the task is complex, the system will offload part of the task to the DPU for processing; when the network traffic is small or the task is simple, the task may continue to be processed by the CPU.
[0072] At the same time as step S21, the loads of the CPU and DPU are monitored in real time. If the real-time load of the CPU is greater than or equal to the set CPU load threshold, and the load of the DPU is less than the set DPU load threshold, the specified task in the CPU is offloaded to the DPU for processing.
[0073] Step S4 includes the following specific processes:
[0074] S41: The DPU receives the task and related information and sets the priority of the task;
[0075] S42: Process the tasks in sequence according to the set priority order.
[0076] The process of setting the priority of the received task in step S41 is as follows:
[0077] S411: After receiving the tasks, the DPU determines the urgency and importance of each task, and establishes a first-level priority according to the urgency and importance of the tasks;
[0078] S412: Analyze the delay sensitivity of each task, and set the second-level priority for some tasks with the same urgency and importance according to the task delay sensitivity, and set a higher priority for the task with high delay sensitivity;
[0079] S413: Calculate the computing resources required for processing each task, set the third-level priority for some tasks with the same task delay sensitivity according to the required computing resources, and set a higher priority for tasks requiring less computing resources;
[0080] S414: Marking the set priority of the third level priority to all tasks;
[0081] S415: Create a task queue for all marked tasks.
[0082] Since different types of tasks have different urgency and importance, different priorities need to be assigned according to the urgency and importance of the tasks, and urgency and importance are the first considerations for setting priorities. For example, emergency tasks related to safety need to be handled first, so their priority is the highest to ensure safety. Therefore, the first-level priority is set according to the urgency and importance of the tasks.
[0083] After setting the first-level priority, for some tasks with the same urgency, the second-level priority needs to be set according to the delay sensitivity of the task. During the task offloading process, the task should be completed within the delay constraint time as much as possible. Therefore, for some tasks with the same urgency, the second-level priority is set according to the delay sensitivity of the task.
[0084] After setting the second-level priority, for tasks with the same delay sensitivity, the third-level priority needs to be set based on the computing resources of the tasks. In the process of task offloading, if computing resources are limited, if the task that requires more computing resources is executed first, the task will occupy computing resources for a long time, and subsequent tasks will need to spend extra time waiting for the previous task to release the computing resources it occupies, affecting the efficiency of the offloading system. Therefore, for the third-level priority setting, tasks with less computing resource requirements are set with a higher priority to release the occupied computing resources as soon as possible.
[0085] After receiving the tasks through DPU, the urgency and importance of each task are determined, and the first-level priority is established according to the urgency and importance of the task; the delay sensitivity of each task is analyzed, and for some tasks with the same urgency and importance, the second-level priority is set according to the task delay sensitivity, and a higher priority is set for tasks with high delay sensitivity; the computing resources required for processing each task are calculated, and for some tasks with the same task delay sensitivity, the third-level priority is set according to the required computing resources, and a higher priority is set for tasks that require fewer computing resources; the priority after the third-level priority is set is marked on all tasks; the process of establishing a task queue for all marked tasks establishes a multi-level priority, so that each task can be executed according to the created queue according to demand, ensuring the effective execution of each task.
[0086] In step S5, after receiving the processing result, the smart network card driver incorporates it into the subsequent network processing flow, and the subsequent network processing flow includes data packet forwarding, upper layer protocol processing and application response.
[0087] In step S6, the specified performance indicator data of the DPU is collected, including latency, throughput, and error rate. Dynamic adjustment of the offloading strategy includes updating the driver, adjusting the DPU configuration, and optimizing task scheduling. Based on the performance data of the DPU, the system can dynamically adjust the offloading strategy. Optimizing network performance involves updating the driver, adjusting the DPU configuration, optimizing task scheduling, etc. Through continuous optimization and adjustment, the system can ensure the best performance of the network task offloading method.
[0088] The smart network card network task unloading method of the present application integrates the DPU into the smart network card in the existing server network architecture, and realizes the unloading of network tasks by modifying the driver and network task scheduling mechanism of the smart network card. During the implementation process, it is necessary to select a suitable DPU model and programming interface according to actual needs to ensure the smooth implementation of the unloading method. By testing the unloading method of the present invention in an actual environment, it can be found that it can significantly improve the performance and processing efficiency of the server network, reduce the burden on the CPU, and improve the stability and reliability of the system. At the same time, the method can also improve resource utilization, reduce energy consumption and operating costs.
[0089] A DPU-based intelligent network card network task offloading system includes a network traffic monitoring module, an offloading decision module, an intelligent network card driver, a DPU, and a priority setting module. The network traffic monitoring module is used to monitor and analyze network traffic in real time; the network traffic monitoring module is connected to the offloading decision module, the offloading decision module is connected to the priority setting module, the priority setting module is connected to the intelligent network card driver, and the intelligent network card driver is connected to the DPU. The offloading decision module is used to determine whether it is necessary to offload the network task to the DPU based on the analysis result of the network traffic. The intelligent network card driver is used to send task-related information to the DPU when the offloading decision module determines that the network task needs to be offloaded to the DPU, and the task-related information includes data packets, processing requirements, and contexts. The DPU is used to process the received tasks to be processed using the built-in hardware acceleration function. The priority setting module is used to set the processing priority of the task according to the urgency and importance of the task, the delay sensitivity, and the required computing resources.
[0090] In summary, the DPU-based smart network card network task offloading method and system provided by the present invention, the DPU-based smart network card network task offloading method, by intelligently offloading network tasks to the DPU, releases CPU resources and improves network performance and efficiency. The method combines the hardware acceleration function and intelligent scheduling mechanism of the DPU to achieve efficient processing and optimization of network tasks. Through continuous performance monitoring and optimization adjustment, the system can ensure optimal network performance and offloading efficiency.
[0091] By integrating the DPU into the smart NIC to offload network tasks and using its powerful hardware acceleration function to offload network tasks, the DPU has high-performance data processing capabilities, can quickly and effectively complete task processing, improve task execution efficiency, make network task processing more efficient, and reduce the CPU load. Intelligent decision-making and scheduling of network tasks are achieved through the smart NIC driver to ensure efficient processing of network tasks. Performance data collection and analysis are achieved by continuously monitoring network performance and DPU offloading efficiency. The system can dynamically adjust the offloading strategy and task scheduling mechanism to optimize network performance. The reorganization of task results and the redistribution of network tasks are achieved, effectively managing task traffic, optimizing network resource utilization, and improving the efficiency and performance of the overall network.
Claims
1. A DPU-based intelligent network card network task offloading method, characterized in that: The following steps are involved: S1: Integrate DPU into smart network card and monitor network traffic in real time, analyze and identify task types and characteristics in the network; S2: Based on the identification results of the task types and characteristics in the network, determine whether it is necessary to offload the network task to the DPU. If so, execute step S3; S3: Send task related information to DPU through the SmartNIC driver; S4: After receiving the task, the DPU uses its built-in hardware acceleration function to process the received task; S5: After the DPU completes the processing of the received network task, it returns the processing result to the smart network card driver; S6: Continuously monitor network performance and DPU offloading efficiency, and collect specified performance indicator data of the DPU; and dynamically adjust the offloading strategy based on the DPU performance indicator data; The specific process in step S1 is as follows: S11: Integrate DPU into SmartNIC; S12: monitor network traffic in real time and parse information of network data packets from the network traffic. The information of the data packets includes arrival rate, size and protocol type; S13: identifying tasks that need to be processed, including routing lookup, firewall rule matching, and encryption and decryption; Step S2 includes the following specific processes: S21: Obtaining identification results of task types and characteristics in the network; S22: Determine whether the network traffic is greater than a set threshold, or whether the task is complex. If the network traffic is greater than or equal to the set threshold or the task is complex, execute step S23. If the network traffic is less than the set threshold, the CPU continues to execute the current task. S23: offloading the specified task to the DPU for processing; At the same time as step S21, the loads of the CPU and the DPU are monitored in real time. If the real-time load of the CPU is greater than or equal to the set CPU load threshold, and the load of the DPU is less than the set DPU load threshold, the specified task in the CPU is unloaded to the DPU for processing; Step S4 includes the following specific processes: S41: The DPU receives the task and related information and sets the priority of the task; S42: Processing the tasks in sequence according to the set priority order; The process of setting the priority of the received task in step S41 is as follows: S411: After receiving the tasks, the DPU determines the urgency and importance of each task, and establishes a first-level priority according to the urgency and importance of the tasks; S412: Analyze the delay sensitivity of each task, and set the second-level priority for some tasks with the same urgency and importance according to the task delay sensitivity, and set a higher priority for the task with high delay sensitivity; S413: Calculate the computing resources required for processing each task, set the third-level priority for some tasks with the same task delay sensitivity according to the required computing resources, and set a higher priority for tasks requiring less computing resources; S414: Marking the set priority of the third level priority to all tasks; S415: Create a task queue for all marked tasks.
2. A DPU-based smart network card network task offloading method according to claim 1, characterized in that: In step S3, the smart network card driver sends the task and related information to the DPU, wherein the task related information includes a data packet, a processing requirement, and a context.
3. The method for offloading network tasks of a smart network card based on DPU according to claim 1, characterized in that: The processing result in step S5 includes the modified data packet, processing status information, and log. After receiving the processing result, the smart network card driver incorporates it into the subsequent network processing process. The subsequent network processing process includes data packet forwarding, upper layer protocol processing, and application response.
4. The method for offloading network tasks of a smart network card based on DPU according to claim 1, characterized in that: In step S6, the specified performance indicator data of the DPU including latency, throughput and error rate are collected, and the dynamic adjustment of the offloading strategy includes updating the driver, adjusting the DPU configuration and optimizing the task scheduling.
5. A DPU-based smart network card network task offloading system, used to implement a DPU-based smart network card network task offloading method according to any one of claims 1 to 4, characterized in that: It includes a network traffic monitoring module, an uninstall decision module, an intelligent network card driver, a DPU, and a priority setting module, wherein the network traffic monitoring module is connected to the uninstall decision module, the uninstall decision module is connected to the priority setting module, the priority setting module is connected to the intelligent network card driver, and the intelligent network card driver is connected to the DPU; The network traffic monitoring module is used to monitor and analyze network traffic in real time; The offloading decision module is used to determine whether the network task needs to be offloaded to the DPU based on the analysis result of the network traffic; The smart network card driver is used to send task-related information to the DPU when the offload decision module determines that the network task needs to be offloaded to the DPU, and the task-related information includes data packets, processing requirements, and context; The DPU is used to process the received task to be processed using a built-in hardware acceleration function; The priority setting module is used to set the processing priority of the task according to the urgency and importance of the task, delay sensitivity and required computing resources.
