Command exception processing method, electronic device, and storage medium

CN122924967APending Publication Date: 2026-10-16SHANGHAI YUNMAI XINLIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611425467.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]由于若干个功能单元的请求命令队列均与网卡固件的请求命令队列进行命令传输,属于多对一的对应关系,因此,当命令队列处于高负载(即功能单元的命令数量过多)的情况时,若此时某一个功能单元发生了异常,就需要暂停该功能单元的请求命令队列的命令传输,且还需要丢弃掉该功能单元已经发送至网卡固件的请求命令队列中尚未处理的请求命令,但由于此时网卡固件的请求命令队列处于高负载状态,必须对需要丢弃掉的命令之前的命令进行处理之后,才能丢弃掉该命令,而系统又不允许需要丢弃的命令的等待处理时间过长,因此,如何快速地使需要丢弃的命令从网卡固件的请求命令队列中出队是亟需解决的技术问题

Benefits of technology

[0020]The command exception handling method of the present invention, when any functional unit of the host malfunctions, identifies the functional unit as an exception unit, sets the command status bit corresponding to each storage space of the exception unit in the command status table (which stores the command status bits of the request commands corresponding to each storage space of each functional unit of the host) to a first status bit. The first status bit indicates that there are no pending request commands in the corresponding storage space, that is, no request commands are transmitted to the network card firmware. The transmission of request commands of the exception unit is paused. If there are pending request commands sent by the exception unit in the pending request queue corresponding to the network card firmware (which stores pending request commands sent by each functional unit of the host), the pending request commands sent by the exception unit need to be discarded. That is, the request command at the head of the pending request queue is obtained. If the pending request queue is at the head of the queue, the request command sent by the exception unit is discarded. If the request command at the head of the queue is not a pending request command sent by an abnormal unit, then the request command is removed from the pending request queue and stored in the storage space corresponding to the request command. That is, request commands that do not need to be discarded are dequeued first. If the request command at the head of the pending request queue is a pending request command sent by an abnormal unit, then the request command is discarded. If there is no pending request command sent by an abnormal unit in the pending request queue after the discarding, then the request command at the current head of the pending request queue is processed. This is to quickly process the request commands that need to be discarded by dequeuing the request commands that do not need to be discarded (i.e., request commands sent by functional units that have not experienced abnormalities) that are located before the request commands that need to be discarded (i.e., request commands sent by functional units that have experienced abnormalities) in the pending request queue of the network card firmware first.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122924967A_ABST
    Figure CN122924967A_ABST
Patent Text Reader

Abstract

The application provides a command exception processing method, an electronic device and a storage medium. The method comprises the following steps: obtaining a request command at the head of a to-be-processed request queue corresponding to a network card firmware; if the request command is not a to-be-processed request command sent by an exception unit, moving the request command out of the to-be-processed request queue and storing the request command in a storage space corresponding to the request command; if the request command is a to-be-processed request command sent by the exception unit, discarding the request command; and if there is no to-be-processed request command sent by the exception unit in the to-be-processed request queue after discarding, processing the request command at the current head of the to-be-processed request queue, so as to realize the fast processing of the request command that needs to be discarded by the processing mode that the request command that does not need to be discarded in the to-be-processed request queue of the network card firmware is dequeued first before the request command that needs to be discarded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of command processing, and in particular to a command exception handling method, electronic device, and storage medium. Background Technology

[0002] When several functional units on the host communicate with the network interface card (NIC) firmware via commands, a command queue is established for each functional unit and a command queue for the NIC firmware. The command queue includes a request command queue (used to store request commands) and a response command queue (used to store response commands). When any functional unit issues a request command, it first stores the request command in the request command queue corresponding to that functional unit, and then sends it to the request command queue corresponding to the NIC firmware. After the request command is processed, the response command corresponding to the request command is sent from the response command queue of the NIC firmware to the response command queue of the corresponding functional unit.

[0003] Since the request command queues of several functional units all transmit commands to the request command queue of the network card firmware, forming a many-to-one correspondence, when the command queue is under high load (i.e., the number of commands from the functional units is too large), if a certain functional unit malfunctions, it is necessary to pause the command transmission of the request command queue of that functional unit and discard the request commands that the functional unit has sent to the request command queue of the network card firmware but have not yet been processed. However, since the request command queue of the network card firmware is under high load at this time, the commands before the command that needs to be discarded must be processed before the command that needs to be discarded can be discarded. The system does not allow the waiting time for the command that needs to be discarded to be too long. Therefore, how to quickly dequeue the command that needs to be discarded from the request command queue of the network card firmware is an urgent technical problem to be solved. Summary of the Invention

[0004] To address the aforementioned technical problems, the technical solution adopted by this invention is as follows:

[0005] According to one aspect of this application, a command exception handling method is provided, comprising:

[0006] Step S100: When any functional unit of the host malfunctions, that functional unit is identified as the malfunctioning unit.

[0007] Step S200: Set the command status bit corresponding to each storage space of the abnormal unit in the preset command status table to the first status bit;

[0008] The command status table stores the command status bits of the request commands corresponding to each storage space of each functional unit of the host.

[0009] The first status bit indicates that there are no pending request commands in the corresponding storage space;

[0010] Step S300: If there is a pending request command sent by an abnormal unit in the pending request queue corresponding to the network card firmware, then obtain the request command at the head of the pending request queue.

[0011] The pending request queue stores pending request commands sent by each functional unit of the host.

[0012] Step S400: If the request command at the current head of the pending request queue is not a pending request command sent by an abnormal unit, then proceed to step S500.

[0013] If the request command at the head of the pending request queue is a pending request command sent by an abnormal unit, then proceed to step S600.

[0014] Step S500: Remove the request command from the pending request queue and store it in the storage space corresponding to the request command, then return to step S400;

[0015] Step S600: Discard the request command. If there are still pending request commands sent by the abnormal unit in the pending request queue after the discard, return to step S400.

[0016] If there are no pending request commands sent by the abnormal unit in the queue of pending requests after they have been discarded, then the request command at the current head of the queue will be processed.

[0017] According to another aspect of this application, a non-transitory computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the aforementioned command exception handling method.

[0018] According to another aspect of this application, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0019] The present invention has at least the following beneficial effects:

[0020] The command exception handling method of the present invention, when any functional unit of the host malfunctions, identifies the functional unit as an exception unit, sets the command status bit corresponding to each storage space of the exception unit in the command status table (which stores the command status bits of the request commands corresponding to each storage space of each functional unit of the host) to a first status bit. The first status bit indicates that there are no pending request commands in the corresponding storage space, that is, no request commands are transmitted to the network card firmware. The transmission of request commands of the exception unit is paused. If there are pending request commands sent by the exception unit in the pending request queue corresponding to the network card firmware (which stores pending request commands sent by each functional unit of the host), the pending request commands sent by the exception unit need to be discarded. That is, the request command at the head of the pending request queue is obtained. If the pending request queue is at the head of the queue, the request command sent by the exception unit is discarded. If the request command at the head of the queue is not a pending request command sent by an abnormal unit, then the request command is removed from the pending request queue and stored in the storage space corresponding to the request command. That is, request commands that do not need to be discarded are dequeued first. If the request command at the head of the pending request queue is a pending request command sent by an abnormal unit, then the request command is discarded. If there is no pending request command sent by an abnormal unit in the pending request queue after the discarding, then the request command at the current head of the pending request queue is processed. This is to quickly process the request commands that need to be discarded by dequeuing the request commands that do not need to be discarded (i.e., request commands sent by functional units that have not experienced abnormalities) that are located before the request commands that need to be discarded (i.e., request commands sent by functional units that have experienced abnormalities) in the pending request queue of the network card firmware first. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A flowchart of a command exception handling method provided in an embodiment of the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] This application proposes a command exception handling method, such as Figure 1 As shown, it includes:

[0025] Step S100: When any functional unit of the host malfunctions, that functional unit is identified as the malfunctioning unit.

[0026] Step S200: Set the command status bit corresponding to each storage space of the abnormal unit in the preset command status table to the first status bit;

[0027] The first status bit indicates that there are no pending request commands in the corresponding storage space.

[0028] The command status table stores the command status bits of the request commands corresponding to each storage space of each functional unit of the host.

[0029] The command status table consists of a status sub-table corresponding to each functional unit. Each status sub-table corresponding to a functional unit includes the command status bit of the request command corresponding to each storage space of that functional unit.

[0030] Specifically, the command status table is A=(A1,A2,...,A...). i ,...,A f );

[0031] Where i = 1, 2, ..., f; f is the number of functional units of the host computer; A i This is the status sub-table corresponding to the i-th functional unit of the host;

[0032] A i =(A i1 A i2 ,...,A ig ,...,A ih ); g = 1, 2, ..., h; h is the amount of storage space in each functional unit of the host; A ig This is the command status bit of the request command corresponding to the g-th storage space of the i-th functional unit of the host;

[0033] A ig The initial state bit is the first state bit.

[0034] In A ig When the corresponding storage space contains pending request commands, A will be... ig The state is changed from the first state bit to the second state bit.

[0035] The second status bit indicates that there are pending request commands in the corresponding storage space that have not been moved to the pending request queue.

[0036] In A ig When the pending request commands stored in the corresponding storage space are moved to the pending request queue corresponding to the network card firmware, A will be... ig The state is changed from the second state to the third state.

[0037] The queue of pending requests is a first-in, first-out (FIFO) queue.

[0038] The third status bit indicates that there is a request command in the corresponding storage space that has been moved to the queue of pending requests but has not been processed.

[0039] In A ig When the corresponding storage space contains request commands to be processed, the command flag bit corresponding to that storage space is set to the first flag bit.

[0040] The first flag indicates that the command stored in the corresponding storage space is a request command.

[0041] In A ig Once the pending request commands stored in the corresponding storage space have been processed, and the corresponding response commands have been stored in A. ig After placing A in the corresponding storage space ig The command flag for the corresponding storage space is set to the second flag.

[0042] The second flag indicates that the command stored in the corresponding storage space is a response command.

[0043] In A ig The corresponding storage space stores the response command, and A ig After setting the command flag of the corresponding storage space to the second flag, A ig The state is changed from the third state to the first state.

[0044] In A ig After the pending request commands stored in the corresponding storage space are processed, the corresponding response commands are stored in A. ig In the corresponding storage space, so that the response command overwrites the request command.

[0045] Step S300: If there is a pending request command sent by an abnormal unit in the pending request queue corresponding to the network card firmware, then obtain the request command at the head of the pending request queue.

[0046] The pending request queue stores pending request commands sent by each functional unit of the host.

[0047] Step S400: If the request command at the current head of the pending request queue is not a pending request command sent by an abnormal unit, then proceed to step S500.

[0048] If the request command at the head of the pending request queue is a pending request command sent by an abnormal unit, then proceed to step S600.

[0049] Step S500: Remove the request command from the pending request queue and store it in the storage space corresponding to the request command, then return to step S400;

[0050] Step S600: Discard the request command. If there are still pending request commands sent by the abnormal unit in the pending request queue after the discard, return to step S400.

[0051] If there are no pending request commands sent by the abnormal unit in the queue of pending requests after they have been discarded, then the request command at the current head of the queue will be processed.

[0052] The command exception handling method of the present invention, when any functional unit of the host malfunctions, identifies the functional unit as an exception unit, sets the command status bit corresponding to each storage space of the exception unit in the command status table to a first status bit, the first status bit indicating that there are no pending request commands in the corresponding storage space, that is, no request commands are transmitted to the network card firmware, and suspends the transmission of request commands of the exception unit. If there are pending request commands sent by the exception unit in the pending request queue corresponding to the network card firmware, the pending request commands sent by the exception unit need to be discarded, that is, the request command at the head of the pending request queue is obtained. If the request command at the current head of the pending request queue is not sent by the exception unit... If a request command is to be processed, it is removed from the pending request queue and stored in the corresponding storage space. In other words, request commands that do not need to be discarded are dequeued first. If the request command at the head of the pending request queue is a pending request command sent by an abnormal unit, it is discarded. If there are no pending request commands sent by abnormal units in the pending request queue after discarding, the request command at the current head of the pending request queue is processed. This method of quickly removing the request commands that need to be discarded from the pending request queue of the network card firmware by dequeuing the request commands that need to be discarded first achieves fast processing of the request commands that need to be discarded.

[0053] Furthermore, the processing method for request commands in the pending request queue of this application is as follows: steps S0100-S0700:

[0054] Step S0100: Poll the status sub-table corresponding to each functional unit in the preset command status table, and determine the storage space where the command status bit in the status sub-table of the currently polled functional unit is the second status bit as the space to be processed.

[0055] Step S0200: If the priority of all pending request commands stored in the pending processing space is the first priority, then move the request command in each pending processing space to the pending request queue corresponding to the network card firmware.

[0056] Furthermore, step S0200 includes steps S0210-S0230:

[0057] Step S0210: If there is a request command with the third priority among all the pending request commands stored in the pending space, move the request command with the third priority to the pending request queue corresponding to the network card firmware.

[0058] The third priority request command is represented by the priority of the preceding command.

[0059] Step S0220: If there are no request commands with the third priority but there are request commands with the second priority stored in all pending processing spaces, move the request commands with the second priority to the pending request queue corresponding to the network card firmware.

[0060] The third priority is higher than the second priority. Requests with the third priority are processed first, so that preceding requests are moved to the queue of pending requests first, thereby speeding up the processing progress of the queue of pending requests.

[0061] Step S0230: If all pending request commands stored in all pending spaces have the highest priority, move the request command in each pending space to the pending request queue corresponding to the network card firmware.

[0062] By assigning different priorities to request commands, requests with higher processing levels are given priority to enter the pending request queue, thus avoiding blockage of the pending request queue caused by preceding commands being located after the corresponding request commands.

[0063] Step S0300: Adjust the command status bit of the storage space corresponding to the request command that has been moved to the pending request queue from the second status bit to the third status bit in the command status table.

[0064] Step S0400: If there is a preceding command in the request command at the head of the pending request queue, the request command is determined as a secondary processing command.

[0065] The preceding command corresponding to the secondary processing command is the request command on which the secondary processing command depends for processing. That is, the secondary processing command can only be processed after the preceding command corresponding to the secondary processing command has been processed.

[0066] Furthermore, step S0400 also includes steps S0410-S0420:

[0067] Step S0410: If there is no preceding command for the request command at the head of the pending request queue, determine the request command as a processing command.

[0068] Step S0420: After a processing command is completed and the response command corresponding to the processing command is stored in the storage space corresponding to the processing command, the command flag bit of the storage space corresponding to the response command is set to the second flag bit.

[0069] When the functional unit corresponding to a processing command receives a response command sent by the network card firmware, it stores the response command in the storage space corresponding to the processing command, so that the response command overwrites the processing command, and each storage space contains only one command, thereby reducing space occupancy.

[0070] After the response command corresponding to a processing command is stored in the storage space corresponding to the processing command, and the command flag bit of the storage space corresponding to the response command is set to the second flag bit, the command status bit of the storage space corresponding to the processing command in the command status table is adjusted from the third status bit to the first status bit.

[0071] Based on the processing status of the request commands in each storage space, three status bits are adjusted for each storage space so that the location of the request commands in each storage space can be known by checking the command status table.

[0072] Step S0500: Remove the secondary processing command from the pending request queue and store it in the storage space corresponding to the secondary processing command;

[0073] When there are secondary processing commands, in order to ensure the processing efficiency of the pending request queue and prevent the queue from becoming blocked, the secondary processing commands are first dequeued (without command processing), so that the pending request queue can process the request commands after the secondary processing commands normally.

[0074] Step S0600: Adjust the command status bit of the storage space corresponding to the secondary processing command in the command status table from the third status bit to the second status bit;

[0075] Step S0700: Set the priority of the secondary processing command to the second priority, and set the priority of the preceding command corresponding to the secondary processing command to the third priority.

[0076] The processing intensity of the third priority, the second priority, and the first priority decreases in that order.

[0077] After the secondary processing command is dequeued, since there is a preceding command for the secondary processing command, the priority of the corresponding preceding command is adjusted to the highest (i.e., the third priority), and the priority of the secondary processing command is adjusted to the second highest (i.e., the second priority). This ensures that the corresponding preceding command enters the pending request queue before the secondary processing command, and the preceding command is processed before the secondary processing command. When the secondary processing command is at the head of the pending request queue, the corresponding preceding command has already been processed, and the secondary processing command can also be processed. This speeds up the command processing in the pending request queue while also ensuring the processing order of the secondary processing command and the corresponding preceding command.

[0078] The command processing method for the pending request queue of the present invention first polls the status sub-table corresponding to each functional unit in the command status table, and determines the storage space in the status sub-table of the currently polled functional unit where the command status bit is the second status bit as the pending space. Then, it checks the priority of the pending request commands stored in the pending space. If the priority of the pending request commands stored in all pending spaces is the first priority, then the request commands in each pending space are moved to the pending request queue corresponding to the network card firmware, and the command status bit of the storage space corresponding to the request command moved to the pending request queue in the command status table is adjusted from the second status bit to the third status bit. In addition, if the request command at the head of the pending request queue has a preceding command, the request command is determined. For secondary processing commands, the secondary processing command is removed from the pending request queue and stored in the corresponding storage space. The command status bit of the storage space corresponding to the secondary processing command in the command status table is adjusted from the third status bit to the second status bit. The priority of the secondary processing command is set to the second priority, and the priority of the preceding command corresponding to the secondary processing command is set to the third priority. This is done by establishing a command status table to represent the transmission status of commands for each functional unit, enabling unified command allocation across all functional units. Furthermore, by assigning priority values ​​to request commands, the preceding command has the highest priority, ensuring its priority is prioritized and preventing secondary processing commands from being unable to be processed due to unprocessed preceding commands, thus avoiding congestion in the pending request queue.

[0079] Furthermore, since the response command queues of several functional units all transmit commands to the response command queue of the network interface card (NIC) firmware in a many-to-one correspondence, when a response command from the NIC firmware's response command queue needs to be sent to the corresponding functional unit, an interrupt notification must first be sent to the functional unit to inform it that the response command can be retrieved. However, since the interrupt notification does not contain an identifier for the corresponding storage space, upon receiving the interrupt notification, the functional unit only knows that the response command should be retrieved, but does not know which storage space the response command should be stored in. The functional unit will then search all the available storage spaces... The storage space is traversed to determine the storage space where the corresponding request command is located. If the number of storage spaces is small or the corresponding request command is located at the beginning of the storage space, the time consumed by this traversal method is acceptable. However, if the number of storage spaces is large, this traversal method is too time-consuming and will increase the processing latency of the network card firmware's response command queue. Therefore, this application also proposes a command processing response interruption notification method, which is applied to the steps after the request command at the head of the pending request queue corresponding to the network card firmware has been processed, specifically steps S00100-S00600:

[0080] Step S00100: After the request command at the head of the pending request queue corresponding to the network card firmware is processed, the request command is identified as the target request command, and the target response command corresponding to the target request command is generated.

[0081] Step S00200: When the functional unit corresponding to the target request command receives the response interrupt notification sent by the network card firmware, the storage space corresponding to the command status bit that is the third status bit in the command status table among the several storage spaces of the functional unit corresponding to the target request command is determined as the first space, and step S00300 is executed.

[0082] In addition, step S00200 also includes steps S00201-S00203:

[0083] Step S00201: Store the identifier of the storage space corresponding to the target request command in a preset response status table;

[0084] The response status table stores the identifier of the storage space where each request command that has generated a corresponding response command is located.

[0085] Step S00202: When the functional unit corresponding to the target request command receives the response interrupt notification sent by the network card firmware, it retrieves the identifier of the storage space corresponding to the target request command from the response status table and identifies the identifier as the target identifier.

[0086] Step S00203: Store the target response command in the storage space corresponding to the target identifier so that the target response command overwrites the target request command, and then execute step S00500.

[0087] Step S00300: Determine the first space where the command flag bit is the first flag bit as the second space;

[0088] Step S00400: Traverse each second space. If the request command in any second space is the target request command, then store the target response command in the second space so that the target response command overwrites the target request command.

[0089] Step S00500: Set the command flag of the second space to the second flag.

[0090] Step S00600: After the target response command is stored in the second space, the command status bit in the second space in the command status table is adjusted from the third status bit to the first status bit.

[0091] Steps S00201-S00203 involve establishing a response status table, retrieving the identifier of the storage space corresponding to the target request command from the response status table, and determining the storage space corresponding to the response command. Steps S00200-S00500 involve traversing each second space to determine the storage space corresponding to the response command. By using the above two methods to determine the storage space corresponding to the response command, the storage space where the response command is stored can be quickly determined from several storage spaces, thereby accelerating the processing of the response command queue of the network card firmware.

[0092] The command processing response interruption notification method of the present invention, after the request command at the head of the pending request queue corresponding to the network card firmware is processed, determines the request command as the target request command and generates a target response command corresponding to the target request command. When the functional unit corresponding to the target request command receives the response interruption notification sent by the network card firmware, the storage space corresponding to the command status bit with the third status bit in the command status table of the functional unit corresponding to the target request command is determined as the first space, and the first space with the command flag bit as the first flag bit is determined as the second space. Each second space is traversed. If any request command in the second space is a target request command, then the target response command is stored in the second space so that the target response command overwrites the target request command. The command flag bit of the second space is set to the second flag bit. After the target response command is stored in the second space, the command status bit of the second space in the command status table is adjusted from the third status bit to the first status bit. By checking the command status bit of the storage space and the command flag bit of each storage space in the command status table, the storage space of the response command can be quickly located, reducing the processing latency of the response command queue of the network card firmware.

[0093] Embodiments of the present invention also provide a computer program product including program code, which, when the program product is run on an electronic device, causes the electronic device to perform the steps of the methods described above in various exemplary embodiments of the present invention.

[0094] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0095] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0096] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.

[0097] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: entirely in hardware, entirely in software (including firmware, microcode, etc.), or in a combination of hardware and software, collectively referred to herein as “circuit,” “module,” or “system.”

[0098] An electronic device according to this embodiment of the invention. The electronic device is merely an example and should not be construed as limiting the functionality or scope of the embodiments of the invention.

[0099] Electronic devices are manifested in the form of general-purpose computing devices. The components of an electronic device may include, but are not limited to: at least one processor, at least one memory, and a bus connecting different system components (including memory and processor).

[0100] The storage device stores program code that can be executed by the processor to perform the steps described in the "Exemplary Methods" section above, according to various exemplary embodiments of the present invention.

[0101] The storage may include readable media in the form of volatile storage, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).

[0102] The storage may also include programs / utilities having a set (at least one) of program modules, including but not limited to: an operating system, one or more applications, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0103] A bus can represent one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus that uses any of the various bus architectures.

[0104] Electronic devices can also communicate with one or more external devices (such as keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable users to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (such as routers, modems, etc.). This communication can be performed through input / output (I / O) interfaces. Furthermore, electronic devices can also communicate with one or more networks (such as local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapters.

[0105] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0106] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the invention described in the "Exemplary Methods" section of this specification.

[0107] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0108] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0109] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0110] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0111] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0112] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0113] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A command exception handling method, characterized in that, include: Step S100: When any functional unit of the host malfunctions, that functional unit is identified as the malfunctioning unit. Step S200: Set the command status bit corresponding to each storage space of the abnormal unit in the preset command status table to the first status bit; The command status table stores the command status bits of the request commands corresponding to each storage space of each functional unit of the host. The first status bit indicates that there are no pending request commands in the corresponding storage space; Step S300: If there is a pending request command sent by the abnormal unit in the pending request queue corresponding to the network card firmware, then obtain the request command at the head of the pending request queue. The pending request queue stores pending request commands sent by each functional unit of the host. Step S400: If the request command at the current head of the pending request queue is not a pending request command sent by the abnormal unit, then proceed to step S500. If the request command at the head of the pending request queue is a pending request command sent by the abnormal unit, then step S600 is executed. Step S500: Remove the request command from the pending request queue and store it in the storage space corresponding to the request command, then return to step S400; Step S600: Discard the request command. If there are still pending request commands sent by the abnormal unit in the pending request queue after the discard, return to step S400. If there is no pending request command sent by the abnormal unit in the pending request queue after it has been discarded, then the request command at the current head of the pending request queue is processed.

2. The method according to claim 1, characterized in that, The command status table A=(A1,A2,...,A... i ,...,A f ); where i = 1, 2, ..., f; f is the number of functional units of the host computer; A i This is the status sub-table corresponding to the i-th functional unit of the host; A i =(A i1 A i2 ,...,A ig ,...,A ih ); g = 1, 2, ..., h; h is the amount of storage space in each functional unit of the host; A ig This is the command status bit of the request command corresponding to the g-th storage space of the i-th functional unit of the host; A ig The initial state bit is the first state bit.

3. The method according to claim 2, characterized in that, In A ig When the corresponding storage space contains pending request commands, A will be... ig The state is changed from the first state bit to the second state bit. The second status bit indicates that there are pending request commands in the corresponding storage space that have not been moved to the pending request queue.

4. The method according to claim 3, characterized in that, In A ig When a pending request command stored in the corresponding storage space is moved to the pending request queue, A will be... ig The state is changed from the second state bit to the third state bit; The third status bit indicates that there is a request command in the corresponding storage space that has been moved to the pending request queue but has not been processed.

5. The method according to claim 4, characterized in that, In A ig When the corresponding storage space contains a request command to be processed, set the command flag bit corresponding to that storage space to the first flag bit. The first flag indicates that the command stored in the corresponding storage space is a request command.

6. The method according to claim 5, characterized in that, In A ig After the pending request commands stored in the corresponding storage space are processed, the corresponding response commands are stored in A. ig In the corresponding storage space, so that the response command overwrites the request command.

7. The method according to claim 6, characterized in that, In A ig Once the pending request commands stored in the corresponding storage space have been processed, and the corresponding response commands have been stored in A. ig After placing A in the corresponding storage space ig The command flag for the corresponding storage space is set to the second flag. The second flag indicates that the command stored in the corresponding storage space is a response command.

8. The method according to claim 7, characterized in that, In A ig The corresponding storage space stores the response command, and A ig After setting the command flag of the corresponding storage space to the second flag, A ig The state is changed from the third state to the first state.

9. A non-transitory computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the method as described in any one of claims 1-8.

10. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 9.