CN112491600A - Method and device for upgrading network card firmware, network card and equipment - Google Patents

Method and device for upgrading network card firmware, network card and equipment Download PDF

Info

Publication number
CN112491600A
CN112491600A CN202011279529.3A CN202011279529A CN112491600A CN 112491600 A CN112491600 A CN 112491600A CN 202011279529 A CN202011279529 A CN 202011279529A CN 112491600 A CN112491600 A CN 112491600A
Authority
CN
China
Prior art keywords
network card
firmware
memory area
service
processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011279529.3A
Other languages
Chinese (zh)
Inventor
谢军宏
徐启明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XFusion Digital Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202011279529.3A priority Critical patent/CN112491600A/en
Publication of CN112491600A publication Critical patent/CN112491600A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play

Abstract

The application provides a method, a device, a network card and equipment for upgrading network card firmware, wherein the method comprises the following steps: the network card receives the new firmware of the network card from the equipment where the network card is located; saving the field information of the service currently processed by the network card, wherein the field information of the service is used for indicating the information related to the service currently processed by the network card; the network card loads the new firmware into a memory area of the network card and runs the new firmware in the memory area; and initializing and configuring other modules except the service logic module in the network card, and recovering the service indicated by the field information. According to the method and the device, the network card does not need to be restarted when the firmware of the network card is upgraded, so that the upgrading of the firmware of the network card can be completed under the condition that a service link is maintained uninterrupted, and the influence of the upgrading of the firmware of the network card on service application can be reduced.

Description

Method and device for upgrading network card firmware, network card and equipment
Technical Field
The present application relates to the field of communications, and in particular, to a method, an apparatus, a network card, and a device for upgrading a network card firmware.
Background
With the rapid development of network technology, different network protocols can be used for transmitting data between different devices. Correspondingly, the types of network cards in the devices are more and more, besides the traditional ethernet card, an intelligent network card is also provided, and the messages can be transmitted between different devices configured with the intelligent network card by using a high-speed network transmission protocol, so that the network transmission rate is improved. Meanwhile, as the internal software and hardware of the network card are increasingly complex, the software defects (bugs) and hardware faults of the network card are more and more. Only if the fault is repaired in time can the impact on the running service in the device be reduced. Therefore, for the software and hardware defects of the network card, Firmware (FW) in the network card needs to be updated timely and quickly for repair.
At present, the conventional method is to update the internal firmware of the network card by using a cold upgrade method. The basic process of cold upgrade is that after a device to be upgraded (e.g., a server/memory array) acquires a new firmware, the new firmware is sent to a network card in the device through a peripheral component interconnect express (PCIe) bus, the network card writes the new firmware into a read-only memory (ROM) (e.g., a flash memory), and then restarts the network card and starts the boot by running the new firmware from the ROM, so that the new firmware will take effect. But restarting the network card can cause service link interruption, which in turn causes service interruption. In addition, on the device which does not support the hot plug of the network card, in the process of updating the firmware of the network card, the network card is required to be restarted, and the whole device is required to be restarted, so that the new firmware can take effect.
Therefore, the current method for upgrading the network card firmware can cause service link interruption and influence service operation.
Disclosure of Invention
The application provides a method, a device, a network card and equipment for upgrading the firmware of the network card, which can maintain a service link uninterrupted in the process of upgrading the firmware of the network card and reduce the influence of upgrading the firmware of the network card on service application.
In a first aspect, a method for upgrading a network card firmware is provided, where the method includes: the network card receives the new firmware of the network card from the equipment where the network card is located; before the network card runs the new firmware, storing the field information of the service currently processed by the network card, wherein the field information of the service is used for indicating the information related to the service currently processed by the network card; the network card loads the new firmware into a memory area of the network card and runs the new firmware in the memory area; after the network card runs the new firmware, initializing and configuring other modules in the network card except the service logic module, and recovering the service indicated by the field information.
Specifically, the processor of the device in which the network card is located issues the new firmware of the network card to the network card through the bus, and accordingly, the network card receives the new firmware issued by the host processor through the bus.
The bus for performing communication between the processor of the device where the network card is located and the network card may be a PCIe bus, or may be a non-PCIe bus. The non-PCIe bus may be a system management bus (SMBus), an integrated circuit bus (I2C), a Serial Peripheral Interface (SPI) bus, or a universal asynchronous receiver/transmitter (UART), for example.
As an implementation manner, after receiving a new firmware issued by a device where the network card is located, the network card stores the new firmware in a local ROM.
By saving the site before the new firmware is operated, restoring the site after the new firmware is operated, and performing initialization configuration on other modules except the service logic module, the firmware of the network card can be upgraded without restarting the network card, and the service link can be kept uninterrupted because the network card does not need to be restarted. Therefore, the technical scheme provided by the embodiment can complete the firmware upgrade of the network card under the condition of keeping the service communication link continuous, so that the influence of the firmware upgrade of the network card on the service can be reduced.
In another possible implementation, the service logic module represents a functional module in the network card for processing the service logic. For example, the business logic module includes at least one of the following modules: a serial-parallel transceiver (servers) message processing module, a PCIe message processing module, an FC/ETH MAC message processing module and an FC/ETH message processing module.
In another possible implementation manner, the other modules represent modules in the network card except for the service logic module. For example, the other module includes at least one of the following modules: a processor subsystem module and a peripheral interface module. The peripheral interface module includes but is not limited to: the device comprises an integrated circuit bus interface module, a serial peripheral interface module and a general purpose input/output (GPIO) interface module.
In another possible implementation manner, the memory area of the network card includes a first memory area and a second memory area, and the network card includes a processor; the network card loads the new firmware to a 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, wherein the first memory area is different from the second memory area where the old firmware currently runs by the network card; the processor jumps from the second memory area to the first memory area when executing the software program, in other words, the range of the processor reading memory addresses of the network card is moved from the second memory area to the first memory area. It should be understood that the processor of the network card reads the instruction in the first memory area, which is equivalent to running the new firmware.
In another possible implementation manner, the network card loads the new firmware into the first memory area before saving the field information of the service.
By loading the new firmware into the new memory area before saving the field, the new firmware can be immediately operated after the field saving (or other preparation operations) is finished, and the influence of the upgrading of the network card firmware on the service can be further reduced.
The old firmware is stored in the second memory area of the network card, the new firmware is stored in the first memory area of the network card, and then the position of the processor of the network card for executing the software program is jumped from the second memory area to the first memory area, so that the operation of the new firmware is realized, namely the firmware upgrading is realized. In the whole firmware upgrading process, the network card is not required to be restarted, and the network card is not powered off, so that the link between the network card and the host processor is maintained uninterrupted, the link between the network card and the remote equipment is also not interrupted, namely, the service link is ensured to be uninterrupted, and the influence of firmware upgrading on the service can be effectively reduced.
In another possible implementation manner, the memory area of the network card includes a second memory area, and the network card includes a processor; the network card loads the new firmware to a 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 resetting; after the processor is reset, the network card loads the new firmware into the second memory area; and the processor restarts from the second memory area and runs the new firmware.
In the application, the firmware upgrading is realized by resetting and restarting the processor of the network card, the business link can be maintained without interruption in the firmware upgrading process, and in addition, because the new firmware and the old firmware are not required to be loaded into the memory area at the same time, the requirement on the memory space of the network card can be reduced.
In another possible implementation manner, the new firmware includes a data firmware portion and a control firmware portion that are separated, 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 for processing a data function, and the second processor unit is used for processing a control function; the network card loads the new firmware to a memory area of the network card, and runs the new firmware in the memory area, including: the network card resets the first processor unit, the first processor unit running the data firmware portion of the old firmware in the third memory area prior to the resetting; 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 reboots from the third memory region, running the data firmware portion of the new firmware; after the first processor unit is restarted, 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 resetting; 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 is restarted from the fourth memory area and runs the control firmware portion of the new firmware.
Specifically, the processor of the network card may be a single-core processor or a multi-core processor. The first processor unit and the second processor unit may be two single-core processors, or the first processor unit and the second processor unit may be two processor cores of the same multi-core processor.
In the application, the network card is provided with a first processor unit and a second processor unit, the first processor unit is used for processing a data function, the second processor unit is used for processing a control function, under the condition that a new firmware comprises a data firmware part and a control firmware part which are separated, the first processor unit is reset and restarted to operate the data firmware part of the new firmware, and after the first processor unit is restarted, the second processor unit is reset and restarted to operate the control firmware part of the new firmware, so that firmware upgrading is completed. Although a short service stay may be caused in the scenario of resetting the first processor, the data firmware portion of the new firmware is relatively thin compared to the whole new firmware, and thus, the service link is not interrupted. Therefore, the embodiment can reduce the influence of firmware upgrade on the service, and can also reduce the requirement on the memory space of the network card.
In another possible implementation manner, the presence information of the service includes at least one of the following information: hardware state information of the service logic, service configuration information issued by a user, and memory information allocated for the service logic hardware.
In another possible implementation manner, the network card may store the service field information in a storage area where a segment of data of the network card is not lost.
In another possible implementation, before the new firmware is executed, the method further includes: the network card performs at least one of the following operations: closing the system scheduling of the network card, completing the current transaction processed by the network card, cleaning the system resources of the network card, and informing the equipment that the network card enters a firmware upgrading state.
In another possible implementation, after the new firmware is executed, the method further includes: the network card also executes notification of completion of peripheral thermal upgrade, and peripheral isolation and shielding are removed.
In summary, the present application can upgrade the firmware of the network card without restarting the network card by saving the field before running the new firmware, restoring the field after running the new firmware, and performing initialization configuration on other modules except the service logic module. Therefore, the technical scheme provided by the application can finish the firmware upgrade of the network card under the condition of keeping the service communication link continuous, so that the influence of the firmware upgrade of the network card on the service can be reduced.
In a second aspect, a network card is provided, which includes modules for executing the method for upgrading the firmware of the network card in the first aspect or any one of the possible implementation manners of the first aspect.
In a third aspect, a network card is provided, where 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 first aspect or the operation steps of the method in any possible implementation manner of the first aspect.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a computer, causes the computer to carry out the operational steps of the method of the first aspect or any possible implementation manner of the first aspect. Specifically, the computer may be a network card.
In a fifth aspect, there is provided a computer program product comprising instructions which, when executed by a computer, cause the computer to carry out the operational steps of the method of the first aspect or any possible implementation manner of the first aspect. Specifically, the computer may be a network card.
A sixth aspect provides a device comprising a network card, where the network card is configured to perform the operation steps of the method in the first aspect or any possible implementation manner of the first aspect.
The present application can further combine to provide more implementations on the basis of the implementations provided by the above aspects.
Drawings
Fig. 1 is a schematic diagram of a typical networking architecture of a network card firmware upgrade scenario.
Fig. 2 is a schematic flowchart of a method for upgrading a network card firmware according to an embodiment of the present disclosure.
Fig. 3 is a schematic diagram illustrating the principle of the new firmware for the network card to take effect in the embodiment of the present application.
Fig. 4 is a schematic diagram of space allocation of a RAM area inside the network card.
Fig. 5 is another schematic flowchart of a method for upgrading network card firmware according to an embodiment of the present disclosure.
Fig. 6 is still another schematic flowchart of a method for upgrading a network card firmware according to an embodiment of the present disclosure.
Fig. 7 is a diagram illustrating the operation control firmware of the network card processor according to the embodiment of the present application.
Fig. 8 is a schematic diagram of the network card processor operating control and data firmware according to an embodiment of the present application.
Fig. 9 is a schematic diagram illustrating that two processor units of the network card respectively run the control firmware and the data firmware according to the embodiment of the present application.
Fig. 10 is a schematic block diagram of a network card provided in the embodiment of the present application.
Fig. 11 is another schematic block diagram of a network card according to an embodiment of the present application.
Fig. 12 is a schematic block diagram of an apparatus provided by an embodiment of the present application.
Detailed Description
The technical solution in the present application will be described below with reference to the accompanying drawings.
To facilitate understanding of the embodiments of the present application, a typical networking architecture of a network card firmware upgrade scenario is first described below with reference to fig. 1.
As shown in fig. 1, the first device includes a processor and a network card. The first device performs network communication with the second device through the network card. The second device may be a remote network node. The network card is connected with a 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 (not shown in fig. 1) on the second device.
In particular, the first device may be a server or a storage array. The second device may also be a server or a storage array.
It should be understood that the network card is an interface of a device (such as the first device in fig. 1) in the local area network where the network card connected with the firmware to be upgraded is located and a remote device (such as the second device in fig. 1), and a transmission medium of the network card may be ETH/FC in fig. 1, which not only can implement physical connection and electrical signal matching with the transmission medium of the local area network, but also relates to functions of sending and receiving frames, encapsulating and decapsulating frames, controlling medium access, encoding and decoding data, and buffering data, etc.
It should also be understood that FIG. 1 is exemplary only and not limiting. In practical application, the networking architecture of the network card firmware upgrading scene can also be a scene in which multiple hosts share the network card, that is, multiple hosts share one network card. Specifically, the processors of the devices with firmware to be upgraded are connected with the same network card through a plurality of PCIe buses respectively.
It should be noted that the host mentioned herein corresponds to the first device shown in fig. 1. For example, in a scenario of sharing a network card by multiple hosts, a plurality of first devices as shown in fig. 1 are included, but the plurality of first devices share one network card, in other words, respective processors of the plurality of first devices are respectively connected to the same network card through PCIe buses.
It should be further noted that the processor shown in fig. 1 is a processor of the first device, not a processor of the network card. In the following embodiments, a processor (or a processor unit) of the network card is referred to, and for distinction and not limitation, in the following embodiments, a processor in a device in which the network card is located is referred to as a host processor. That is, the processors mentioned in the following embodiments, except for the host processor, refer to the processors (processor units) of the network card unless otherwise specified.
As described above, the existing cold upgrade method of network card firmware is to restart the network card to run the new firmware of the network card. However, the network card is restarted, which causes the network card to power down, thereby causing the service link to be interrupted. For example, when the host upgrade network card firmware supporting network card hot plug needs to restart the network card to recover the service link, since the time for restarting the network card is generally tens of seconds, the service link is interrupted for tens of seconds when the host upgrade network card firmware supporting network card hot plug. For another example, when the upgrade network card firmware of the host that does not support network card hot plug is upgraded, the network card needs to be restarted, and the host needs to be restarted to recover the service link. For services with high network requirements (such as devices deploying financial, medical related applications), network connectivity outages for services of tens of seconds or even minutes are unacceptable. In addition, for a scenario where the network card is shared by multiple hosts and does not support hot plug, the multiple hosts are restarted due to the fact that the network card is restarted by firmware cold upgrade, and recovery cost is high. In addition, since the network card is restarted, a network link between the network card and a remote device (such as the second device in fig. 1) is also interrupted, a link between the network card and the remote device needs to be reestablished, and the remote device needs to be reconfigured at the same time, so that the maintenance cost is also high.
In summary, the existing network card firmware upgrading scheme has the following disadvantages: network card power failure causes service link interruption, and network maintenance cost is high.
In view of the above problems, embodiments of the present application provide a method, an apparatus, a network card, and a device for upgrading a network card firmware, which can maintain a service link without interruption in a process of upgrading the network card firmware, and can also reduce network maintenance cost.
It should be noted that, the firmware mentioned in this embodiment refers to software inside the network card, including a driver and an operating system in the network card. Correspondingly, the network card firmware upgrade refers to software upgrade inside the network card.
It should be understood that the network card includes a processor and memory therein. The processor in the network card may be a Central Processing Unit (CPU), or other microprocessor, or may also be a field-programmable gate array (FPGA). The memory in the network card includes a ROM (or flash memory) and a memory storage. Specifically, the memory storage is a random-access memory (RAM). Usually, the firmware on the network card is stored in the ROM, and when the network card is working, the firmware in the ROM is loaded to the RAM area to be executed.
Fig. 2 is a schematic flowchart of a method for upgrading a network card firmware according to an embodiment of the present disclosure. The method comprises the following steps.
S210, the network card receives the new firmware of the network card from the device where the network card is located.
The device where the network card is located may be a computer, a server, or a storage array.
For convenience of description, 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.
In S210, specifically, the host processor issues the new firmware of the network card to the network card through the bus, and accordingly, the network card receives the new firmware issued by the host processor through the bus.
Specifically, the host processor sends new firmware stored in a memory area (ROM or RAM) of the host to the network card.
The bus for communication between the host processor and the network card may be a PCIe bus or a non-PCIe bus. The non-PCIe bus may be a system management bus (SMBus), an integrated circuit bus (I2C), a Serial Peripheral Interface (SPI) bus, or a universal asynchronous receiver/transmitter (UART), for example.
And after the network card receives the new firmware, storing the new firmware into the storage space of the network card. Specifically, as shown in fig. 2, in S211, the new firmware is stored in the ROM or FLASH of the network card (as an example, in the ROM schematically shown in fig. 2).
Optionally, after the network card stores the new firmware locally, it sends a response message to the host processor that the new firmware is successfully received, as shown in S212 in fig. 2.
Optionally, after receiving the response message sent by the network card and successfully receiving the new firmware, the host processor may issue a command to take effect of the new firmware to the network card, as shown in S213 in fig. 2.
S220, before the network card runs the new firmware, the network card stores the field information of the service currently processed by the network card.
Specifically, the field information of the service indicates information related to the service processed by the network card at the current time. For example, the presence information of the service includes at least one of the following information: hardware state information of the service logic, service configuration information issued by a user, and memory information allocated for the service logic hardware.
Optionally, in some embodiments, the network card may store the live information of the service on a storage area where a piece of data of the network card is not lost.
As an example, fig. 3 is a schematic diagram of space allocation of a RAM area inside a network card. As shown in fig. 3, the RAM area inside the network card includes a boot loader (Bootloader) area, a Firmware (FW) running area, and an area for other purposes. In this embodiment, the network card further opens up a storage area in the RAM area of the network card, such as the field save area shown in fig. 3, where the field save area has the following attributes: the data stored in the save-in-place area is not lost while the new firmware is running. The network card stores the field information of the service in the field saving area as shown in fig. 3, for example, at least one of the following information is stored in the field saving area: hardware state information of the service logic, service configuration information issued by a user, and memory information allocated for the service logic hardware.
It should be understood that the ability of a segment of RAM area to ensure that data stored thereon is not lost is guaranteed by hardware, which is prior art and will not be described herein.
Optionally, in some embodiments, the implementation manner of saving the live information of the service includes but is not limited to: and storing by utilizing a database, a linked list and a queue.
The operation performed in S220 may be referred to as a preparation operation before the firmware is run.
Optionally, in some embodiments, the preparation operation before the firmware is run may include at least one of the following operations in addition to saving the field information of the service.
And operation 1, shielding the interruption of the network card, and closing the system scheduling of the network card.
The purpose of operation 1 is that the network card is no longer processing other new transactions.
And 2, waiting for the hardware of the network card to enter an idle state, or waiting for the task state of the network card to change into the idle state.
The purpose of operation 2 is to wait for the network card to complete the currently processed transaction, and enter an idle state, i.e. there is no task to be executed.
And operation 3, cleaning the system resources of the network card.
Specifically, for example, timer data in the network card is deleted, a task in the network card is deleted, and a memory in the network card is released.
And operation 4, informing the device that the network card enters a firmware upgrading state.
Specifically, the device where the network card is located or other devices in communication connection with the network card are notified, and the network card will enter a firmware hot-upgrade state, during which the network card no longer responds to a command issued by the device where the network card is located or other devices.
It should be understood that performing operations 2 and 3 above refers to restoring the dynamic behavior running in the network card to a static state, i.e., leaving the network card without tasks to be performed. In the case of performing operation 2 and operation 3, the field information of the service stored 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 to the service logic hardware when the hardware of the network card is in the idle state.
S230, the network card loads the new firmware into a memory area of the network card (for example, the new firmware is schematically loaded into the RAM in fig. 2), and runs the new firmware in the memory area.
Reference herein to "load" means "Copy". Loading the new firmware into the memory area of the network card means copying the new firmware stored in S211 into the memory area (e.g., RAM area) of the network card.
Running the new firmware in the memory area means that the processor of the network card loads the new firmware and reads the content in the new firmware, so as to run the new firmware.
For example, the processor of the network card runs the new firmware in the FW run area as shown in fig. 3.
S240, after the network card runs the new firmware, initializing and configuring other modules except the service logic module in the network card, and recovering the service indicated by the field information.
The service logic module represents a functional module in the network card for processing the service logic. For example, the business logic module includes at least one of the following modules: a serial-parallel transceiver (Serdes) message processing module, a PCIe message processing module, a FC/ETH MAC message processing module and a FC/ETH message processing module.
The other modules represent modules in the network card except the service logic module. For example, the other module includes at least one of the following modules: a processor subsystem (e.g., CPU subsystem) module, and a peripheral interface module. The peripheral interface module includes but is not limited to: the system comprises an integrated circuit bus interface module, a serial peripheral interface module and a universal input/output interface module.
Optionally, the other modules further include a module for implementing at least one of the following functions:
creating a resource semaphore of an operating system of the network card, creating a task of the network card, hanging the network card in an interruption mode, creating a timer of the network card, and applying for a memory of the network card.
It should be understood that the resource semaphore is created to achieve synchronization and contention between the multiple tasks of the network card. The task creation is to process complex hardware events within the network card, poll the hardware status, and so on. The interrupt hooking is to make the new firmware capable of sensing the events reported by the network card hardware.
Specifically, in S240, only the processor subsystem module and the peripheral interface module in the network card are initialized and configured, but the service logic module in the network card is not initialized.
In S240, the implementation of restoring the field information corresponds to the implementation of saving the field information.
It should be noted that the initialization configuration involved in the present embodiment is different from the power-on initialization configuration after power-off in the conventional technology. For example, after the network card is powered off, the network card is powered on and restarted, and at this time, all modules in the network card need to be initially configured. The initialization configuration in this embodiment refers to initializing other modules except the service logic module. The initialization configuration related in the present embodiment may also be referred to as a differential initialization configuration.
The operation performed in S240 may be referred to as a recovery operation after the firmware is run.
Optionally, in some embodiments, the preparation operation before the firmware is executed includes an operation 4 of notifying the device that the network card enters a firmware upgrade state, and accordingly, the recovery operation after the firmware is executed may further include: and informing the equipment that the network card finishes firmware upgrading.
It should be understood that, by using the technical solution provided in this embodiment, the firmware of the network card is upgraded without restarting the network card, that is, the network card is not powered off, and it is ensured that the service link is not disconnected.
It should be noted that, the new and old concepts, such as the new firmware and the old firmware, are referred to herein, and the new and old concepts are referred to herein as being opposite.
In the embodiment, the field is saved before the new firmware is run, the field is recovered after the new firmware is run, and the initialization configuration is performed on other modules except the service logic module, so that the firmware of the network card can be upgraded without restarting the network card. Therefore, the technical scheme provided by this embodiment can complete firmware upgrade of the network card while maintaining the service communication link, so as to reduce the influence of the firmware upgrade of the network card on the service.
Compared with the traditional firmware cold upgrading method, the method for upgrading the network card firmware provided by the embodiment of the application can be called a firmware hot upgrading method.
Fig. 4 is a schematic diagram illustrating the operation of the new firmware of the network card. Step (r) in fig. 4 corresponds to step S220 in the above-described embodiment, step (r) in fig. 4 corresponds to step S230 in the above-described embodiment, and step (r) in fig. 4 corresponds to step S240 in the above-described embodiment.
For a detailed description, reference is made to the above description, which is not repeated.
Three implementations of running the new firmware in S230 will be described below, and the network card may run the new firmware in any one of the following ways.
The first method is as follows:
the memory area of the network card comprises a first memory area and a second memory area, and the network card comprises a processor. S230 specifically includes: the network card loads the new firmware into the first memory area, wherein the first memory area is different from the second memory area where the old firmware currently runs by the network card; the location where the processor executes the software program jumps from the second memory region to the first memory region.
The jump of the position of the processor executing the software program from the second memory area to the first memory area means that the range of the memory address read by the processor of the network card is moved from the second memory area to the first memory area. It should be understood that the processor of the network card reads the instruction in the first memory area, which is equivalent to running the new firmware.
In this embodiment, the memory area of the network card is sufficient, and the old firmware and the new firmware can be stored simultaneously, 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 for storing the old firmware, and the first memory area is used for storing the new firmware. The old firmware is a relative concept to the new firmware, the old firmware representing a firmware version before the firmware upgrade, and the new firmware representing a firmware version after the firmware upgrade.
For example, in the example of space allocation of the RAM area inside the network card shown in fig. 3, the FW operation area inside the network card may be divided into an old area for storing old firmware and a new area for storing new firmware.
Optionally, in this embodiment, the operation of the network card loading the new firmware into the first memory area may be performed before the network card stores the field information of the service.
Specifically, before S220, the network card loads the new firmware into the first memory area.
In the embodiment, the new firmware is loaded into the new memory area before the field is saved, so that the new firmware can be immediately operated after the field saving (or other preparation operations) is completed, and the influence of the upgrading of the network card firmware on the service can be further reduced.
Fig. 5 is a flow chart diagram illustrating an implementation method of a network card running new firmware in the first mode. In fig. 5, the memory area of the network card includes a first memory area and a second memory area, the second memory area is used for storing the old firmware, and the first memory area is used for storing the new firmware. As shown in fig. 5, the following steps are included.
S51, the user sends a firmware upgrade order to the host processor.
Correspondingly, the host processor receives a firmware upgrading instruction issued by a user.
S52, the host processor issues the new firmware to the network card.
S52 may correspond to S210 described above, and the relevant content is described above in detail and will not be described herein again.
S53, the network card writes the new firmware into the ROM.
S54 (optionally), the network card may send a response message to the host that the new firmware reception is successful after writing the new firmware into the ROM.
S55, the network card performs a preparation operation before the new firmware is run, the preparation operation includes saving the field information of the service currently processed by the network card.
S55 may correspond to S220 described above, and the relevant content is described above and will not be described herein.
S56, the network card loads the new firmware into a first memory area, where the first memory area is different from the second memory area where the old firmware is currently running, and the location where the processor of the network card executes the software program jumps from the second memory area to the first memory area.
Specifically, the processor of the network card runs the old firmware in the second memory area at present, the network card copies the new firmware to the first memory area different from the second memory area, and then the processor of the network card executes a jump instruction to jump from the second memory area to the first memory area to run the new firmware. And running the new firmware, namely, reading the content in the new firmware by the network card processor calling process and finishing the operation of the corresponding content.
Optionally, the operation of loading the new firmware into the first memory area by the network card in S56 may be performed before S55.
By loading the new firmware into the new memory area before saving the field, the new firmware can be immediately operated after the field saving (or other preparation operations) is finished, and the influence of the upgrading of the network card firmware on the service can be further reduced.
And S57, the network card executes a recovery operation after the new firmware is run, wherein the recovery operation comprises the steps of initializing and configuring other modules except the service logic module in the network card and recovering the service indicated by the field information.
S57 may correspond to S240 described above, and the relevant content is described above and will not be described herein.
S58 (optionally), after the firmware upgrade is completed, the network card sends a response message that the firmware upgrade is successful to the host processor.
In the present embodiment, in the whole firmware upgrade process, communication links between the network card and the host processor and between the network card and the remote network device are normal, and a service link is also normal, as illustrated in fig. 4. It should be understood that the remote network device in fig. 4 corresponds to the second device in fig. 1.
In this embodiment, the old firmware is stored in the second memory area of the network card, the new firmware is stored in the first memory area of the network card, and then the position of the processor of the network card executing the software program is skipped from the second memory area to the first memory area, so that the operation of the new firmware is realized, that is, the firmware upgrade is realized. In the whole firmware upgrading process, the network card is not required to be restarted, and the network card is not powered off, so that the link between the network card and the host processor is maintained uninterrupted, the link between the network card and the remote equipment is also not interrupted, namely, the service link is ensured to be uninterrupted, and the influence of firmware upgrading on the service can be effectively reduced.
It should be understood that, in the case that the memory area of the network card is sufficient in space, that is, the memory area can store the new firmware and the old firmware at the same time, the network card firmware can be upgraded by using the implementation manner of operating the new firmware as described above.
The second method comprises the following steps: the memory area of the network card comprises a second memory area, and the network card comprises a processor. S230 specifically includes: the network card resets the processor, and the processor runs the old firmware in the second memory area before resetting; after the processor is reset, the network card loads the new firmware into the second memory area; and the processor restarts from the second memory area and runs the new firmware.
For example, in the example of space allocation of the RAM area inside the network card shown in fig. 3, the FW operation area inside the network card does not need to be divided into a plurality of areas. Before the processor of the network card is reset, the old firmware is operated in the FW operation area, and after the processor of the network card is restarted, the new firmware is operated in the FW operation area.
Fig. 6 is a flow chart diagram illustrating an implementation method of the network card running new firmware in the second mode. In fig. 6, the memory area of the network card includes a second memory area, and the second memory area is used for storing the old firmware. As shown in fig. 6, the following steps are included.
S61, the user sends a firmware upgrade order to the host processor.
Correspondingly, the host processor receives a firmware upgrading instruction issued by a user.
S62, the host processor issues the new firmware to the network card.
S62 may correspond to S210 described above, and the relevant content is described above in detail and will not be described herein again.
S63, the network card writes the new firmware into the ROM.
S64 (optionally), the network card may send a response message to the host that the new firmware reception is successful after writing the new firmware into the ROM.
S65, the network card performs a preparation operation before the new firmware is run, the preparation operation includes saving the field information of the service currently processed by the network card.
S65 may correspond to S220 described above, and the relevant content is described above and will not be described herein.
S66, the network card resets the processor of the network card, and the processor runs the old firmware in the second memory area before resetting; after the processor of the network card is reset, the network card loads the new firmware into the second memory area; and restarting the processor of the network card from the second memory area, and running the new firmware.
And S67, the network card executes a recovery operation after the new firmware is run, wherein the recovery operation comprises the steps of initializing and configuring other modules except the service logic module in the network card and recovering the service indicated by the field information.
S67 may correspond to S240 described above, and the relevant content is described above and will not be described herein.
S68 (optionally), after the firmware upgrade is completed, the network card sends a response message that the firmware upgrade is successful to the host processor.
In the embodiment, in the whole process of firmware upgrade, communication links between the network card and the host processor and between the network card and the remote network device are normal, as illustrated in fig. 5. It should be understood that the remote network device in fig. 5 corresponds to the second device in fig. 1.
It should be appreciated that a processor reset by the network card will cause a short service dwell, but for a short period of time, it will not cause the network card to be disconnected from the remote device, and thus the network service is barely perceptible.
In this embodiment, the firmware upgrade is implemented by resetting and restarting the processor of the network card, so that the service link can be maintained without interruption in the firmware upgrade process, and in addition, because the new firmware and the old firmware are not required to be loaded into the memory area at the same time, the requirement on the memory space of the network card can be reduced.
It should be understood that, in the case that the memory area space of the network card is not sufficient, for example, the new firmware and the old firmware are not allowed to coexist, the firmware upgrade of the network card may be implemented in the second manner.
Next, a software and hardware layered structure inside the network card provided by the embodiment of the present application is further described with reference to fig. 7. As shown in fig. 7, the software and hardware layers inside the network card include, from bottom to top:
(1) the physical Layer (PHY Layer) is responsible for the underlying physical transport, electrical characteristics.
(2) And a data link Layer (MAC Layer) for taking charge of data link negotiation and transmission.
(3) And the network Hardware Layer (FC/ETH Hardware Layer) is used for taking charge of the network transmission protocol part. The network layer is not limited to Fibre Channel (FC) and ethernet.
The three layers above belong to hardware logic modules and directly participate in data forwarding.
(4) Transport layer to application layer.
The processor of the network card runs firmware corresponding to the transport layer to the application layer.
The firmware of the network card can be divided into the following two types.
The first type of firmware is only responsible for functions on control paths such as network card configuration, network card event processing and the like, and does not participate in functions on data paths. I.e., the first type of firmware may be referred to as control firmware (CTRL FW).
As shown in fig. 7, if the firmware executed by the processor of the network card is control firmware, the process of upgrading the firmware of the network card is not related to the function on the data path. While traffic pertains to functions on the data path. Therefore, the upgrading process of the first type firmware can not cause the stay of the service, namely the service can not sense the firmware upgrading at all.
The second type firmware is not only responsible for functions on control paths such as network card configuration and network card event processing, but also participates in functions on data paths such as message analysis and data forwarding processing. I.e. the second type of firmware may be referred to as control and DATA firmware (CTRL + DATA FW).
As shown in fig. 8, if the firmware executed by the processor of the network card is control and data firmware, the process of upgrading the network card firmware is related to the function on the data path.
Optionally, in the above embodiments, the new firmware may be the first type of firmware or the second type of firmware.
It should be understood that, for upgrading the second type of firmware, the network card firmware is upgraded by the method for upgrading the network card firmware provided in the embodiment of the present application, and a service link can be maintained without interruption when the network card firmware is upgraded.
As described above, when the memory space of the network card is not sufficient, the network card firmware should be updated by using the above-described implementation method of operating the new firmware. In this implementation, a short interruption of the service (service link is not interrupted) is caused by the reset of the processor of the network card, but the duration of this interruption is almost imperceptible to the user.
In a scenario where the second-type network card is upgraded by operating a new firmware in the second mode, in order to further reduce the influence of the upgrade of the second-type firmware on the service, the application proposes to separate the second-type firmware into a control firmware part and a data firmware part. Wherein, the data firmware part refers to the firmware participating in the functions of the data path; the control firmware portion refers to firmware that participates in the functions of the control path. It will be appreciated that upgrading the control firmware portion of the second type of firmware has no impact on the business. Although the upgrading of the data firmware part of the second type firmware has an influence on the business, the data firmware part of the second type firmware is relatively simplified compared with the whole second type firmware, in other words, the upgrading process of the data firmware part of the second type firmware is simpler and takes relatively less time than the whole upgrading process of the second type firmware. Therefore, the upgrade process of the data firmware part of the second type firmware has less influence on the business than the overall upgrade process of the second type firmware.
In order to realize the independent upgrade of the data portion and the control portion of the second type of firmware, the network card is required to have a first processor unit and a second processor unit, wherein the first processor unit is used for processing data functions, and the second processor unit is used for processing control functions, for example, the first processor unit is used for running the data firmware portion, and the second processor unit is used for running the control firmware portion.
The processor of the network card may be a single-core processor or a multi-core processor. The first processor unit and the second processor unit may be two single-core processors, or the first processor unit and the second processor unit may be two processor cores of the same multi-core processor.
Specifically, as shown in fig. 9, the network card has a multi-core processor, and the plurality of processors include a processor core 1 and a processor core 2 as shown in fig. 9, where the processor core 1 is used to run control firmware and the processor core 2 is used to run data firmware. It should be understood that the process of controlling the upgrade of the firmware is realized by resetting and restarting the processor core 1, and has no influence on the service.
The first and second implementations of the new firmware operation are described above with reference to fig. 5 and 6, and the third implementation of the new firmware operation is described below.
The third method comprises the following steps: the new firmware includes a data firmware portion and a control firmware portion which are separated, 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 the processor core 1 shown in fig. 9) and a second processor unit (such as the processor core 2 shown in fig. 9), the first processor unit is used for processing a data function, and the second processor unit is used for processing a control function. S230 specifically includes: the network card resets the first processor unit, the first processor unit running the data firmware portion of the old firmware in the third memory area prior to the resetting; 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 reboots from the third memory region, running the data firmware portion of the new firmware; after the first processor unit is restarted, 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 resetting; 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 is restarted from the fourth memory area and runs the control firmware portion of the new firmware.
In this embodiment, the network card has a first processor unit and a second processor unit, the first processor unit is configured to process a data function, the second processor unit is configured to process a control function, and when a new firmware includes a data firmware part and a control firmware part that are separated from each other, the first processor unit is reset and restarted to run the data firmware part of the new firmware, and after the first processor unit is restarted, the second processor unit is reset and restarted to run the control firmware part of the new firmware, thereby completing firmware upgrade. Although a short service stay may be caused in the scenario of resetting the first processor, the data firmware portion of the new firmware is relatively thin compared to the whole new firmware, and thus, the service link is not interrupted. Therefore, the embodiment can reduce the influence of firmware upgrade on the service, and can also reduce the requirement on the memory space of the network card.
To sum up, in the embodiment of the present application, the field is saved before the new firmware is run, the field is restored after the new firmware is run, and initialization configuration is performed on other modules except the service logic module, so that the firmware of the network card can be updated without restarting the network card. Therefore, the technical scheme provided by this embodiment can complete firmware upgrade of the network card while maintaining the service communication link, so as to reduce the influence of the firmware upgrade of the network card on the service.
The above describes a method of separately upgrading the network card firmware. In practical applications, a scenario may occur in which the host and the network card are upgraded together. If the host needs to be restarted due to upgrading of the firmware inside the host, in this case, the service link can be disconnected because the network card cannot be powered off. If the firmware in the upgrading host does not need to restart the host, the method provided by the embodiment of the application is used for upgrading the network card firmware, so that the service link is not disconnected.
Although the network card is taken as the object, the method for upgrading the firmware is described. However, the firmware upgrading scheme provided in the embodiment of the present application may also be applied to an ethernet (ethernet) interface, a Fiber Channel (FC) interface, an SAS/SATA interface, a RAID (redundant array of independent disks, RAID), a Host Bus Adapter (HBA), and an IO interface card device of a network host (a computing node or a storage node) in other forms.
The firmware upgrading scheme provided by the embodiment of the application can also be applied to a system-on-a-chip (SoC). SoC refers to a technology for grouping all or part of necessary electronic circuits into a package by integrating a complete system on a single chip. A complete system generally includes a Central Processing Unit (CPU), a memory, and peripheral circuits.
Method embodiments of the present application are described above and apparatus embodiments of the present application are described below. For explanation and beneficial effects of relevant content in the device embodiment, reference may be made to the corresponding method embodiments provided above, and details are not repeated here.
As shown in fig. 10, an embodiment of the present application provides a network card, which includes the following units.
A transceiving unit 1010, configured to receive a new firmware of the network card from a device where the network card is located;
a processing unit 1020, configured to store field information of a service currently processed by the network card, where the field information of the service is used to indicate information related to the service currently processed by the network card; loading the new firmware to a memory area of the network card, and operating the new firmware in the memory area; and initializing and configuring other modules except the service logic module in the network card, and recovering the service indicated by the field information.
In the embodiment, the field is saved before the new firmware is run, the field is recovered after the new firmware is run, and the initialization configuration is performed on other modules except the service logic module, so that the firmware of the network card can be upgraded without restarting the network card. Therefore, the technical scheme provided by this embodiment can complete firmware upgrade of the network card while maintaining the service communication link, so as to reduce the influence of the firmware upgrade of the network card on the service.
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;
the processing unit 1020 is configured to load the new firmware into a memory area of the network card, and run the new firmware in the memory area, and includes: the processing unit 1020 is specifically configured to load the new firmware into the first memory area, where the first memory area is different from the second memory area where the old firmware currently runs on the network card; the processor is configured to jump the location of executing the software program from the second memory area to the first memory area.
Optionally, in some embodiments, the memory area of the network card includes a second memory area, and the processing unit 1020 includes a processor;
the processing unit 1020 is configured to load the new firmware into a memory area of the network card, and run the new firmware in the memory area, and includes: the processing unit 1020 is specifically configured to reset the processor, which runs the old firmware in the second memory region before the reset; loading the new firmware into the second memory area after the processor is reset; the processor is used for restarting from the second memory area and running the new firmware.
Optionally, in some embodiments, the new firmware includes a data firmware portion and a control firmware portion which are separated, 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 for processing a data function, and the second processor unit is used for processing a control function;
the processing unit 1020 is configured to load the new firmware into a memory area of the network card, and run the new firmware in the memory area, and includes: the processing unit 1020 is specifically configured to reset the first processor unit, which runs the data firmware portion of the old firmware in the third memory area before the reset; loading a data firmware portion of the new firmware into the third memory area after the first processor unit is reset; the first processor unit is used for restarting from the third memory area and running the data firmware part of the new firmware; the processing unit 1020 is specifically configured to, after the first processor unit is restarted, reset the second processor unit, which runs the control firmware portion of the old firmware in the fourth memory area before the reset; loading a control firmware portion of the new firmware into the fourth memory area after the second processor unit is reset; the second processor unit is configured to execute the control firmware portion of the new firmware by rebooting from the fourth memory area.
Optionally, in some embodiments, the processing unit 1020 is configured to load the new firmware into the first memory area, including: the processing unit 1020 is specifically configured to load the new firmware into the first memory area before saving the field information of the service.
Optionally, in some embodiments, the presence information of the service includes at least one of the following information: hardware state information of the service logic, service configuration information issued by a user, and memory information allocated for the service logic hardware.
Optionally, in some embodiments, the processing unit 1020 is further configured to perform at least one of the following operations before executing the new firmware: closing the system scheduling of the network card, completing the current transaction processed by the network card, cleaning the system resources of the network card, and informing the equipment that the network card enters a firmware upgrading state.
The network card according to the embodiment of the present invention may correspond to performing 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 are respectively for implementing corresponding flows of each method in fig. 2, fig. 5, and fig. 6, and are not described herein again for brevity.
In summary, in the embodiment, the site is saved before the new firmware is run, the site is restored after the new firmware is run, and the initialization configuration is performed on the other modules except the service logic module, so that the firmware of the network card can be upgraded without restarting the network card. Therefore, the technical scheme provided by this embodiment can complete firmware upgrade of the network card while maintaining the service communication link, so as to reduce the influence of the firmware upgrade of the network card on the service.
As shown in fig. 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 interface 1140 and an output interface 1150. The processor 1110, memory 1120, input reception 1140, and output interface 1150 are communicatively coupled via a bus 1130. The memory 1120 is used for storing instructions, the processor 1110 is used for executing the instructions stored in the memory 1130, and the execution of the instructions stored in the memory 1130 causes the processor 1110 to be used for executing the actions performed by the network card in the above method embodiments.
The embodiment of the present application further provides a chip, where the chip includes a processing unit and a communication interface, the processing unit is configured to execute operations executed by the chip device in the foregoing method embodiments, and the communication interface is configured to communicate with the outside.
Optionally, the chip may further include a storage unit, where instructions are stored in the storage unit, and the processing unit is configured to execute the instructions stored in the storage unit, and when the instructions are executed, the processing unit is configured to execute the operation executed by the network card in the foregoing method embodiment.
The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method performed by the network card in the foregoing method embodiments may be implemented.
The embodiment of the present application further provides a computer program product including instructions, where the instructions, when executed by a computer, may implement the network card execution method in the foregoing method embodiment.
As shown in fig. 12, the embodiment of the present application further provides an apparatus, which includes a processor 1210, a communication interface 1220, a bus 1230, and a network card 1240, wherein 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 above embodiments. The network card 1240 corresponds to the network card in the above embodiment. The server may correspond to the first device or host mentioned in the above embodiments.
Alternatively, the bus 1130 may be a PCIe bus or a non-PCIe bus. The non-PCIe bus may be SMBus, I2C, SPI bus, UART, or the like.
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 fig. 9 in the embodiment of the present invention, and may correspond to an execution main body in the method for implementing firmware upgrade of the network card according to the embodiment of the present invention, and the above and other operations and/or functions of each module in the device are respectively for implementing corresponding flows of each method in fig. 2, fig. 5, and fig. 6, and are not described herein again for brevity.
To sum up, in the embodiment of the present application, the field is saved before the new firmware is run, the field is restored after the new firmware is run, and initialization configuration is performed on other modules except the service logic module, so that the firmware of the network card can be updated without restarting the network card. Therefore, the technical scheme provided by this embodiment can complete firmware upgrade of the network card while maintaining the service communication link, so as to reduce the influence of the firmware upgrade of the network card on the service.
It should be understood that the network card in this embodiment has a processor and a memory. Wherein the memory may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. 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 SDRAM, enhanced SDRAM, SLDRAM, Synchronous Link DRAM (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, the above-described embodiments may 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 loaded or executed on a computer, cause the flow or functions according to embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., 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, data center, etc. that contains one or more collections of available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium may be a Solid State Drive (SSD).
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (18)

1. A method for upgrading a network card, the method comprising:
acquiring new firmware required by network card upgrading;
isolating the network card and other parts in the equipment where the network card is located;
a hot upgrade operation is performed.
2. The method of claim 1, wherein prior to said isolating the links of the network card to other components in the device in which the network card is located, the method further comprises:
and acquiring the field information of the service currently processed by the network card, wherein the field information of the service is used for indicating the information related to the service currently processed by the network card.
3. The method of claim 1 or 2, wherein the isolating the link between the network card and the other component in the device where the network card is located comprises:
shielding the interruption of the network card;
closing the system scheduling of the network card;
and when the hardware of the network card enters an idle state, cleaning the system resources of the network card.
4. The method of any of claims 1 to 3, wherein the performing a hot-upgrade operation comprises:
and the network card loads the new firmware into a memory area of the network card and runs the new firmware in the memory area.
5. The method of any of claims 1 to 3, wherein the performing a hot-upgrade operation comprises:
the network card loads the new firmware to a first memory area of the network card, wherein the first memory area is different from a second memory area where the old firmware currently runs on the network card;
and jumping to the first memory area from the position of the network card executing the software program.
6. The method of any one of claims 1 to 3, wherein the new firmware comprises a separate data firmware portion and control firmware portion, the memory area of the network card comprises a third memory area and a fourth memory area, the network card comprises a first processor unit and a second processor unit, the first processor unit is configured to process data functions, the second processor unit is configured to process control functions; the executing the hot upgrade operation comprises:
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 resetting; after the first processor unit is reset, the network card loads a data firmware part of the new firmware into the third memory area; the first processor unit reboots from the third memory region, running a data firmware portion of the new firmware;
after the first processor unit is restarted, the network card resets the second processor unit, and the second processor unit runs a control firmware part of the old firmware in the fourth memory area before resetting; 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 reboots from the fourth memory region, running the control firmware portion of the new firmware.
7. The method according to any one of claims 1 to 6, wherein the presence information of the service comprises at least one of the following information: hardware state information of the service logic, service configuration information issued by a user, and memory information allocated for the service logic hardware.
8. The method of any of claims 1 to 7, wherein after said performing a hot-upgrade operation, the method further comprises:
and the network card initializes and configures other modules in the network card except the service logic module, and recovers the service indicated by the field information.
9. An apparatus for upgrading a network card, the apparatus comprising:
the receiving and sending unit is used for acquiring new firmware required by network card upgrading;
the processing unit is used for isolating the link between the network card and other parts in the equipment where the network card is located; and performing a hot upgrade operation.
10. The apparatus of claim 9,
the receiving and sending unit is further configured to acquire field information of a service currently processed by the network card before the network card is isolated from links of other components in the device in which the network card is located, where the field information of the service is used to indicate information related to the service currently processed by the network card.
11. The apparatus of claim 9 or 10,
the processing unit is also used for shielding the interruption of the network card; closing the system scheduling of the network card; and when the hardware of the network card enters an idle state, cleaning the system resources of the network card.
12. The apparatus according to any one of claims 9 to 11,
the processing unit is further configured to load the new firmware into a memory area of the network card, and run the new firmware in the memory area.
13. The apparatus according to any one of claims 9 to 11, wherein the new firmware comprises a data firmware part and a control firmware part which are separated, the memory area of the network card comprises a third memory area and a fourth memory area, the processing unit comprises a first processing unit and a second processing unit, the first processing unit is configured to process a data function, and the second processing unit is configured to process a control function;
the processing unit is further configured to reset the first processing unit, and the first processing unit runs the data firmware part of the old firmware in the third memory area before the reset; loading a data firmware portion of the new firmware into the third memory area after the first processing unit is reset; the first processing unit is restarted from the third memory area and runs the data firmware part of the new firmware; resetting the second processing unit after the first processing unit is restarted, the second processing unit running the control firmware portion of the old firmware in the fourth memory area prior to the resetting; loading a control firmware portion of the new firmware into the fourth memory area after the second processing unit is reset; and the second processing unit restarts from the fourth memory area and runs the control firmware part of the new firmware.
14. The apparatus according to any one of claims 9 to 13, wherein the service presence information comprises at least one of the following information: hardware state information of the service logic, service configuration information issued by a user, and memory information allocated for the service logic hardware.
15. The apparatus according to any one of claims 9 to 14,
the processing unit is further configured to initialize and configure other modules in the network card except the service logic module, and recover the service indicated by the field information.
16. A network card comprising a memory for storing instructions and a processor for executing the instructions stored by the memory, and wherein execution of the instructions stored in the memory causes the processor to perform the operational steps of the method of any one of claims 1 to 8.
17. An apparatus comprising a network card, the network card comprising a memory for storing instructions and a processor for executing the instructions stored by the memory, and execution of the instructions stored in the memory causes the processor to perform the operational steps of the method of any one of claims 1 to 8.
18. A computer-readable storage medium, in which a computer program is stored which, when executed by a computer, causes the computer to carry out the operational steps of the method according to any one of claims 1 to 8.
CN202011279529.3A 2018-03-07 2018-03-07 Method and device for upgrading network card firmware, network card and equipment Pending CN112491600A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011279529.3A CN112491600A (en) 2018-03-07 2018-03-07 Method and device for upgrading network card firmware, network card and equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011279529.3A CN112491600A (en) 2018-03-07 2018-03-07 Method and device for upgrading network card firmware, network card and equipment
CN201810185565.XA CN108616382B (en) 2018-03-07 2018-03-07 Method and device for upgrading network card firmware, network card and equipment

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201810185565.XA Division CN108616382B (en) 2018-03-07 2018-03-07 Method and device for upgrading network card firmware, network card and equipment

Publications (1)

Publication Number Publication Date
CN112491600A true CN112491600A (en) 2021-03-12

Family

ID=63658495

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202011279529.3A Pending CN112491600A (en) 2018-03-07 2018-03-07 Method and device for upgrading network card firmware, network card and equipment
CN201810185565.XA Active CN108616382B (en) 2018-03-07 2018-03-07 Method and device for upgrading network card firmware, network card and equipment

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201810185565.XA Active CN108616382B (en) 2018-03-07 2018-03-07 Method and device for upgrading network card firmware, network card and equipment

Country Status (1)

Country Link
CN (2) CN112491600A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422994A (en) * 2022-03-29 2022-04-29 龙旗电子(惠州)有限公司 Firmware upgrading method and device, electronic equipment and storage medium
CN114900469A (en) * 2022-06-10 2022-08-12 苏州浪潮智能科技有限公司 Method, system, equipment and medium for controlling data flow of multi-host network card
CN115543393A (en) * 2022-12-01 2022-12-30 摩尔线程智能科技(北京)有限责任公司 Upgrading method, electronic device and storage medium
CN115941475A (en) * 2023-03-15 2023-04-07 苏州浪潮智能科技有限公司 Network card firmware upgrading method, device, equipment, network card and readable storage medium

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112491600A (en) * 2018-03-07 2021-03-12 华为技术有限公司 Method and device for upgrading network card firmware, network card and equipment
CN110619955A (en) * 2019-09-20 2019-12-27 江苏赛诺格兰医疗科技有限公司 Method for upgrading electronic equipment software in medical imaging equipment and electronic equipment
CN110944048B (en) * 2019-11-29 2022-06-24 腾讯科技(深圳)有限公司 Service logic configuration method and device
CN111045714B (en) * 2019-12-19 2022-03-01 歌尔股份有限公司 Firmware updating method and device, earphone and computer readable storage medium
CN111399891A (en) * 2020-03-09 2020-07-10 蚌埠依爱消防电子有限责任公司 Method for hot upgrading local software of user information transmission device
CN111522559A (en) * 2020-04-17 2020-08-11 苏州浪潮智能科技有限公司 Intelligent network card firmware refreshing method and device and computer readable storage medium
CN111786820B (en) * 2020-06-16 2023-02-17 浙江国利网安科技有限公司 Firmware updating method and device and network equipment
CN112600679A (en) * 2020-12-01 2021-04-02 锐捷网络股份有限公司 Intelligent network card
CN112732462B (en) * 2021-01-07 2024-02-09 杭州中电安科现代科技有限公司 NETMAP network card drive-based method for preventing network card from restarting
CN113407217B (en) * 2021-06-30 2023-05-23 迈普通信技术股份有限公司 Chip program upgrading method, communication device and computer readable storage medium
CN114422485B (en) * 2022-01-27 2023-11-24 上海顺舟智能科技股份有限公司 Firmware updating method and device for Zigbee wireless intelligent device
CN115175289A (en) * 2022-07-29 2022-10-11 恒玄科技(北京)有限公司 Wireless network card and wireless communication method for host

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002084484A2 (en) * 2001-04-18 2002-10-24 Domosys Corporation Method of remotely upgrading firmware in field-deployed devices
KR20060019146A (en) * 2004-08-26 2006-03-03 삼성전자주식회사 Apparatus and method of up-grade firmware in network card
US20090103432A1 (en) * 2007-05-11 2009-04-23 Incipient, Inc. Non-disruptive data path upgrade using target mobility
CN102880487A (en) * 2012-09-10 2013-01-16 曙光信息产业(北京)有限公司 Method for programming NIC (network interface card) firmware with one click
CN102915249A (en) * 2012-11-02 2013-02-06 苏州科达科技股份有限公司 Method and device for remotely realizing firmware updating
CN103970567A (en) * 2014-04-28 2014-08-06 浪潮电子信息产业股份有限公司 Method for online upgrading of cloud storage system firmware
CN105045627A (en) * 2015-07-23 2015-11-11 浪潮电子信息产业股份有限公司 Method for realizing online update of network card configuration file by server
CN105320553A (en) * 2015-12-07 2016-02-10 浪潮集团有限公司 Method and system for updating network card firmware on basis of domestic processor platform
CN105912356A (en) * 2016-03-31 2016-08-31 武汉光迅科技股份有限公司 Optical module firmware program online upgrade method supporting version fallback
CN106874032A (en) * 2017-01-04 2017-06-20 青岛海信宽带多媒体技术有限公司 Method, device and optical module that optical module firmware is upgraded
CN107517223A (en) * 2017-09-29 2017-12-26 郑州云海信息技术有限公司 A kind of method and system of long-range renewal mellanox network card softwares
CN108616382B (en) * 2018-03-07 2020-12-08 华为技术有限公司 Method and device for upgrading network card firmware, network card and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102789388B (en) * 2012-06-14 2016-08-03 曙光信息产业(北京)有限公司 In MIPS IA frame serverPC, the method and system of network interface card function are increased based on BMC
CN104579772B (en) * 2014-12-30 2018-12-14 华为技术有限公司 The configuring management method of computer equipment and computer equipment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002084484A2 (en) * 2001-04-18 2002-10-24 Domosys Corporation Method of remotely upgrading firmware in field-deployed devices
KR20060019146A (en) * 2004-08-26 2006-03-03 삼성전자주식회사 Apparatus and method of up-grade firmware in network card
US20090103432A1 (en) * 2007-05-11 2009-04-23 Incipient, Inc. Non-disruptive data path upgrade using target mobility
CN102880487A (en) * 2012-09-10 2013-01-16 曙光信息产业(北京)有限公司 Method for programming NIC (network interface card) firmware with one click
CN102915249A (en) * 2012-11-02 2013-02-06 苏州科达科技股份有限公司 Method and device for remotely realizing firmware updating
CN103970567A (en) * 2014-04-28 2014-08-06 浪潮电子信息产业股份有限公司 Method for online upgrading of cloud storage system firmware
CN105045627A (en) * 2015-07-23 2015-11-11 浪潮电子信息产业股份有限公司 Method for realizing online update of network card configuration file by server
CN105320553A (en) * 2015-12-07 2016-02-10 浪潮集团有限公司 Method and system for updating network card firmware on basis of domestic processor platform
CN105912356A (en) * 2016-03-31 2016-08-31 武汉光迅科技股份有限公司 Optical module firmware program online upgrade method supporting version fallback
CN106874032A (en) * 2017-01-04 2017-06-20 青岛海信宽带多媒体技术有限公司 Method, device and optical module that optical module firmware is upgraded
CN107517223A (en) * 2017-09-29 2017-12-26 郑州云海信息技术有限公司 A kind of method and system of long-range renewal mellanox network card softwares
CN108616382B (en) * 2018-03-07 2020-12-08 华为技术有限公司 Method and device for upgrading network card firmware, network card and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
沈祥玖: "《操作系统原理与Windows NT系统》", pages: 104 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422994A (en) * 2022-03-29 2022-04-29 龙旗电子(惠州)有限公司 Firmware upgrading method and device, electronic equipment and storage medium
CN114900469A (en) * 2022-06-10 2022-08-12 苏州浪潮智能科技有限公司 Method, system, equipment and medium for controlling data flow of multi-host network card
CN114900469B (en) * 2022-06-10 2023-07-25 苏州浪潮智能科技有限公司 Method, system, equipment and medium for controlling data flow of multi host network card
CN115543393A (en) * 2022-12-01 2022-12-30 摩尔线程智能科技(北京)有限责任公司 Upgrading method, electronic device and storage medium
CN115543393B (en) * 2022-12-01 2023-08-22 摩尔线程智能科技(北京)有限责任公司 Upgrade method, electronic device and storage medium
CN115941475A (en) * 2023-03-15 2023-04-07 苏州浪潮智能科技有限公司 Network card firmware upgrading method, device, equipment, network card and readable storage medium

Also Published As

Publication number Publication date
CN108616382B (en) 2020-12-08
CN108616382A (en) 2018-10-02

Similar Documents

Publication Publication Date Title
CN108616382B (en) Method and device for upgrading network card firmware, network card and equipment
US10102170B2 (en) System and method for providing input/output functionality by an I/O complex switch
US20090144720A1 (en) Cluster software upgrades
CN104823160A (en) Virtual machine-preserving host updates
US10430082B2 (en) Server management method and server for backup of a baseband management controller
TW200817920A (en) Method, apparatus, and computer usable program code for migrating virtual adapters from source physical adapters to destination physical adapters
CN111147274B (en) System and method for creating a highly available arbitration set for a cluster solution
US9092334B2 (en) Method for shortening enumeration of tightly coupled USB device
US20220004380A1 (en) Pipeline rolling update
CN114741233A (en) Quick start method
WO2021004256A1 (en) Node switching method in node failure and related device
CN114817105A (en) Method and device for device enumeration, computer device and storage medium
CN101251815B (en) System and method for recoverring computer system
CN116521209B (en) Upgrading method and device of operating system, storage medium and electronic equipment
JP2007080012A (en) Rebooting method, system and program
CN116450046A (en) Cloud disk implementation method and device, intelligent network card, server and storage medium
CN106972963B (en) Service module starting control method and starting control method after crash restart
CN109189444A (en) A kind of upgrade control method and device of the management node of server virtualization system
US11829493B2 (en) Device access control system
CN115202803A (en) Fault processing method and device
CN114115703A (en) Bare metal server online migration method and system
US11290321B1 (en) Expanded availability computing system
US11507383B2 (en) Configurable boot paths
CN103500074B (en) A kind of hard disk access method and device
EP4195021A1 (en) Online migration method and system for bare metal server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20211223

Address after: 450046 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu wisdom Island, Zhengdong New Area, Zhengzhou City, Henan Province

Applicant after: Super fusion Digital Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Applicant before: HUAWEI TECHNOLOGIES Co.,Ltd.

TA01 Transfer of patent application right