A device upgrade method, device, electronic device and storage medium

By using the transparent command word and the NVMe controller in the server, the coupling between BMC and NVMe devices is reduced, and the efficient upgrade of NVMe devices is achieved, solving the problem of high coupling between BMC and NVMe devices in traditional servers is improved, and the system efficiency and stability are improved.

CN116257268BActive Publication Date: 2025-07-04INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310084919.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-08
Publication Date
2025-07-04
Estimated Expiration
2043-02-08

AI Technical Summary

Technical Problem

In traditional servers, the coupling degree between BMC and NVMe devices is high, resulting in low system operation efficiency. When upgrading NVMe devices, BMC needs to be upgraded accordingly, affecting the development cycle and system stability.

Method used

By receiving the transparent command message sent by the upper computer on the BMC, using the transparent command word to instruct the BMC not to resolve the target upgrade packet, and send the target upgrade packet to the NVMe device through the NVMe controller to achieve the upgrade of the NVMe device.

Benefits of technology

It reduces the coupling between BMC and NVMe devices, improves the operating efficiency of the server system, shortens the development cycle, and ensures the stability of the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116257268B_ABST
    Figure CN116257268B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a device upgrade method, device, electronic device, and storage medium. The method is applied to a server, and the server includes an NVMe device, an NVMe controller, and a BMC. The server communicates with a host computer. The method includes: receiving, by the BMC, a first passthrough command packet sent by the host computer, where the first passthrough command packet includes a passthrough command word and a target upgrade data packet; the passthrough command word is used to instruct the BMC not to parse the target upgrade data packet when parsing the first passthrough command packet; after the BMC parses the first passthrough command packet, encapsulating the first passthrough command packet to obtain a second passthrough command packet, and sending the second passthrough command packet to the NVMe controller; sending, by the NVMe controller, the target upgrade data packet to the NVMe device and triggering the NVMe device to upgrade. This method can reduce the coupling degree between the BMC and the NVMe device and improve the operation efficiency of the server system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and particularly to a device upgrade method, apparatus, electronic device, and storage medium. Background Art

[0002] An NVMe (non-volatile memory express) device is a storage device using the NVMe interface specification, including SSD (Solid State Drive), SDI (Service Driven Infrastucture) card, etc.

[0003] A BMC (Baseboard Management Controller) is usually an independent board card installed on the server motherboard, providing support for IPMI (Intelligent Platform Management Interface) commands. During operation, all IPMI functions are completed by sending commands to the BMC. The commands use the instructions specified in the IPMI specification. The BMC receives and records event messages in the system event log, and maintains a sensor data record describing the situation of sensors in the system.

[0004] In a traditional server, the BMC accesses the NVMe device through physical buses such as I2C (Inter-Integrated Circuit) and PCIe (Peripheral Component Interconnect express) in response to IPMI commands, so as to obtain information such as the manufacturer, temperature, and voltage of the NVMe device, and perform operations such as upgrading the NVMe device. However, in the above operation process, the coupling degree between the BMC and the NVMe device is high, resulting in low system operation efficiency. And if the NVMe device is upgraded, the BMC also needs to be correspondingly upgraded, and the entire development cycle involves multi-party business development. Summary of the Invention

[0005] In view of the above problems, embodiments of the present invention are proposed to provide a device upgrade method, apparatus, electronic device, and storage medium that overcome the above problems or at least partially solve the above problems.

[0006] To solve the above problems, in a first aspect, embodiments of the present invention disclose a device upgrade method, which is applied to a server. The server includes a Non-Volatile Memory Express (NVMe) device, an NVMe controller, and a Baseboard Management Controller (BMC). The server communicates with a host computer. The method includes:

[0007] Receiving, by the BMC, a first passthrough command packet sent by the host computer. The first passthrough command packet includes: the driver type of the NVMe controller, the identifier of the NVMe controller, a passthrough command word, and a target upgrade data packet; the passthrough command word is used to instruct the BMC not to parse the target upgrade data packet;

[0008] Parsing, by the BMC, the first passthrough command packet, and encapsulating the first passthrough command packet according to the driver type of the NVMe controller to obtain a second passthrough command packet;

[0009] Sending, by the BMC, the second passthrough command packet to the NVMe controller according to the identifier of the NVMe controller;

[0010] Sending, by the NVMe controller, the target upgrade data packet to the NVMe device and triggering the NVMe device to upgrade.

[0011] Optionally, the passthrough command word is further used to instruct the NVMe controller to upgrade the NVMe device. The step of sending, by the NVMe controller, the target upgrade data packet to the NVMe device and triggering the NVMe device to upgrade includes:

[0012] Receiving and parsing, by the NVMe controller, the second passthrough command packet to obtain the passthrough command word and the target upgrade data packet;

[0013] Sending, by the NVMe controller, the target upgrade data packet to the NVMe device and triggering the NVMe device to upgrade according to the passthrough command word.

[0014] Optionally, the first passthrough command packet further includes an upgrade command, which is used to instruct the NVMe controller to upgrade the NVMe device. The step of sending, by the NVMe controller, the target upgrade data packet to the NVMe device and triggering the NVMe device to upgrade includes:

[0015] Receiving and parsing, by the NVMe controller, the second passthrough command packet to obtain the upgrade command and the target upgrade data packet;

[0016] Send the target upgrade data packet to the NVMe device through the NVMe controller, and trigger the upgrade of the NVMe device according to the upgrade command.

[0017] Optionally, the method further includes:

[0018] After the host computer obtains the upgrade data packet, through the host computer, perform fragmentation processing on the upgrade data packet according to the size of the upgrade data packet and the payload of the first passthrough command, to obtain a plurality of sub-upgrade data packets;

[0019] Through the host computer, use the sub-upgrade data packet as the target upgrade data packet, and generate a first passthrough command message according to the target upgrade data packet.

[0020] Optionally, the method further includes:

[0021] Receive and parse the second passthrough command message through the NVMe controller to obtain the plurality of sub-upgrade data packets;

[0022] Through the NVMe controller, combine the plurality of sub-upgrade data packets to obtain the upgrade data packet, and perform verification on the upgrade data packet to obtain a verification result;

[0023] Through the NVMe controller, send a first response message to the BMC, where the first response message includes the verification result;

[0024] Receive the first response message sent by the BMC through the host computer, and send an upgrade start command to the BMC according to the verification result;

[0025] Receive the upgrade start command sent by the BMC through the NVMe controller, and trigger the upgrade of the NVMe device.

[0026] Optionally, the first passthrough command message further includes: the total number of sub-upgrade data packets, the current number of sub-upgrade data packets, and the verification code of the sub-upgrade data packet. The process of combining the plurality of sub-upgrade data packets to obtain the upgrade data packet and performing verification on the upgrade data packet through the NVMe controller includes:

[0027] Through the NVMe controller, combine the plurality of sub-upgrade data packets according to the total number of sub-upgrade data packets and the current number of sub-upgrade data packets to obtain the upgrade data packet, and perform verification on the upgrade data packet according to the verification code of the sub-upgrade data packet.

[0028] Optionally, the method further includes:

[0029] When the NVMe device completes the upgrade, a second response message is sent through the NVMe device, and the second response message includes the upgrade result of the NVMe device.

[0030] Second invention. An embodiment of the present invention discloses a device upgrade apparatus, which is applied to a server. The server includes a Non-Volatile Memory Express (NVMe) device, an NVMe controller, and a Baseboard Management Controller (BMC). The server communicates with a host computer. The apparatus includes:

[0031] A first passthrough command message receiving module, configured to receive, through the BMC, a first passthrough command message sent by the host computer. The first passthrough command message includes: the driver type of the NVMe controller, the identifier of the NVMe controller, a passthrough command word, and a target upgrade data packet. The passthrough command word is used to instruct the BMC not to parse the target upgrade data packet.

[0032] A first passthrough command message encapsulation module, configured to parse, through the BMC, the first passthrough command message, and encapsulate the first passthrough command message according to the driver type of the NVMe controller to obtain a second passthrough command message.

[0033] A second passthrough command message sending module, configured to send, through the BMC, the second passthrough command message to the NVMe controller according to the identifier of the NVMe controller.

[0034] A device upgrade module, configured to send, through the NVMe controller, the target upgrade data packet to the NVMe device and trigger the upgrade of the NVMe device.

[0035] Optionally, the passthrough command word is further used to instruct the NVMe controller to upgrade the NVMe device. The device upgrade module is specifically configured to:

[0036] Receive and parse, through the NVMe controller, the second passthrough command message to obtain the passthrough command word and the target upgrade data packet.

[0037] Send, through the NVMe controller, the target upgrade data packet to the NVMe device and trigger the upgrade of the NVMe device according to the passthrough command word.

[0038] Optionally, the first passthrough command message further includes an upgrade command, which is used to instruct the NVMe controller to upgrade the NVMe device. The device upgrade module is specifically configured to:

[0039] Receiving and parsing the second passthrough command packet through the NVMe controller to obtain the upgrade command and the target upgrade data packet;

[0040] Sending the target upgrade data packet to the NVMe device through the NVMe controller, and triggering the upgrade of the NVMe device according to the upgrade command.

[0041] Optionally, the device further includes a first passthrough command packet generation module, configured to, after the host computer obtains the upgrade data packet, perform fragmentation processing on the upgrade data packet according to the size of the upgrade data packet and the payload of the first passthrough command through the host computer to obtain a plurality of sub-upgrade data packets; use the sub-upgrade data packets as the target upgrade data packet through the host computer, and generate a first passthrough command packet according to the target upgrade data packet.

[0042] Optionally, the device upgrade module specifically includes:

[0043] An upgrade data packet combination and verification unit, configured to receive and parse the second passthrough command packet through the NVMe controller to obtain the plurality of sub-upgrade data packets; combine the plurality of sub-upgrade data packets through the NVMe controller to obtain the upgrade data packet, and verify the upgrade data packet to obtain a verification result;

[0044] A first response packet sending unit, configured to send a first response packet to the BMC through the NVMe controller, where the first response packet includes the verification result;

[0045] An upgrade start command receiving unit, configured to receive the first response packet sent by the BMC through the host computer, and send an upgrade start command to the BMC according to the verification result;

[0046] A device upgrade trigger unit, configured to receive the upgrade start command sent by the BMC through the NVMe controller, and trigger the upgrade of the NVMe device.

[0047] Optionally, the first passthrough command packet further includes: the total number of sub-upgrade data packets, the current number of sub-upgrade data packets, and the verification code of the sub-upgrade data packets. The upgrade data packet combination and verification unit is specifically configured to combine the plurality of sub-upgrade data packets into the upgrade data packet according to the total number of sub-upgrade data packets and the current number of sub-upgrade data packets through the NVMe controller, and verify the upgrade data packet according to the verification code of the sub-upgrade data packets.

[0048] Optionally, the device further includes:

[0049] The second response message sending module is configured to send a second response message through the NVMe device when the NVMe device completes the upgrade, where the second response message includes the NVMe device upgrade result.

[0050] In a third aspect, an embodiment of the present invention discloses an electronic device, including: a processor, a memory, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, the steps of the device upgrade method described above are implemented.

[0051] In a fourth aspect, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the device upgrade method described above are implemented.

[0052] The embodiments of the present invention have the following advantages:

[0053] By receiving, through the BMC, a first pass-through command message sent by the host computer, where the first pass-through command message includes a pass-through command word and a target upgrade data packet; the pass-through command word is used to instruct the BMC not to parse the target upgrade data packet when parsing the first pass-through command message; after the BMC parses the first pass-through command message, it encapsulates the first pass-through command message to obtain a second pass-through command message and sends the second pass-through command message to the NVMe controller; through the NVMe controller, the target upgrade data packet is sent to the NVMe device and the NVMe device upgrade is triggered. This method can reduce the coupling degree between the BMC and the NVMe device, improve the operation efficiency of the server system; and after the NVMe device is upgraded, there is no need to further develop and adaptively upgrade the BMC, which can shorten the development cycle. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is a flowchart of the steps of a device upgrade method provided by an embodiment of the present invention;

[0055] Figure 2 is a flowchart of a device upgrade method provided by an embodiment of the present invention;

[0056] Figure 3 is a structural block diagram of a device upgrade device provided by an embodiment of the present invention;

[0057] Figure 4 is a structural block diagram of an electronic device provided by an embodiment of the present invention;

[0058] Figure 5 is a structural block diagram of a computer-readable storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0059] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0060] Due to the high coupling between the server's BMC and NVMe devices, the system operation efficiency will be reduced to a certain extent, and when the NVMe device is upgraded, the BMC also needs to be upgraded accordingly, affecting the system stability. Therefore, one of the core concepts of the embodiment of the present invention is to develop a transparent transmission command word for upgrading, open up the link between the host computer software and the NVMe device, and the host computer can use the transparent transmission command word to upgrade the NVMe device connected to the BMC, so that after the NVMe device is upgraded, there is no need to adapt and upgrade the BMC, shorten the development cycle, and improve the stability of the server.

[0061] Reference Figure 1 , shows a flow chart of the steps of a device upgrade method provided by an embodiment of the present invention, which is applied to a server, the server includes a non-volatile storage fast channel NVMe device, an NVMe controller, and a baseboard management controller BMC, and the server communicates with a host computer. The method may specifically include the following steps:

[0062] Step 101, receiving a first transparent transmission command message sent by a host computer through the BMC, the first transparent transmission command message including: a driver type of an NVMe controller, an identifier of an NVMe controller, a transparent transmission command word, and a target upgrade data packet; the transparent transmission command word is used to instruct the BMC not to parse the target upgrade data packet.

[0063] When the NVMe device needs to be upgraded, a first transparent transmission command message can be generated by the host computer, and the first transparent transmission command message can be a message based on the IPMI protocol. The first transparent transmission command message may include the driver type of the NVMe controller, the identifier of the NVMe controller, the transparent transmission command word, and the target upgrade data packet. Among them, the target upgrade data packet is a partial or complete upgrade data packet corresponding to the NVMe device; the transparent transmission command word is a command word designed based on the IPMI protocol, and the command word is used to instruct the BMC to stop parsing when receiving the first transparent transmission command message and parsing the first transparent transmission command message. That is, the payload-target upgrade data packet after the transparent transmission command word is not parsed.

[0064] After the host computer generates the first transparent transmission command message, it sends the first transparent transmission command message to the BMC of the same server as the NVMe device that needs to be upgraded. The first transparent transmission command message can be sent to the BMC according to the IP address of the BMC.

[0065] The BMC receives the first passthrough command message, parses the first passthrough command message, and obtains the driver type of the NVMe controller and the identifier of the NVMe controller. When the BMC parses the passthrough command word, it stops parsing the content after the passthrough command word, that is, it stops parsing the target upgrade data packet after the passthrough command word.

[0066] Step 102: The BMC parses the first passthrough command message and encapsulates the first passthrough command message according to the driver type of the NVMe controller to obtain a second passthrough command message.

[0067] After receiving the first passthrough command message, the BMC parses the first passthrough command message and can obtain the driver type of the NVMe controller. The BMC can encapsulate the first passthrough command message according to the driver type of the NVMe controller, encapsulate the first passthrough command message into a driver format corresponding to the driver type of the NVMe controller, and obtain a second passthrough command message.

[0068] Step 103: The BMC sends the second passthrough command message to the NVMe controller according to the identifier of the NVMe controller.

[0069] After receiving the first passthrough command message, the BMC parses the first passthrough command message and can obtain the identifier of the NVMe controller. The BMC can send the second passthrough command message to the corresponding NVMe controller according to the identifier of the NVMe controller.

[0070] Step 104: The NVMe controller sends the target upgrade data packet to the NVMe device and triggers the NVMe device upgrade.

[0071] The NVMe controller receives the second passthrough command message, parses the second passthrough command message, and obtains the passthrough command word and the target upgrade data packet. The NVMe controller sends the target upgrade data packet to the NVMe device and triggers the NVMe device upgrade.

[0072] In an embodiment of the present invention, the BMC receives a first passthrough command message sent by the host computer. The first passthrough command message includes: the driver type of the NVMe controller, the identifier of the NVMe controller, the passthrough command word, and the target upgrade data packet. The passthrough command word is used to instruct the BMC not to parse the target upgrade data packet. The BMC parses the first passthrough command message and encapsulates the first passthrough command message according to the driver type of the NVMe controller to obtain a second passthrough command message. The BMC sends the second passthrough command message to the NVMe controller according to the identifier of the NVMe controller. The NVMe controller sends the target upgrade data packet to the NVMe device and triggers the upgrade of the NVMe device. This method can reduce the coupling degree between the BMC and the NVMe device and improve the operation efficiency of the server system. Moreover, after the NVMe device is upgraded, there is no need to develop and upgrade the BMC adaptively. Only the upgrade program of the host computer needs to be updated correspondingly. Therefore, the development cycle can be shortened. At the same time, reducing the upgrade of the BMC can also ensure the stability and reliability of the server.

[0073] In one embodiment, the passthrough command word is further used to instruct the NVMe controller to upgrade the NVMe device. The NVMe controller sends the target upgrade data packet to the NVMe device and triggers the upgrade of the NVMe device, including:

[0074] The NVMe controller receives and parses the second passthrough command message to obtain the passthrough command word and the target upgrade data packet;

[0075] The NVMe controller sends the target upgrade data packet to the NVMe device and triggers the upgrade of the NVMe device according to the passthrough command word.

[0076] The NVMe controller receives the second passthrough command message and parses the second passthrough command message to obtain the passthrough command word and the target upgrade data packet. The passthrough command word is used to instruct the NVMe controller to upgrade the NVMe device. Therefore, when the NVMe controller parses the passthrough command word, it immediately sends the target upgrade data packet to the NVMe device. After the target upgrade data packet is sent, the NVMe controller triggers the upgrade of the NVMe device.

[0077] In an embodiment of the present invention, when the BMC parses the pass-through command word, it stops parsing the target upgrade data packet after the pass-through command word. When the NVMe controller parses the pass-through command word, it sends the target upgrade data to the NVMe device and triggers the upgrade of the NVMe device. Through the pass-through command word, while decoupling some management functions of the BMC for the NVMe device, the upgrade of the NVMe device can be achieved. Through the data pass-through function, the data packets in all packets generated based on the pass-through command word can be passed through the BMC to the NVMe controller, realizing direct data interaction between the host computer software and the NVMe device.

[0078] In one embodiment, the first pass-through command message further includes an upgrade command for instructing the NVMe controller to upgrade the NVMe device. Through the NVMe controller, the target upgrade data packet is sent to the NVMe device and the upgrade of the NVMe device is triggered, including:

[0079] Receiving and parsing the second pass-through command message by the NVMe controller to obtain the upgrade command and the target upgrade data packet;

[0080] Through the NVMe controller, the target upgrade data packet is sent to the NVMe device, and the NVMe device upgrade is triggered according to the upgrade command.

[0081] The pass-through command word can be only used to instruct the BMC not to parse the target upgrade data packet. At this time, an upgrade command needs to be added to the first pass-through command message. When the NVMe controller parses the upgrade command and the target upgrade data packet from the second pass-through command message, the NVMe controller responds to the upgrade command, sends the target upgrade data packet to the NVMe device, and triggers the upgrade of the NVMe device. The upgrade command can be a command based on the IPMI protocol. The upgrade command can be an existing command based on the IPMI protocol instead of a separately designed command.

[0082] In an embodiment of the present invention, only using the pass-through command word to instruct the BMC not to parse the target upgrade data packet can simplify the design of the pass-through command word and enrich the use of the pass-through command word. For example, not only using the pass-through command word to upgrade the NVMe device, but also combining the pass-through command word with other existing control commands to perform control operations on the NVMe device.

[0083] In one embodiment, the device upgrade method further includes:

[0084] After the host computer obtains the upgrade data packet, through the host computer, the upgrade data packet is segmented according to the size of the upgrade data packet and the payload of the first pass-through command to obtain a plurality of sub-upgrade data packets;

[0085] Through the host computer, the sub-upgrade data packet is used as the target upgrade data packet, and a first pass-through command message is generated according to the target upgrade data packet.

[0086] When the size of the upgrade data packet exceeds the payload of the first pass-through command, the upgrade data packet can be fragmented according to the size of the upgrade data packet and the payload of the first pass-through command, and the upgrade data packet is divided into multiple sub-upgrade data packets; then the sub-upgrade data packet is used as the target upgrade data packet, and a first pass-through command message is generated according to the target upgrade data packet. Then, according to the number of sub-upgrade data packets, the corresponding number of first pass-through command messages can be generated.

[0087] When upgrading the NVMe device, the host computer can pass each sub-upgrade data packet to the NVMe device through the BMC, which can decouple the coupling relationship between the BMC and the NVMe device and improve the upgrade flexibility.

[0088] In one embodiment, the device upgrade method further includes:

[0089] Receive and parse the second pass-through command message through the NVMe controller to obtain multiple sub-upgrade data packets;

[0090] Combine multiple sub-upgrade data packets through the NVMe controller to obtain an upgrade data packet, and perform a check on the upgrade data packet to obtain a check result;

[0091] Send a first response message including the check result to the BMC through the NVMe controller;

[0092] Receive the first response message sent by the BMC through the host computer, and send an upgrade start command to the BMC according to the check result;

[0093] Receive the upgrade start command sent by the BMC through the NVMe controller and trigger the NVMe device upgrade.

[0094] A second passthrough command packet contains a sub - upgrade data packet. By receiving and parsing the second passthrough command packet through the NVMe controller, each sub - upgrade data packet can be obtained. Through the NVMe controller, each sub - upgrade data packet can be combined to obtain an upgrade data packet. After obtaining the upgrade data packet, the NVMe controller can verify the upgrade data packet and generate a verification result. The verification content can include: the combination order of the sub - upgrade data packets, the integrity of the upgrade data packet, etc. The NVMe controller generates a first response packet according to the verification result, and the first response packet includes the verification result. The NVMe controller sends the first response packet to the host computer via the BMC. The host computer can determine whether the verification result in the first response packet meets a preset condition. The preset condition can be that the combination order of the sub - upgrade data packets is correct and the upgrade data packet is complete. If the verification result in the first response packet meets the preset condition, an upgrade start command can be sent. The upgrade start command is sent to the NVMe controller via the BMC. The NVMe controller receives and responds to the upgrade start command, triggering the upgrade of the NVMe device.

[0095] In one embodiment, the first passthrough command packet further includes: the total number of sub - upgrade data packets, the current number of sub - upgrade data packets, and the sub - upgrade data packet check code. By using the NVMe controller to combine multiple sub - upgrade data packets to obtain an upgrade data packet and verify the upgrade data packet, it includes:

[0096] Through the NVMe controller, according to the total number of sub - upgrade data packets and the current number of sub - upgrade data packets, multiple sub - upgrade data packets are combined to obtain an upgrade data packet, and the upgrade data packet is verified according to the sub - upgrade data packet check code.

[0097] When the size of the upgrade data packet exceeds the payload of the first passthrough command, the upgrade data packet can be fragmented according to the size of the upgrade data packet and the payload of the first passthrough command to obtain multiple sub - upgrade data packets. Then, the sub - upgrade data packets are used as target upgrade data packets, and a first passthrough command packet is generated according to the target upgrade data packets. When generating the first passthrough command packet, information such as the total number of sub - upgrade data packets, the current number of sub - upgrade data packets, and the sub - upgrade data packet check code can be added to the first passthrough command packet. Then, when the NVMe controller receives each second passthrough command packet and parses each sub - upgrade data packet from each second passthrough command packet, each sub - upgrade data packet can be combined according to the total number of sub - upgrade data packets and the current number of sub - upgrade data packets to obtain an upgrade data packet. At the same time, the upgrade data packet can be verified according to the sub - upgrade data packet check code.

[0098] In one embodiment, the device upgrade method further includes:

[0099] When the NVMe device completes the upgrade, it sends a second response message, which includes the upgrade result of the NVMe device.

[0100] When the NVMe device completes the upgrade, it can generate a second response message, which includes the upgrade result of the NVMe device. The second response message is sent to the host computer via the NVMe controller and the BMC. When the host computer receives the second response message, a round of device upgrade is completed.

[0101] In one embodiment, the program in the host computer can generate a first passthrough command message according to the device upgrade process and in combination with the passthrough command word, and send the first passthrough command message to the BMC based on the IPMI command. At the same time, the program can also parse the first response message and the second response message sent back via the BMC during the device upgrade process.

[0102] After the passthrough command word is designed, in addition to enabling the program in the host computer to generate a first passthrough command message in combination with the passthrough command word, it is also necessary to enable the BMC and the NVMe controller to parse and recognize the passthrough command word to ensure the smooth progress of the upgrade process.

[0103] Refer to Figure 2 , which shows the flowchart of a device upgrade method provided by an embodiment of the present invention. The host computer software sends the first passthrough command message to the BMC based on the IPMI command. The NVMe-MI (Non-Volatile Memory express Management Interface) upgrade module in the BMC receives the first passthrough command message and parses the first passthrough command message to obtain the driver type of the NVMe controller. The driver type of the NVMe controller can be I2C or PCIe. After determining the driver type of the NVMe controller, the driver adaptation layer in the BMC calls the corresponding driver module to encapsulate the first passthrough command message into the corresponding driver format to obtain a second passthrough command message. Then, the BMC sends the second passthrough command message to the corresponding NVMe controller according to the identifier of the NVMe controller parsed from the first passthrough command message, and finally triggers the NVMe device upgrade through the NVMe controller.

[0104] By constructing a pass-through command word and generating a pass-through command message according to the IPMI command, when the pass-through command message is transmitted to the BMC, after the BMC parses the pass-through command word, it does not perform any parsing on the subsequent content, and transmits the pass-through command message to the NVMe controller. After the NVMe controller parses the pass-through message, it obtains the command payload content and processes it. During the entire interaction process, the BMC is unaware of the message content and it is all a non-intrusive operation. This embodiment can reduce the coupling between the IPMI command and the BMC, and the host computer command control message can be developed independently, thereby reducing the frequency of BMC upgrades, improving the reliability of the server, and reducing the server maintenance cost.

[0105] It should be noted that for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequence, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present invention.

[0106] Referring to Figure 3 , a structural block diagram of a device upgrade device provided by an embodiment of the present invention is shown. The device is applied to a server, and the server includes a Non-Volatile Memory Express (NVMe) device, an NVMe controller, and a Baseboard Management Controller (BMC). The server communicates with a host computer, and the device may include the following modules:

[0107] A first pass-through command message receiving module 201, configured to receive, through the BMC, a first pass-through command message sent by the host computer. The first pass-through command message includes: the driver type of the NVMe controller, the identifier of the NVMe controller, a pass-through command word, and a target upgrade data packet; the pass-through command word is used to instruct the BMC not to parse the target upgrade data packet;

[0108] A first pass-through command message encapsulation module 202, configured to parse the first pass-through command message through the BMC, and encapsulate the first pass-through command message according to the driver type of the NVMe controller to obtain a second pass-through command message;

[0109] A second pass-through command message sending module 203, configured to send, through the BMC, the second pass-through command message to the NVMe controller according to the identifier of the NVMe controller;

[0110] A device upgrade module 204, configured to send, through the NVMe controller, the target upgrade data packet to the NVMe device and trigger the NVMe device upgrade.

[0111] Optionally, the passthrough command word is further used to instruct the NVMe controller to upgrade the NVMe device. Specifically, the device upgrade module 204 is configured to:

[0112] Receive and parse the second passthrough command message through the NVMe controller to obtain the passthrough command word and the target upgrade data packet;

[0113] Send the target upgrade data packet to the NVMe device through the NVMe controller, and trigger the upgrade of the NVMe device according to the passthrough command word.

[0114] Optionally, the first passthrough command message further includes an upgrade command, which is used to instruct the NVMe controller to upgrade the NVMe device. Specifically, the device upgrade module 204 is configured to:

[0115] Receive and parse the second passthrough command message through the NVMe controller to obtain the upgrade command and the target upgrade data packet;

[0116] Send the target upgrade data packet to the NVMe device through the NVMe controller, and trigger the upgrade of the NVMe device according to the upgrade command.

[0117] Optionally, the device further includes a first passthrough command message generation module, which is configured to, after the host computer obtains the upgrade data packet, through the host computer, perform fragmentation processing on the upgrade data packet according to the size of the upgrade data packet and the payload of the first passthrough command to obtain a plurality of sub-upgrade data packets; through the host computer, use the sub-upgrade data packets as the target upgrade data packet, and generate a first passthrough command message according to the target upgrade data packet.

[0118] Optionally, the device upgrade module 204 specifically includes:

[0119] An upgrade data packet combination and verification unit, which is configured to receive and parse the second passthrough command message through the NVMe controller to obtain the plurality of sub-upgrade data packets; combine the plurality of sub-upgrade data packets through the NVMe controller to obtain the upgrade data packet, and verify the upgrade data packet to obtain a verification result;

[0120] A first response message sending unit, which is configured to send a first response message to the BMC through the NVMe controller, and the first response message includes the verification result;

[0121] An upgrade start command receiving unit, configured to receive the first response message sent by the BMC through the host computer, and send an upgrade start command to the BMC according to the verification result;

[0122] A device upgrade triggering unit, configured to receive the upgrade start command sent by the BMC through the NVMe controller, and trigger the NVMe device upgrade.

[0123] Optionally, the first pass-through command message further includes: the total number of sub-upgrade data packets, the current number of sub-upgrade data packets, and the verification code of the sub-upgrade data packets. The upgrade data packet combination and verification unit is specifically configured to, through the NVMe controller, combine the multiple sub-upgrade data packets according to the total number of sub-upgrade data packets and the current number of sub-upgrade data packets to obtain the upgrade data packet, and verify the upgrade data packet according to the verification code of the sub-upgrade data packets.

[0124] Optionally, the device further includes:

[0125] A second response message sending module, configured to send a second response message through the NVMe device when the NVMe device completes the upgrade, where the second response message includes the NVMe device upgrade result.

[0126] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For related parts, refer to the partial description of the method embodiment.

[0127] Refer to Figure 4 , which shows a structural block diagram of an electronic device 30 provided by an embodiment of the present invention. The electronic device 30 includes:

[0128] A processor 301, a memory 302, and a computer program 3021 stored on the memory 302 and capable of running on the processor 301. When the computer program 3021 is executed by the processor 301, it implements each process of the above-mentioned cabinet test method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here again.

[0129] Refer to Figure 5 , which shows a structural block diagram of a computer-readable storage medium 40 provided by an embodiment of the present invention. A computer program 401 is stored on the computer-readable storage medium 40. When the computer program 401 is executed by a processor, it implements each process of the above-mentioned cabinet test method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here again.

[0130] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other.

[0131] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention can take the form of all-hardware embodiments, all-software embodiments, or embodiments combining software and hardware aspects. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.

[0132] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing terminal devices to generate a machine, such that the instructions executed by the processors of the computer or other programmable data processing terminal devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0133] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0134] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, such that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0135] Although the preferred embodiments of the embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0136] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the element.

[0137] The above has introduced in detail a device upgrade method, device, electronic device and storage medium provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A device upgrade method, characterized in that, Applied to a server, the server includes a Non-Volatile Memory Express (NVMe) device, an NVMe controller, and a Baseboard Management Controller (BMC). The server communicates with a host computer. The method includes: Receiving, by the BMC, a first passthrough command packet sent by the host computer. The first passthrough command packet includes: the driver type of the NVMe controller, the identifier of the NVMe controller, a passthrough command word, and a target upgrade data packet. The passthrough command word is used to instruct the BMC not to parse the target upgrade data packet and to instruct the NVMe controller to upgrade the NVMe device. Parsing, by the BMC, the first passthrough command packet and encapsulating the first passthrough command packet according to the driver type of the NVMe controller to obtain a second passthrough command packet. Sending, by the BMC, the second passthrough command packet to the NVMe controller according to the identifier of the NVMe controller. Sending, by the NVMe controller, the target upgrade data packet to the NVMe device and triggering the upgrade of the NVMe device. Wherein, the step of sending, by the NVMe controller, the target upgrade data packet to the NVMe device and triggering the upgrade of the NVMe device includes: Receiving and parsing, by the NVMe controller, the second passthrough command packet to obtain the passthrough command word and the target upgrade data packet; sending, by the NVMe controller, the target upgrade data packet to the NVMe device and triggering the upgrade of the NVMe device according to the passthrough command word.

2. The device upgrade method according to claim 1, wherein The first passthrough command packet further includes an upgrade command for instructing the NVMe controller to upgrade the NVMe device. The step of sending, by the NVMe controller, the target upgrade data packet to the NVMe device and triggering the upgrade of the NVMe device includes: Receiving and parsing, by the NVMe controller, the second passthrough command packet to obtain the upgrade command and the target upgrade data packet. Sending, by the NVMe controller, the target upgrade data packet to the NVMe device and triggering the upgrade of the NVMe device according to the upgrade command.

3. The device upgrade method according to claim 1, characterized in that, The method further includes: After the host computer obtains the upgrade data packet, fragmenting, by the host computer, the upgrade data packet according to the size of the upgrade data packet and the payload of the first passthrough command to obtain a plurality of sub-upgrade data packets. Taking, by the host computer, the sub-upgrade data packets as the target upgrade data packet and generating a first passthrough command packet according to the target upgrade data packet.

4. The device upgrade method according to claim 3, characterized in that The method further includes: Receiving and parsing, by the NVMe controller, the second passthrough command packet to obtain the plurality of sub-upgrade data packets. Combining, by the NVMe controller, the plurality of sub-upgrade data packets to obtain the upgrade data packet and performing a check on the upgrade data packet to obtain a check result. Send a first response message to the BMC through the NVMe controller, where the first response message includes the verification result; Receive the first response message sent by the BMC through the host computer, and send an upgrade start command to the BMC according to the verification result; Receive the upgrade start command sent by the BMC through the NVMe controller, and trigger the upgrade of the NVMe device.

5. The device upgrade method according to claim 4, characterized in that The first pass-through command message further includes: the total number of sub-upgrade data packets, the current number of sub-upgrade data packets, and the verification code of the sub-upgrade data packets. Combining the multiple sub-upgrade data packets to obtain the upgrade data packet through the NVMe controller, and verifying the upgrade data packet includes: Combining the multiple sub-upgrade data packets to obtain the upgrade data packet according to the total number of sub-upgrade data packets and the current number of sub-upgrade data packets through the NVMe controller, and verifying the upgrade data packet according to the verification code of the sub-upgrade data packets.

6. The device upgrade method according to claim 1, characterized in that The method further includes: When the NVMe device completes the upgrade, send a second response message through the NVMe device, where the second response message includes the NVMe device upgrade result.

7. An equipment upgrade device, characterized in that, Applied to a server, the server includes a non-volatile memory express (NVMe) device, an NVMe controller, and a baseboard management controller (BMC). The server communicates with a host computer. The device includes: A first pass-through command message receiving module, configured to receive a first pass-through command message sent by the host computer through the BMC. The first pass-through command message includes: the driver type of the NVMe controller, the identifier of the NVMe controller, a pass-through command word, and a target upgrade data packet. The pass-through command word is used to instruct the BMC not to parse the target upgrade data packet, and is used to instruct the NVMe controller to upgrade the NVMe device; A first pass-through command message encapsulation module, configured to parse the first pass-through command message through the BMC, and encapsulate the first pass-through command message according to the driver type of the NVMe controller to obtain a second pass-through command message; A second pass-through command message sending module, configured to send the second pass-through command message to the NVMe controller through the BMC according to the identifier of the NVMe controller; A device upgrade module, configured to send the target upgrade data packet to the NVMe device through the NVMe controller, and trigger the upgrade of the NVMe device; Wherein, sending the target upgrade data packet to the NVMe device through the NVMe controller and triggering the upgrade of the NVMe device includes: Receiving and parsing the second pass-through command message through the NVMe controller to obtain the pass-through command word and the target upgrade data packet; sending the target upgrade data packet to the NVMe device through the NVMe controller, and triggering the upgrade of the NVMe device according to the pass-through command word.

8. An electronic device, characterized in that, Includes: A processor, a memory, and a computer program stored on the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the device upgrade method according to any one of claims 1-6 are implemented.

9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the device upgrade method according to any one of claims 1-6 are implemented.

Citation Information

Patent Citations

  • Firmware upgrading method and system comprising hard disk

    CN110162326A

  • Management equipment firmware updating method and device, electronic equipment and storage medium

    CN115589361A