Method, apparatus, network card and device for upgrading network card firmware

The method of saving business state information and loading new firmware in memory during upgrades maintains business link continuity, addressing the disruption issues of traditional firmware upgrade methods.

CN112491600BActive Publication Date: 2025-07-15XFUSION DIGITAL TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011279529.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-03-07
Publication Date
2025-07-15
Estimated Expiration
2038-03-07

AI Technical Summary

Technical Problem

The existing network card firmware upgrade method causes business link interruption and affects business operation. Especially on devices that do not support hot-swap removal, restarting the network card and equipment will cause several minutes of interruption, which cannot meet the high network requirements.

Method used

By saving on-site information in the network card memory area and loading new firmware without restarting the network card, and initializing other modules except the business logic module, the operation of the new firmware is realized to ensure that the business link is not interrupted.

Benefits of technology

Complete network card firmware upgrade without interrupting the service link, reducing the impact of firmware upgrade on business and reducing network maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112491600B_ABST
    Figure CN112491600B_ABST
Patent Text Reader

Abstract

The present application provides a method, apparatus, network card and device for upgrading network card firmware. The method includes: the network card receives new firmware of the network card from the device where the network card is located; saves the on-site information of the service currently processed by the network card, and the on-site information of the service is used to indicate information related to the service currently processed by the network card; the network card loads the new firmware into the memory area of the network card and runs the new firmware in the memory area; initializes and configures other modules in the network card except the service logic module, and resumes the service indicated by the on-site information. The present application does not need to restart the network card when upgrading the network card firmware. Therefore, the upgrade of the network card firmware can be completed while maintaining the uninterrupted service link, and the impact of the network card firmware upgrade on service applications can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more specifically, to a method, apparatus, network card, and device for upgrading network card firmware. Background Art

[0002] With the rapid development of network technologies, different devices can use different network protocols to transmit data. Correspondingly, the types of network cards in devices are also increasing. In addition to traditional Ethernet network cards, intelligent network cards have emerged. Different devices equipped with intelligent network cards can use high-speed network transmission protocols to transmit packets, improving the network transmission rate. At the same time, due to the increasing complexity of the software and hardware inside the network card, there are more and more software defects (bugs) and hardware failures in the network card. Only by promptly repairing the failures can the impact on the services running in the device be reduced. Therefore, for the software and hardware defects of the network card, it is necessary to update the firmware (Firmware, FW) inside the network card promptly and quickly for repair.

[0003] Currently, the traditional method is to update the network card firmware using a cold upgrade method. The basic process of cold upgrade is that after the device to be upgraded (such as a server / memory array) obtains the new firmware, it sends the new firmware to the network card in the device through the peripheral component interconnect express (PCIe) bus. The network card writes the new firmware into a read-only memory (ROM) (such as flash memory), then restarts the network card, and boots up by running the new firmware from the ROM, so that the new firmware takes effect. However, restarting the network card will cause the service link to be interrupted, and further cause the service to be interrupted. In addition, on devices that do not support hot plugging of network cards, during the process of updating the network card firmware, not only the network card needs to be restarted, but the entire device also needs to be restarted to make the new firmware take effect.

[0004] Therefore, the current method of upgrading network card firmware will cause the service link to be interrupted and affect the service operation. Summary of the Invention

[0005] This application provides a method, apparatus, network card, and device for upgrading network card firmware, which can maintain the service link without interruption during the process of upgrading the network card firmware and reduce the impact of network card firmware upgrade on service applications.

[0006] In a first aspect, a method for upgrading the firmware of a network card is provided. The method includes: the network card receives new firmware of the network card from the device where the network card is located; before running the new firmware, the network card saves the on-site information of the service currently processed by the network card, and the on-site information of the service is used to indicate information related to the service currently processed by the network card; the network card loads the new firmware into the memory area of the network card and runs the new firmware in the memory area; after running the new firmware, the network card initializes and configures other modules in the network card except the service logic module and resumes the service indicated by the on-site information.

[0007] Specifically, the processor of the device where the network card is located issues the new firmware of the network card to the network card through the bus. Correspondingly, the network card receives the new firmware issued by the host processor through the bus.

[0008] The bus for communication between the processor of the device where the network card is located and the network card can be a PCIe bus, or it can also be a non-PCIe bus. Among them, the non-PCIe bus can be a system management bus (SMBus), an inter-integrated circuit (I2C), a serial peripheral interface (SPI) bus, or a universal asynchronous receiver / transmitter (UART), etc.

[0009] As an implementation, after receiving the new firmware issued by the device where the network card is located, the network card stores the new firmware in the local ROM.

[0010] By saving the on-site information before running the new firmware, restoring the on-site information after running the new firmware, and initializing and configuring other modules except the service logic module, the firmware of the network card can be upgraded without restarting the network card. Since there is no need to restart the network card, the service link can be kept uninterrupted. Therefore, the technical solution provided in this embodiment can complete the firmware upgrade of the network card while keeping the service communication link uninterrupted, thereby reducing the impact of the network card firmware upgrade on the service.

[0011] In another possible implementation, the service logic module represents a functional module in the network card for processing service logic. For example, the service logic module includes at least one of the following modules: a serdes message processing module, a PCIe message processing module, an FC / ETH MAC message processing module, an FC / ETH message processing module.

[0012] In another possible implementation, other modules refer to the modules in the network card except the above-mentioned service logic modules. For example, the other modules include at least one of the following modules: a processor subsystem module, a peripheral interface module. The peripheral interface module includes, but is not limited to: an integrated circuit bus interface module, a serial peripheral interface module, a general purpose input output (GPIO) interface module.

[0013] In another possible implementation, the memory area of the network card includes a first memory area and a second memory area, and the network card includes a processor; wherein, the network card loads the new firmware into the memory area of the network card and runs the new firmware in the memory area, including: the network card loads the new firmware into the first memory area, and the first memory area is different from the second memory area where the network card currently runs the old firmware; the position where the processor executes the software program jumps from the second memory area to the first memory area. In other words, the range of the memory addresses read by the processor of the network card moves from the second memory area to the first memory area. It should be understood that the processor of the network card reads instructions in the first memory area, which is equivalent to running the new firmware.

[0014] In another possible implementation, the network card loads the new firmware into the first memory area before saving the on-site information of the service.

[0015] By loading the new firmware into the new memory area before saving the on-site information, it can be ensured that the new firmware can be immediately run after the on-site saving (or other preparation operations) is completed, which can further reduce the impact of the network card firmware upgrade on the service.

[0016] By storing the old firmware in the second memory area of the memory area of the network card and storing the new firmware in the first memory area of the memory area of the network card, and then making the position where the processor of the network card executes the software program jump from the second memory area to the first memory area, the operation of the new firmware is realized, that is, the firmware upgrade is realized. During the whole firmware upgrade process, there is no need to restart the network card, so the network card is not powered off, thus maintaining the uninterrupted link between the network card and the host processor and the uninterrupted link between the network card and the remote device, that is, ensuring the uninterrupted service link, and can effectively reduce the impact of the firmware upgrade on the service.

[0017] In another possible implementation, the memory area of the network card includes a second memory area, and the network card includes a processor. Wherein, the network card loads the new firmware into the memory area of the network card and runs the new firmware in the memory area, including: the network card resets the processor, and the processor runs the old firmware in the second memory area before the reset; after the processor is reset, the network card loads the new firmware into the second memory area; the processor restarts from the second memory area and runs the new firmware.

[0018] In this application, firmware upgrade is achieved by resetting and restarting the processor of the network card, which can maintain the business link without interruption during the firmware upgrade process. In addition, since it is not required to load the new firmware and the old firmware into the memory area at the same time, the requirement for the memory space of the network card can be reduced.

[0019] In another possible implementation, the new firmware includes a separated data firmware part and a control firmware part. The memory area of the network card includes a third memory area and a fourth memory area. The network card includes a first processor unit and a second processor unit. The first processor unit is used to process data functions, and the second processor unit is used to process control functions. Wherein, the network card loads the new firmware into the memory area of the network card and runs the new firmware in the memory area, including: the network card resets the first processor unit, and the first processor unit runs the data firmware part of the old firmware in the third memory area before the reset; after the first processor unit is reset, the network card loads the data firmware part of the new firmware into the third memory area; the first processor unit restarts from the third memory area and runs the data firmware part of the new firmware; after the first processor unit restarts, the network card resets the second processor unit, and the second processor unit runs the control firmware part of the old firmware in the fourth memory area before the reset; after the second processor unit is reset, the network card loads the control firmware part of the new firmware into the fourth memory area; the second processor unit restarts from the fourth memory area and runs the control firmware part of the new firmware.

[0020] Specifically, the processor of the network card can be a single-core processor or a multi-core processor. The above-mentioned first processor unit and second processor unit can be two single-core processors, or the above-mentioned first processor unit and second processor unit are two processor cores of the same multi-core processor.

[0021] In the present application, the network card has a first processor unit and a second processor unit, the first processor unit is used to process data functions, and the second processor unit is used to process control functions. In the case where the new firmware includes a separated data firmware part and a control firmware part, the data firmware part of the new firmware is run by resetting and restarting the first processor unit. After the first processor unit is restarted, the control firmware part of the new firmware is run by resetting and restarting the second processor unit, thereby completing the firmware upgrade. Although a short service stop will be caused in the scenario of resetting the first processor, since the data firmware part of the new firmware is relatively streamlined compared to the new firmware as a whole, it will not cause an interruption of the service link. Therefore, this embodiment can reduce the impact of firmware upgrades on services, and can also reduce the requirements for network card memory space.

[0022] In another possible implementation, the on-site information of the service includes at least one of the following information: hardware status information of the service logic, service configuration information sent by a user, and memory information allocated to the service logic hardware.

[0023] In another possible implementation, the network card may store the on-site information of the service in a storage area of the network card where a segment of data is not lost.

[0024] In another possible implementation, before running the new firmware, the method also includes: the network card performs at least one of the following operations: shutting down the system scheduling of the network card, completing the transaction currently processed by the network card, clearing the system resources of the network card, and notifying the device that the network card enters the firmware upgrade state.

[0025] In another possible implementation, after running the new firmware, the method further includes: the network card also notifies the peripherals that the hot upgrade is complete and releases the peripheral isolation and shielding.

[0026] In summary, this application saves the scene before running the new firmware, restores the scene after running the new firmware, and initializes the configuration of other modules except the business logic module, so that the firmware of the network card can be upgraded without restarting the network card. Since there is no need to restart the network card, the business link can be kept uninterrupted. Therefore, the technical solution provided by this application can complete the firmware upgrade of the network card while maintaining the business communication link, thereby reducing the impact of the network card firmware upgrade on the business.

[0027] In a second aspect, a network card is provided, comprising modules for executing the method for upgrading the network card firmware in the first aspect or any possible implementation of the first aspect.

[0028] In a third aspect, a network card is provided, which includes a memory and a processor. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory. The execution of the instructions stored in the memory causes the processor to perform the operation steps of the method in the first aspect or any possible implementation manner of the first aspect.

[0029] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the computer implements the operation steps of the method in the first aspect or any possible implementation manner of the first aspect. Specifically, the computer can be a network card.

[0030] In a fifth aspect, a computer program product containing instructions is provided. When the instructions are executed by a computer, the computer implements the operation steps of the method in the first aspect or any possible implementation manner of the first aspect. Specifically, the computer can be a network card.

[0031] In a sixth aspect, a device is provided, which includes a network card. The network card is used to perform the operation steps of the method in the first aspect or any possible implementation manner of the first aspect.

[0032] Based on the implementation manners provided in the above aspects of the present application, further combinations can be made to provide more implementation manners. Description of the Drawings

[0033] Figure 1 It is a schematic diagram of a typical networking architecture for the network card firmware upgrade scenario.

[0034] Figure 2 It is a schematic flowchart of the method for upgrading the network card firmware provided by the embodiment of the present application.

[0035] Figure 3 It is a schematic diagram of the principle of the network card to take effect the new firmware in the embodiment of the present application.

[0036] Figure 4 It is a schematic diagram of the space allocation of the RAM area inside the network card.

[0037] Figure 5 It is another schematic flowchart of the method for upgrading the network card firmware provided by the embodiment of the present application.

[0038] Figure 6 It is still another schematic flowchart of the method for upgrading the network card firmware provided by the embodiment of the present application.

[0039] Figure 7 It is a schematic diagram of the network card processor running the control firmware involved in the embodiment of the present application.

[0040] Figure 8Schematic diagram of the operation control and data firmware of the network card processor involved in the embodiments of the present application.

[0041] Figure 9 Schematic diagram of the two processor units of the network card involved in the embodiments of the present application respectively running control firmware and data firmware.

[0042] Figure 10 Schematic block diagram of the network card provided by the embodiments of the present application.

[0043] Figure 11 Another schematic block diagram of the network card provided by the embodiments of the present application.

[0044] Figure 12 Schematic block diagram of the device provided by the embodiments of the present application. Detailed implementation manners

[0045] Next, the technical solutions in the present application will be described with reference to the accompanying drawings.

[0046] To facilitate the understanding of the embodiments of the present application, first, the typical networking architecture for describing the network card firmware upgrade scenario is described below in conjunction with Figure 1 Describe the typical networking architecture of the network card firmware upgrade scenario.

[0047] As Figure 1 shown, the first device includes a processor and a network card. The first device communicates with the second device through the network card. The second device can be a remote network node. The network card is connected to the processor of the first device through a peripheral component interconnect express (PCIe) bus. The network card is connected to the second device through Ethernet (ETH) / Fibre Channel (FC). It should be understood that there is also a corresponding network card on the second device ( Figure 1 not shown).

[0048] Specifically, the first device can be a server or a storage array. The second device can also be a server or a storage array.

[0049] It should be understood that the network card is an interface between the device where the network card with the firmware to be upgraded is located (such as Figure 1 the first device in Figure 1 ) and the remote device (such as Figure 1 the second device in

[0050] ), and their transmission medium can be Figure 1 ETH / FC in

[0050] . It can not only achieve the physical connection and electrical signal matching with the local area network transmission medium, but also involve functions such as frame sending and receiving, frame encapsulation and decapsulation, media access control, data encoding and decoding, and data caching. Figure 1For example only, not for limitation. In actual applications, the networking architecture in the network card firmware upgrade scenario can also be a scenario where multiple hosts share a network card, that is, multiple hosts share one network card. Specifically, the processors of multiple devices whose firmware needs to be upgraded are respectively connected to the same network card through multiple PCIe buses.

[0051] It should be noted that the host mentioned in this article corresponds to Figure 1 the first device shown in Figure 1 . For example, in the scenario where multiple hosts share a network card, it includes multiple first devices as shown in

[0052] but these multiple first devices share one network card. In other words, the processors of these multiple first devices are respectively connected to the same network card through PCIe buses. Figure 1 It should also be noted that the processor shown in

[0053] is the processor of the first device, not the processor of the network card. In the following embodiments, the processor in the device where the network card is located will be referred to as the host processor for the purpose of distinction rather than limitation. That is to say, unless otherwise specified, the processors mentioned in the following embodiments other than the host processor all represent the processor (processor unit) of the network card. Figure 1 In the above, it has been described that the existing cold upgrade method for network card firmware is to restart the network card to run the new firmware of the network card. However, due to restarting the network card, the network card loses power, resulting in the interruption of the service link. For example, when upgrading the network card firmware on a host that supports network card hot pluggability, the network card needs to be restarted to restore the service link. Since the time for restarting the network card is generally dozens of seconds, when upgrading the network card firmware on a host that supports network card hot pluggability, the service link will be interrupted for dozens of seconds. For another example, when upgrading the network card firmware on a host that does not support network card hot pluggability, both the network card and the host need to be restarted to restore the service link. Since restarting the host generally takes several minutes, when upgrading the network card firmware on a host that does not support network card hot pluggability, the service link will be interrupted for several minutes. For services with high network requirements (such as devices deploying financial and medical related applications), the interruption of the service network connection for dozens of seconds or even several minutes is unacceptable. In addition, for the scenario of multiple hosts sharing a network card that does not support hot pluggability, restarting the network card due to cold upgrade of the firmware will cause multiple hosts to restart, and the recovery cost is relatively high. In addition, due to the restart of the network card, the network link between the network card and the remote device (such as

[0054] the second device in

[0055] In view of the above problems, an embodiment of the present application provides a method, device, network card and device for upgrading the network card firmware, which can maintain the business link uninterrupted during the process of upgrading the network card firmware and can also reduce the network maintenance cost.

[0056] It should also be noted that the firmware mentioned in this embodiment refers to the software inside the network card, including the driver program and the operating system in the network card. Correspondingly, the upgrade of the network card firmware refers to the upgrade of the software inside the network card.

[0057] It should be understood that the network card includes a processor and a memory. The processor inside the network card can be a central processing unit (CPU), or other microprocessors, or can also be a field-programmable gate array (FPGA). The memory inside the network card includes ROM (or flash memory) and a memory. Specifically, the memory is a random-access memory (RAM). Generally, the firmware on the network card is stored in the ROM, and when the network card works, the firmware in the ROM is loaded into the RAM area for execution.

[0058] Figure 2 FIG. is a schematic flowchart of the method for upgrading the network card firmware provided by the embodiment of the present application. The method includes the following steps.

[0059] S210, the network card receives the new firmware of the network card from the device where the network card is located.

[0060] The device where the network card is located can be a computer, a server or a storage array.

[0061] For the convenience of description, hereinafter, the device where the network card is located is referred to as a host, and correspondingly, the processor of the device where the network card is located is referred to as a host processor.

[0062] In S210, specifically, the host processor sends the new firmware of the network card to the network card through the bus, and correspondingly, the network card receives the new firmware sent by the host processor through the bus.

[0063] Specifically, the host processor sends the new firmware stored in the storage area (ROM or RAM) of the host to the network card.

[0064] The bus for communication between the host processor and the network card can be a PCIe bus, or it can also be a non-PCIe bus. Among them, the non-PCIe bus can be a system management bus (SMBus), an inter-integrated circuit (I2C), a serial peripheral interface (SPI) bus, or a universal asynchronous receiver / transmitter (UART), etc.

[0065] After the network card receives the new firmware, it stores the new firmware in the storage space of the network card. Specifically, as Figure 2 shown, in S211, the new firmware is stored in the ROM or FLASH of the network card (as an example, Figure 2 it is schematically shown as being stored in the ROM).

[0066] Optionally, after the network card stores the new firmware locally, it sends an acknowledgment message indicating successful reception of the new firmware to the host processor, as Figure 2 shown in S212.

[0067] Optionally, after the host processor receives the acknowledgment message indicating successful reception of the new firmware sent by the network card, it can send a command to the network card to activate the new firmware, as Figure 2 shown in S213.

[0068] S220, before the network card runs the new firmware, it saves the on-site information of the services currently processed by the network card.

[0069] Specifically, the on-site information of the service represents information related to the services currently processed by the network card. For example, the on-site information of the service includes at least one of the following information: the hardware status information of the service logic, the service configuration information issued by the user, and the memory information allocated for the service logic hardware.

[0070] Optionally, in some embodiments, the network card can store the on-site information of the service in a storage area of the network card where data is not lost.

[0071] As an example, Figure 3 is a schematic diagram of the space allocation of the RAM area inside the network card. As Figure 3 shown, the RAM area inside the network card includes a Bootloader area, a firmware (FW) running area, and an area for other purposes. In this embodiment, the network card creates another storage area in the RAM area of the network card, as Figure 3The on-site storage area shown in the figure has the following attributes: When the new firmware is running, the data stored in this on-site storage area will not be lost. The network card stores the on-site information of the service in the on-site storage area as shown in Figure 3 the figure. For example, at least one of the following information is stored in this on-site storage area: the hardware status information of the service logic, the service configuration information issued by the user, and the memory information allocated for the service logic hardware.

[0072] It should be understood that the ability of a section of RAM area to ensure that the data stored on it is not lost is guaranteed by hardware, which is prior art and will not be elaborated here.

[0073] Optionally, in some embodiments, the implementation methods for saving the on-site information of the service include but are not limited to: using databases, linked lists, and queues for storage.

[0074] The operations performed in S220 can be referred to as preparation operations before running the firmware.

[0075] Optionally, in some embodiments, the preparation operations before running the firmware may include at least one of the following operations in addition to saving the on-site information of the service.

[0076] Operation 1: Mask the interrupt of the network card and turn off the system scheduling of the network card.

[0077] The purpose of Operation 1 is that the network card no longer processes other new transactions.

[0078] Operation 2: Wait for the hardware of the network card to enter the idle state, or in other words, wait for the task state of the network card to become the idle state.

[0079] The purpose of Operation 2 is to wait for the network card to complete the currently processed transaction and enter the idle state, that is, there are no tasks to be executed.

[0080] Operation 3: Clean up the system resources of the network card.

[0081] Specifically, for example, delete the timer data in the network card, delete the tasks in the network card, and release the memory in the network card.

[0082] Operation 4: Notify the device that the network card enters the firmware upgrade state.

[0083] Specifically, notify the device where the network card is located or other devices that have a communication connection with this network card that the network card will enter the firmware hot upgrade state, and during this period, it will no longer respond to the commands issued by the device where the network card is located or other devices.

[0084] It should be understood that performing the above operations 2 and 3 means restoring the dynamic behavior running in the network card to a static state, that is, making the network card have no tasks to be executed. In the case of performing operations 2 and 3, the on-site information of the service saved in S220 refers to the hardware state of the service logic maintained by the software, the configuration information issued by the user, and the memory allocated for the use of the service logic hardware when the hardware of the network card is in an idle state.

[0085] S230, the network card loads the new firmware into the memory area of the network card (as an example, Figure 2 as shown in the figure, it is loaded into the RAM), and runs the new firmware in this memory area.

[0086] "Loading" mentioned in this article means "Copy". Loading the new firmware into the memory area of the network card means copying the new firmware stored in S211 to the memory area of the network card (such as the RAM area).

[0087] Running the new firmware in this memory area means that the processor of the network card loads the new firmware and reads the content in the new firmware to run the new firmware.

[0088] For example, the processor of the network card runs the new firmware in the FW running area as Figure 3 shown.

[0089] S240, after running the new firmware, the network card initializes and configures other modules in the network card except the service logic module, and restores the service indicated by the on-site information.

[0090] The service logic module refers to the functional module in the network card for processing service logic. For example, the service logic module includes at least one of the following modules: serial-to-parallel transceiver (Serdes) message processing module, PCIe message processing module, FC / ETH MAC message processing module, FC / ETH message processing module.

[0091] Other modules refer to the modules in the network card except the above service logic module. For example, the other modules include at least one of the following modules: processor subsystem (such as CPU subsystem) module, peripheral interface module. The peripheral interface module includes but is not limited to: integrated circuit bus interface module, serial peripheral interface module, general-purpose input / output interface module.

[0092] Optionally, the other modules further include modules for implementing at least one of the following functions:

[0093] Resource semaphore creation of the network card's operating system, task creation of the network card, interrupt hanging of the network card, timer creation of the network card, memory application of the network card.

[0094] It should be understood that the resource semaphore is created to achieve synchronization and competition among multiple tasks of the network card. Task creation is for handling complex hardware events within the network card, polling hardware status, and other transactions. Interrupt attachment is for enabling the new firmware to sense events reported by the network card hardware.

[0095] Specifically, in S240, only the processor subsystem module and the peripheral interface module within the above network card are initialized and configured, without initializing the service logic module inside the above network card.

[0096] In S240, the implementation method of restoring the scene information corresponds to the implementation method of saving the scene information.

[0097] It should be noted that the initialization and configuration involved in this embodiment are different from the power-on initialization configuration after power-off in the traditional technology. For example, after the network card is powered off and restarted, all modules in the network card need to be initialized and configured at this time. However, the initialization and configuration in this embodiment refer to the initialization of other modules except the service logic module. The initialization and configuration involved in this embodiment can also be called differential initialization configuration.

[0098] The operations performed in S240 can be called the recovery operations after running the firmware.

[0099] Optionally, in some embodiments, the preparation operations before running the firmware include operation 4, notifying the device that the network card enters the firmware upgrade state. Correspondingly, the recovery operations after running the firmware can also include: notifying the device that the network card has completed the firmware upgrade.

[0100] It should be understood that by using the technical solution provided in this embodiment to implement the firmware upgrade of the network card, there is no need to restart the network card, that is, the network card does not lose power, so the service link is ensured not to be disconnected.

[0101] It should also be noted that the concepts of new and old will be mentioned in this article, such as the new firmware and the old firmware. Here, the concepts of new and old are relative.

[0102] In this embodiment, by saving the scene before running the new firmware, restoring the scene after running the new firmware, and initializing and configuring other modules except the service logic module, the firmware of the network card can be upgraded without restarting the network card. Since there is no need to restart the network card, the service link can be kept uninterrupted. Therefore, the technical solution provided in this embodiment can complete the firmware upgrade of the network card while keeping the service communication link uninterrupted, thereby reducing the impact of the network card firmware upgrade on the service.

[0103] Compared with the traditional firmware cold upgrade method, the method for upgrading the network card firmware provided in the embodiment of the present application can be called the firmware hot upgrade method.

[0104] Figure 4 Schematic diagram of the principle for the new network card firmware to take effect. Figure 4 Step ① in [ ] corresponds to S220 in the above embodiment, Figure 4 Step ② in [ ] corresponds to S230 in the above embodiment, Figure 4 Step ③ in [ ] corresponds to S240 in the above embodiment.

[0105] For specific descriptions, please refer to the above text and will not be elaborated here.

[0106] Three implementation manners for running the new firmware in S230 will be described below. The network card can run the new firmware in any of the following manners.

[0107] Manner 1:

[0108] The memory area of the network card includes a first memory area and a second memory area, and the network card includes a processor. S230 specifically includes: the network card loads the new firmware into the first memory area, and the first memory area is different from the second memory area where the network card currently runs the old firmware; the position where the processor executes the software program jumps from the second memory area to the first memory area.

[0109] The position where the processor executes the software program jumps from the second memory area to the first memory area means that the range of the memory addresses read by the processor of the network card moves from the second memory area to the first memory area. It should be understood that the processor of the network card reads instructions in the first memory area, which is equivalent to running the new firmware.

[0110] In this embodiment, the memory area of the network card is relatively sufficient and can store the old firmware and the new firmware at the same time, that is, the memory area of the network card includes a first memory area and a second memory area. The second memory area is used to store the old firmware, and the first memory area is used to store the new firmware. The old firmware and the new firmware are relative concepts. The old firmware represents the firmware version before the firmware upgrade, and the new firmware represents the firmware version after the firmware upgrade.

[0111] For example, in Figure 3 the example of the space allocation of the RAM area inside the network card shown, the FW running area inside the network card can be divided into an old area and a new area. The old area is used to store the old firmware, and the new area is used to store the new firmware.

[0112] Optionally, in this embodiment, the operation of the network card loading the new firmware into the first memory area can be performed before the network card saves the on-site information of the service.

[0113] Specifically, before S220, the network card loads the new firmware into the first memory area.

[0114] In this embodiment, by loading the new firmware into a new memory area before saving the scene, it is possible to immediately run the new firmware after completing the scene saving (or other preparation operations), which can further reduce the impact of network card firmware upgrade on services.

[0115] Figure 5 The flowchart schematic diagram showing the implementation method of the network card running the new firmware in Method 1. In Figure 5 the memory area of the network card includes a first memory area and a second memory area. The second memory area is used to store the old firmware, and the first memory area is used to store the new firmware. As Figure 5 shown, it includes the following steps.

[0116] S51, the user sends a firmware upgrade instruction to the host processor.

[0117] Correspondingly, the host processor receives the firmware upgrade instruction issued by the user.

[0118] S52, the host processor sends the new firmware to the network card.

[0119] S52 can correspond to S210 described above. For relevant content, please refer to the above description and will not be elaborated here.

[0120] S53, the network card writes the new firmware into the ROM.

[0121] S54 (optionally), after writing the new firmware into the ROM, the network card can send a response message indicating successful reception of the new firmware to the host.

[0122] S55, the network card performs preparation operations before running the new firmware, and the preparation operations include saving the scene information of the service currently processed by the network card.

[0123] S55 can correspond to S220 described above. For relevant content, please refer to the above description and will not be elaborated here.

[0124] S56, the network card loads the new firmware into the first memory area. The first memory area is different from the second memory area where the network card is currently running the old firmware, and the position where the processor of the network card executes the software program jumps from the second memory area to the first memory area.

[0125] Specifically, the processor of the network card is currently running the old firmware in the second memory area. The network card copies the new firmware to the first memory area different from the second memory area, and then makes the processor of the network card execute a jump instruction to jump from the second memory area to the first memory area to run the new firmware. Among them, running the new firmware means that the network card processor calls a process to read the content in the new firmware and complete the corresponding operations.

[0126] Optionally, the operation of the network card loading the new firmware into the first memory area in S56 can be performed before S55.

[0127] By loading the new firmware into the new memory area before saving the scene, it can make the new firmware run immediately after the scene saving (or other preparation operations) is completed, which can further reduce the impact of network card firmware upgrade on the service.

[0128] S57, the network card performs the recovery operation after running the new firmware. The recovery operation includes initializing and configuring other modules in the network card except the service logic module, and restoring the service indicated by the scene information.

[0129] S57 can correspond to S240 described above. For relevant content, see the above description and will not be elaborated here.

[0130] S58 (optionally), after the network card completes the firmware upgrade, it sends a response message indicating successful firmware upgrade to the host processor.

[0131] In the whole process of firmware upgrade in this embodiment, the communication link between the network card and the host processor and between the network card and the remote network device is normal, and the service link is also normal, as shown in Figure 4 the schematic diagram. It should be understood that Figure 4 the remote network device in Figure 1 corresponds to the second device in

[0132] In this embodiment, the old firmware is stored in the second memory area of the network card's memory area, and the new firmware is stored in the first memory area of the network card's memory area. Then, the position where the processor of the network card executes the software program jumps from the second memory area to the first memory area, thereby realizing the operation of the new firmware, that is, realizing firmware upgrade. During the whole firmware upgrade process, there is no need to restart the network card, so the network card is not powered off, thus maintaining the uninterrupted link between the network card and the host processor and the uninterrupted link between the network card and the remote device, that is, ensuring the uninterrupted service link, and can effectively reduce the impact of firmware upgrade on the service.

[0133] It should be understood that when there is sufficient space in the memory area of the network card, that is, the memory area can store the new firmware and the old firmware at the same time, the implementation method of running the new firmware described in the above method one can be used to upgrade the network card firmware.

[0134] Method two: The memory area of the network card includes a second memory area, and the network card includes a processor. S230 specifically includes: the network card resets the processor, and the processor runs the old firmware in the second memory area before reset; after the processor is reset, the network card loads the new firmware into the second memory area; the processor restarts from the second memory area and runs the new firmware.

[0135] For example, in Figure 3 the example of the space allocation of the RAM area inside the network card shown, the FW operation area inside the network card does not need to be divided into multiple areas. Before the network card's processor is reset, the old firmware runs in this FW operation area. After the network card's processor restarts, the new firmware runs in this FW operation area.

[0136] Figure 6 The flowchart schematic diagram showing the implementation method of the network card running the new firmware in the second method. In Figure 6 it, the memory area of the network card includes a second memory area, and the second memory area is used to store the old firmware. As Figure 6 shown, it includes the following steps.

[0137] S61. The user sends a firmware upgrade instruction to the host processor.

[0138] Correspondingly, the host processor receives the firmware upgrade instruction issued by the user.

[0139] S62. The host processor sends the new firmware to the network card.

[0140] S62 can correspond to S210 described above. For the relevant content, please refer to the above description and will not be elaborated here.

[0141] S63. The network card writes the new firmware into the ROM.

[0142] S64 (optionally). After the network card writes the new firmware into the ROM, it can send a response message indicating successful reception of the new firmware to the host.

[0143] S65. The network card performs the preparation operations before running the new firmware, and the preparation operations include saving the on-site information of the service currently processed by the network card.

[0144] S65 can correspond to S220 described above. For the relevant content, please refer to the above description and will not be elaborated here.

[0145] S66. The network card resets the processor of the network card. Before the reset, the old firmware in the second memory area runs on this processor; after the reset of the processor of the network card, the network card loads the new firmware into the second memory area; the processor of the network card restarts from the second memory area and runs the new firmware.

[0146] S67. The network card performs the recovery operations after running the new firmware, and the recovery operations include initializing and configuring other modules in the network card except the service logic module, and resuming the service indicated by the on-site information.

[0147] S67 can correspond to S240 described above. For the relevant content, please refer to the above description and will not be elaborated here.

[0148] S68 (optionally), after the network card completes the firmware upgrade, it sends a firmware upgrade success response message to the host processor.

[0149] In the whole process of firmware upgrade in this embodiment, the communication links between the network card and the host processor and between the network card and the remote network device are normal, as Figure 5 shown in the illustration. It should be understood that Figure 5 the remote network device in the illustration corresponds to Figure 1 the second device in the illustration.

[0150] It should be understood that the reset of the network card's processor will cause a short business pause, but because the time is very short, it will not cause the network card to disconnect from the remote device. Therefore, the network service hardly perceives it.

[0151] In this embodiment, by resetting and restarting the network card's processor to implement firmware upgrade, it is possible to maintain the business link without interruption during the firmware upgrade process. In addition, since it is not required to load the new firmware and the old firmware into the memory area at the same time, the requirement for the network card's memory space can be reduced.

[0152] It should be understood that when the memory area space of the network card is not sufficient, for example, when it does not allow the new firmware and the old firmware to exist at the same time, the network card firmware upgrade can be implemented by the above method two.

[0153] Next, in combination with Figure 7 the software and hardware hierarchical structure inside the network card provided by the embodiments of the present application will be further introduced. As Figure 7 shown, the software and hardware hierarchy inside the network card from bottom to top includes:

[0154] (1) Physical layer (PHY Layer), which is responsible for underlying physical transmission and electrical characteristics.

[0155] (2) Data link layer (MAC Layer), which is responsible for data link negotiation and transmission.

[0156] (3) Network hardware layer (FC / ETH Hardware Layer), which is responsible for the network transmission protocol part. The network layer is not limited to Fibre Channel (FC) and Ethernet.

[0157] The above three layers belong to the hardware logic module and are directly involved in data forwarding.

[0158] (4) Transport layer to application layer.

[0159] The processor of the network card runs the firmware, corresponding to the transport layer to the application layer.

[0160] The firmware of the network card can be divided into the following two types.

[0161] The first type of firmware is only responsible for functions on the control path such as network card configuration and network card event handling, and does not participate in functions on the data path. That is, the first type of firmware can be called control firmware (CTRL FW).

[0162] As Figure 7 shown, if the firmware running on the network card's processor is control firmware, the process of upgrading the network card firmware has nothing to do with the functions on the data path. And the service belongs to the functions on the data path. Therefore, the process of upgrading the first type of firmware will not cause the service to pause, that is, the service is completely unaware of the firmware upgrade.

[0163] The second type of firmware is not only responsible for functions on the control path such as network card configuration and network card event handling, but also participates in functions on the data path such as packet parsing and data forwarding processing. That is, the second type of firmware can be called control and data firmware (CTRL+DATA FW).

[0164] As Figure 8 shown, if the firmware running on the network card's processor is control and data firmware, the process of upgrading the network card firmware is related to the functions on the data path.

[0165] Optionally, in each of the above embodiments, the new firmware can be the first type of firmware or the second type of firmware.

[0166] It should be understood that for the upgrade of the second type of firmware, by using the method for upgrading the network card firmware provided by the embodiments of the present application to implement the network card firmware upgrade, the service link can be maintained without interruption during the network card firmware upgrade.

[0167] As described above, when the memory space of the network card is insufficient, the implementation method of running the new firmware in the above-described manner two should be used to upgrade the network card firmware. In this implementation method, due to the reset of the network card's processor, it will cause a short interruption of the service (the service link is not interrupted), but the user can hardly perceive the duration of this interruption.

[0168] In the scenario of upgrading the second type of network card by implementing the new firmware in Method 2, in order to further reduce the impact of the upgrade of the second type of firmware on the service, this application proposes to separate the second type of firmware into a control firmware part and a data firmware part. Among them, the data firmware part refers to the firmware that participates in the functions of the data path; the control firmware part refers to the firmware that participates in the functions of the control path. It should be understood that the upgrade of the control firmware part of the second type of firmware has no impact on the service. Although the upgrade of the data firmware part of the second type of firmware has an impact on the service, the data firmware part of the second type of firmware is relatively streamlined compared to the overall second type of firmware. In other words, the upgrade process of the data firmware part of the second type of firmware is simpler than the overall upgrade process of the second type of firmware and takes less time. Therefore, the impact of the upgrade process of the data firmware part of the second type of firmware on the service is less than the impact of the overall upgrade process of the second type of firmware on the service.

[0169] To achieve independent upgrades of the data part and the control part of the second type of firmware, the network card needs to have a first processor unit and a second processor unit. Among them, the first processor unit is used to process data functions, and the second processor unit is used to process control functions. For example, the first processor unit is used to run the data firmware part, and the second processor unit is used to run the control firmware part.

[0170] The processor of the network card can be a single-core processor or a multi-core processor. The above-mentioned first processor unit and second processor unit can be two single-core processors, or the above-mentioned first processor unit and second processor unit are two processor cores of the same multi-core processor.

[0171] Specifically, as Figure 9 shown, the network card has a multi-core processor, and the multiple processors include processor core 1 and processor core 2 as shown in Figure 9 . Among them, processor core 1 is used to run the control firmware, and processor core 2 is used to run the data firmware. It should be understood that the process of upgrading the control firmware by resetting and restarting processor core 1 has no impact on the service.

[0172] As described above in combination with Figure 5 and Figure 6 the implementation methods of Method 1 and Method 2 for running the new firmware are described. The following describes the third implementation method for running the new firmware.

[0173] Method 3: The new firmware includes a separated data firmware part and a control firmware part. The memory area of the network card includes a third memory area and a fourth memory area. The network card includes a first processor unit (such as processor core 1 shown in Figure 9 ) and a second processor unit (such as Figure 9The processor core shown in 2), the first processor unit is used to process data functions, and the second processor unit is used to process control functions. S230 specifically includes: the network card resets the first processor unit, and the first processor unit runs the data firmware part of the old firmware in the third memory area before reset; after the first processor unit is reset, the network card loads the data firmware part of the new firmware into the third memory area; the first processor unit restarts from the third memory area and runs the data firmware part of the new firmware; after the first processor unit restarts, the network card resets the second processor unit, and the second processor unit runs the control firmware part of the old firmware in the fourth memory area before reset; after the second processor unit is reset, the network card loads the control firmware part of the new firmware into the fourth memory area; the second processor unit restarts from the fourth memory area and runs the control firmware part of the new firmware.

[0174] In this embodiment, the network card has a first processor unit and a second processor unit. The first processor unit is used to process data functions, and the second processor unit is used to process control functions. In the case where the new firmware includes a separated data firmware part and a control firmware part, by resetting and restarting the first processor unit to run the data firmware part of the new firmware, and after the first processor unit restarts, by resetting and restarting the second processor unit to run the control firmware part of the new firmware, the firmware upgrade is completed. Although in the scenario of resetting the first processor, there will be a short-term business pause, but since the data firmware part of the new firmware is relatively concise compared to the whole new firmware, it will not cause the interruption of the business link. Therefore, this embodiment can reduce the impact of firmware upgrade on the business, and at the same time can also reduce the requirement for the memory space of the network card.

[0175] In summary, the embodiment of the present application saves the scene before running the new firmware, restores the scene after running the new firmware, and initializes and configures other modules except the business logic module, so that the firmware of the network card can be upgraded without restarting the network card. Since there is no need to restart the network card, the business link can be kept uninterrupted. Therefore, the technical solution provided by this embodiment can complete the firmware upgrade of the network card while keeping the business communication link uninterrupted, thereby reducing the impact of the network card firmware upgrade on the business.

[0176] The method for separately upgrading the network card firmware is described above. In practical applications, there may be a scenario where the host and the network card are upgraded together. If the host needs to be restarted due to upgrading the firmware inside the host, in this case, it is inevitable that the network card will lose power, resulting in the disconnection of the business link. If there is no need to restart the host when upgrading the firmware inside the host, then the method provided by the embodiment of the present application is used to upgrade the network card firmware, which can ensure that the business link is not disconnected.

[0177] Although the above describes the method for firmware upgrade of a network card, the firmware upgrade solution provided by the embodiments of the present application can also be applied to Ethernet interfaces, Fibre Channel (FC) interfaces, SAS / SATA interfaces, redundant arrays of independent disks (RAID), host bus adapters (HBA), and can also be used for IO interface card devices of other forms of network hosts (compute nodes, storage nodes).

[0178] The firmware upgrade solution provided by the embodiments of the present application can also be applied to some system-on-a-chip (SoC). SoC refers to the technology of integrating a complete system on a single chip and packaging all or part of the necessary electronic circuits. A complete system generally includes a central processing unit (CPU), a memory, and peripheral circuits, etc.

[0179] The method embodiments of the present application are described above, and the device embodiments of the present application are described below. The explanations and beneficial effects of the relevant content in the device embodiments can refer to the corresponding method embodiments provided above, and will not be elaborated here.

[0180] As Figure 10 shown, the embodiments of the present application provide a network card, and the network card includes the following units.

[0181] A transceiver unit 1010, configured to receive new firmware of the network card from the device where the network card is located;

[0182] A processing unit 1020, configured to save the on-site information of the service currently processed by the network card, where the on-site information of the service is used to indicate information related to the service currently processed by the network card; load the new firmware into the memory area of the network card, and run the new firmware in the memory area; initialize and configure other modules in the network card except the service logic module, and resume the service indicated by the on-site information.

[0183] In this embodiment, by saving the on-site information before running the new firmware, restoring the on-site information after running the new firmware, and initializing and configuring other modules except the service logic module, the firmware of the network card can be upgraded without restarting the network card. Since there is no need to restart the network card, the service link can be kept uninterrupted. Therefore, the technical solution provided by this embodiment can complete the firmware upgrade of the network card while keeping the service communication link uninterrupted, thereby reducing the impact of the network card firmware upgrade on the service.

[0184] Optionally, in some embodiments, the memory area of the network card includes a first memory area and a second memory area, and the processing unit 1020 includes a processor;

[0185] Among them, the processing unit 1020 is used to load the new firmware into the memory area of the network card and run the new firmware in this memory area, including: specifically, the processing unit 1020 is used to load the new firmware into the first memory area, and the first memory area is different from the second memory area where the network card currently runs the old firmware; the processor is used to jump the execution position of the software program from the second memory area to the first memory area.

[0186] Optionally, in some embodiments, the memory area of the network card includes a second memory area, and the processing unit 1020 includes a processor;

[0187] Among them, the processing unit 1020 is used to load the new firmware into the memory area of the network card and run the new firmware in this memory area, including: specifically, the processing unit 1020 is used to reset the processor, and the processor runs the old firmware in the second memory area before reset; after the processor is reset, load the new firmware into the second memory area; the processor is used to restart from the second memory area and run the new firmware.

[0188] Optionally, in some embodiments, the new firmware includes a separated data firmware part and a control firmware part, the memory area of the network card includes a third memory area and a fourth memory area, the processing unit 1020 includes a first processor unit and a second processor unit, the first processor unit is used to process data functions, and the second processor unit is used to process control functions;

[0189] Among them, the processing unit 1020 is used to load the new firmware into the memory area of the network card and run the new firmware in this memory area, including: specifically, the processing unit 1020 is used to reset the first processor unit, and the first processor unit runs the data firmware part of the old firmware in the third memory area before reset; after the first processor unit is reset, load the data firmware part of the new firmware into the third memory area; the first processor unit is used to restart from the third memory area and run the data firmware part of the new firmware; specifically, the processing unit 1020 is used to reset the second processor unit after the first processor unit restarts, and the second processor unit runs the control firmware part of the old firmware in the fourth memory area before reset; after the second processor unit is reset, load the control firmware part of the new firmware into the fourth memory area; the second processor unit is used to restart from the fourth memory area and run the control firmware part of the new firmware.

[0190] Optionally, in some embodiments, the processing unit 1020 is configured to load the new firmware into the first memory area, including: specifically, the processing unit 1020 is configured to load the new firmware into the first memory area before saving the on-site information of the service.

[0191] Optionally, in some embodiments, the on-site information of the service includes at least one of the following information: hardware status information of the service logic, service configuration information issued by the user, and memory information allocated to the service logic hardware.

[0192] Optionally, in some embodiments, before running the new firmware, the processing unit 1020 is further configured to perform at least one of the following operations: closing the system scheduling of the network card, completing the transactions currently processed by the network card, cleaning up the system resources of the network card, and notifying the device that the network card enters the firmware upgrade state.

[0193] The network card according to the embodiment of the present invention can correspondingly execute the method described in the embodiment of the present invention, and the above and other operations and / or functions of each unit in the network card respectively implement Figure 2 、 Figure 5 and Figure 6 the corresponding processes of each method, and for the sake of brevity, they will not be elaborated here.

[0194] In summary, in this embodiment, by saving the on-site before running the new firmware, restoring the on-site after running the new firmware, and initializing and configuring other modules except the service logic module, the firmware of the network card can be upgraded without restarting the network card. Since there is no need to restart the network card, the service link can be kept uninterrupted. Therefore, the technical solution provided in this embodiment can complete the firmware upgrade of the network card while keeping the service communication link uninterrupted, thereby reducing the impact of the network card firmware upgrade on the service.

[0195] As Figure 11 , the embodiment of the present application further provides a network card, which includes a processor 1110, a memory 1120, a bus 1130, an input receiver 1140, and an output interface 1150. The processor 1110, the memory 1120, the input receiver 1140, and the output interface 1150 are communicatively connected through the bus 1130. The memory 1120 is used to store instructions, and the processor 1110 is configured to execute the instructions stored in the memory 1130, and the execution of the instructions stored in the memory 1130 causes the processor 1110 to execute the actions performed by the network card in the above method embodiment.

[0196] The embodiment of the present application further provides a chip, which includes a processing unit and a communication interface. The processing unit is configured to execute the operations performed by the chip device in the above method embodiment, and the communication interface is used to communicate with the outside.

[0197] Optionally, the chip may further include a storage unit in which instructions are stored, and the processing unit is configured to execute the instructions stored in the storage unit. When the instructions are executed, the processing unit is configured to perform the operations performed by the network card in the foregoing method embodiments.

[0198] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method executed by the network card in the foregoing method embodiments can be implemented.

[0199] An embodiment of the present application further provides a computer program product including instructions. When the instructions are executed by a computer, the method executed by the network card in the foregoing method embodiments can be implemented.

[0200] As Figure 12 shown, an embodiment of the present application further provides a device, which includes a processor 1210, a communication interface 1220, a bus 1230, and a network card 1240. Among them, the communication interface 1220 and the network card 1240 are communicatively connected through the bus 1230. The processor 1210 corresponds to the host processor mentioned in the foregoing embodiments. The network card 1240 corresponds to the network card in the foregoing embodiments. The server may correspond to the first device or the host mentioned in the foregoing embodiments.

[0201] Optionally, the bus 1130 may be a PCIe bus, or may also be a non-PCIe bus. Among them, the non-PCIe bus may be an SMBus, I2C, SPI bus, or UART, etc.

[0202] It should be understood that the network card in the device according to the embodiment of the present invention may correspond to the network card shown in the embodiment of the present invention Figure 9 and may correspond to the execution subject of the method for implementing network card firmware upgrade according to the embodiment of the present invention Figure 2 , Figure 5 and Figure 6 in, and the above and other operations and / or functions of each module in the device are respectively for implementing Figure 2 , Figure 5 and Figure 6 in the corresponding processes of each method. For the sake of brevity, they will not be described herein again.

[0203] In summary, in the embodiment of the present application, the scene is saved before running the new firmware, the scene is restored after running the new firmware, and other modules except the business logic module are initialized and configured, so that the firmware of the network card can be upgraded without restarting the network card. Since there is no need to restart the network card, the service link can be kept uninterrupted. Therefore, the technical solution provided by this embodiment can complete the firmware upgrade of the network card while keeping the service communication link uninterrupted, thereby reducing the impact of the network card firmware upgrade on the service.

[0204] It should be understood that the network card in this embodiment has a processor and a memory. Among them, the memory can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM). It should be noted that the memories described herein are intended to include but not be limited to these and any other suitable types of memories.

[0205] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more collections of available media. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media. The semiconductor media can be a solid state drive (SSD).

[0206] Those of ordinary skill in the art will appreciate that the units and algorithm steps of the examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0207] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be described herein again.

[0208] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the devices or units can be in electrical, mechanical, or other forms.

[0209] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0210] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.

[0211] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for network card upgrade, characterized in that, The method includes: Obtaining new firmware required for network card upgrade; Notifying the device where the network card is located or other devices in communication connection with the network card that the network card will no longer respond to commands issued by the device where the network card is located or other devices; performing a hot upgrade operation; after the hot upgrade operation is completed, lifting the peripheral isolation; The new firmware includes a separated data firmware part and a control firmware part. The network card includes a first processor unit and a second processor unit. The first processor unit is used to process data functions, and the second processor unit is used to process control functions. Among them, the data firmware part refers to the firmware participating in the functions of the data path, and the control firmware part refers to the firmware participating in the functions of the control path. By resetting and restarting the first processor unit to run the data firmware part of the new firmware, after the first processor unit restarts, by resetting and restarting the second processor unit to run the control firmware part of the new firmware, to complete the firmware upgrade.

2. The method according to claim 1, wherein Before notifying the device where the network card is located or other devices in communication connection with the network card that the network card will no longer respond to commands issued by the device where the network card is located or other devices, the method further includes: Obtaining the on-site information of the service currently processed by the network card, and the on-site information of the service is used to indicate information related to the service currently processed by the network card.

3. The method according to claim 2, wherein Before performing the hot upgrade operation, the method further includes: Masking the interrupt of the network card; Closing the system scheduling of the network card; When the hardware of the network card enters the idle state, clearing the system resources of the network card.

4. The method according to any one of claims 1 to 3, characterized in that, Performing the hot upgrade operation includes: The network card loads the new firmware into the memory area of the network card and runs the new firmware in the memory area.

5. The method according to any one of claims 1 to 3, characterized in that Performing the hot upgrade operation includes: The network card loads the new firmware into the first memory area of the network card, and the first memory area is different from the second memory area where the network card currently runs the old firmware. The execution location of the software program of the network card jumps to the first memory area.

6. The method according to any one of claims 1 to 3, characterized in that The memory area of the network card includes a third memory area and a fourth memory area; performing the hot upgrade operation includes: The network card resets the first processor unit. The first processor unit runs the data firmware part of the old firmware in the third memory area before reset; after the first processor unit is reset, the network card loads the data firmware part of the new firmware into the third memory area; the first processor unit restarts from the third memory area and runs the data firmware part of the new firmware. After the first processor unit restarts, the network card resets the second processor unit. The second processor unit runs the control firmware part of the old firmware in the fourth memory area before reset; after the second processor unit is reset, the network card loads the control firmware part of the new firmware into the fourth memory area; the second processor unit restarts from the fourth memory area and runs the control firmware part of the new firmware.

7. The method according to claim 2 or 3, characterized in that, The on-site information of the service includes at least one of the following information: hardware status information of the service logic, service configuration information issued by the user, and memory information allocated to the service logic hardware.

8. The method according to claim 2 or 3, characterized in that, After performing the hot upgrade operation, the method further includes: The network card initializes and configures other modules in the network card except the service logic module, and restores the service indicated by the site information.

9. A device for network card upgrade, characterized in that, The device comprises: The transceiver unit is used to obtain the new firmware required for the network card upgrade; A processing unit, configured to notify the device where the network card is located or other devices that are in communication connection with the network card that the network card no longer responds to commands issued by the device where the network card is located or other devices, and to perform a hot upgrade operation; after the hot upgrade operation is completed, release the peripheral isolation; The new firmware includes a separate data firmware part and a control firmware part, and the network card includes a first processor unit and a second processor unit, the first processor unit is used to process data functions, and the second processor unit is used to process control functions; wherein, the data firmware part refers to the firmware participating in the functions of the data path, and the control firmware part refers to the firmware participating in the functions of the control path, and the data firmware part of the new firmware is run by resetting and restarting the first processor unit. After the first processor unit is restarted, the control firmware part of the new firmware is run by resetting and restarting the second processor unit to complete the firmware upgrade.

10. The device according to claim 9, characterized in that The transceiver unit is also used to obtain on-site information of the business currently processed by the network card before notifying the device where the network card is located or other devices that have a communication connection with the network card that the network card no longer responds to commands issued by the device where the network card is located or other devices, where the on-site information of the business is used to indicate information related to the business currently processed by the network card.

11. The device according to claim 10, characterized in that The processing unit is further used to shield the interruption of the network card; turn off the system scheduling of the network card; and when the hardware of the network card enters an idle state, clean up the system resources of the network card.

12. The device according to any one of claims 9 to 11, characterized in that The processing unit is further configured to load the new firmware into the memory area of the network card and run the new firmware in the memory area.

13. The device according to any one of claims 9 to 11, characterized in that, The memory area of the network card includes a third memory area and a fourth memory area; The processing unit is further used to reset the first processor unit, the first processor unit runs the data firmware part of the old firmware in the third memory area before resetting; after the first processor unit is reset, the data firmware part of the new firmware is loaded into the third memory area; The first processor unit restarts from the third memory area and runs the data firmware part of the new firmware; After the first processor unit is restarted, resetting the second processor unit, the second processor unit running the control firmware portion of the old firmware in the fourth memory area before the resetting; After the second processor unit is reset, the control firmware part of the new firmware is loaded into the fourth memory area; The second processor unit restarts from the fourth memory area and runs the control firmware part of the new firmware.

14. The device according to claim 10 or 11, characterized in that, The on-site information of the service includes at least one of the following information: the hardware status information of the service logic, the service configuration information issued by the user, and the memory information allocated to the service logic hardware.

15. The device according to claim 10 or 11, wherein The processing unit is further configured to initialize and configure other modules in the network card except the service logic module, and resume the service indicated by the on-site information.

16. A network card, characterized in that, It includes a memory and a processor. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory. And the execution of the instructions stored in the memory causes the processor to execute the operation steps in the method according to any one of claims 1 to 8.

17. A device, characterized in that, The device includes a network card, and the network card includes a memory and a processor. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory. And the execution of the instructions stored in the memory causes the processor to execute the operation steps in the method according to any one of claims 1 to 8.

18. A computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer is caused to execute the operation steps in the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Optical module firmware program online upgrade method supporting version fallback

    CN105912356A