Network card firmware upgrade method, program product, device and medium

By switching to out-of-band operation during the network card firmware upgrade process, the problem of multiple restarts and complex operations required in the existing technology of network card firmware upgrade is solved, and a simplified upgrade process and normal server business operation is achieved.

CN119621114BActive Publication Date: 2025-06-10INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510157664.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-06-10
Estimated Expiration
2045-02-13

AI Technical Summary

Technical Problem

In the prior art, the firmware upgrade of the network card needs to be carried out through the operating system tools on the server. The enable and shutdown of the debug interface requires the server to restart or power outage, resulting in interruption of business operations and complex operations.

Method used

By obtaining the firmware package information of the network card firmware, sending an upgrade request to the network card, allowing it to enter the update mode, transmitting the upgrade data and updating the firmware to be upgraded in combination with the component information table, switching to out-of-band operation, and only restarting is required after completion.

Benefits of technology

The network card firmware upgrade process is switched to out-of-band, avoiding the impact of multiple restarts and internal and external cooperation operations on the system business, and ensuring the normal operation of server business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621114B_ABST
    Figure CN119621114B_ABST
Patent Text Reader

Abstract

The present application discloses a method, program product, device and medium for upgrading network card firmware, which relates to the field of computer technology. The method includes obtaining firmware package information of the network card firmware, sending an upgrade request including the firmware package information to the network card, so that the network card receives the upgrade request and sets the network card firmware to enter the update mode; in response to the network card firmware entering the update mode, obtaining response information in the upgrade request, confirming the upgrade data status according to the response information, and transmitting the upgrade data to the network card; obtaining a component information table of the firmware to be upgraded, and sending the component information table to the network card, so that the network card updates the firmware to be upgraded by combining the upgrade data and the component information table. The upgrade process of the present application is easy to operate, has a short upgrade time, and does not require restarting the server system multiple times, reducing the impact on system services and ensuring the operation of services on the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a method for upgrading network card firmware, a program product, a device, and a medium. Background Art

[0002] A network card component is installed on a server, which refers to a piece of software installed on the server hardware; it is similar to an operating system and can run when the server starts up, controlling and managing various functions of the hardware devices. Its main role is to ensure the normal operation of the server hardware and provide reliable performance; it is responsible for managing and controlling various hardware components, such as processors, memory, hard disks, network interface cards, and input / output interfaces. Through close integration with the server hardware, the firmware enables the server to effectively execute various tasks, such as starting up, configuring devices, performing self-diagnostics, and backups. Network card firmware is the firmware in a network interface card (NIC), which is responsible for processing the transmission of network packets. Updating the network card firmware can improve network performance and security.

[0003] In some related technologies, the firmware upgrade of the network card component is completed through tools in the operating system on the server. Specifically, the firmware upgrade needs to be carried out based on the status of the debug interface. The enabling of the debug interface can only be initiated from out-of-band, and it must be closed after the firmware is updated. The enabling and closing of the debug interface also require the server to be restarted or even powered off. The power-off process not only affects the business operation of the server but also probabilistically has many problems such as card loss and driver loss, and the upgrade process is extremely complex. Summary of the Invention

[0004] To solve at least one of the problems mentioned in the above background art, this application provides a method for upgrading network card firmware, a program product, a device, and a medium, which can switch all the upgrade processes of the firmware to out-of-band, and after the upgrade is completed, only one restart is required, thus avoiding the complex operations brought by multiple restarts and in-band and out-of-band cooperation.

[0005] The specific technical solutions provided by the embodiments of this application are as follows:

[0006] In a first aspect, a method for upgrading network card firmware is provided, which is applied to a baseboard management controller. The method includes:

[0007] Obtain the firmware package information of the network card firmware, and send an upgrade request including the firmware package information to the network card, so that the network card receives the upgrade request and sets the network card firmware to enter the update mode;

[0008] In response to the network card firmware entering the update mode, obtain the response information in the upgrade request, confirm the upgrade data status according to the response information, and transmit the upgrade data to the network card;

[0009] Obtain the component information table of the firmware to be upgraded, and send the component information table to the network card so that the network card combines the upgrade data and the component information table to update the firmware to be upgraded.

[0010] In a specific embodiment, after sending an upgrade request including the firmware package information to the network card, the method further includes: the network card replies with a response indication according to the upgrade request, and the response indication is used to confirm whether to start firmware update; read the response value in the response indication, if the response value is a preset threshold, confirm to start firmware update, and set the network card firmware to enter the update mode.

[0011] In a specific embodiment, obtain the response information in the upgrade request, confirm the upgrade data status according to the response information, and transmit the upgrade data to the network card, where the upgrade data includes packet information and configuration data information, specifically including: read the packet indication value in the response information, if the packet indication value is not 0, confirm the existence of the packet information; in response to receiving a packet acquisition instruction, transmit the packet information to the network card; or, if the packet indication value is 0, confirm the non-existence of the packet information; read the configuration data indication value in the response information, if the indication value of the configuration data information is not 0, confirm the existence of the configuration data information; send a configuration information acquisition instruction to read and save the configuration data information in the network card according to the configuration information instruction; or, if the indication value of the configuration data information is 0, confirm the non-existence of the configuration data information.

[0012] In a specific embodiment, the network card combines the upgrade data and the component information table to update the firmware to be upgraded, where the component information table includes one or more component images, specifically including: configure the update process of the firmware to be upgraded according to the upgrade data; in response to receiving a firmware data request from the network card, obtain the component image associated with the firmware data request; verify that the offset data of the component image meets the preset range, and transmit the component image associated with the firmware data request to the network card to update the firmware to be upgraded.

[0013] In a specific embodiment, in response to receiving a transmission completion instruction from the network card, set the state of the baseboard management controller to change from the firmware transmission state to the verification state; in response to verifying that the upgraded firmware is in a valid state, send a verification completion instruction to the baseboard management controller through the network card to set the baseboard management controller to change from the verification state to the application state; in response to the completion of all firmware upgrades, send an activation firmware instruction to the network card to activate the upgraded firmware through the activation firmware instruction.

[0014] In a specific embodiment, a number of firmware to be upgraded are configured to obtain firmware update data, and the firmware update data includes a component transfer sequence associated with the firmware to be upgraded; in response to the completion of the current firmware upgrade, the component images are sequentially transferred to the network card according to the component transfer sequence.

[0015] In a specific embodiment, in response to receiving a firmware data request from the network card, the state of the baseboard management controller is set to the firmware transfer state, and the duration of the firmware transfer state is recorded; if the duration of the firmware transfer state exceeds a first preset time, it is confirmed that the firmware transfer state is abnormal, a cancellation upgrade instruction is sent, and the state of the baseboard management controller is set to the ready-to-transfer state; or, if the transfer of the component image fails, a cancellation upgrade instruction is sent, and the state of the baseboard management controller is set to the initial state.

[0016] In a specific embodiment, in response to the baseboard management controller entering the verification state, the duration of the verification state is recorded; if the duration of the firmware transfer state exceeds a second preset time, it is confirmed that the verification state is abnormal, a cancellation upgrade instruction is sent, and the state of the baseboard management controller is set to the ready-to-transfer state; or, if the verification process fails, a cancellation upgrade instruction is sent, and the state of the baseboard management controller is set to the initial state.

[0017] In a specific embodiment, the component image associated with the data request is read from the bottom layer of the baseboard management controller through a read function.

[0018] The component image is parsed, and the instructions in the baseboard management controller are filtered to obtain filtered instructions.

[0019] The function associated with the filtered instruction is executed according to the content of the filtered instruction.

[0020] In a specific embodiment, before sending the upgrade request to the network card, the method further includes: creating a monitoring thread, where the monitoring thread is used to obtain the upgrade progress of the firmware to be upgraded; the upgrade progress is calculated by the ratio of the sum of the offset data of the component image and the length of the component image data associated with the firmware data request to the length of the component image of the firmware to be upgraded.

[0021] In a specific embodiment, in response to the baseboard management controller entering the firmware transfer state, the monitoring thread is used to obtain the upgrade progress; when the upgrade progress reaches a preset target data, it is confirmed that the transfer of the component image data is completed.

[0022] In a specific embodiment, obtain the identification code of the firmware to be upgraded, and set the identification code to be associated with the upgrade progress of the firmware to be upgraded; write the identification code and the upgrade progress of the firmware to be upgraded into a constructed storage file; in response to obtaining the upgrade progress, query the storage file by executing a script to obtain the upgrade progress data.

[0023] In a second aspect, a computer program product is provided, including a computer program which, when executed by a processor, implements the method steps as described above:

[0024] Step A: Obtain the firmware package information of the network card firmware, and send an upgrade request including the firmware package information to the network card, so that the network card receives the upgrade request and sets the network card firmware to enter the update mode;

[0025] Step B: In response to the network card firmware entering the update mode, obtain the response information in the upgrade request, confirm the upgrade data status according to the response information, and transmit the upgrade data to the network card;

[0026] Step C: Obtain the component information table of the firmware to be upgraded, and send the component information table to the network card, so that the network card combines the upgrade data and the component information table to update the firmware to be upgraded.

[0027] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0028] Step A: Obtain the firmware package information of the network card firmware, and send an upgrade request including the firmware package information to the network card, so that the network card receives the upgrade request and sets the network card firmware to enter the update mode;

[0029] Step B: In response to the network card firmware entering the update mode, obtain the response information in the upgrade request, confirm the upgrade data status according to the response information, and transmit the upgrade data to the network card;

[0030] Step C: Obtain the component information table of the firmware to be upgraded, and send the component information table to the network card, so that the network card combines the upgrade data and the component information table to update the firmware to be upgraded.

[0031] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0032] Step A: Obtain the firmware package information of the network card firmware, and send an upgrade request including the firmware package information to the network card, so that the network card receives the upgrade request and sets the network card firmware to enter the update mode;

[0033] Step B: In response to the network card firmware entering the update mode, obtain the response information in the upgrade request, confirm the upgrade data status according to the response information, and transmit the upgrade data to the network card;

[0034] Step C: Obtain the component information table of the firmware to be upgraded, and send the component information table to the network card, so that the network card updates the firmware to be upgraded by combining the upgrade data and the component information table.

[0035] The embodiments of the present application have the following beneficial effects:

[0036] 1. The solution provided by the embodiments of the present application obtains the firmware package information of the network card firmware, sends an upgrade request including the firmware package information to the network card, so that the network card receives the upgrade request and enters the update mode; confirms the upgrade data according to the response information in the upgrade request, and transmits the upgrade data to the network card, so that the network card updates the firmware to be upgraded by combining the upgrade data and the component information table; through the setting of the solution in this embodiment, all upgrade processes of the firmware can be switched to out-of-band, and only one restart is required after the upgrade is completed, thereby avoiding the impact of multiple restarts and in-band and out-of-band cooperation operations on the system services and ensuring the normal operation of the server services. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0038] Figure 1 Shows a schematic diagram of the application environment according to the present application;

[0039] Figure 2 Shows a schematic diagram of the network card firmware upgrade method according to the present application;

[0040] Figure 3 Shows an overall schematic diagram of the thread for upgrading the network card firmware according to the present application;

[0041] Figure 4 Shows a schematic diagram of the format of the firmware package information according to the present application;

[0042] Figure 5 Shows a schematic diagram of the upgrade process of a single firmware according to the present application;

[0043] Figure 6 Shows a schematic diagram of a computer device according to the present application. Detailed implementation manners

[0044] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are only a part rather than all of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0045] The network card firmware upgrade method provided by the present application can be applied to, for example Figure 1 The application environment shown. Among them, the network card communicates with the server through the network. The server is also configured with a BMC (Baseboard Management Controller), and the BMC communicates with the network card to obtain the firmware package information of the network card firmware, send an upgrade request including the firmware package information to the network card, so that the network card receives the upgrade request and sets the network card firmware to enter the update mode; then obtains the response information in the upgrade request, confirms the upgrade data status according to the response information, and transmits the upgrade data to the network card; obtains the component information table of the firmware to be upgraded, and sends the component information table to the network card, so that the network card combines the upgrade data and the component information table to update the firmware to be upgraded. Among them, the network card can be but not limited to BF3 network card, AX200 network card or RTL8852BE network card, and the server can be implemented by an independent server or a server cluster composed of multiple servers.

[0046] In one embodiment, as Figure 2 shown, a network card firmware upgrade method is provided. Taking the BMC in Figure 1 as an example for illustration, the upgrade of the network card firmware is realized through the BMC. The method includes the following steps:

[0047] Step 101: Obtain the firmware package information of the network card firmware, and send an upgrade request including the firmware package information to the network card, so that the network card receives the upgrade request and sets the network card firmware to enter the update mode.

[0048] Among them, as Figure 3 shown, the upgrade of the network card firmware involves at least three threads in the BMC, including the network card firmware upgrade thread, the network card request response thread, and the monitoring thread for monitoring the upgrade progress. The operations of the network card firmware upgrade thread instructions are executed by receiving the instructions sent by the BMC and according to the instructions sent by the BMC.

[0049] In an embodiment, asFigure 4 As shown, the firmware package information of the network card firmware specifically includes: firmware package header information, device description information, firmware information, header check information, valid check information, and component images. Among them, the firmware information includes the version information of the firmware package, the release time, the size of the firmware package header, and the identifier. The device description information is used to compare the information in the firmware package with the information read from the device side, and the two must be consistent to be used for device upgrade. The firmware information refers to the information of each firmware, including the identifier, the size of the component, the offset of the component, the classification, and the version information; the header check information includes the header check value, and the valid check information refers to the check value of the payload. There are several component images set, where "Component Image 1" is the image of Firmware 1, "Component Image 2" is the image of Firmware 2, and "ComponentImage N" is the image of Firmware N.

[0050] To obtain the above firmware package information, first place the network card firmware in the var or path of the BMC, or copy the network card firmware to the inside of the BMC through remote copy, or configure the upgrade interface to connect the network card firmware to the BMC, obtain the firmware package information through the above methods, and implement firmware upgrade based on the above firmware package information.

[0051] Further, when obtaining the firmware package information of the network card firmware, the BMC is configured to the initial state. The firmware package information in this embodiment includes the number of firmwares, the maximum data transfer size, the firmware package size, and the version information of the firmware package. Send an upgrade request to the network card, where the upgrade request carries the above firmware package information. When the network card receives the upgrade request, the network card replies with a response indication according to the upgrade request. The response indication is used to confirm whether to start firmware update; read the response value in the response indication. If the response value is the preset threshold, confirm to start firmware update and set the network card firmware to enter the update mode. Exemplarily, the preset threshold is "1". When the response value replied by the network card is 1, it indicates that firmware update can be performed. At this time, set the network card firmware to enter the update mode, and configure the BMC not to send other update requests until this firmware upgrade is completed or cancelled.

[0052] Step 102: In response to the network card firmware entering the update mode, obtain the response information in the upgrade request, confirm the upgrade data status according to the response information, and transmit the upgrade data to the network card.

[0053] It should be noted that after the network card firmware enters the update mode, the configuration BMC status is converted from the initial state to the firmware package transmission state, and the upgrade data is transmitted in the firmware package transmission state. The upgrade data includes packet information and configuration data information. Specifically, the packet indication value in the response information is read. If the packet indication value is not 0, it is confirmed that the packet information exists. In response to receiving the packet acquisition instruction, the packet information is transmitted to the network card. Or, if the packet indication value is 0, it is confirmed that the packet information does not exist. The configuration data indication value in the response information is read. If the indication value of the configuration data information is not 0, it is confirmed that the configuration data information exists. The configuration information acquisition instruction is sent to read and save the configuration data information in the network card according to the configuration information instruction. Or, if the indication value of the configuration data information is 0, it is confirmed that the configuration data information does not exist.

[0054] Exemplarily, the packet indication value is the "send_get_pkg_data_cmd value", and the configuration data indication value is the "meta_data_len value". When the "send_get_pkg_data_cmd value" is 0, it means that the firmware package does not contain packets. When the "send_get_pkg_data_cmd value" is not 0, it means that there are packets in the firmware package. When the "meta_data_len value" is 0, it means that there is no configuration data. When the "meta_data_len value" is not 0, it means that there is configuration data. And when it is confirmed that the above upgrade data exists, the upgrade data is transmitted to the network card for the upgrade of the network card firmware.

[0055] Step 103: Obtain the component information table of the firmware to be upgraded, and send the component information table to the network card so that the network card combines the upgrade data and the component information table to update the firmware to be upgraded.

[0056] In this embodiment, at this time, the BMC remains in the firmware package transmission state. To implement the upgrade of the network card firmware, the BMC transmits the component information table in the firmware package header to the network card. The component information table includes identifiers of several applicable component images, the size and offset of the components, classification, and version information. The transmission of the component information table is achieved by the BMC sending one or more transmission component commands. After the network card receives the component information table data, the status of the BMC is set to the ready-to-transmit state. At this time, through the firmware upgrade command sent by the BMC, the network card firmware upgrade process begins.

[0057] In a specific embodiment, such as Figure 5As shown, the network card combines the upgrade data and the component information table to update the firmware to be upgraded, where the component information table includes one or more component images, specifically including: configuring the update process of the firmware to be upgraded according to the upgrade data; in response to receiving a firmware data request from the network card, obtaining the component image associated with the firmware data request; verifying that the offset data of the component image meets the preset range, and transmitting the component image associated with the firmware data request to the network card to update the firmware to be upgraded.

[0058] Among them, after the network card sends a firmware data request, set the status of the baseboard management controller to the firmware transmission status, and record the duration of the firmware transmission status; if the duration of the firmware transmission status exceeds the first preset time, confirm that the firmware transmission status is abnormal, send a cancellation upgrade instruction, and set the status conversion of the baseboard management controller to the ready-to-transmit status; or, if the component image transmission fails, send a cancellation upgrade instruction, and set the status conversion of the baseboard management controller to the initial status.

[0059] Furthermore, in response to receiving a transmission completion instruction from the network card, set the status of the baseboard management controller to change from the firmware transmission status to the verification status; in response to verifying that the upgraded firmware is in a valid state, send a verification completion instruction to the baseboard management controller through the network card to set the baseboard management controller to change from the verification status to the application status; in response to all firmware upgrades being completed, send an activate firmware instruction to the network card to activate the upgraded firmware through the activate firmware instruction.

[0060] When the BMC enters the verification status, start monitoring the verification status; in response to the baseboard management controller entering the verification status, record the duration of the verification status; if the duration of the firmware transmission status exceeds the second preset time, confirm that the verification status is abnormal, send a cancellation upgrade instruction, and set the status conversion of the baseboard management controller to the ready-to-transmit status; or, if the verification process fails, send a cancellation upgrade instruction, and set the status conversion of the baseboard management controller to the initial status.

[0061] During the normal upgrade process, the BMC will sequentially perform status conversions in the order of the initial status, the firmware package transmission status, the ready-to-transmit status, the firmware transmission status, the verification status, the application status, and the activation status to control the upgrade process of the network card firmware, monitor the status of each BMC, and complete the update of the network card firmware through the coordinated conversion of each BMC status.

[0062] In this embodiment, the BMC sends an update firmware command and performs a firmware upgrade operation according to the upgrade data and component information table sent to the network card. The upgrade data and component information table are used to provide component classification, component version, component size, and update options to start the process of updating specific firmware components. First, the network card sends one or more firmware data requests to the BMC to obtain the corresponding component image through this request. The firmware data request defines the offset and length fields for transmitting data through the RequestFirmware Data command; and the BMC verifies that the offset data of the component image meets the preset range and transmits the component image that meets the preset range to the network card.

[0063] Furthermore, when the packet information exists, the BMC is set to transmit the packet information to the network card before transmitting the component image. Specifically, when the packet information exists, the BMC responds to the network card's Get Package Data command and responds to the network card to transmit the package data to the network card. When the configuration data exists, the BMC sends the Get Device Meta Data command, reads the meta data in the network card and saves it, and restores it to the network card after all the component images have been transmitted.

[0064] It should be noted that after the BMC is converted to the application state, the network card sends an application completion command to the BMC and confirms the completion of the transmission of the component image of the new firmware according to the successful response information received from the BMC. By monitoring each state in the firmware upgrade process, the network card upgrade process is controlled.

[0065] In a specific embodiment, there are several firmware to be upgraded in this embodiment. Combining the above firmware upgrade process, the corresponding component images are cyclically obtained to complete the update of multiple firmwares. The firmware update data is included in the firmware package header. Further, the firmware update data is obtained. The firmware update data includes the component transmission sequence associated with the firmware to be upgraded. In response to the completion of the current firmware upgrade, the component images are transmitted to the network card in sequence according to the component transmission sequence.

[0066] Furthermore, after all the firmwares are upgraded, an activate firmware instruction is sent to the network card to activate the upgraded firmware.

[0067] In this embodiment, after the BMC receives each request from the network card, it reads the component image associated with the data request from the bottom layer of the baseboard management controller through a read function; parses the component image, and filters the instructions in the baseboard management controller to obtain the filtered instructions; and executes the function associated with the filtered instructions according to the content of the filtered instructions.

[0068] Specifically, the read function in this embodiment is configured as the "recvfrom" function, which reads data from the underlying layer through the "recvfrom" function and sets up blocking waiting when there is no data. After the BMC obtains the read data, it parses the data, filters various requests in the BMC, and only processes the requests actively sent by the network card, that is, including the Request FirmwareData command for requesting firmware data, the Transfer Complete command for transfer completion, the Verify Complete command for verification completion, and the Apply Complete command for application completion. After filtering various requests, for the Transfer Complete command for transfer completion, the Verify Complete command for verification completion, and the Apply Complete command for application completion, the results sent by the network card are analyzed. If it is correct, proceed to the next step; if it is incorrect, assign values to the corresponding global variables to implement judgment and analysis in the network card firmware upgrade thread based on the above variable assignments. After the judgment fails, the update mode will be exited.

[0069] Step 104: Create a monitoring thread, which is used to obtain the upgrade progress of the firmware to be upgraded.

[0070] Before sending the upgrade request to the network card, the creation operation of the monitoring thread is performed, and the upgrade progress is obtained. The upgrade progress is calculated by the ratio of the sum of the offset data of the component image and the length of the component image data associated with the firmware data request to the length of the component image of the firmware to be upgraded. In response to the baseboard management controller entering the firmware transfer state, the monitoring thread is used to obtain the upgrade progress; when the upgrade progress reaches the preset target data, it is confirmed that the component image data transfer is completed.

[0071] Furthermore, obtain the identification code of the firmware to be upgraded, and set the identification code to be associated with the upgrade progress of the firmware to be upgraded; write the identification code and the upgrade progress of the firmware to be upgraded into the constructed storage file; in response to obtaining the upgrade progress, query the storage file by executing a script to obtain the upgrade progress data.

[0072] The monitoring thread is used to monitor during the upgrade process of each firmware. The identification code of the component comes from the global variable in the network card firmware upgrade thread, and the upgrade progress result comes from the global variable in the response network card request thread. After calculating the upgrade progress through the above calculation process, read the information in the file through the out-of-band upgrade script to obtain the upgrade progress data. When the offset data of the requested component image reaches the size of the component image, the firmware transfer is completed.

[0073] This embodiment can switch all the firmware upgrade processes to out-of-band. After the upgrade is completed, only one restart is required, thus avoiding the impact of multiple restarts and in-band and out-of-band coordination operations on the system services and ensuring the normal operation of the server services.

[0074] Corresponding to the above embodiment, a computer program product is provided, including a computer program, which when executed by a processor, implements the following steps:

[0075] Step 201: Obtain the firmware package information of the network card firmware, and send an upgrade request including the firmware package information to the network card, so that the network card receives the upgrade request and sets the network card firmware to enter the update mode;

[0076] Step 202: In response to the network card firmware entering the update mode, obtain the response information in the upgrade request, confirm the upgrade data status according to the response information, and transmit the upgrade data to the network card;

[0077] Step 203: Obtain the component information table of the firmware to be upgraded, and send the component information table to the network card, so that the network card combines the upgrade data and the component information table to update the firmware to be upgraded.

[0078] In one embodiment, when the computer program is executed by a processor, it also implements the following steps:

[0079] After sending an upgrade request including the firmware package information to the network card, the network card replies with a response indication according to the upgrade request. The response indication is used to confirm whether to start the firmware update; read the response value in the response indication. If the response value is a preset threshold, confirm to start the firmware update and set the network card firmware to enter the update mode.

[0080] In one embodiment, when the computer program is executed by a processor, it also implements the following steps:

[0081] Among them, the upgrade data includes data packet information and configuration data information. Read the data packet indication value in the response information. If the data packet indication value is not 0, confirm that the data packet information exists; in response to receiving the data packet acquisition instruction, transmit the data packet information to the network card; or, if the data packet indication value is 0, confirm that the data packet information does not exist; read the configuration data indication value in the response information. If the indication value of the configuration data information is not 0, confirm that the configuration data information exists; send the configuration information acquisition instruction to read and save the configuration data information in the network card according to the configuration information instruction; or, if the indication value of the configuration data information is 0, confirm that the configuration data information does not exist.

[0082] In one embodiment, when the computer program is executed by a processor, it also implements the following steps:

[0083] The component information table includes one or more component images, and configures the update process of the firmware to be upgraded according to the upgrade data; in response to receiving a firmware data request from the network card, obtains the component image associated with the firmware data request; verifies that the offset data of the component image meets a preset range, and transmits the component image associated with the firmware data request to the network card to update the firmware to be upgraded.

[0084] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0085] In response to receiving a transmission completion instruction from the network card, sets the status of the baseboard management controller to change from the firmware transmission state to the verification state; in response to verifying that the upgraded firmware is in a valid state, sends a verification completion instruction to the baseboard management controller through the network card to set the baseboard management controller to change from the verification state to the application state; in response to all firmware upgrades being completed, sends an activate firmware instruction to the network card to activate the upgraded firmware through the activate firmware instruction.

[0086] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0087] Obtains firmware update data, where the firmware update data includes a component transmission sequence associated with the firmware to be upgraded; in response to the completion of the current firmware upgrade, sequentially transmits the component images to the network card according to the component transmission sequence.

[0088] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0089] In response to receiving a firmware data request from the network card, sets the status of the baseboard management controller to the firmware transmission state, and records the duration of the firmware transmission state; if the duration of the firmware transmission state exceeds a first preset time, confirms that the firmware transmission state is abnormal, sends a cancel upgrade instruction, and sets the status of the baseboard management controller to change to the ready-to-transmit state; or, if the component image transmission fails, sends a cancel upgrade instruction, and sets the status of the baseboard management controller to change to the initial state.

[0090] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0091] In response to the baseboard management controller entering the verification state, records the duration of the verification state; if the duration of the firmware transmission state exceeds a second preset time, confirms that the verification state is abnormal, sends a cancel upgrade instruction, and sets the status of the baseboard management controller to change to the ready-to-transmit state; or, if the verification process fails, sends a cancel upgrade instruction, and sets the status of the baseboard management controller to change to the initial state.

[0092] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0093] Read component images associated with the data request from the underlying substrate management controller through a read function; parse the component images and filter the instructions in the substrate management controller to obtain filtered instructions; execute the function associated with the filtered instructions according to the content of the filtered instructions.

[0094] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0095] Before sending an upgrade request to the network card, create a monitoring thread for obtaining the upgrade progress of the firmware to be upgraded; the upgrade progress is calculated by the ratio of the sum of the offset data of the component image and the length of the component image data associated with the firmware data request to the length of the component image of the firmware to be upgraded.

[0096] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0097] In response to the substrate management controller entering the firmware transmission state, use the monitoring thread to obtain the upgrade progress; when the upgrade progress reaches the preset target data, confirm that the transmission of the component image data is completed.

[0098] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0099] Obtain the identification code of the firmware to be upgraded, and set the corresponding association between the identification code and the upgrade progress of the firmware to be upgraded; write the identification code and the upgrade progress of the firmware to be upgraded into the constructed storage file; in response to obtaining the upgrade progress, query the storage file by executing a script to obtain the upgrade progress data.

[0100] Corresponding to the above embodiments, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0101] Step 301, obtain the firmware package information of the network card firmware, and send an upgrade request including the firmware package information to the network card, so that the network card receives the upgrade request and sets the network card firmware to enter the update mode;

[0102] Step 302, in response to the network card firmware entering the update mode, obtain the response information in the upgrade request, confirm the upgrade data status according to the response information, and transmit the upgrade data to the network card;

[0103] Step 303, obtain the component information table of the firmware to be upgraded, and send the component information table to the network card, so that the network card combines the upgrade data and the component information table to update the firmware to be upgraded.

[0104] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0105] After sending an upgrade request including firmware package information to the network card, the network card replies with a response indication according to the upgrade request, and the response indication is used to confirm whether to start firmware update; read the response value in the response indication, if the response value is a preset threshold, then confirm to start firmware update and set the network card firmware to enter the update mode.

[0106] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0107] Among them, the upgrade data includes data packet information and configuration data information. Read the data packet indication value in the response information. If the data packet indication value is not 0, then confirm that the data packet information exists; in response to receiving the data packet acquisition instruction, transmit the data packet information to the network card; or, if the data packet indication value is 0, then confirm that the data packet information does not exist; read the configuration data indication value in the response information. If the indication value of the configuration data information is not 0, then confirm that the configuration data information exists; send the configuration information acquisition instruction to read and save the configuration data information in the network card according to the configuration information instruction; or, if the indication value of the configuration data information is 0, then confirm that the configuration data information does not exist.

[0108] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0109] Among them, the component information table includes one or more component images, configures the update process of the firmware to be upgraded according to the upgrade data; in response to receiving a firmware data request from the network card, obtain the component image associated with the firmware data request; verify that the offset data of the component image meets the preset range, and transmit the component image associated with the firmware data request to the network card to update the firmware to be upgraded.

[0110] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0111] In response to receiving a transmission completion instruction from the network card, set the state of the baseboard management controller to change from the firmware transmission state to the verification state; in response to verifying that the upgraded firmware is in a valid state, send a verification completion instruction to the baseboard management controller through the network card to set the baseboard management controller to change from the verification state to the application state; in response to all firmware upgrades being completed, send an activate firmware instruction to the network card to activate the upgraded firmware through the activate firmware instruction.

[0112] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0113] Obtain firmware update data, and the firmware update data includes a component transmission sequence associated with the firmware to be upgraded; in response to the completion of the current firmware upgrade, transmit the component images to the network card in sequence according to the component transmission sequence.

[0114] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0115] In response to receiving a firmware data request from the network card, set the status of the baseboard management controller to the firmware transfer status, and record the duration of the firmware transfer status; if the duration of the firmware transfer status exceeds the first preset time, confirm that the firmware transfer status is abnormal, send a cancellation upgrade instruction, and set the status of the baseboard management controller to the ready-to-transfer status; or, if the component image transfer fails, send a cancellation upgrade instruction, and set the status of the baseboard management controller to the initial status.

[0116] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0117] In response to the baseboard management controller entering the verification status, record the duration of the verification status; if the duration of the firmware transfer status exceeds the second preset time, confirm that the verification status is abnormal, send a cancellation upgrade instruction, and set the status of the baseboard management controller to the ready-to-transfer status; or, if the verification process fails, send a cancellation upgrade instruction, and set the status of the baseboard management controller to the initial status.

[0118] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0119] Read the component image associated with the data request from the underlying layer of the baseboard management controller through a read function; parse the component image, and filter the instructions in the baseboard management controller to obtain the filtered instructions; execute the function associated with the filtered instructions according to the content of the filtered instructions.

[0120] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0121] Before sending an upgrade request to the network card, create a monitoring thread, which is used to obtain the upgrade progress of the firmware to be upgraded; the upgrade progress is calculated by the ratio of the sum of the offset data of the component image and the length of the component image data associated with the firmware data request to the length of the component image of the firmware to be upgraded.

[0122] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0123] In response to the baseboard management controller entering the firmware transfer status, use the monitoring thread to obtain the upgrade progress; when the upgrade progress reaches the preset target data, confirm that the component image data transfer is completed.

[0124] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0125] Obtain the identification code of the firmware to be upgraded, and set the corresponding association between the identification code and the upgrade progress of the firmware to be upgraded; write the identification code and the upgrade progress of the firmware to be upgraded into the constructed storage file; in response to obtaining the upgrade progress, query the storage file by executing a script to obtain the upgrade progress data.

[0126] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 6 shown. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store firmware package information data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for upgrading network card firmware.

[0127] Those skilled in the art can understand that Figure 6 the structure shown in

[0128] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0129] Step 401: Obtain the firmware package information of the network card firmware, and send an upgrade request including the firmware package information to the network card, so that the network card receives the upgrade request and sets the network card firmware to enter the update mode;

[0130] Step 402: In response to the network card firmware entering the update mode, obtain the response information in the upgrade request, confirm the upgrade data status according to the response information, and transmit the upgrade data to the network card;

[0131] Step 403: Obtain the component information table of the firmware to be upgraded, and send the component information table to the network card, so that the network card combines the upgrade data and the component information table to update the firmware to be upgraded.

[0132] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0133] After sending an upgrade request including firmware package information to the network card, the network card replies with a response indication according to the upgrade request. The response indication is used to confirm whether to start firmware update; read the response value in the response indication. If the response value is a preset threshold, confirm to start firmware update and set the network card firmware to enter the update mode.

[0134] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0135] Among them, the upgrade data includes packet information and configuration data information. Read the packet indication value in the response information. If the packet indication value is not 0, confirm the existence of packet information; in response to receiving a packet acquisition instruction, transmit the packet information to the network card; or, if the packet indication value is 0, confirm the non-existence of packet information; read the configuration data indication value in the response information. If the indication value of the configuration data information is not 0, confirm the existence of the configuration data information; send a configuration information acquisition instruction to read and save the configuration data information in the network card according to the configuration information instruction; or, if the indication value of the configuration data information is 0, confirm the non-existence of the configuration data information.

[0136] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0137] Among them, the component information table includes one or more component images. Configure the update process of the firmware to be upgraded according to the upgrade data; in response to receiving a firmware data request from the network card, obtain the component image associated with the firmware data request; verify that the offset data of the component image meets the preset range, and transmit the component image associated with the firmware data request to the network card to update the firmware to be upgraded.

[0138] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0139] In response to receiving a transmission completion instruction from the network card, set the status of the baseboard management controller to change from the firmware transmission state to the verification state; in response to verifying that the upgraded firmware is in a valid state, send a verification completion instruction to the baseboard management controller through the network card to set the baseboard management controller to change from the verification state to the application state; in response to all firmware upgrades being completed, send an activate firmware instruction to the network card to activate the upgraded firmware through the activate firmware instruction.

[0140] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0141] Obtain firmware update data, where the firmware update data includes a component transmission sequence associated with the firmware to be upgraded; in response to the completion of the current firmware upgrade, transmit the component images to the network card in sequence according to the component transmission sequence.

[0142] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0143] In response to receiving a firmware data request from the network card, set the status of the baseboard management controller to the firmware transfer state, and record the duration of the firmware transfer state; if the duration of the firmware transfer state exceeds a first preset time, confirm that the firmware transfer state is abnormal, send a cancellation upgrade instruction, and set the status transition of the baseboard management controller to the ready-to-transfer state; or, if the component image transfer fails, send a cancellation upgrade instruction, and set the status transition of the baseboard management controller to the initial state.

[0144] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0145] In response to the baseboard management controller entering the verification state, record the duration of the verification state; if the duration of the firmware transfer state exceeds a second preset time, confirm that the verification state is abnormal, send a cancellation upgrade instruction, and set the status transition of the baseboard management controller to the ready-to-transfer state; or, if the verification process fails, send a cancellation upgrade instruction, and set the status transition of the baseboard management controller to the initial state.

[0146] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0147] Read the component image associated with the data request from the bottom layer of the baseboard management controller through a read function; parse the component image, and filter the instructions in the baseboard management controller to obtain the filtered instructions; execute the function associated with the filtered instructions according to the content of the filtered instructions.

[0148] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0149] Before sending an upgrade request to the network card, create a monitoring thread, which is used to obtain the upgrade progress of the firmware to be upgraded; the upgrade progress is calculated by the ratio of the sum of the offset data of the component image and the length of the component image data associated with the firmware data request to the length of the component image of the firmware to be upgraded.

[0150] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0151] In response to the baseboard management controller entering the firmware transfer state, use the monitoring thread to obtain the upgrade progress; when the upgrade progress reaches the preset target data, confirm that the component image data transfer is completed.

[0152] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0153] Obtain the identification code of the firmware to be upgraded, and set the corresponding association between the identification code and the upgrade progress of the firmware to be upgraded; write the identification code and the upgrade progress of the firmware to be upgraded into the constructed storage file; in response to obtaining the upgrade progress, query the storage file by executing a script to obtain the upgrade progress data.

[0154] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0155] Although the preferred embodiments in the embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they know the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0156] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.

Claims

1. A network card firmware upgrade method, characterized in that: Applied to a baseboard management controller, the method comprises: Obtain firmware package information of the network card firmware, wherein the network card firmware is placed in the BMC path, or the network card firmware is copied to the BMC through remote copying, or the network card firmware is connected to the BMC through a configuration upgrade interface; Sending an upgrade request including the firmware package information to the network card, so that the network card receives the upgrade request and sets the network card firmware to enter an update mode; In response to the network card firmware entering an update mode, obtaining response information in the upgrade request, confirming the upgrade data status according to the response information, and transmitting the upgrade data to the network card; Obtaining a component information table of the firmware to be upgraded, wherein the component information table includes one or more component images; The component information table is sent to the network card so that the network card updates the firmware to be upgraded in combination with the upgrade data and the component information table, specifically comprising: configuring the update process of the firmware to be upgraded according to the upgrade data; in response to receiving a firmware data request from the network card, obtaining the component image associated with the firmware data request; verifying that the offset data of the component image meets a preset range, and transmitting the component image associated with the firmware data request to the network card to update the firmware to be upgraded.

2. The network card firmware upgrade method according to claim 1, characterized in that: After sending the upgrade request including the firmware package information to the network card, the method further includes: The network card replies with a response indication according to the upgrade request, wherein the response indication is used to confirm whether to start the firmware update; The response value in the response indication is read, and if the response value is a preset threshold, it is confirmed to start the firmware update, and the network card firmware is set to enter the update mode.

3. The network card firmware upgrade method according to claim 1 or 2, characterized in that: Obtain response information in the upgrade request, confirm the upgrade data status according to the response information, and transmit the upgrade data to the network card, wherein the upgrade data includes data packet information and configuration data information, specifically including: Reading the data packet indication value in the response information, and if the data packet indication value is not 0, confirming that the data packet information exists; In response to receiving an instruction to obtain a data packet, transmitting the data packet information to the network card; Alternatively, if the data packet indication value is 0, it is confirmed that the data packet information does not exist; Reading the configuration data indication value in the response information, and if the indication value of the configuration data information is not 0, confirming that the configuration data information exists; Sending a configuration information acquisition instruction to read and save the configuration data information in the network card according to the configuration information instruction; Alternatively, if the indication value of the configuration data information is 0, it is confirmed that the configuration data information does not exist.

4. The network card firmware upgrade method according to claim 1, characterized in that: The method further comprises: In response to receiving a transmission completion instruction from the network card, setting the state of the baseboard management controller to be converted from a firmware transmission state to a verification state; In response to verifying that the upgraded firmware is in a valid state, sending a verification completion instruction to the baseboard management controller through the network card to set the baseboard management controller to switch from the verification state to the application state; In response to all firmware upgrades being completed, an activation firmware instruction is sent to the network card to activate the upgraded firmware through the activation firmware instruction.

5. The network card firmware upgrade method according to claim 1, characterized in that: There are several firmware configurations to be upgraded, and the method further includes: Acquire firmware update data, wherein the firmware update data includes a component transmission sequence associated with the firmware to be upgraded; In response to the current firmware upgrade being completed, the component images are sequentially transmitted to the network card according to the component transmission sequence.

6. The network card firmware upgrade method according to claim 1, characterized in that: The method further comprises: In response to receiving a firmware data request from the network card, setting the state of the baseboard management controller to a firmware transmission state, and recording the duration of the firmware transmission state; If the duration of the firmware transmission state exceeds a first preset time, confirming that the firmware transmission state is abnormal, sending a cancel upgrade instruction, and setting the state of the baseboard management controller to be converted to a ready-to-transmit state; Alternatively, if the component image transmission fails, a cancel upgrade instruction is sent, and the state of the baseboard management controller is set to be converted to an initial state.

7. The network card firmware upgrade method according to claim 4, characterized in that: The method further comprises: In response to the baseboard management controller entering the verification state, recording a duration of the verification state; If the duration of the firmware transmission state exceeds a second preset time, confirming that the verification state is abnormal, sending a cancel upgrade instruction, and setting the state of the baseboard management controller to be converted to a ready-to-transmit state; Alternatively, if the verification process fails, a cancel upgrade instruction is sent, and the state of the baseboard management controller is set to be converted to an initial state.

8. The network card firmware upgrade method according to claim 1, characterized in that: The method further comprises: Read the component image associated with the data request from the bottom layer of the baseboard management controller through a read function; Parsing the component image and filtering the instructions in the baseboard management controller to obtain filtered instructions; The function associated with the filtered instruction is executed according to the filtered instruction content.

9. The network card firmware upgrade method according to claim 1, characterized in that: Before sending the upgrade request to the network card, the method further includes: Creating a monitoring thread, wherein the monitoring thread is used to obtain the upgrade progress of the firmware to be upgraded; The upgrade progress is calculated by the ratio of the sum of the offset data of the component image and the length of the component image data associated with the firmware data request to the component image length of the firmware to be upgraded.

10. The network card firmware upgrade method according to claim 9, characterized in that: The method further comprises: In response to the baseboard management controller entering a firmware transmission state, using the monitoring thread to obtain the upgrade progress; When the upgrade progress reaches the preset target data, it is confirmed that the component image data transmission is completed.

11. The network card firmware upgrade method according to claim 9, characterized in that: The method further comprises: Obtaining an identification code of the firmware to be upgraded, and setting a corresponding association between the identification code and the upgrade progress of the firmware to be upgraded; Setting the identification code and the upgrade progress of the firmware to be upgraded to be written into the constructed storage file; In response to obtaining the upgrade progress, the storage file is queried by executing a script to obtain the upgrade progress data.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 11 are implemented.

13. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 11 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Network card chip firmware upgrading method, management board, management node and computing equipment

    CN118227162A