Data processing method and device of intelligent network card and intelligent network card

By monitoring and verifying the write operation of the smart network card memory, the stability problem of traditional network cards in cloud service scenarios is solved, a fast recovery and high-reliability smart network card system is realized, and the high stability requirements of cloud services are met.

CN118605902APending Publication Date: 2024-09-06TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202310212892.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-06
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Traditional network cards are difficult to meet the high reliability and stability requirements of cloud service scenarios, causing the reliability and stability of cloud services to be affected.

Method used

By monitoring the write operation of the dynamic management area of ​​the smart network card memory, verify the write error, continue to try to write to eliminate false exceptions, reload the system image after reaching the set number of times, and load the unstarted image from the solid-state memory when recovery is impossible. System image to restore the system.

Benefits of technology

It achieves rapid recovery of smart network cards, improves operational stability, avoids downtime caused by memory abnormalities, and meets the high reliability and stability requirements of cloud services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118605902A
    Figure CN118605902A
Patent Text Reader

Abstract

The invention relates to a data processing method and device of an intelligent network card and the intelligent network card. The method comprises the following steps: when a write-in operation on a dynamic management area of an intelligent network card memory is monitored, obtaining first target write-in data and first actual write-in data of the write-in operation; when the write-in error of the dynamic management area is verified according to the first target write-in data and the first actual write-in data, continuing to write the first target write-in data into the dynamic management area of the memory; when the number of times of writing errors in the dynamic management area reaches a set number of times, reloading the currently running intelligent network card system mirror image; determining a target storage area of the intelligent network card system mirror image in an unstarted state when reloading of the current running intelligent network card system mirror image cannot enable writing of the dynamic management area to be correct; the target storage area is located in the dynamic management area; and reading the system mirror image of the intelligent network card from the target storage area of the intelligent network card, and loading the system mirror image of the intelligent network card in an unstarted state. According to the method, the operation stability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of smart network card technology and cloud technology, and in particular to a data processing method and device for a smart network card, a smart network card, a storage medium, and a computer program product. Background Art

[0002] With the development of cloud technology, users have put forward higher requirements for the reliability and stability of cloud services.

[0003] The network card is an important part of cloud services. As the infrastructure in the cloud scenario, the network card provides the cloud server with an interface for the underlying operating system, so that the upper-layer services of the cloud server can use the hardware through a unified underlying application program interface. Therefore, the stability and reliability of the network card, to some extent, affects the reliability and stability of the cloud service.

[0004] However, traditional network cards are difficult to meet the high reliability and high stability requirements of cloud service scenarios. Summary of the invention

[0005] Based on this, it is necessary to provide a data processing method, device, computer equipment, computer-readable storage medium and computer program product for a smart network card with high reliability and high stability in order to solve the above technical problems.

[0006] In a first aspect, the present application provides a data processing method for a smart network card. The method comprises:

[0007] When a write operation to the dynamic management area of ​​the smart network card memory is monitored, obtaining first target write data and first actual write data of the write operation;

[0008] When a write error in the dynamic management area is verified according to the first target write data and the first actual write data, continuing to write the first target write data into the dynamic management area of ​​the memory;

[0009] When the number of write errors in the dynamic management area reaches a set number, reloading the currently running smart network card system image;

[0010] When reloading the currently running smart network card system image fails to correctly write the dynamic management area, determining a target storage area of ​​the smart network card system image in an unstarted state; the target storage area is located in the dynamic management area;

[0011] The smart network card system image is read from the target storage area of ​​the smart network card, and the smart network card system image in an unstarted state is loaded.

[0012] In a second aspect, the present application also provides a data processing device for a smart network card. The device includes:

[0013] A monitoring module, configured to obtain first target write data and first actual write data of the write operation when a write operation to the dynamic management area of ​​the smart network card memory is monitored;

[0014] a verification module, configured to continue writing the first target write data into the dynamic management area of ​​the memory when a write error in the dynamic management area is verified according to the first target write data and the first actual write data;

[0015] A reloading module, used for reloading the currently running smart network card system image when the number of write errors in the dynamic management area reaches a set number;

[0016] The exception handling module is used to determine the target storage area of ​​the smart network card system image in an unstarted state when reloading the currently running smart network card system image cannot make the dynamic management area write correctly; the target storage area is located in the dynamic management area; read the smart network card system image from the target storage area of ​​the smart network card, and load the smart network card system image in an unstarted state.

[0017] In a third aspect, the present application further provides a smart network card. The smart network card includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0018] When a write operation to the dynamic management area of ​​the smart network card memory is monitored, obtaining first target write data and first actual write data of the write operation;

[0019] When a write error in the dynamic management area is verified according to the first target write data and the first actual write data, continuing to write the first target write data into the dynamic management area of ​​the memory;

[0020] When the number of write errors in the dynamic management area reaches a set number, reloading the currently running smart network card system image;

[0021] When reloading the currently running smart network card system image fails to correctly write the dynamic management area, determining a target storage area of ​​the smart network card system image in an unstarted state; the target storage area is located in the dynamic management area;

[0022] The smart network card system image is read from the target storage area of ​​the smart network card, and the smart network card system image in an unstarted state is loaded.

[0023] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0024] When a write operation to the dynamic management area of ​​the smart network card memory is monitored, obtaining first target write data and first actual write data of the write operation;

[0025] When a write error in the dynamic management area is verified according to the first target write data and the first actual write data, continuing to write the first target write data into the dynamic management area of ​​the memory;

[0026] When the number of write errors in the dynamic management area reaches a set number, reloading the currently running smart network card system image;

[0027] When reloading the currently running smart network card system image fails to correctly write the dynamic management area, determining a target storage area of ​​the smart network card system image in an unstarted state; the target storage area is located in the dynamic management area;

[0028] The smart network card system image is read from the target storage area of ​​the smart network card, and the smart network card system image in an unstarted state is loaded.

[0029] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0030] When a write operation to the dynamic management area of ​​the smart network card memory is monitored, obtaining first target write data and first actual write data of the write operation;

[0031] When a write error in the dynamic management area is verified according to the first target write data and the first actual write data, continuing to write the first target write data into the dynamic management area of ​​the memory;

[0032] When the number of write errors in the dynamic management area reaches a set number, reloading the currently running smart network card system image;

[0033] When reloading the currently running smart network card system image fails to correctly write the dynamic management area, determining a target storage area of ​​the smart network card system image in an unstarted state; the target storage area is located in the dynamic management area;

[0034] The smart network card system image is read from the target storage area of ​​the smart network card, and the smart network card system image in an unstarted state is loaded.

[0035] The above-mentioned smart network card data processing method, device, smart network card, computer storage medium and computer program product monitor the write operation of the dynamic management area of ​​the smart network card memory. When the dynamic management area of ​​the smart network card cannot be written correctly, it attempts to continue writing to eliminate false abnormalities. When the number of write errors in the dynamic management area reaches the set number, the currently running smart network card system image is reloaded, which can achieve millisecond-level rapid recovery of the smart network card system. When the smart network card system still cannot be restored after reloading the currently running smart network card system image, the unstarted system image is reloaded from the solid-state memory to restore the smart network card system, which can solve the situation where the dynamic management area is written incorrectly due to external data. This method can detect memory anomalies in time by monitoring the write of the dynamic management area of ​​the memory, and recover by restoring the smart network card system, avoiding the downtime of the smart network card caused by memory anomalies and improving the stability of the operation of the smart network card. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 An application environment diagram of a data processing method for a smart network card in an embodiment;

[0037] Figure 2 A schematic diagram of a flow chart of a data processing method of a smart network card in one embodiment;

[0038] Figure 3 A schematic diagram of a flow chart of a data processing method of a smart network card in another embodiment;

[0039] Figure 4 A schematic diagram of a flow chart of a data processing method of a smart network card in yet another embodiment;

[0040] Figure 5 is a flow chart of a data processing method of a smart network card in yet another embodiment;

[0041] Figure 6 is a system framework diagram of a traditional smart network card system in an embodiment;

[0042] Figure 7 A system framework diagram of a smart network card system in one embodiment of the present application;

[0043] Figure 8 A schematic diagram of a process of starting a smart network card system in one embodiment;

[0044] Fig. 9 A schematic diagram of a process flow of exception handling of a smart network card system in an embodiment;

[0045] Fig.10 A schematic diagram of a process of upgrading a smart network card system image in one embodiment;

[0046] Fig.11 A schematic diagram of a smart network card system image upgrade process in an embodiment;

[0047] Fig.12 A schematic diagram of a process for verifying upgrade image data of an intelligent network card system in one embodiment;

[0048] Fig.13 is a structural block diagram of a data processing device of a smart network card in an embodiment;

[0049] Fig.14 FIG. 4 is a diagram showing the internal structure of a smart network card in an embodiment. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0051] The data processing method of the smart network card provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, through the smart network card 106, the user terminal 102 of the cloud platform and the cloud platform 108 are connected, and the smart network card 106 is also connected to the smart network card management terminal 104. The smart network card management terminal 104 can be used to realize the management of the upgrade and configuration of the smart terminal. Among them, the user terminal 102 can be but not limited to various desktop computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The cloud platform 108 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms. The smart network card management terminal can be but not limited to various desktop computers, laptops, smart phones and tablets.

[0052] Among them, cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.

[0053] In one embodiment, a data processing method for an intelligent network card is provided. Figure 1 Take the intelligent network card in the cloud computing scenario as an example to illustrate. The intelligent network card can be applied to cloud technology application scenarios. As the infrastructure in the cloud scenario, it provides the interface of the underlying operating system for the cloud server, and enables the upper-layer business of the cloud server to use the hardware through the unified underlying application program interface. The cloud server can be a cloud host in the cloud computing scenario, and the cloud host runs cloud computing applications. The cloud server can also provide data services for the cloud servers in the data center.

[0054] A data processing method for an intelligent network card, such as Figure 2 As shown, the following steps are included:

[0055] Step 202: When a write operation to the dynamic management area of ​​the smart network card memory is monitored, first target write data and first actual write data of the write operation are obtained.

[0056] To ensure the high reliability of the operation of the smart network card, the use of the smart network card memory is divided into a dynamic management area and a static management area. Among them, the static management area is responsible for saving the required memory in the smart network card system for a long time. No matter how the system changes during execution, it will not overwrite and erase the unauthorized modifications. The dynamic management area is the system image execution area, which is used to store the code segment and data segment of the smart network card system.

[0057] Different management strategies are adopted in this embodiment for different management areas of the memory to ensure the high reliability of the operation of the smart network card. Specifically, an observation checkpoint can be injected into the write point of the system memory, and data verification can be performed every time the dynamic management area is written. Among them, the observation checkpoint can be injected into the write point of the system memory by burying the point at the write point of the system memory. When a write operation to the dynamic management area of ​​the smart network card memory is monitored, the first target write data and the first actual write data of the write operation are obtained.

[0058] Specifically, when a write operation to the dynamic management area of ​​the smart network card memory is monitored, the first target write data to be written is read. In response to the system write operation, the first target write data is written to the dynamic management area. The written first actual write data is read out.

[0059] Step 204: When a write error in the dynamic management area is verified based on the first target write data and the first actual write data, continue to write the first target write data into the dynamic management area of ​​the memory.

[0060] Specifically, the consistency of the first target write data and the first actual write data is verified to verify whether there is a write error in the dynamic management area. If the first target write data and the first actual write data are consistent, it indicates that the dynamic management area is normal. At this time, the process can return to step 202 to continue monitoring the write operation of the dynamic management area.

[0061] If the first target write data and the first actual write data are inconsistent, it means that there may be a memory failure, and the dynamic management area write error is caused by the memory failure. There are many reasons for memory failure. One of them is that the device is hit by high-energy particle rays, causing an abnormality, such as a bit flip, which causes a temporary memory failure. For the application scenarios of smart network cards that need to meet high reliability requirements, the most serious case of memory failure is that it causes the smart network card to crash, which in turn causes service interruptions in cloud technology application scenarios, affecting user use. To address this problem, when the dynamic management area write error is determined based on the first target write data and the first actual write data, at this time, you can continue to try to write the first target write data into the dynamic management area of ​​the memory.

[0062] Step 206: When the number of write errors in the dynamic management area reaches a set number, the currently running smart network card system image is reloaded.

[0063] In order to accurately verify whether a real abnormality occurs in the dynamic management area, a threshold for dynamic management area write errors can be set. For example, the threshold can be set to three times based on experience. When the number of dynamic management area write errors is compared with the set number, false abnormalities can be excluded. When the number of dynamic management area write errors reaches the set number, the currently running smart NIC system image is reloaded.

[0064] The smart network card system framework of this embodiment sets up dual mirroring to meet the requirements of system exception handling in cloud scenarios. Two areas are divided in the dynamic management area of ​​the system, namely the main mirror storage partition and the backup mirror storage partition. The main mirror storage partition is used to store the main mirror of the smart network card system, and the backup mirror storage partition is used to store the backup mirror of the smart network card system.

[0065] Normally, when the Smart NIC is started, the main image of the Smart NIC system is started. When the main image of the Smart NIC system fails to start and the switching condition is met, the backup image of the Smart NIC system can also be started. When a write error occurs in the dynamic management area of ​​the captured memory, the Smart NIC system image in the unstarted state is the system image that is not currently started. For example, if the main system image of the Smart NIC system is currently running, the Smart NIC system image in the unstarted state is the backup image of the Smart NIC system. If the backup image of the Smart NIC system is currently running, the Smart NIC system image in the unstarted state is the main image of the Smart NIC system.

[0066] The target storage area is a storage partition of the unstarted smart network card system image in the smart network card external memory, wherein the smart network card system main image is stored in the main image storage partition, and the smart network card system backup image is stored in the backup image storage partition of the smart network card. If the unstarted smart network card system image is the smart network card system backup image, the target storage partition is the backup image storage partition; if the unstarted smart network card system image is the smart network card system main image, the target storage partition is the main image storage partition.

[0067] Specifically, when a write error occurs in the dynamic management area of ​​the memory, if the memory anomaly is caused by external data and the system operation anomaly is caused, reloading the currently running smart network card system image takes less time than reloading the unstarted system image from the solid-state memory. Moreover, when reloading the currently running smart network card image, the internal data of the system during the last operation will be cleaned up to ensure that the execution environment is clean, so the smart network card system can be quickly restored.

[0068] Step 208 : when reloading the currently running smart NIC system image fails to correctly write the dynamic management area, determine the target storage area of ​​the smart NIC system image that is not started; the target storage area is located in the dynamic management area.

[0069] Specifically, after reloading the currently running smart network card system image, continue to monitor the write operation to the dynamic management area of ​​the smart network card memory. When reloading the currently running smart network card system image fails to write the dynamic management area correctly, the target storage area of ​​the smart network card system image in the unstarted state can be determined, and the smart network card system image is read from the target storage area of ​​the smart network card to load the smart network card system image in the unstarted state. For example, the smart network card system main image is currently running, and when a dynamic management area write error is captured, the smart network card system main image is reloaded. When reloading the smart network card system main image fails to write the dynamic management area correctly, the smart network card system backup image is read from the backup image storage partition of the smart network card to restore the smart network card system. For another example, the smart network card system backup image is currently running, and when a dynamic management area write error is captured, the smart network card system backup image is reloaded. When the dynamic management area cannot be written correctly after reloading the smart network card system backup image, the smart network card system main image is read from the main image storage partition of the smart network card to restore the smart network card system.

[0070] When the Smart NIC memory abnormality is caused by external data and the system runs abnormally, the currently running Smart NIC system image is reloaded. When the currently running Smart NIC system image is reloaded, the internal data of the last run will be cleaned up to ensure that the execution environment is clean, so the Smart NIC system image can be quickly restored. For example, the operation abnormality may be caused by external data rather than a problem with the program code. At this time, reloading and executing the currently running Smart NIC system image can quickly start. When the Smart NIC system image runs abnormally due to hardware failure or internal system reasons, loading the Smart NIC system image that is in an unstarted state can also restore the system operation.

[0071] In comparison, the method of reloading the currently running smart NIC system image can start the smart NIC system more quickly than the method of reloading the unstarted system image from the solid-state memory. Specifically, the method of reloading the currently running smart NIC system image can achieve millisecond-level rapid recovery of the smart NIC system, while the method of reloading the unstarted system image from the solid-state memory can achieve second-level recovery of the smart NIC system.

[0072] Step 210: read the smart network card system image from the target storage area of ​​the smart network card, and load the smart network card system image in an unstarted state.

[0073] From the perspective of actual business scenarios, the situation in which operation abnormalities are caused by external data is far greater than the situation in which operation abnormalities are caused by hardware failures or system internal abnormalities. Therefore, in this embodiment, when the operation abnormality of the smart network card system image is caused by external data, the currently running smart network card system image is reloaded. When the operation abnormality of the smart network card system main image is caused by hardware failures or system internal reasons, if the dynamic management area cannot be written correctly after reloading the currently running smart network card system image, the unstarted system image is reloaded from the solid-state memory to restore the smart network card system. Various operation abnormalities can be quickly recovered.

[0074] In this embodiment, when the dynamic management area still cannot be written correctly after reloading the currently running smart network card system image, the unstarted system image is reloaded from the solid-state memory to restore the smart network card system, which can solve the problem of abnormal operation caused by external data.

[0075] The method monitors the write operation of the dynamic management area of ​​the smart network card memory. When the dynamic management area of ​​the smart network card cannot be written correctly, the method attempts to continue writing to eliminate false anomalies. When the number of write errors in the dynamic management area reaches the set number, the currently running smart network card system image is reloaded, which can achieve millisecond-level rapid recovery of the smart network card system. When the smart network card system still cannot be recovered after reloading the currently running smart network card system image, the unstarted system image is reloaded from the solid-state memory to restore the smart network card system, which can solve the situation where the dynamic management area is written incorrectly due to external data. The method monitors the write of the dynamic management area of ​​the memory, can detect memory anomalies in time, and recover by restoring the smart network card system, avoiding the downtime of the smart network card caused by memory anomalies, and improving the stability of the operation of the smart network card.

[0076] In another embodiment, a data processing method of a smart network card, such as Figure 3 As shown, it also includes:

[0077] Step 302: When a write operation to the static management area of ​​the memory is monitored, obtain second target write data and second actual write data of the write operation.

[0078] The static management area is responsible for preserving the required memory in the smart network card system for a long time. No matter how the system changes during execution, it will not overwrite and erase the unauthorized modifications. For example, the static management area stores the data that is not easy to change when the smart network card system is running, such as the configuration table generated by the business simulator. Once generated, it is not changed much and will only change when the smart network card is powered on and off again. If the data in the static management area cannot be written correctly, it will affect the operation of the smart network card system.

[0079] The observation detection point can be injected into the write point of the system memory by embedding the point at the write point of the system memory. When a write operation to the static management area of ​​the smart network card memory is monitored, the second target write data and the second actual write data of the write operation are obtained.

[0080] Specifically, when a write operation to the static management area of ​​the smart network card memory is monitored, the second target write data to be written is read. In response to the system write operation, the second target write data is written to the dynamic management area. The written second actual write data is read out.

[0081] Step 304: When a write error in the static management area is verified based on the second target write data and the second actual write data, continue to write the second target write data into the static management area of ​​the memory.

[0082] As mentioned above, the static management area is responsible for the memory in the system that has a long-term preservation requirement. No matter how the system changes during execution, it cannot be modified at will. Therefore, the data in the static management area is stable. In order to ensure the correctness of the data written to the static management area and avoid data writing errors in the static management area, in this embodiment, the consistency of the second target write data and the second actual write data is verified to verify whether there is a write error in the static management area. If the second target write data is consistent with the second actual write data, it means that the static management area can be written normally. At this time, it can return to step 302 to continue monitoring the write operation of the static management area.

[0083] Step 306: When the number of static management area write errors reaches a set number, static management area abnormality information is generated and reported.

[0084] When the number of write errors in the static management area reaches the set number, abnormal information of the static management area is generated and reported. In this embodiment, different management strategies are adopted in this embodiment for different management areas of the memory to ensure the high reliability of the operation of the smart network card. For the dynamic management area, when the number of write errors reaches the set number, the system is quickly restored by reloading the smart network card system image, so that the dynamic management area returns to normal. For the static management area, when the number of write errors reaches the set number, abnormal information of the static management area is generated and reported, so that the operation and maintenance personnel can promptly discover the abnormality of the static management area, ensure the accurate writing of the data in the static management area, and improve the reliability and stability of the operation of the smart network card.

[0085] In this embodiment, a static management area is set in the memory of the smart network card system to store data that requires long-term preservation. When monitoring the writing of data in the static management area, the writing accuracy of the static management area is verified. When the number of failed write errors in the static management area reaches a set number, abnormal information of the static management area is generated and reported. The abnormality can be discovered and reported in time to avoid the data generated by the upper-layer application being tampered with when writing, which may cause abnormalities in the upper-layer applications connected to the smart network card system.

[0086] In other embodiments, in order to ensure the stability of the operation of the smart network card, the system also provides a memory monitoring task, which periodically (such as every 5ms) performs a memory scan of the user-specified area, calculates the checksum of the data in the corresponding memory area, and compares it with the checksum of the original data, thereby providing memory security detection services such as unexpected memory rewriting and memory failure during runtime.

[0087] In another embodiment, a data processing method of a smart network card, such as Figure 4 As shown, it also includes:

[0088] Step 402, in response to the scheduler's scheduling request for the hardware status monitoring task, execute the hardware status monitoring task and obtain monitoring results of the monitored smart network card hardware, where the monitoring results include at least one of operating parameters, usage status and abnormality report.

[0089] Specifically, the smart network card system contains hardware resources of various parts. In many scenarios of cloud-based embedded DPU systems, there will be customizable programmable hardware such as FPGA. Since these hardware resources are important in function but not directly facing customers, they will also cause losses to users if problems occur, and the cloud environment is not conducive to troubleshooting.

[0090] In this embodiment, a timed monitoring task is set to monitor the hardware status. The hardware status monitoring task can be executed by the scheduler of the smart network card system. The scheduler can schedule the execution task with 1ms accuracy, and the monitoring task of the smart network card hardware is executed based on the scheduler to ensure millisecond-level monitoring.

[0091] Among them, the usage status, operating parameters and abnormal reports of various hardware resources can be included in the scheduled monitoring task, and the high-precision scheduling service provided by the system can be used to regularly check the information of each hardware component, including the legitimacy of registers, hardware error codes, and execution statistics of each hardware unit. For example, the scheduling execution is carried out with an accuracy of 1ms, and the above statistical information of the hardware is read in the task according to the register list pre-integrated into the system.

[0092] Step 404: Determine the operating status of the monitored smart network card hardware according to the monitoring result of the monitored smart network card hardware.

[0093] Specifically, according to the monitoring results of the monitored smart network card hardware, the hardware of the monitored smart network card is analyzed to determine the operating status of the monitored smart network card hardware. One analysis method may be to set a threshold for the degree of abnormality, and determine the operating status of the smart network card hardware by comparing the monitoring results with the threshold. Among them, for abnormal monitored smart network card hardware, different levels of abnormality such as fatal, non-fatal, and warning can be set according to the degree of impact of the abnormality on the actual operation of the smart network card, and reported in a timely manner.

[0094] Step 406: Report the operating status of the monitored smart network card hardware to the host side.

[0095] One way is that the smart network card periodically reports the operating status of the monitored smart network card hardware to the host side. Another way is to report the abnormal operating status of the smart network card to the host side when the smart network card hardware is detected to be in an abnormal state. After reporting to the host side, the host can repair the corresponding hardware problem according to a predetermined strategy.

[0096] In this embodiment, by monitoring the operating status of the smart network card hardware and reporting the operating status of the smart network card hardware to the host side, abnormal conditions in the smart network card status can be discovered in a timely manner, hardware-level errors can be identified in a timely manner, and reported to the operation and maintenance for timely processing, thereby avoiding user losses and improving the reliability and stability of the smart network card.

[0097] In another embodiment, a data processing method of a smart network card, such as Figure 5 As shown, including:

[0098] Step 502, obtain the smart network card startup request sent by the cloud server through the service interface of the smart network card. In traditional cloud infrastructure, server hosts, switches, routers and network cards mostly use Linux or Linux-derived systems. Since the design goal of the Linux system itself is to be a universal, widely compatible system, it is currently widely used in the cloud, but it is particularly special for embedded systems, and even customized high-performance components such as DPU and GPU in data centers are still not optimized enough. It is difficult to meet the requirements of better operating space and storage space and highly reliable operation and maintenance. Therefore, in the embedded infrastructure on the cloud, some scenarios will encounter constraints in deployment and use. For example, the overall architecture of Linux is complex. Traditional Linux-based smart network card systems such as Figure 6As shown in the figure, the virtual memory is divided into two parts by the operating system: kernel space and user space. The kernel space runs kernel code, and the user space can run the code of multiple user programs. When a process runs in the kernel space, it is in kernel state, and when a process runs in the user space, it is in user state. The kernel space can execute any command and call all system resources, while the user space can only perform simple operations and cannot directly call system resources. It must go through the system interface to issue instructions to the kernel. Through the system interface, the process can switch from user space to kernel space. Therefore, the isolation of user space and kernel space improves security to a certain extent, but also brings the overhead of frequent switching in performance.

[0099] In this embodiment, the framework of the embedded system on the smart network card side is as follows: Figure 7 As shown, it includes: smart network card service, scheduler, hardware and network interface. Among them, the client of the smart network card service accesses the smart network card service through the network interface, and the operation and maintenance personnel of the cloud platform or data center manage the smart network card through the client. The smart network card service is specifically a smart network card system service, which provides a service interface that can be exposed to the upper-layer applications of the cloud computing platform or data center. The upper-layer applications can call the smart network card hardware to provide smart network card services for the upper-layer applications. The smart network card service plays the role of an intermediate layer between the upper-layer applications and the smart network card hardware. Compared with the smart network card of the Linux system, the smart network card hardware and the upper-layer applications are connected through the smart network card service, without the need to frequently switch between the user space and the kernel space, which can reduce the overhead of frequent switching in performance.

[0100] The hardware of the embedded system on the smart network card side may include a processor (CPU), external memory (flash), internal memory, and external input and output devices, wherein the external input and output devices may include FPGA devices, serial ports, and I2C devices, etc. The processor may adopt a single-core hardware environment, or may join multi-core SMP (symmetric multi-processing) and AMP (asymmetric multi-processing) scenarios, thereby increasing the application scope of the smart network card system.

[0101] The scheduler of the embedded system on the smart network card side can provide scheduling services for the smart network card service. Among them, the scheduling algorithm adopted by the scheduling service can be fair scheduling or priority scheduling. Priority scheduling specifically sets the task priority of the tasks of the upper-layer application of the smart network card, and schedules the tasks according to the priority to better ensure real-time performance.

[0102] Based on the service interface of the smart network card, the smart network card receives a smart network card startup request sent by the cloud server of the upper layer application to start the smart network card. The cloud server of the upper layer application may send the smart network card startup request to the service interface of the smart network card when starting.

[0103] Step 504: In response to the startup request, load the system boot program of the smart network card system from the startup storage partition of the smart network card.

[0104] Among them, system boot refers to the process of loading the system kernel into the memory and starting the system, and the system boot program is the program code that can realize the system boot, and the system boot program of the smart network card system is the program code that can realize the smart network card system boot. Among them, the system boot program of the smart network card system is stored in the boot storage partition of the smart network card memory. When the smart network card startup request sent by the cloud server is received, the system boot program of the smart network card system is loaded from the boot storage partition of the smart network card to the memory, and the execution right is handed over to the system boot program by reading the system boot program to realize the startup of the smart network card system.

[0105] Step 506 , executing the system boot program to boot the loading of the smart network card system master image from the master image storage partition of the smart network card to start the smart network card system.

[0106] The smart network card system framework of this embodiment sets up dual-image startup switching to meet the requirements of system exception handling in cloud scenarios. First, two areas are divided on the system storage medium, namely the main image storage partition and the backup image storage partition. The main image storage partition is used to store the main image of the smart network card system, and the backup image storage partition is used to store the backup image of the smart network card system.

[0107] When executing the system boot program, the main image of the smart network card system is loaded from the main image storage partition of the smart network card, and the smart network card system is started by running the main image of the smart network card system. In the process of running the main image of the smart network card system, there may be two situations: the smart network card system starts successfully or fails to start.

[0108] Among them, abnormalities in the main image of the smart network card system, abnormalities in the underlying scheduler, and hardware abnormalities may all lead to the failure of the smart network card system to start up.

[0109] Step 508: When the smart network card system main image startup failure meets the switching condition, the smart network card system backup image is read from the backup image storage partition of the smart network card to start the smart network card system.

[0110] Among them, the switching condition for switching the main image of the smart network card system to the backup image of the smart network card system is pre-set, and the switching condition is usually related to the failure of the main image of the smart network card system to start. When the failure of the main image of the smart network card system to start the switching condition meets the switching condition, the backup image of the smart network card system is read from the backup image storage partition of the smart network card to start the smart network card system. Therefore, when the main image of the smart network card system cannot start the smart network card system normally, the system boot program guides the switch to the backup image of the smart network card system to switch to the system emergency image, so that the smart network card system can perform recovery operations in the emergency image.

[0111] In one implementation, the smart NIC system backup image is an image system file that is the same as the smart NIC system main image. When the smart NIC system main image cannot be started normally, the smart NIC system backup image is switched to start the complete smart NIC system service.

[0112] In one embodiment, the backup image of the smart network card system is a streamlined image system file relative to the main image of the smart network card system, and the backup image of the smart network card system provides basic smart network card system services. This is based on the consideration of the frequency of use and cost of the backup image. Usually, the frequency of use of the backup image is very low. For example, the backup image will be switched to use only when the main image cannot be used normally. However, the complete system image occupies the same flash memory space as the main image when used as a backup image. In the case of low usage, the cost of this backup image is relatively high. Based on this, a backup image is designed to only provide basic smart network card system services, which can reduce the size of the backup image, thereby reducing the flash memory space it occupies, reducing the cost of the backup image, and at the same time realizing redundant backup of dual images.

[0113] Among them, the failure situation of starting the main image of the smart network card system can be compared with the switching condition. If the failure situation of starting the main image of the smart network card system meets the switching condition, the backup image of the smart network card system is read from the backup image storage partition of the smart network card to start the smart network card system. If the failure situation of starting the main image of the smart network card system does not meet the switching condition, the main image of the smart network card system is continuously loaded from the main image storage partition of the smart network card to start the smart network card system until the smart network card system is successfully started, or the failure situation of starting the main image of the smart network card system meets the switching condition, and the backup image of the smart network card system is read from the backup image storage partition of the smart network card to start the smart network card system. Among them, the switching condition can be set to that the number of failures to start the main image of the smart network card system reaches a threshold, or it can be set to that the reason for the failure to start the main image of the smart network card system is that the main image of the smart network card system is abnormal.

[0114] The data processing method of the above-mentioned smart network card obtains the smart network card startup request sent by the cloud server through the service interface of the smart network card, loads the system boot program of the smart network card system from the startup storage partition of the smart network card, and the system boot program first boots the main image of the smart network card system. When the main image of the smart network card system fails to start and meets the switching conditions, the backup image of the smart network card system is booted. On the one hand, when the system is booted, the startup status of the system is monitored. If the main image startup fails to meet the switching conditions, booting the system backup image can quickly start the smart network card, improve the success rate of the smart network card startup, and improve the reliability and stability of the smart network card. On the other hand, the smart network card service plays the role of an intermediate layer between the upper-layer application and the smart network card hardware. Compared with the smart network card of the Linux system, the smart network card hardware and the upper-layer application are connected through the smart network card service, and there is no need to frequently switch between the user space and the kernel space, which can reduce the overhead of frequent switching in performance.

[0115] The switching condition may be set as follows: the number of times the smart NIC system main image fails to start reaches a threshold. That is, when the number of times the smart NIC system main image fails to start reaches a threshold, the smart NIC system backup image is read from the backup image storage partition of the smart NIC to start the smart NIC system.

[0116] Among them, the watchdog can be used to count the number of times the main image of the smart network card system fails to start. Figure 8 As shown, the system boot program boots the main image of the smart network card system from the main image storage partition of the smart network card to start the smart network card system. By detecting the running status of the system, if the startup fails, the number of startup failures is counted. If the number of startup failures does not reach the threshold, the system boot program continues to boot the main image of the smart network card system from the main image storage partition of the smart network card to start the smart network card system. If the number of startup failures reaches the threshold, the system boot program boots the backup image of the smart network card system from the backup image storage partition of the smart network card to start the smart network card system.

[0117] Among them, the backup image of the smart network card system is a simplified image system file relative to the main image of the smart network card system. The backup image of the smart network card system provides basic smart network card system services. When the number of startup failures of the main image of the smart network card system reaches the threshold, it indicates that the booted system main image is abnormal, and the backup image of the smart network card system is loaded from the backup image storage partition of the external memory to ensure that the smart network card provides basic smart network card services for the cloud server. At the same time, the startup abnormality is analyzed and reported to the management client of the smart network card (smart network card management terminal), and maintenance is performed through manual intervention. When the system main image is normal, it is manually switched to the main image of the smart network card system to provide complete smart network card services.

[0118] In this embodiment, in order to meet the requirements of system exception handling in cloud scenarios, the present invention implements dual-image startup switching in abnormal situations. First, two areas are divided on the system storage medium to store the system normal image and the system emergency image respectively. When the system boots, the operating status of the system is detected. If the number of startup failures detected reaches a threshold, the boot is switched to the system emergency image, so that the system can perform recovery operations in the emergency image, which improves the stability of the smart network card system, so that the smart network card can adapt to the high reliability requirements of cloud scenarios.

[0119] Among them, after the smart network card is started, the operation of the smart network card system is monitored. If the smart network card system is detected to be running abnormally, in order to avoid affecting the business processing of the upper-layer application, it is usually necessary to perform abnormal recovery. Taking the smart network card of the Linux system as an example, the traditional Linux system introduces interrupt processing, which increases the overhead of interrupt context switching and increases the complexity and unpredictability of the scheduler. Specifically, when the smart network card of the traditional Linux system captures an abnormal operation, it usually writes the exception into the log for logging, and then switches to the interrupt stack and retains the context. The abnormal information is restored by restarting or replacing the hardware. If the exception can be recovered, the smart network card system continues to run, and if it cannot be recovered, the system crashes. However, this exception handling mechanism has a complex processing process and it is difficult to achieve abnormal recovery. For example, if some hardware or software causes an unrecoverable exception, the Linux system will crash directly. Therefore, the smart network card of the traditional Linux system is not suitable for business scenarios with low latency requirements such as cloud computing or data centers.

[0120] In one embodiment, a dual-image setting can be used. When an abnormal operation of the smart network card system is captured, the currently running smart network card system image is reloaded; when reloading the currently running smart network card system image cannot restore the smart network card system, the target storage area of ​​the smart network card system image in an unstarted state is determined, the smart network card system image is read from the target storage area of ​​the smart network card, and the smart network card system image in an unstarted state is loaded.

[0121] In one embodiment, when the smart network card is usually started, the main image of the smart network card system is started. When the startup of the main image of the smart network card system fails to meet the switching condition, the backup image of the smart network card system can also be started. After starting the backup image of the smart network card system, an alarm analysis of the startup anomaly is performed at the same time, and it is reported to the management client (smart network card management terminal) of the smart network card, and maintenance is performed through manual intervention. When the main image of the system is normal, it is manually switched to the main image of the smart network card system. Therefore, in most cases, the smart network card runs the main image of the smart network card system. When the main image of the smart network card system is captured to be running abnormally, the main image of the smart network card system is reloaded. When the smart network card system still cannot be restored after reloading the main image of the smart network card system, the backup image of the smart network card system is read from the backup image storage partition of the smart network card to restore the smart network card system.

[0122] Based on the above, Fig. 9 As shown, when an abnormal operation of the smart network card system is captured, the abnormality is written into the log record, and the currently running smart network card system image is reloaded. When reloading the currently running smart network card system image cannot restore the smart network card system, the target storage area of ​​the smart network card system image in the unstarted state is determined, the smart network card system image is read from the target storage area of ​​the smart network card, and the smart network card system image in the unstarted state is loaded to restore the smart network card system. The advantage of this exception handling is that when a system exception is captured, the interrupt stack is no longer switched, the system context is no longer retained, the exception type is no longer distinguished, and the exception recovery processing is no longer targeted for different exception types. For all exception types, the system operation abnormality caused by external data abnormality can be solved by reloading the currently running smart network card system image, and the fast smart network card system can be restored. The exception handling delay can reach hundreds of microseconds, while reducing the business disturbance to the upper layer application. When reloading the currently running smart network card system image cannot restore the smart network card system, the system function is completely restored by loading the smart network card system image in the unstarted state, and the exception handling delay can reach seconds. The processing method of the operation exception of this embodiment can realize the indiscriminate processing of the exception types, for example, memory access exceptions, instruction exceptions, recoverable exceptions, and irrecoverable exceptions can all be processed by the system.

[0123] Specifically, when an exception is detected in the operation of the smart network card system, the interrupt stack will no longer be switched, and the system context will no longer be retained, but the task data of the cloud server in the task stack will be retained. After the smart network card system is restored, it will directly return to the task stack, obtain the task data from the task stack and execute it, quickly recovering from the exception without interrupting the processing of the current task. This method simplifies the steps of exception handling. Since it will not interrupt the currently processed task, it can achieve an exception handling delay of hundreds of microseconds, making the user layer unaware of the exception, and can be suitable for business scenarios with low latency requirements such as cloud computing or data centers.

[0124] In one embodiment, when a traditional embedded system needs to upgrade its firmware image, it needs to complete the three steps of writing, restarting, and taking effect. However, restarting the cloud system will cause business interruption, which cannot meet the requirement of unaware service of upper-layer business. Based on this, in this embodiment, a method for online hot upgrade of the system is proposed, which makes it possible to update the system without interrupting the upper-layer business.

[0125] like Fig.10 As shown in the figure, the image upgrade process includes the following steps:

[0126] Step 1002: Receive an image upgrade instruction from the smart network card management terminal through the network interface of the smart network card.

[0127] The smart network card management terminal communicates with the smart network card system through the network interface of the smart network card. The smart network card management terminal is used to manually maintain, monitor, dispatch and manage the smart network card. When the operation and maintenance personnel release the upgrade image data, the image upgrade instruction is sent to the smart network card system. The smart network card system receives the image upgrade instruction sent by the smart network card management terminal through the network interface of the smart network card.

[0128] Step 1004 , in response to the image upgrade instruction, when it is determined that the smart network card meets the upgrade requirements, the upgrade image data is obtained from the smart network card management terminal and stored in the system storage area of ​​the smart network card system.

[0129] Specifically, the smart network card responds to the image upgrade instruction and detects whether the smart network card meets the upgrade requirements. The upgrade requirements may include: whether the data is empty, whether the system is normal, etc. If the data is empty and the system is normal, it meets the upgrade requirements, sends a data transmission signaling to the smart network card management terminal, and obtains the upgrade image data from the smart network card management terminal.

[0130] Specifically, after receiving the data transmission signaling, the smart network card management terminal transmits the upgrade image data to the smart network card. The smart network card system puts the upgrade image data into the system storage area. The system storage area is used to store the programs and data of the smart network card system.

[0131] Step 1006: Load the upgrade image data from the system storage area to the waiting space, start the upgrade image, and write the upgrade image into the external memory of the smart network card.

[0132] After the upgrade image data is transmitted, the upgrade image data is stored in the system storage area of ​​the smart network card system. The upgrade image data is loaded from the system storage area to the waiting space, the hot upgrade image is executed to start the upgrade image, and the upgrade image is written to the solid-state storage medium of the smart network card to complete the solidification image operation.

[0133] like Fig.11 As shown, this upgrade method stores the upgrade image file in the system storage area when running the current system image, and then loads it into the waiting space and starts it to switch to the upgraded system image. As a result, during the image upgrade process, there is no need to restart the smart network card system to avoid business interruption caused by the upgrade, and the upper-layer business is unaware of the upgrade process.

[0134] The upgrade image data is transmitted from the smart network card management terminal to the smart network card in the form of data packets. To ensure the integrity of the data, a communication verification mechanism is used for verification during the data transmission process.

[0135] Specifically, the upgrade image data includes verification information obtained by calculating the upgrade image data using a verification algorithm at the intelligent network card management terminal. The verification algorithm may use a data digest algorithm, including but not limited to CRC (cyclic redundancy check), MD5 (Message-Digest Algorithm 5, message digest algorithm version 5) and SHA (Secure Hash Algorithm).

[0136] Before the steps of loading the upgrade image data into the space to be run, starting the upgrade image, and writing the upgrade image into the external memory of the smart network card, the upgrade image data is verified according to the verification information, and after the upgrade image data verification passes, the steps of loading the upgrade image data into the space to be run, starting the upgrade image, and writing the upgrade image into the external memory of the smart network card are executed.

[0137] Specifically, after receiving the upgrade image data, the smart network card uses the same data summary algorithm to calculate the verification code for the upgrade image data. If the calculated verification code is consistent with the data verification information carried by the upgrade image data, it indicates that the received data is consistent with the sent data and the verification passes.

[0138] By verifying the upgrade image data, the completeness and accuracy of the upgrade image data can be ensured, and after the verification passes, the image hot upgrade is performed to improve the success rate of the image hot upgrade.

[0139] Among them, the upgraded mirror data is transmitted from the smart network card management terminal to the smart network card in the form of a data packet. In order to improve the integrity of the mirror data packet transmission and to be able to handle the mirror data packets with transmission abnormalities in a timely manner, in this embodiment, the verification of the upgraded mirror data can be performed from two dimensions. The first dimension is the verification dimension of the integrity of a single data packet, and the second dimension is the integrity verification dimension of all upgraded mirror data. The advantage of this is that by verifying the integrity of a single data packet, abnormal mirror data packets during the transmission process can be discovered in a timely manner, and the smart network card management terminal can be communicated with in a timely manner, and the upgraded mirror data packet can be sent again by the smart management terminal.

[0140] Specifically, the verification information includes first verification information of each data packet and second verification information of the upgrade image data; the first verification information is obtained by calculating the upgrade image data packet using a first algorithm; the second verification information is obtained by calculating the upgrade image data using a second algorithm.

[0141] like Fig.12 As shown, the upgrade image data is verified according to the verification information, including:

[0142] Step 1202: For each received upgrade image data packet, a first check code is calculated using a first algorithm.

[0143] Among them, the first algorithm can be a cyclic redundancy check algorithm. For each upgrade mirror data packet, a cyclic redundancy check algorithm is used to generate the first verification information. Specifically, a 16- or 32-bit polynomial is added to the upgrade mirror data packet sent by the smart network card management terminal, which is the first verification information attached to the data packet during transmission. The first verification information is transmitted to the smart network card along with the data packet. After receiving the data packet, the smart network card uses a cyclic redundancy check algorithm to add the same polynomial to the upgrade mirror data packet data to obtain the first verification information.

[0144] Step 1204, compare the first verification code and the first verification information to see if they are the same. If they are the same, execute step 1206; if they are different, execute step 1205.

[0145] By comparing the first verification information carried in the data packet with the locally generated first verification code, if the two are the same, it means that the data of the data packet is received successfully and the data is complete.

[0146] Step 1205: The intelligent network card sends verification failure information to the intelligent network card management terminal, and the intelligent network card management terminal sends the upgrade image data packet again.

[0147] Step 1206: The upgrade image data packet passes verification, and the verified upgrade image data packet is sent to the system storage area of ​​the smart network card.

[0148] By comparing the first verification information carried by the data packet with the locally generated first verification code, if the two are the same, it means that the data of the data packet is received successfully and the data is complete, then the upgrade mirror data packet passes the verification, and the verified upgrade mirror data packet is sent to the system storage area of ​​the smart network card.

[0149] Step 1208: After receiving the second verification information, a second verification code is obtained by calculating the upgrade data packet in the intelligent network card system storage area using a second algorithm.

[0150] The second verification information is obtained by calculating the upgrade image data using a second algorithm. The second algorithm may be an MD5 algorithm. The second verification information may be used to characterize the integrity and accuracy of the entire upgrade image data. The second verification information may be transmitted in the header or the tail of the upgrade data packet. After receiving the second verification information, the intelligent network card system calculates the upgrade image data in the system storage area using the second algorithm to obtain a second verification code.

[0151] Step 1210, compare the second verification code and the second verification information to see if they are the same. If they are the same, execute step 1213; if they are different, execute step 1214.

[0152] Step 1213: Abandon the current mirror data upgrade.

[0153] If the second verification code is inconsistent with the second verification information, it means that the received upgrade image data is incomplete, and the current image data upgrade is abandoned.

[0154] Step 1214, the upgraded image data is verified and passed.

[0155] If the second verification code is consistent with the second verification information, it indicates that the received image data is complete and the upgrade image data verification passes.

[0156] In this embodiment, the integrity of the upgraded mirror data is verified from the verification dimension of the integrity of a single data packet and the integrity verification dimension of all upgraded mirror data. When an abnormality is found in the verification of the integrity of a single data packet, the abnormal mirror data packet in the transmission process can be discovered in time, and the intelligent network card management terminal can be communicated with in time. The intelligent management terminal sends the upgraded mirror data packet again, thereby improving the success rate of the integrity verification of the entire upgraded mirror data packet, and further improving the success rate of the mirror hot upgrade.

[0157] The data processing method of the smart network card of the present application is as follows Figure 7 The embedded smart network card system framework shown in the figure sets the main image of the smart network card system and the backup image of the smart network card system, and makes improvements in the following aspects:

[0158] 1. Handle startup exceptions: When the number of startup failures of the main image of the smart network card system reaches a threshold, boot the backup image of the smart network card system. This method can improve the success rate of smart network card startup and improve the reliability and stability of the smart network card.

[0159] 2. Handling of operation exceptions: when an operation exception of the smart network card system is captured, the currently running smart network card system image is reloaded. When reloading the currently running smart network card system image cannot restore the smart network card system, the target storage area of ​​the smart network card system image in the unstarted state is determined, the smart network card system image is read from the target storage area of ​​the smart network card, and the smart network card system image in the unstarted state is loaded to restore the smart network card system. In this way, when an operation exception occurs, the operation exception caused by external data exception can be solved by reloading the currently running smart network card system image, and the smart network card system can be quickly restored. The exception handling delay can reach hundreds of microseconds, and the business disturbance to the upper layer application can be reduced. When reloading the currently running smart network card system image cannot restore the smart network card system, the system function is completely restored by loading the smart network card system image in the unstarted state, and the exception handling delay can reach seconds. This method can make the user layer unaware of the exception, and can be suitable for business scenarios with low latency requirements such as cloud computing or data centers.

[0160] 3. Upgrade processing: receive the image upgrade instruction from the smart network card management terminal through the network interface of the smart network card, respond to the image upgrade instruction, and when it is determined that the smart network card meets the upgrade requirements, obtain the upgrade image data from the smart network card management terminal and store it in the system storage area of ​​the smart network card system, load the upgrade image data from the system storage area to the waiting space, start the upgrade image, and write the upgrade image to the external memory of the smart network card. In this way, there is no need to restart the smart network card system to avoid service interruption caused by the upgrade, and the upper-layer service is not aware of it during the upgrade process.

[0161] 4. Handling of abnormal writing to the dynamic management area. By monitoring the writing operation to the dynamic management area of ​​the smart network card memory, when the dynamic management area of ​​the smart network card cannot be written correctly, by trying to continue writing to eliminate false abnormalities, when the number of write errors in the dynamic management area reaches the set number, reload the currently running smart network card system image, which can achieve millisecond-level rapid recovery of the smart network card system. When the smart network card system still cannot be restored after reloading the currently running smart network card system image, reload the unstarted system image from the solid-state memory, which can solve the situation where the dynamic management area is written due to external data. This method can detect memory abnormalities in a timely manner by monitoring the writing of the dynamic management area of ​​the memory, and recover by reloading the smart network card system, avoiding the downtime of the smart network card caused by memory abnormalities and improving the stability of the operation of the smart network card.

[0162] 5. Handling of abnormal writing to the static management area. By setting up a static management area in the memory of the smart network card system to store data that requires long-term preservation, when monitoring data writing in the static management area, by verifying the accuracy of writing to the static management area, when the number of failed write errors in the static management area reaches the set number, abnormal information about the static management area is generated and reported. This allows for timely detection and reporting of abnormalities, thus preventing data generated by upper-layer applications from being tampered with during writing, which may cause abnormalities in upper-layer applications connected to the smart network card system.

[0163] 6. Hardware status monitoring and processing. By monitoring the operating status of the smart network card hardware and reporting the operating status of the smart network card hardware to the host side, it is possible to promptly discover abnormal conditions in the smart network card status, identify hardware-level errors in a timely manner, and report them to the operation and maintenance department for timely processing, thereby avoiding user losses and improving the reliability and stability of the smart network card.

[0164] The above-mentioned data processing method of the smart network card improves the smart network card in terms of startup, exception handling, upgrade handling, hardware status monitoring, static management area write exception handling, and dynamic management area write exception handling, so that the smart network card system meets the cloud computing equipment requirements of high reliability, strong stability, self-recovery, upgradeability, and high-precision measurable latency required in cloud services. Specifically, it can meet the millisecond system startup time, meet the uninterrupted operation time requirements in years, meet the millisecond system abnormality recovery time requirements, meet the image replacement and millisecond image effectiveness time requirements when the system is online, meet the 10 millisecond processing response requirements required by the PCIE specification, meet the requirements of small system image, fast system service response, short startup time, fast abnormal recovery, and fast and complete overall hot upgrade in long-term cloud devices (365 days x 24 hours uninterrupted, power off), and ensure the working performance indicators of embedded systems on the cloud.

[0165] From the developer's perspective, having an embedded unified development platform on the cloud allows them to complete various upper-level businesses through standard system APIs. They can also use the various rich tools provided by the platform to measure and improve the performance and transparency of upper-level businesses.

[0166] From the perspective of operation and maintenance, it greatly saves deployment time, deployment steps and operation and maintenance processes. The cloud embedded system designed and implemented with this solution can meet the requirements of 24-hour operation. First of all, the size of the entire image is at the level of 500KB, which greatly facilitates system transmission and deployment. Secondly, the system startup time is at the millisecond level, which is quickly in place and suitable for some scenarios with strict timing requirements for the startup time of the entire system. In addition, the system supports abnormal recovery, whether it is hardware abnormality or software abnormality, and converges the system running state to a certain state. The entire abnormal recovery time is at the level of 10 milliseconds. After actual high-stress testing, it can fully meet the high-performance processing requirements.

[0167] As for system upgrades, which are of great concern to operations and maintenance, the system supports complete image hot upgrades, which greatly facilitates defect repair and function iteration in scenarios where the power cannot be turned off online, and increases the robustness of the entire system. The entire hot upgrade time is on the order of 10ms, which does not affect the stability of the entire system. For customers, it is a non-perceptible and highly secure usage experience, which can greatly enhance the user experience.

[0168] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0169] Based on the same inventive concept, the embodiment of the present application also provides a data processing device for an intelligent network card for implementing the data processing method for the intelligent network card involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the data processing device embodiments of one or more intelligent network cards provided below can refer to the limitations of the data processing method for the intelligent network card above, and will not be repeated here.

[0170] In one embodiment, Fig.13As shown, a data processing device of a smart network card is provided, comprising:

[0171] The monitoring module 1302 is used to obtain first target write data and first actual write data of the write operation when a write operation to the dynamic management area of ​​the smart network card memory is monitored.

[0172] The verification module 1304 is used to continue writing the first target write data into the dynamic management area of ​​the memory when verifying the write error of the dynamic management area according to the first target write data and the first actual write data.

[0173] The reloading module 1306 is used to reload the currently running smart network card system image when the number of write errors in the dynamic management area reaches a set number.

[0174] The exception handling module 1308 is used to determine the target storage area of ​​the smart network card system image in an unstarted state when reloading the currently running smart network card system image cannot make the dynamic management area write correctly; the target storage area is located in the dynamic management area; read the smart network card system image from the target storage area of ​​the smart network card, and load the smart network card system image in an unstarted state.

[0175] The data processing device of the smart network card mentioned above monitors the write operation of the dynamic management area of ​​the smart network card memory. When the dynamic management area of ​​the smart network card cannot be written correctly, it attempts to continue writing to eliminate false abnormalities. When the number of write errors in the dynamic management area reaches the set number, the currently running smart network card system image is reloaded, which can achieve millisecond-level rapid recovery of the smart network card system. When the smart network card system still cannot be restored after reloading the currently running smart network card system image, the unstarted system image is reloaded from the solid-state memory to restore the smart network card system, which can solve the situation where the dynamic management area is written incorrectly due to external data. The device can detect memory anomalies in time by monitoring the write of the dynamic management area of ​​the memory, and recover by restoring the smart network card system, avoiding the downtime of the smart network card caused by memory anomalies and improving the stability of the operation of the smart network card.

[0176] In another embodiment, the data processing device of the smart network card further includes:

[0177] The static monitoring module is used to obtain the second target write data and the second actual write data of the write operation when a write operation to the static management area of ​​the memory is monitored.

[0178] The verification module is also used to continue writing the second target write data into the static management area of ​​the memory when a write error in the static management area is verified based on the second target write data and the second actual write data.

[0179] The exception handling module is also used to generate and report static management area exception information when the number of write errors in the static management area reaches a set number.

[0180] In another embodiment, the data processing device of the smart network card further includes:

[0181] The status monitoring module is used to respond to the scheduling request of the scheduler for the hardware status monitoring task, execute the hardware status monitoring task, and obtain the monitoring result of the monitored smart network card hardware, wherein the monitoring result includes at least one of the operating parameters, the usage status and the abnormal report.

[0182] The status analysis module is used to determine the operating status of the monitored intelligent network card hardware according to the monitoring result of the monitored intelligent network card hardware.

[0183] The status reporting module is used to report the operating status of the monitored smart network card hardware to the host side.

[0184] In another embodiment, the data processing device of the smart network card further includes:

[0185] The startup acquisition module is used to obtain the smart network card startup request sent by the cloud server through the service interface of the smart network card.

[0186] The startup execution module is used to load the system boot program of the smart network card system from the startup storage partition of the smart network card in response to the startup request.

[0187] The loading module is used to execute the system boot program to guide the loading of the smart network card system main image from the main image storage partition of the smart network card to start the smart network card system.

[0188] The exception handling module is used to guide the reading of the intelligent network card system backup image from the backup image storage partition of the intelligent network card to start the intelligent network card system when the startup failure of the main image of the intelligent network card system meets the switching condition.

[0189] In another embodiment, the exception handling module is also used to retain the task data of the cloud server in the task stack when an operation exception of the smart network card system is captured; after the smart network card system is restored, the smart network card system obtains the task data from the task stack and executes it.

[0190] In another embodiment, the data processing device of the smart network card further includes:

[0191] The upgrade instruction acquisition module is used to receive the image upgrade instruction of the smart network card management terminal through the network interface of the smart network card.

[0192] The transmission module is used to respond to the image upgrade instruction and, when it is determined that the smart network card meets the upgrade requirements, obtain the upgrade image data from the smart network card management terminal and store it in the system storage area of ​​the smart network card system.

[0193] The upgrade loading module is used to load the upgrade image data from the system storage area to the waiting space, start the upgrade image, and write the upgrade image into the external memory of the smart network card.

[0194] In another embodiment, the upgrade image data includes verification information.

[0195] The data processing device of the intelligent network card also includes a verification module, which is used to verify the upgrade image data according to the verification information.

[0196] The upgrade loading module is used to load the upgrade image data into the waiting-to-run space after the upgrade image data is verified, start the upgrade image, and write the upgrade image into the external memory of the smart network card.

[0197] In another embodiment, the verification information includes first verification information of each data packet and second verification information of the upgrade image data; the first verification information is obtained by calculating the upgrade image data packet using a first algorithm; the second verification information is obtained by calculating the upgrade image data using a second algorithm;

[0198] The verification module is used to calculate a first verification code for each received upgrade image data packet using a first algorithm; when the first verification code is the same as the first verification information, the upgrade image data packet is verified to pass; after receiving the second verification information, the upgrade data packet of the storage area of ​​the intelligent network card system is calculated using a second algorithm to obtain a second verification code; when the second verification code and the second verification information are the same, the upgrade image data is verified to pass.

[0199] Each module in the data processing device of the above-mentioned smart network card can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0200] In one embodiment, a smart network card is provided, and its internal structure diagram can be as follows: Fig.14As shown. The smart network card includes a processor, a memory and a communication interface connected via a system bus. Among them, the processor of the smart network card is used to provide computing and control capabilities. The memory of the smart network card includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless method can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data processing method for a smart network card is implemented.

[0201] Those skilled in the art will understand that Fig.14 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0202] In one embodiment, a smart network card is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the data processing method of the smart network card in the above embodiments when executing the computer program.

[0203] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data processing method of the smart network card in the above embodiments are implemented.

[0204] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps of the data processing method of the smart network card in the following embodiments.

[0205] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0206] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0207] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0208] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data processing method for an intelligent network card, characterized in that: The method comprises: When a write operation to the dynamic management area of ​​the smart network card memory is monitored, obtaining first target write data and first actual write data of the write operation; When a write error in the dynamic management area is verified according to the first target write data and the first actual write data, continuing to write the first target write data into the dynamic management area of ​​the memory; When the number of write errors in the dynamic management area reaches a set number, reloading the currently running smart network card system image; When reloading the currently running smart network card system image fails to correctly write the dynamic management area, determining a target storage area of ​​the smart network card system image in an unstarted state; the target storage area is located in the dynamic management area; The smart network card system image is read from the target storage area of ​​the smart network card, and the smart network card system image in an unstarted state is loaded.

2. The method according to claim 1, characterized in that The method further comprises: When a write operation to the static management area of ​​the memory is monitored, obtaining second target write data and second actual write data of the write operation; When a write error in the static management area is verified according to the second target write data and the second actual write data, continuing to write the second target write data into the static management area of ​​the memory; When the number of write errors in the static management area reaches a set number, static management area abnormal information is generated and reported.

3. The method according to claim 1, characterized in that The method further comprises: In response to a scheduling request of the scheduler for a hardware status monitoring task, executing the hardware status monitoring task, and obtaining a monitoring result of the monitored smart network card hardware, wherein the monitoring result includes at least one of an operating parameter, a usage status, and an abnormality report; Determining the operating status of the monitored smart network card hardware according to the monitoring result of the monitored smart network card hardware; Report the operating status of the monitored smart network card hardware to the host side.

4. The method according to claim 1, characterized in that: The method further comprises: Obtain the smart network card startup request sent by the cloud server through the smart network card service interface; In response to the startup request, loading a system boot program of the smart network card system from the startup storage partition of the smart network card; Execute the system boot program to load the main image of the smart network card system from the main image storage partition of the smart network card to start the smart network card system; When the startup failure of the main image of the smart network card system meets the switching condition, the backup image storage partition of the smart network card is guided to read the backup image of the smart network card system to start the smart network card system.

5. The method according to claim 1, characterized in that The method further comprises: When reloading the currently running SmartNIC system image, the task data in the task stack is retained; After the smart network card system is restored, the smart network card system obtains the task data from the task stack and executes the task data.

6. The method according to claim 1, characterized in that The method further comprises: Receiving an image upgrade instruction from the smart network card management terminal through the network interface of the smart network card; In response to the image upgrade instruction, when it is determined that the smart network card meets the upgrade requirements, the upgrade image data is obtained from the smart network card management terminal and stored in the system storage area of ​​the smart network card system; The upgrade image data is loaded from the system storage area to the waiting-for-execution space, the upgrade image is started, and the upgrade image is written into the external memory of the smart network card.

7. The method according to claim 6, characterized in that The upgrade image data includes verification information; Before the steps of loading the upgrade image data into the to-be-run space, starting the upgrade image, and writing the upgrade image into the external memory of the smart network card, the method further includes: Verifying the upgrade image data according to the verification information; After the upgrade image data is verified, the steps of loading the upgrade image data into the to-be-run space, starting the upgrade image, and writing the upgrade image into the external memory of the smart network card are performed.

8. The method according to claim 7, characterized in that The verification information includes first verification information of each data packet and second verification information of the upgrade image data; the first verification information is obtained by calculating the upgrade image data packet using a first algorithm; The second verification information is obtained by calculating the upgrade image data using a second algorithm; Verifying the upgrade image data according to the verification information includes: For each received upgrade image data packet, a first check code is calculated using a first algorithm; When the first verification code is the same as the first verification information, the upgrade image data packet passes the verification; After receiving the second verification information, using a second algorithm to calculate the upgrade data packet of the storage area of ​​the intelligent network card system to obtain a second verification code; When the second verification code and the second verification information are the same, the upgrade image data passes the verification.

9. A data processing device for a smart network card, characterized in that: The device comprises: A monitoring module, configured to obtain first target write data and first actual write data of the write operation when a write operation to the dynamic management area of ​​the smart network card memory is monitored; a verification module, configured to continue writing the first target write data into the dynamic management area of ​​the memory when a write error in the dynamic management area is verified according to the first target write data and the first actual write data; A reloading module, used for reloading the currently running smart network card system image when the number of write errors in the dynamic management area reaches a set number; The exception handling module is used to determine the target storage area of ​​the smart network card system image in an unstarted state when reloading the currently running smart network card system image cannot make the dynamic management area write correctly; the target storage area is located in the dynamic management area; read the smart network card system image from the target storage area of ​​the smart network card, and load the smart network card system image in an unstarted state.

10. A smart network card, comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Rhinitis intelligent treatment detection system based on composite sensing

    CN120154826A

  • Automatic network diagnosis method, system, chip, network card and equipment based on DPU (Data Processing Unit)

    CN121309333A

  • Intelligent network card, operating system switching method and electronic equipment

    CN121579281A