Network card operation monitoring method and electronic equipment

By monitoring the operating status of the smart network interface card (NIC) and automatically switching to NIC mode, saving context data and restoring network connectivity, the problem of long-term interruption caused by NIC failure in DPU mode is solved, achieving rapid fault repair and service continuity.

CN120956636APending Publication Date: 2025-11-14INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511203656.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

When a smart network card is running in DPU mode, errors in the software stack or hardware acceleration unit can cause long service interruptions, affecting business continuity. Existing technologies cannot perform dynamic mode switching, so fault recovery depends on overall reset or host system intervention, resulting in long interruption times and data loss.

Method used

Monitor the network card's operating status, identify error events and save context data, autonomously switch to NIC mode, and restore network connectivity using shared storage, thereby achieving autonomous fault repair and reducing service interruption time.

Benefits of technology

By enabling autonomous mode switching and fault repair, service interruption time is significantly reduced, operational complexity and costs are lowered, equipment stability is improved, and business operations can be restored without interruption or quickly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120956636A_ABST
    Figure CN120956636A_ABST
Patent Text Reader

Abstract

The invention discloses a network card operation monitoring method and electronic equipment, and relates to the technical field of network card management, and the method comprises the steps: monitoring the operation state of a target network card, and if it is judged that the target network card currently has a target error event according to the operation state, and the current operation mode of the target network card is a data processor mode, executing the operation of the target network card; if yes, acquiring context data when the target network card operates based on the data processor mode, storing the context data in a preset shared storage area, activating the first function stack, and switching the current operation mode to the network interface card mode; and based on the context data in the preset shared storage area, establishing a network connection when the target network card operates based on the network interface card mode, and repairing a target error event of the target network card. The network card can be quickly switched to a stable working mode based on the network interface card when the mode based on the data processor fails, the service interruption time is shortened through self-repairing of the network card, and the operation and maintenance complexity and cost are remarkably reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network interface card (NIC) management technology, and in particular to a method and electronic device for monitoring NIC operation. Background Technology

[0002] Smart NICs (Smart Network Interface Controllers) have evolved from traditional NICs (Network Interface Cards) into devices integrating powerful processing capabilities, capable of offloading network, storage, and security tasks from the host CPU (Central Processing Unit). In NIC mode, basic network connectivity and packet transmission / reception are primarily provided, with relatively simple and direct processing logic. In DPU (Data Processing Unit) mode, however, computing power is deeply integrated, enabling the execution of complex tasks such as network function virtualization, storage acceleration, security processing, and virtual machine / container network offloading. Currently, smart NICs are typically statically configured to either DPU or NIC mode during initialization, without dynamic switching. Furthermore, when running complex tasks in DPU mode, errors in the software stack or hardware acceleration units can lead to prolonged service interruptions, impacting business continuity. Summary of the Invention

[0003] This application provides a network card operation monitoring method and electronic device to solve the problem of data loss caused by the current network card operating in data processor-based mode, which requires overall network card reset or host system intervention for fault recovery. It enables autonomous switching of network card operating mode and problem repair, thereby improving the stability of device operation.

[0004] This application provides a method for monitoring network interface card (NIC) operation, including:

[0005] Monitor the operating status of the target network interface card (NIC) and determine whether there are any target error events based on the operating status.

[0006] If the target network interface card (NIC) has a target error event and the target NIC is currently running in data processor mode, then obtain the context data of the target NIC when it is running in data processor mode.

[0007] Save the context data to the preset shared storage area, activate the first function stack of the target network card, and switch the current operating mode of the target network card to the network interface card mode;

[0008] Based on the context data in the preset shared storage area, establish the network connection of the target network card when it is running in network interface card mode, and repair the target error event of the target network card based on the context data.

[0009] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any of the above-described network card operation monitoring methods when executing the computer program.

[0010] This application can monitor the operating status of the target network card. If it is determined from the operating status that the target network card currently has a target error event and the current operating mode of the target network card is data processor mode, then the context data of the target network card running in data processor mode is saved to a preset shared storage area, and the first function stack of the target network card is activated to switch the current operating mode of the target network card to network interface card mode. Based on the context data in the preset shared storage area, a network connection is established for the target network card running in network interface card mode, and the target error event of the target network card is repaired based on the context data.

[0011] The above technical solution allows for the saving of the target network interface card's (NIC) context data (based on its current operating mode) to a shared storage area when a target NIC experiences a fault event. The solution then switches the NIC's current operating mode to a network interface card (NIC)-based operating mode, re-establishing the NIC's network connection based on the context data in the shared storage area. This enables the NIC to quickly and autonomously switch to a stable NIC-based operating mode when a data processor-based mode fails, significantly reducing service interruption time and enabling uninterrupted or rapid service recovery. This solves the problems of long interruptions and data loss caused by resetting the entire NIC or relying on host system intervention when the NIC is currently operating in data processor-based mode. It also significantly reduces reliance on manual intervention, achieving NIC self-repair. Furthermore, the autonomous switching of the NIC's operating mode and problem repair significantly reduce operational complexity and costs, improving the stability of the device hosting the NIC. Attached Figure Description

[0012] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 A flowchart of a network interface card (NIC) operation monitoring method provided in this application embodiment;

[0014] Figure 2A network interface card (NIC) architecture diagram provided for an embodiment of this application;

[0015] Figure 3 A specific network interface card (NIC) operation monitoring flowchart is provided for embodiments of this application;

[0016] Figure 4 This application provides a structural diagram of an electronic device. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0018] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0019] Currently, smart network interface cards (NICs) are typically statically configured in DPU or NIC mode during initialization, and cannot be dynamically switched. Furthermore, when running complex tasks in DPU mode, errors in the software stack or hardware acceleration unit can lead to long service interruptions, affecting business continuity. In contrast, the NIC in this application can quickly and autonomously switch to a stable network interface card-based working mode when the data processor-based mode fails, greatly reducing service interruption time and enabling uninterrupted or rapid business recovery. Moreover, through the autonomous switching of the NIC's operating mode and problem repair, the complexity and cost of operation and maintenance are significantly reduced, and the stability of the device in which the NIC is located is improved.

[0020] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0021] like Figure 1 As shown, an embodiment of this application provides a network interface card (NIC) operation monitoring method. The following is a detailed description of the execution flow of the NIC operation monitoring method, including:

[0022] Step S11: Monitor the operating status of the target network card and determine whether there is a target error event based on the operating status.

[0023] It is understandable that, such as Figure 2 As shown, the firmware / software architecture of the smart network interface card (NIC) in this embodiment simultaneously supports the complete NIC mode function stack and DPU mode function stack (including operating system, driver, hypervisor, application framework, etc.). It also sets up a mode state machine to record the current operating mode (DPU Active, NIC Active) and possible transition states (such as Switching, Error Recovery), and sets up a shared context storage area to save and restore critical state information (such as network connection status, secure session keys, offloaded flow table entries, etc.) during mode switching, ensuring service continuity after switching. Furthermore, the smart NIC can be controlled through a target control platform, which can be a host or a control plane. Specifically, the hardware layer monitors processor (e.g., Arm Cores, x86 Cores) temperature, voltage, ECC (Error Checking and Correcting) memory errors; monitors FPGA (Field Programmable Gate Array) / ASIC (Application Specific Integrated Circuit) status registers and watchdog timers; and monitors PHY (Physical Layer) / SerDes (Serializer / Deserializer) link status. The firmware / software layer monitors operating system kernel crashes (Panic / Oops), critical service (e.g., vSwitch, storage target) crashes, application crashes, resource exhaustion (memory, threads), protocol stack anomalies, and data consistency check failures (e.g., DMA (Direct Memory Access)). The functional layer monitors key business metrics (e.g., sudden increases in packet loss rate, excessive processing latency, encryption / decryption failure rate). The error classifier categorizes detected error events (e.g., transient errors, isolated software errors, firmware logic errors, severe hardware errors) and assesses their impact and severity.

[0024] Based on the above-mentioned smart network interface card, such as Figure 3As shown, this embodiment monitors the operating status of the target network interface card (NIC) at the hardware, software, and functional layers. Based on these states, it determines whether an initial error event exists. If an initial error event exists, a preset error classifier categorizes it to determine its event type. If the event type meets preset mode switching conditions, the initial error event is designated as the target error event. By performing multi-level error monitoring on the NIC's operating status, the current error event type can be further determined, allowing for targeted measures to ensure the stability of the NIC's operation.

[0025] In another specific embodiment, when the event category does not meet the preset mode switching conditions and the target network card's current operating mode is data processor mode, the network card repair rules for the target network card running in data processor mode are directly determined, and the initial error event is repaired according to the network card repair rules. For example... Figure 3 As shown, for error events that do not meet the preset mode switching conditions, lightweight repair (In-Place Recovery) can be used. For example, for transient errors or local software errors (such as a single application crash), an attempt can be made to repair in the current mode (usually DPU mode). Specific repair operations include, but are not limited to: restarting the crashed application or service; isolating the faulty module and resetting the relevant hardware unit (such as a specific acceleration engine); and rolling back to a known good configuration or software version.

[0026] And as Figure 3 As shown, after repairing the initial error event according to the network card repair rules, it is necessary to determine whether the initial error event was repaired successfully. If the initial error event was repaired successfully, the target network card continues to operate in data processor mode; if the initial error event was repaired unsuccessfully, the initial error event is used as the target error event to switch the target network card's current operating mode to network interface card mode. Here, data processor mode refers to the target network card's operating mode based on a data processor, and network interface card mode refers to the target network card's operating mode based on a network interface card.

[0027] Step S12: If the target network card has a target error event and the current operating mode of the target network card is data processor mode, then obtain the context data of the target network card running in data processor mode.

[0028] In this embodiment, if the target network interface card (NIC) has a target error event and its current operating mode is data processor mode, then the context data of the target NIC running in data processor mode is obtained. Here, data processor mode refers to the target NIC's data processor-based operating mode, i.e., DPU mode. In other words, when lightweight repair fails or the current error time meets the preset mode switching conditions, mode switching repair (Failover Recovery) can be performed. Specifically, in this embodiment, when lightweight repair fails, or the error is classified as requiring a more thorough environment reset (such as kernel crash or firmware logic disorder), an autonomous switch to NIC mode (Network Interface Card mode) can be triggered.

[0029] Step S13: Save the context data to the preset shared storage area, activate the first function stack of the target network card, and switch the current operating mode of the target network card to the network interface card mode.

[0030] In this embodiment, when performing mode switching repair, such as Figure 3 As shown, the process first requires saving the context data to a preset shared storage area and activating the first function stack of the target network interface card (NIC), switching the NIC's current operating mode to network interface card mode. During this process, after saving the context data to the preset shared storage area, the second function stack and hardware resources of the target NIC running in data processor mode can be determined, and then unloaded or reset. Furthermore, the target function accelerator in the target NIC can be identified, and its operation can be maintained, or it can be directly restarted, to ensure the target NIC's network connectivity is maintained.

[0031] Based on the above technical solution, in this embodiment, when performing mode switching repair, the network interface card (NIC) state is first saved. Specifically, the current DPU mode activity can be frozen, and critical contexts (network connections, secure sessions, etc.) can be saved to the shared context storage area. Then, mode unloading / resetting is performed. Specifically, the software stack and hardware resources related to the DPU mode can be securely unloaded or reset. It is understood that this step may involve restarting the OS (Operating System) or hypervisor on the NIC. Afterward, NIC mode can be activated. First, the NIC mode function stack is activated, and the necessary configurations are loaded. The saved context is then used to quickly rebuild the basic network connection. Simultaneously, the smart NIC can also control the hardware data plane (such as a fixed-function accelerator) to maintain partial forwarding capabilities or quickly restart during control plane switching operations, ensuring uninterrupted basic traffic and maintaining basic network connectivity in NIC mode, thus achieving data plane keep-alive for the NIC. For example, in terms of network processing, it maintains basic packet forwarding (L2-L4 layers), traffic classification, checksum calculation, etc., to ensure that basic data transmission at the hardware level is not interrupted when switching modes. In this process, it can also choose to support hardware offloading to accelerate the transmission and access of stored data, and maintain integrated encryption / decryption, firewall rule matching and other hardware logic to quickly handle security-related tasks and further improve the reliability of the network card.

[0032] Based on the above technical solution, when the network interface card (NIC) freezes the current DPU mode activity, it does not disconnect the network connection. Instead, it maintains the network connection and ensures service continuity by constructing a shared context store and implementing data plane keep-alive measures. The shared context store saves key state information such as network connection status, secure session keys, and offloaded flow table entries, providing a foundation for quickly rebuilding the network connection after a switchover. Therefore, in this embodiment, key network connection parameters are preserved during the brief period of freezing DPU mode activity, allowing for subsequent connection recovery based on this information, rather than directly disconnecting the network connection. Furthermore, during control plane switching operations (including freezing DPU mode activity), the hardware data plane (such as fixed-function accelerators) may maintain some forwarding capabilities or quickly restart, ensuring that basic traffic is not interrupted and the network connection can still be maintained to a certain extent. If there is a real-time network data transmission requirement, the data plane keep-alive mechanism allows the NIC to continue processing some traffic, preventing network connection interruption due to DPU mode freezing.

[0033] Furthermore, in this embodiment, after switching the target network card's current operating mode to network interface card mode, a mode switching signal for the target network card can be generated and sent to the target control platform through the management controller or the target interface of the target network card. The target interface is the data transmission interface of the target network card when operating in network interface card mode. In other words, when a mode switch of the smart network card occurs, host notification is required. Specifically, this can be done through an out-of-band management channel (such as a BMC (Baseboard Management Controller)) or a keep-alive NIC channel to notify the host and management system.

[0034] Step S14: Based on the context data in the preset shared storage area, establish the network connection of the target network card when running in network interface card mode, and repair the target error event of the target network card based on the context data.

[0035] It is understandable that DPU mode and NIC mode rely on different software function stacks (DPU mode includes complex advanced functions, while NIC mode only provides basic L2-L4 forwarding). When activating NIC mode, it is necessary to switch to its dedicated function stack. At this time, the configuration needs to be reloaded based on the saved context to adapt to the simplified functional logic of NIC mode. Therefore, in this embodiment, a network connection for the target network card running in network interface card mode can be established based on the context data in the preset shared storage area, and the target error event of the target network card can be repaired based on the context data. After repairing the target error event of the target network card based on the context data, the current running mode of the target network card can be switched back to data processor mode, and the second function stack and the context data in the preset shared storage area can be loaded. Based on the data processor mode, the target network card can continue to run according to the second function stack and the context data. In this way, by combining the above steps and through an efficient context saving / restoration mechanism, connection interruptions during switching are minimized, and network card state snapshots and restoration are achieved.

[0036] Specifically, when repairing a target error event of a target network interface card (NIC), the network connection of the target NIC running in network interface card mode can be maintained. Within the target operating environment, the corresponding target to be repaired for the target error event is diagnosed, obtaining the corresponding diagnostic results. Based on the diagnostic results and preset repair operations, the target to be repaired is then repaired. Here, the target to be repaired refers to the software and firmware of the target NIC running in data processor mode, and the target operating environment is the environment corresponding to the target NIC running in network interface card mode. It should be noted that the aforementioned preset repair operations are any one or a combination of several of the following: reloading firmware, patching the target application corresponding to the target to be repaired, and restoring the configuration of the target to be repaired based on a preset backup. Furthermore, this embodiment does not limit the specific repair operations. Other specific operations that can repair the network card can be selected according to the actual situation, and it is not limited to repairing the network card's software or firmware. For example, hardware-level repair operations can be performed for local hardware anomalies, specifically by performing a partial reset of independent hardware units within the network card, or by reallocating hardware resources when errors / resource exhaustion are detected in a certain part of the hardware resources, or by automatically adjusting parameter configurations for abnormal hardware operating parameters. Firmware / software-level repair operations can be performed for network card software stack anomalies, specifically by restarting critical services that have crashed in the network card software stack, automatically cleaning up junk processes, or performing software version rollback. It should also be noted that after activating the NIC mode function stack to enable the network card to operate in NIC mode, the network card can maintain NIC mode while waiting for external management instructions, and then perform corresponding operations based on the received management instructions to repair the network card. In other words, in this embodiment, the smart network card can utilize the stable environment of NIC mode to perform more in-depth diagnosis and repair of the DPU mode software / firmware (such as reloading firmware, applying patches, restoring configuration from backup) or wait for external management instructions. Once the repair is confirmed, the system will automatically switch back to DPU mode according to the policy, restore advanced functions, and load the previously saved context.

[0037] It should be noted that, in one specific embodiment, if the target network card receives a mode switching instruction from the target control platform, the target network card's current operating mode is directly switched according to the mode switching instruction; in another specific embodiment, if the target network card's current operating mode is data processor mode and it has not received a heartbeat signal from the target control platform within a preset time period, the target network card's current operating mode is directly switched to network interface card mode. That is, in this embodiment, the smart network card has a built-in configurable policy engine that triggers mode switching based on preset or dynamically learned rules. Triggering conditions include, but are not limited to: load conditions (DPU processing load too high / too low, appearance / disappearance of specific types of traffic (such as traffic requiring deep inspection)); energy efficiency requirements (the network card needs to enter a low-power state (preferring NIC mode); task requirements (the network card receives a task instruction from the host or management plane that requires execution in a specific mode); error detection signals (when the network card detects a recoverable error in DPU mode, it triggers a switch to NIC mode for degraded operation or repair); and heartbeat / health check failure (communication between the network card and the host or control plane is interrupted, triggering a switch to the more reliable NIC mode as a backup). This allows for dynamic adjustment of the operating mode based on load and demand, optimizing performance and energy efficiency, and improving the overall reliability of the smart network card through its rapid error detection and response mechanism.

[0038] In this embodiment, the operating status of the target network card can be monitored. If it is determined from the operating status that the target network card currently has a target error event and the current operating mode of the target network card is data processor mode, then the context data of the target network card running in data processor mode is saved to a preset shared storage area, and the first function stack of the target network card is activated to switch the current operating mode of the target network card to network interface card mode. Thus, based on the context data in the preset shared storage area, a network connection is established for the target network card running in network interface card mode, and the target error event of the target network card is repaired based on the context data. The above technical solution allows for the saving of the target network interface card's (NIC) context data during its current operating mode to a shared storage area when a target NIC experiences a fault event. The target NIC's current operating mode is then switched to a network interface card (NIC)-based operating mode. Based on the context data in the shared storage area, the network connection is re-established. This enables the NIC to operate in a dual-mode environment, employing multi-level intelligent error detection and diagnosis. When a fault occurs in the data processor-based mode, the NIC can quickly and autonomously switch to a stable NIC mode via a self-triggering mechanism, achieving lightweight repair and mode switching repair. This significantly reduces service interruption time, enabling uninterrupted or rapid service recovery. It solves the problems of long interruptions and data loss caused by resetting the entire NIC or relying on host system intervention when the NIC is operating in data processor-based mode. It also significantly reduces reliance on manual intervention. Furthermore, through autonomous switching and problem repair of the NIC's operating mode, the software / firmware of the DPU mode can be updated or maintained in the background under NIC mode, and then safely switched back, achieving NIC self-repair. This significantly reduces operational complexity and costs, and improves the stability of the device hosting the NIC.

[0039] like Figure 4 As shown in the figure, embodiments of this application also provide a network interface card (NIC) operation monitoring device, including:

[0040] The status monitoring module 11 is used to monitor the operating status of the target network card and determine whether there is a target error event based on the operating status.

[0041] The data acquisition module 12 is used to acquire the context data of the target network card when it is running in data processor mode if the target network card has a target error event and the current running mode of the target network card is data processor mode.

[0042] The mode switching module 13 is used to save the context data to the preset shared storage area and activate the first function stack of the target network card to switch the current running mode of the target network card to the network interface card mode.

[0043] Error repair module 14 is used to establish network connection of the target network card when running in network interface card mode based on context data in the preset shared storage area, and to repair target error events of the target network card based on context data.

[0044] For a description of the features in the embodiment corresponding to the network card operation monitoring device, please refer to the relevant description of the embodiment corresponding to the network card operation monitoring method, which will not be repeated here.

[0045] In some specific embodiments, the status monitoring module specifically includes:

[0046] The status monitoring unit is used to monitor the hardware layer operation status, software layer operation status, and functional layer operation status of the target network card;

[0047] The event judgment unit is used to determine whether the target network card currently has an initial error event based on the hardware layer running status, software layer running status, and functional layer running status.

[0048] The event classification unit is used to classify the initial error event using a preset error classifier if the target network card has an initial error event, and obtain the event category of the initial error event; when the event category meets the preset mode switching conditions, the initial error event is used as the target error event.

[0049] In some specific embodiments, the network interface card (NIC) operation monitoring device further includes:

[0050] The rule determination module is used to directly determine the network card repair rules for the target network card when the event category does not meet the preset mode switching conditions and the current operating mode of the target network card is data processor mode.

[0051] The event repair module is used to repair initial error events according to the network card repair rules.

[0052] In some specific embodiments, the event repair module is also used to determine whether the initial error event has been successfully repaired; if the initial error event has been successfully repaired, the target network card continues to be controlled to run in data processor mode; if the initial error event has failed to be repaired, the initial error event is used as the target error event so as to switch the current running mode of the target network card to network interface card mode.

[0053] In some specific embodiments, the network interface card (NIC) operation monitoring device further includes:

[0054] The resource determination unit is used to determine the second function stack and hardware resources of the target network interface card when it is running in data processor mode.

[0055] The resource reset unit is used to unload or reset the second function stack and hardware resources.

[0056] In some specific embodiments, the network interface card (NIC) operation monitoring device further includes:

[0057] The mode reset module is used to switch the target network card's current operating mode back to data processor mode;

[0058] The data loading module is used to load the context data in the second function stack and the preset shared storage area, and based on the data processor mode, continue to run the target network card according to the second function stack and the context data.

[0059] In some specific embodiments, the network interface card (NIC) operation monitoring device further includes:

[0060] The instruction execution module is used to directly switch the current operating mode of the target network card according to the mode switching instruction received by the target control platform if the target network card receives the mode switching instruction.

[0061] The signal receiving module is used to switch the current operating mode of the target network card to network interface card mode if the target network card is currently in data processor mode and has not received a heartbeat signal from the target control platform within a preset time period.

[0062] In some specific embodiments, the network interface card (NIC) operation monitoring device further includes:

[0063] Device determination unit, used to determine the target functional accelerator in the target network interface card;

[0064] The device retention unit is used to maintain the operation of the target function accelerator or to directly restart the target function accelerator so as to maintain the network connection of the target network card using the target function accelerator.

[0065] In some specific embodiments, the network interface card (NIC) operation monitoring device further includes:

[0066] The signal generation module is used to generate the mode switching signal for the target network card;

[0067] The signal transmission module is used to send mode switching signals to the target control platform through the management controller or the target interface of the target network card; the target interface is the data transmission interface of the target network card when it is running in network interface card mode.

[0068] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0069] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the network card operation monitoring method embodiments described above.

[0070] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the network interface card (NIC) operation monitoring method embodiments described above when running.

[0071] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0072] The embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the network card operation monitoring method embodiments described above.

[0073] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described network interface card (NIC) operation monitoring method embodiments.

[0074] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0075] The foregoing has provided a detailed description of a network interface card (NIC) operation monitoring method and electronic device provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only intended to help understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A method for monitoring the operation of a network interface card (NIC), characterized in that, include: Monitor the operating status of the target network interface card (NIC) and determine whether there is a target error event based on the operating status. If the target network interface card (NIC) has the target error event, and the current operating mode of the target NIC is data processor mode, then obtain the context data of the target NIC running in the data processor mode; The context data is saved to a preset shared storage area, and the first function stack of the target network card is activated, switching the current operating mode of the target network card to network interface card mode; Based on the context data in the preset shared storage area, a network connection is established for the target network card when it is running in the network interface card mode, and the target error event of the target network card is repaired based on the context data.

2. The network card operation monitoring method according to claim 1, characterized in that, The monitoring of the target network interface card's operating status includes: Monitor the hardware layer operating status, software layer operating status, and functional layer operating status of the target network interface card; Accordingly, determining whether the target network card currently has a target error event based on the operating status includes: Based on the hardware layer operating status, the software layer operating status, and the functional layer operating status, determine whether the target network card currently has an initial error event; If the target network card has the initial error event, then the initial error event is classified using a preset error classifier to obtain the event category of the initial error event; When the event category meets the preset mode switching conditions, the initial error event is used as the target error event.

3. The network card operation monitoring method according to claim 2, characterized in that, After classifying the initial error event using a preset error classifier to obtain the event category of the initial error event, the method further includes: When the event category does not meet the preset mode switching conditions, and the current operating mode of the target network card is data processor mode, the network card repair rules for the target network card running based on the data processor mode are directly determined; Repair the initial error event according to the network card repair rules.

4. The network card operation monitoring method according to claim 3, characterized in that, After repairing the initial error event according to the network card repair rules, the process further includes: Determine whether the initial error event was successfully resolved; If the initial error event is successfully resolved, the target network card will continue to operate in the data processor mode. If the initial error event repair fails, the initial error event is used as the target error event so as to switch the current operating mode of the target network card to the network interface card mode.

5. The network card operation monitoring method according to claim 1, characterized in that, After saving the context data to a preset shared storage area, the method further includes: Determine the second function stack and hardware resources of the target network interface card when it is running in the data processor mode; Unload or reset the second function stack and the hardware resources.

6. The network card operation monitoring method according to claim 5, characterized in that, After repairing the target error event of the target network interface card based on the context data, the method further includes: Switch the current operating mode of the target network card back to the data processor mode; Load the context data from the second function stack and the preset shared storage area, and continue to run the target network card based on the data processor mode, according to the second function stack and the context data.

7. The network card operation monitoring method according to claim 1, characterized in that, The process of repairing the target error event of the target network interface card based on the context data includes: Maintain the network connection of the target network card when it is running in the network interface card mode, and diagnose the target to be repaired corresponding to the target error event in the target operating environment to obtain the corresponding diagnostic results; the target to be repaired is the software and firmware of the target network card when it is running in the data processor mode; the target operating environment is the environment corresponding to the target network card when it is running in the network interface card mode. Repair the target to be repaired based on the diagnostic results and preset repair operations; The preset repair operation is any one or a combination of several of the following: reloading firmware, patching the target application corresponding to the target to be repaired, and restoring the configuration of the target to be repaired based on a preset backup.

8. The network card operation monitoring method according to claim 1, characterized in that, Also includes: If the target network card receives a mode switching instruction from the target control platform, the current operating mode of the target network card is switched directly according to the mode switching instruction; If the target network card is currently operating in the data processor mode and has not received a heartbeat signal from the target control platform within a preset time period, then the target network card's current operating mode is directly switched to the network interface card mode.

9. The network card operation monitoring method according to claim 1, characterized in that, The process of switching the current operating mode of the target network card to the network interface card mode also includes: Identify the target function accelerator in the target network interface card; Keep the target function accelerator running, or directly restart the target function accelerator, so as to maintain the network connection of the target network card using the target function accelerator.

10. The network interface card (NIC) operation monitoring method according to any one of claims 1 to 9, characterized in that, After switching the current operating mode of the target network card to the network interface card mode, the method further includes: Generate the mode switching signal for the target network interface card; The mode switching signal is sent to the target control platform through the management controller or the target interface of the target network card; the target interface is the data transmission interface of the target network card when it is running in the network interface card mode.

11. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the network interface card operation monitoring method as described in any one of claims 1 to 10 when executing the computer program.

Citation Information

Cited By

  • Implementation method of Ethernet card based on eMMC bus interface and Ethernet card

    CN122220264A