Network card firmware upgrading method, program product, equipment and medium

By switching to out-of-band upgrade process in network card firmware upgrade, the problem of complex upgrades in the existing technology and affecting business operation is solved, and the simplified upgrade process and the effect of reducing the number of restarts is achieved.

CN119621114AActive Publication Date: 2025-03-14INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, the firmware upgrade of network card needs to be carried out through the operating system tools on the server. The process is complicated and requires multiple restarts, affecting the operation of the server business.

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, all upgrade processes are switched to out-of-band, and only restarting is required after completion.

Benefits of technology

The entire upgrade process of network card firmware is realized to switch to out-of-band, reducing the number of restarts, simplifying operations, and avoiding the impact on server business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621114A_ABST
    Figure CN119621114A_ABST
Patent Text Reader

Abstract

The invention discloses a network card firmware upgrading method, a program product, equipment and a medium, and relates to the technical field of computers, the method comprises the following steps: acquiring firmware package information of network card firmware, and sending an upgrading request comprising the firmware package information to a network card, so that the network card receives the upgrading request and sets the network card firmware to enter an updating mode; responding to the network card firmware to enter an updating mode, acquiring response information in the upgrading request, confirming an upgrading data state according to the response information, and transmitting the upgrading data to the network card; and obtaining a component information table of firmware to be upgraded, and sending the component information table to a network card, so that the network card updates the firmware to be upgraded by combining the upgrading data and the component information table. The upgrading process is easy to operate, the upgrading time is short, the server system does not need to be restarted for multiple times, the influence on system services is reduced, and operation of the services on the server is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a network card firmware upgrade method, program product, device and medium. Background Art

[0002] The server is installed with a network card component, which refers to a type of software installed on the server hardware; it is similar to an operating system and can run when the server is started to control and manage various functions of the hardware device. The main function 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 and output interfaces. Through tight integration with server hardware, firmware enables the server to effectively perform various tasks such as startup, device configuration, self-diagnosis, and backup. Network card firmware is the firmware in the network interface card (NIC), which is responsible for processing the transmission of network data 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 the tools of the operating system on the server. The specific firmware upgrade needs to be carried out through the status of the debugging interface, where the debugging interface can only be enabled out of band and must be closed after the firmware is updated. The enabling and disabling of the debugging interface also requires the server to be restarted or even powered off. The power off process not only affects the business operation of the server, but also has the probability of many problems such as card and driver dropping, and the upgrade process is extremely complicated. Summary of the invention

[0004] In order to solve at least one of the problems mentioned in the above background technology, the present application provides a network card firmware upgrade method, program product, device and medium, which can switch all firmware upgrade processes to out-of-band, and after the upgrade is completed, only one restart is required, thereby avoiding multiple restarts and complex operations caused by in-band and out-of-band coordination.

[0005] The specific technical solutions provided by the embodiments of this application are as follows: In a first aspect, a network card firmware upgrade method is provided, which is applied to a baseboard management controller, and the method includes: Acquire 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 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; The component information table of the firmware to be upgraded is obtained, and 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.

[0006] In a specific embodiment, after sending an upgrade request including the firmware package information to the network card, the method also 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 the firmware update; reading a response value in the response indication, and if the response value is a preset threshold, confirming the start of the firmware update, and setting the network card firmware to enter the update mode.

[0007] In a specific embodiment, the response information in the upgrade request is obtained, the upgrade data status is confirmed according to the response information, and the upgrade data is transmitted 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 confirming that the data packet information exists if the data packet indication value is not 0; in response to receiving a data packet acquisition instruction, transmitting the data packet information to the network card; or, if the data packet indication value is 0, confirming that the data packet information does not exist; reading the configuration data indication value in the response information, and confirming that the configuration data information exists if the indication value of the configuration data information is not 0; sending 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, confirming that the configuration data information does not exist.

[0008] In a specific embodiment, the network card updates the firmware to be upgraded in combination with the upgrade data and the component information table, wherein 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 satisfies 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.

[0009] In a specific embodiment, in response to receiving a transmission completion instruction from the network card, the state of the baseboard management controller is set 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, a verification completion instruction is sent to the baseboard management controller through the network card to set the baseboard management controller to be converted from the verification state to an application state; in response to completion of all firmware upgrades, an activation firmware instruction is sent to the network card to activate the upgraded firmware through the activation firmware instruction.

[0010] In a specific embodiment, the firmware to be upgraded has several configurations, and firmware update data is obtained, the firmware update data including a component transmission sequence associated with the firmware to be upgraded; in response to the completion of the current firmware upgrade, the component images are sequentially transmitted to the network card according to the component transmission sequence.

[0011] 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 a 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, the firmware transfer state is confirmed to be abnormal, a cancel upgrade instruction is sent, and the state of the baseboard management controller is set to a ready transfer state; or, if the component image transmission fails, a cancel upgrade instruction is sent, and the state of the baseboard management controller is set to an initial state.

[0012] 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 transmission state exceeds a second preset time, the verification state is confirmed to be abnormal, a cancel upgrade instruction is sent, and the state of the baseboard management controller is set to be converted to a ready to transmit state; or, 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.

[0013] 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; 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.

[0014] In a specific embodiment, before sending the upgrade request to the network card, the method also includes: creating a monitoring thread, the monitoring thread being 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.

[0015] In a specific embodiment, in response to the baseboard management controller entering the firmware transmission 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 transmission is completed.

[0016] In a specific embodiment, an identification code of the firmware to be upgraded is obtained, and the identification code is set to correspond to the upgrade progress of the firmware to be upgraded; the identification code and the upgrade progress of the firmware to be upgraded are written into a 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.

[0017] In a second aspect, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the method steps described above: Step A, obtaining firmware package information of the network card firmware, and 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; Step B, in response to the network card firmware entering the update mode, obtaining the 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; Step C: 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.

[0018] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented: Step A, obtaining firmware package information of the network card firmware, and 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; Step B, in response to the network card firmware entering the update mode, obtaining the 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; Step C: 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.

[0019] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: Step A, obtaining firmware package information of the network card firmware, and 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; Step B, in response to the network card firmware entering the update mode, obtaining the 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; Step C: 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.

[0020] The embodiments of the present application have the following beneficial effects: 1. The solution provided in the embodiment 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 in combination with 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 coordination operations on system services, and ensuring the normal operation of server services. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 A schematic diagram of an application environment according to the present application is shown; Figure 2 A schematic diagram of a network card firmware upgrade method according to the present application is shown; Figure 3 Shows an overall schematic diagram of the network card firmware upgrade thread according to the present application; Figure 4 A schematic diagram showing the format of firmware package information according to the present application; Figure 5 A schematic diagram showing the upgrade process of a single firmware according to the present application is shown; Figure 6 A schematic diagram of a computer device according to the present application is shown. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] The network card firmware upgrade method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the network card is connected to the server through network communication, and the server is also configured with a BMC (‌Baseboard Management Controller). The BMC is connected to the network card in communication to 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; then 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; 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 in combination with the upgrade data and the component information table. Among them, the network card can be but not limited to a BF3 network card, an AX200 network card or an RTL8852BE network card, and the server can be implemented with an independent server or a server cluster consisting of multiple servers.

[0025] In one embodiment, Figure 2 As shown, a network card firmware upgrade method is provided, which is applied to Figure 1 The BMC in the example is used to illustrate that the network card firmware is upgraded through the BMC, and the method includes the following steps: Step 101: Obtain 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 an update mode.

[0026] Among them, Figure 3 As shown, the upgrade of the network card firmware involves at least three threads in the BMC, including a network card firmware upgrade thread, a network card request response thread, and a monitoring thread for monitoring the upgrade progress. The operation of the network card firmware upgrade thread instruction is performed by receiving instructions sent by the BMC and executing the instructions sent by the BMC.

[0027] In an embodiment, Figure 4As shown, the firmware package information of the network card firmware specifically includes: firmware package header information, device description information, firmware information, header verification information, valid verification information and component image. The firmware information includes the version information, release time, size of the firmware package header and identifier of the firmware package. The device description information is used to compare the information in the firmware package with the information read from the device end. The two can only be used to upgrade the device if they are consistent. Firmware information refers to the information of each firmware, including identifier, component size, component offset, classification and version information; header verification information includes header verification value, valid verification information refers to the verification value of payload, and there are several component images, among which "Component Image 1" is the image of firmware 1, "Component Image 2" is the image of firmware 2, and "Component Image N" is the image of firmware N.

[0028] In order to obtain the above firmware package information, first place the network card firmware under the var or path of the BMC, or copy the network card firmware to the BMC through remote copy, or configure the upgrade interface to achieve the connection between the network card firmware and the BMC, obtain the firmware package information through the above methods, and implement the firmware upgrade based on the above firmware package information.

[0029] 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 firmware, the maximum data transmission size, the firmware package size, and the version information of the firmware package. Send an upgrade request to the network card, wherein the upgrade request carries the above-mentioned firmware package information. When the network card receives the upgrade request, the network card replies with a response indication according to the upgrade request, and the response indication is used to confirm whether to start the firmware update; read the response value in the response indication, and if the response value is a preset threshold, confirm the start of the 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 the firmware update can be performed. At this time, the network card firmware is set to enter the update mode, and the BMC is configured not to send other update requests before completing or canceling this firmware upgrade.

[0030] Step 102: in response to the network card firmware entering the update mode, 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.

[0031] It should be noted that after the network card firmware enters the update mode, the configuration BMC state is converted from the initial state to the firmware package transmission state, and the upgrade data transmission operation is performed in the firmware package transmission state, and the upgrade data includes data packet information and configuration data information; specifically, the data packet indication value in the response information is read, and if the data packet indication value is not 0, the data packet information is confirmed to exist; in response to receiving the data packet acquisition instruction, the data packet information is transmitted to the network card; or, if the data packet indication value is 0, it is confirmed that the data packet information does not exist; the configuration data indication value in the response information is read, and if the configuration data information indication value 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 configuration data information indication value is 0, it is confirmed that the configuration data information does not exist.

[0032] Exemplarily, the data 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 indicates that the firmware package does not contain a data packet. When the "send_get_pkg_data_cmd value" is not 0, it indicates that a data packet exists in the firmware package. When the "meta_data_len value" is 0, it indicates that there is no configuration data. When the "meta_data_len value" is not 0, it indicates that there is configuration data. When the above upgrade data is confirmed to exist, the upgrade data is transmitted to the network card for upgrading the network card firmware.

[0033] 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 updates the firmware to be upgraded by combining the upgrade data and the component information table.

[0034] In this embodiment, the BMC remains in the firmware package transmission state at this time. In order to realize 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, component sizes and offsets, classifications and version information. The transmission of the component information table is realized by the BMC sending one or more transmission component commands; after the network card receives the component information table data, the BMC state is set to be converted to the ready-to-transmit state. At this time, the upgrade firmware command sent by the BMC starts the upgrade process of the network card firmware.

[0035] In a specific embodiment, Figure 5As shown, the network card updates the firmware to be upgraded in combination with the upgrade data and the component information table, wherein 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, transmitting the component image associated with the firmware data request to the network card, so as to update the firmware to be upgraded.

[0036] Among them, after the network card sends a firmware data request, the state of the baseboard management controller is set to the firmware transmission state, and the duration of the firmware transmission state is recorded; if the duration of the firmware transmission state exceeds a first preset time, it is confirmed that the firmware transmission state is abnormal, a cancel upgrade instruction is sent, and the state of the baseboard management controller is set to be converted to a ready to transmit state; or, 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.

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

[0038] When the BMC enters the verification state, it starts to monitor the verification state; 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 transmission state exceeds a second preset time, it is confirmed that the verification state is abnormal, a cancel upgrade instruction is sent, and the state of the baseboard management controller is set to be converted to the ready transmission state; or, 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 the initial state.

[0039] During the normal upgrade process, the BMC will switch states in the order of initial state, firmware package transmission state, ready transmission state, firmware transmission state, verification state, application state and activation state to control the upgrade process of the network card firmware, monitor the state of each BMC, and complete the update of the network card firmware through the coordinated conversion of each BMC state.

[0040] 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, wherein 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 a specific firmware component. First, the network card sends one or more firmware data requests to the BMC to obtain the corresponding component image through the request, and the firmware data request defines the offset and length fields of the data transmitted 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.

[0041] Further, when the data packet information exists, the BMC is set to transmit the data packet information to the network card before transmitting the component image. Specifically, when the data packet information exists, the BMC responds to the network card 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 a Get Device Meta Data command, reads the meta data in the network card and saves it, and restores it to the network card after the component images have been transmitted.

[0042] It should be noted that when 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 new firmware component image based on the successful response information received from the BMC. By monitoring each state in the firmware upgrade process, the network card upgrade process can be controlled.

[0043] In a specific embodiment, there are several firmware configurations to be upgraded in this embodiment, and in combination with the firmware upgrade process, corresponding component images are cyclically acquired to complete the update of multiple firmwares. The firmware packet header includes firmware update data, and the firmware update data is further acquired, 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, the component images are sequentially transmitted to the network card according to the component transmission sequence.

[0044] Furthermore, after completing the upgrade of all firmware, an activation firmware instruction is sent to the network card to activate the upgraded firmware.

[0045] In this embodiment, after receiving each request from the network card, the BMC 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 filtered instructions; and executes the function associated with the filtered instructions according to the content of the filtered instructions.

[0046] Specifically, the read function in this embodiment is configured as a "recvfrom" function, which reads data from the bottom layer through the "recvfrom" function, and sets a blocking wait 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 requests actively sent by the network card, including the Request FirmwareData request firmware data command, the Transfer Complete transmission completion command, the Verify Complete verification completion command, and the Apply Complete application completion command. After filtering various requests, the results sent by the network card generated in the Transfer Complete transmission completion command, the Verify Complete verification completion command, and the Apply Complete application completion command are analyzed. If correct, continue to the next step. If incorrect, assign the corresponding global variables to achieve judgment and analysis in the network card firmware upgrade thread based on the above variable assignments, and exit the update mode after the judgment fails.

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

[0048] Before sending an upgrade request to the network card, a monitoring thread is created and the upgrade progress is obtained, wherein the upgrade progress is calculated by the ratio of the length of the component image offset data and the component image data associated with the firmware data request to the component image length of the firmware to be upgraded. In response to the baseboard management controller entering the firmware transmission 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 transmission is completed.

[0049] Furthermore, an identification code of the firmware to be upgraded is obtained, and a corresponding association is set between the identification code and the upgrade progress of the firmware to be upgraded; the identification code and the upgrade progress of the firmware to be upgraded are written into a 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.

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

[0051] This embodiment enables all firmware upgrade processes to be switched to out-of-band, and after the upgrade is completed, only one restart is required, thereby avoiding the impact of multiple restarts and in-band and out-of-band coordination operations on system services and ensuring the normal operation of server services.

[0052] In accordance with the above embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: Step 201: Obtain 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 an update mode; Step 202: 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; 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 updates the firmware to be upgraded by combining the upgrade data and the component information table.

[0053] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: After sending an upgrade request including firmware package information to the network card, the network card replies with a response indication based on the upgrade request, and the response indication is used to confirm whether to start the firmware update; read the response value in the response indication, and if the response value is a preset threshold, confirm the start of the firmware update and set the network card firmware to enter the update mode.

[0054] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: Among them, the upgrade data includes data packet information and configuration data information, reads the data packet indication value in the response information, and if the data packet indication value is not 0, confirms that the data packet information exists; in response to receiving the data packet acquisition instruction, transmits the data packet information to the network card; or, if the data packet indication value is 0, confirms that the data packet information does not exist; reads the configuration data indication value in the response information, and if the configuration data information indication value is not 0, confirms that the configuration data information exists; sends 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 configuration data information indication value is 0, confirms that the configuration data information does not exist.

[0055] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: The component information table includes one or more component images, and the update process of the firmware to be upgraded is configured according to the upgrade data; in response to receiving a firmware data request from the network card, the component image associated with the firmware data request is obtained; it is verified that the offset data of the component image meets the preset range, and the component image associated with the firmware data request is transmitted to the network card to update the firmware to be upgraded.

[0056] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: In response to receiving a transmission completion instruction from the network card, the state of the baseboard management controller is set to be converted from the firmware transmission state to the verification state; in response to verifying that the upgraded firmware is in a valid state, a verification completion instruction is sent to the baseboard management controller through the network card to set the baseboard management controller to be converted 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.

[0057] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: The firmware update data is obtained, the firmware update data including a component transmission sequence associated with the firmware to be upgraded; in response to the completion of the current firmware upgrade, the component images are sequentially transmitted to the network card according to the component transmission sequence.

[0058] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: In response to receiving a firmware data request from a network card, the state of the baseboard management controller is set to a firmware transmission state, and the duration of the firmware transmission state is recorded; if the duration of the firmware transmission state exceeds a first preset time, the firmware transmission state is confirmed to be abnormal, a cancel upgrade instruction is sent, and the state of the baseboard management controller is set to be converted to a ready to transmit state; or, 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.

[0059] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: 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 transmission state exceeds a second preset time, the verification state is confirmed to be abnormal, a cancel upgrade instruction is sent, and the state of the baseboard management controller is set to be converted to a ready-to-transmit state; or, 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.

[0060] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: The component image associated with the data request is read from the bottom layer of the baseboard management controller through a reading function; the component image is parsed, and the instructions in the baseboard management controller are filtered to obtain filtered instructions; and the function associated with the filtered instructions is executed according to the content of the filtered instructions.

[0061] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: Before sending an upgrade request to the network card, a monitoring thread is created 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.

[0062] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: In response to the baseboard management controller entering the firmware transmission state, a 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 transmission is completed.

[0063] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: Obtain an identification code of the firmware to be upgraded, and set the identification code to correspond to the upgrade progress of the firmware to be upgraded; set the identification code and the upgrade progress of the firmware to be upgraded to write into the constructed storage file; in response to obtaining the upgrade progress, query the storage file by executing the script to obtain the upgrade progress data.

[0064] Corresponding to the above embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: Step 301: Obtain 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 an update mode; Step 302: in response to the network card firmware entering the update mode, obtaining the 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; 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 updates the firmware to be upgraded in combination with the upgrade data and the component information table.

[0065] In one embodiment, when the processor executes the computer program, the following steps are also implemented: After sending an upgrade request including firmware package information to the network card, the network card replies with a response indication based on the upgrade request, and the response indication is used to confirm whether to start the firmware update; read the response value in the response indication, and if the response value is a preset threshold, confirm the start of the firmware update and set the network card firmware to enter the update mode.

[0066] In one embodiment, when the processor executes the computer program, the following steps are also implemented: Among them, the upgrade data includes data packet information and configuration data information, reads the data packet indication value in the response information, and if the data packet indication value is not 0, confirms that the data packet information exists; in response to receiving the data packet acquisition instruction, transmits the data packet information to the network card; or, if the data packet indication value is 0, confirms that the data packet information does not exist; reads the configuration data indication value in the response information, and if the configuration data information indication value is not 0, confirms that the configuration data information exists; sends 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 configuration data information indication value is 0, confirms that the configuration data information does not exist.

[0067] In one embodiment, when the processor executes the computer program, the following steps are also implemented: The component information table includes one or more component images, and the update process of the firmware to be upgraded is configured according to the upgrade data; in response to receiving a firmware data request from the network card, the component image associated with the firmware data request is obtained; it is verified that the offset data of the component image meets the preset range, and the component image associated with the firmware data request is transmitted to the network card to update the firmware to be upgraded.

[0068] In one embodiment, when the processor executes the computer program, the following steps are also implemented: In response to receiving a transmission completion instruction from the network card, the state of the baseboard management controller is set to be converted from the firmware transmission state to the verification state; in response to verifying that the upgraded firmware is in a valid state, a verification completion instruction is sent to the baseboard management controller through the network card to set the baseboard management controller to be converted 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.

[0069] In one embodiment, when the processor executes the computer program, the following steps are also implemented: The firmware update data is obtained, the firmware update data including a component transmission sequence associated with the firmware to be upgraded; in response to the completion of the current firmware upgrade, the component images are sequentially transmitted to the network card according to the component transmission sequence.

[0070] In one embodiment, when the processor executes the computer program, the following steps are also implemented: In response to receiving a firmware data request from a network card, the state of the baseboard management controller is set to a firmware transmission state, and the duration of the firmware transmission state is recorded; if the duration of the firmware transmission state exceeds a first preset time, the firmware transmission state is confirmed to be abnormal, a cancel upgrade instruction is sent, and the state of the baseboard management controller is set to be converted to a ready to transmit state; or, 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.

[0071] In one embodiment, when the processor executes the computer program, the following steps are also implemented: 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 transmission state exceeds a second preset time, the verification state is confirmed to be abnormal, a cancel upgrade instruction is sent, and the state of the baseboard management controller is set to be converted to a ready-to-transmit state; or, 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.

[0072] In one embodiment, when the processor executes the computer program, the following steps are also implemented: The component image associated with the data request is read from the bottom layer of the baseboard management controller through a reading function; the component image is parsed, and the instructions in the baseboard management controller are filtered to obtain filtered instructions; and the function associated with the filtered instructions is executed according to the content of the filtered instructions.

[0073] In one embodiment, when the processor executes the computer program, the following steps are also implemented: Before sending an upgrade request to the network card, a monitoring thread is created 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.

[0074] In one embodiment, when the processor executes the computer program, the following steps are also implemented: In response to the baseboard management controller entering the firmware transmission state, a 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 transmission is completed.

[0075] In one embodiment, when the processor executes the computer program, the following steps are also implemented: Obtain an identification code of the firmware to be upgraded, and set the identification code to correspond to the upgrade progress of the firmware to be upgraded; set the identification code and the upgrade progress of the firmware to be upgraded to write into the constructed storage file; in response to obtaining the upgrade progress, query the storage file by executing the script to obtain the upgrade progress data.

[0076] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As 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, a network card firmware upgrade method is implemented.

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

[0078] Corresponding to the above embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: Step 401: Obtain 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 an update mode; Step 402: 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; 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 updates the firmware to be upgraded by combining the upgrade data and the component information table.

[0079] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: After sending an upgrade request including firmware package information to the network card, the network card replies with a response indication based on the upgrade request, and the response indication is used to confirm whether to start the firmware update; read the response value in the response indication, and if the response value is a preset threshold, confirm the start of 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, the following steps are also implemented: Among them, the upgrade data includes data packet information and configuration data information, reads the data packet indication value in the response information, and if the data packet indication value is not 0, confirms that the data packet information exists; in response to receiving the data packet acquisition instruction, transmits the data packet information to the network card; or, if the data packet indication value is 0, confirms that the data packet information does not exist; reads the configuration data indication value in the response information, and if the configuration data information indication value is not 0, confirms that the configuration data information exists; sends 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 configuration data information indication value is 0, confirms that the configuration data information does not exist.

[0081] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: The component information table includes one or more component images, and the update process of the firmware to be upgraded is configured according to the upgrade data; in response to receiving a firmware data request from the network card, the component image associated with the firmware data request is obtained; it is verified that the offset data of the component image meets the preset range, and the component image associated with the firmware data request is transmitted to the network card to update the firmware to be upgraded.

[0082] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: In response to receiving a transmission completion instruction from the network card, the state of the baseboard management controller is set to be converted from the firmware transmission state to the verification state; in response to verifying that the upgraded firmware is in a valid state, a verification completion instruction is sent to the baseboard management controller through the network card to set the baseboard management controller to be converted 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.

[0083] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: The firmware update data is obtained, the firmware update data including a component transmission sequence associated with the firmware to be upgraded; in response to the completion of the current firmware upgrade, the component images are sequentially transmitted to the network card according to the component transmission sequence.

[0084] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: In response to receiving a firmware data request from a network card, the state of the baseboard management controller is set to a firmware transmission state, and the duration of the firmware transmission state is recorded; if the duration of the firmware transmission state exceeds a first preset time, the firmware transmission state is confirmed to be abnormal, a cancel upgrade instruction is sent, and the state of the baseboard management controller is set to be converted to a ready to transmit state; or, 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.

[0085] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: 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 transmission state exceeds a second preset time, the verification state is confirmed to be abnormal, a cancel upgrade instruction is sent, and the state of the baseboard management controller is set to be converted to a ready-to-transmit state; or, 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.

[0086] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: The component image associated with the data request is read from the bottom layer of the baseboard management controller through a reading function; the component image is parsed, and the instructions in the baseboard management controller are filtered to obtain filtered instructions; and the function associated with the filtered instructions is executed according to the content of the filtered instructions.

[0087] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: Before sending an upgrade request to the network card, a monitoring thread is created 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.

[0088] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: In response to the baseboard management controller entering the firmware transmission state, a 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 transmission is completed.

[0089] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: Obtain an identification code of the firmware to be upgraded, and set the identification code to correspond to the upgrade progress of the firmware to be upgraded; set the identification code and the upgrade progress of the firmware to be upgraded to write into the constructed storage file; in response to obtaining the upgrade progress, query the storage file by executing the script to obtain the upgrade progress data.

[0090] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many 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.

[0091] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.

[0092] 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 equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A network card firmware upgrade method, characterized in that: Applied to a baseboard management controller, the method comprises: Acquire 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 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; The component information table of the firmware to be upgraded is obtained, and 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.

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 or 2, characterized in that: The network card updates the firmware to be upgraded in combination with the upgrade data and the component information table, wherein the component information table includes one or more component images, specifically including: configuring an 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; Verify that the offset data of the component image meets a preset range, and transmit the component image associated with the firmware data request to the network card to update the firmware to be upgraded.

5. The network card firmware upgrade method according to claim 4, 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.

6. The network card firmware upgrade method according to claim 4, 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.

7. The network card firmware upgrade method according to claim 4, 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.

8. The network card firmware upgrade method according to claim 5, 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.

9. The network card firmware upgrade method according to claim 4, 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.

10. The network card firmware upgrade method according to claim 4, 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 lengths of the offset data of the component image and the component image data associated with the firmware data request to the length of the component image of the firmware to be upgraded.

11. The network card firmware upgrade method according to claim 10, 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.

12. The network card firmware upgrade method according to claim 10, 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.

13. 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 12 are implemented.

14. 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 according to any one of claims 1 to 12 are implemented.

15. 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 12 are implemented.

Citation Information

Patent Citations

  • BMC firmware upgrading method and device, electronic device and storage medium

    CN113703823A

  • Firmware upgrading method and device for FPGA (Field Programmable Gate Array) in intelligent network card

    CN114567550A

  • Firmware upgrading method and device, equipment and medium

    CN117135657A

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

    CN118227162A

  • Firmware update device and firmware update method

    US20200379745A1

Cited By

  • Updating method and device for substrate management controller firmware

    CN121255254A

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

    WO2026170708A1