NVMe protocol test analysis method, device, equipment and storage medium based on Linux

Through the Linux-based NVMe protocol test analysis method, the improved driver module and SA algorithm are used to solve the problems of high cost and poor universality of NVMe protocol test analysis, and the rapid and efficient NVMe storage product development and testing are achieved, which improves the test analysis. Reusability and exception handling capability.

CN119003376BActive Publication Date: 2025-01-03HUBEI CHANGJIANG WANRUN SEMICON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411467400.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-01-03
Estimated Expiration
2044-10-21

AI Technical Summary

Technical Problem

During the test and analysis process of existing NVMe protocols, there are problems such as high testing and analysis cost and poor versatility, making it difficult to quickly and efficiently develop and test NVMe storage products.

Method used

Using Linux-based NVMe protocol testing and analysis method, by setting error-recall configuration files and analyzing configuration files, the improved NVMe driver module is used to perform NVMe protocol testing and analysis, including NVMe protocol monitoring, analysis, error-recalling and display modules, and using Sequential Algorithms( The SA) algorithm performs data compression and outputs analysis results through virtual file system technology.

Benefits of technology

Real-time parsing and compressing output of NVMe protocol commands is realized, which reduces the amount of test code development, improves the reusability and universality of test analysis, and can quickly locate the abnormal situations of the kernel when processing NVMe protocol, and tests the analysis device to NVMe Is the exception handling of the protocol perfect?

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003376B_ABST
    Figure CN119003376B_ABST
Patent Text Reader

Abstract

The present invention discloses a NVMe protocol test and analysis method, device, equipment and storage medium based on Linux, the method comprising: 1) setting an error injection configuration file and an analysis configuration file; wherein the analysis configuration file is used to configure whether to enable the NVMe protocol test and analysis function; the error injection configuration file is used to set the error injection type and error injection data to guide the NVMe protocol error injection; 2) sending NVMe protocol commands to the target storage device through the test software, and using the improved NVMe driver module to perform NVMe protocol test and analysis. The method of the present invention is based on the modification and NVMe protocol analysis of the original NVMe driver of Linux, and can analyze the NVMe protocol commands sent by the general test software and the custom test software currently available on the market, with strong reusability, and can greatly reduce the amount of test code development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to computer storage testing technology, and in particular to a Linux-based NVMe protocol testing and analysis method, device, equipment and storage medium. Background Art

[0002] The market demand for storage products using high-speed storage protocols such as NVMe (non-volatile memory express) is increasing. Rapid development and testing of NVMe storage products can improve the efficiency of NVMe storage product development.

[0003] Currently, there are two main ways to analyze the NVMe protocol. The first is the hardware method, which is to purchase an external PCIe / NVMe protocol analyzer, place it between the host and the device, capture the PCIe bus signal between the host and the device to test and analyze the NVMe protocol commands therein; the second is the software method, which is to capture the NVMe protocol commands sent by the host to the device and perform test analysis. The existing NVMe protocol test and analysis process still has problems such as high test and analysis costs and poor versatility. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a Linux-based NVMe protocol test and analysis method, device, equipment and storage medium in response to the defects in the prior art.

[0005] The technical solution adopted by the present invention to solve the technical problem is: a NVMe protocol test and analysis method based on Linux, comprising the following steps:

[0006] 1) Set up error injection configuration files and analysis configuration files;

[0007] Among them, the analysis configuration file is used to configure whether to enable the NVMe protocol test analysis function; the error injection configuration file is used to set the error injection type and error injection data to guide the NVMe protocol error injection;

[0008] 2) Send NVMe protocol commands to the target storage device through the test software, and use the improved NVMe driver module to perform NVMe protocol test analysis;

[0009] The improved NVMe driver module is obtained by modifying the NVMe standard driver module, and includes:

[0010] NVMe standard driver module, used for standard NVMe protocol command processing, sending commands and data to the NVMe target storage device under test, and recovering the command status;

[0011] NVMe protocol monitoring module, used to monitor and record all information of the standard NVMe protocol command processing flow in the NVMe standard driver module;

[0012] The NVMe protocol analysis module is used to summarize the information obtained by the NVMe protocol monitoring module in real time, and then parse the data information returned by the NVMe protocol command according to the NVMe protocol manual, and output it from the kernel to the NVMe protocol analysis result file through the virtual file system technology;

[0013] The NVMe protocol error annotation module is used to read the error annotation configuration file, establish an error annotation set according to the error annotation type and error annotation data specified in the error annotation configuration file and the analysis results obtained by the NVMe protocol analysis module, and complete the NVMe protocol error annotation in the kernel;

[0014] The NVMe protocol display module is used to parse the NVMe protocol analysis result file in real time, display its content as a UI interface to the user, and provide users with data search specified in the NVMe protocol.

[0015] According to the above scheme, in the step 2) NVMe protocol analysis module, after parsing the data information returned by the NVMe protocol command, the real-time NVMe command and protocol parsing result data are compressed and output; the compression algorithm adopts the Sequential Algorithms (SA) algorithm, and the SA algorithm parameters are modified by predicting the data generation trend.

[0016] According to the above scheme, in the step 2) NVMe protocol analysis module, the data returned by the NVMe protocol command includes Opcode, DWORD10 to 15, SQID, CQID, SQ Door Bell, CQ Door Bell, transmission data, corresponding kernel time, command processing results and abnormal error information.

[0017] According to the above scheme, in the step 3) NVMe protocol analysis module, the error note sets established include command error note sets, SQ error note sets, SQ Door bell error note sets, transmission data error note sets, CQ error note sets and CQ Door Bell error note sets.

[0018] According to the above solution, the target storage device in step 2) is a physical NVMe device or a simulated NVMe device.

[0019] According to the above scheme, the NVMe standard driver module is a native NVMe driver module of the Linux operating system.

[0020] According to the above scheme, the information monitoring and recording in the step 2) NVMe protocol monitoring module includes:

[0021] When the kernel receives the NVMe protocol command, it records the Opcode, DWORD10 to 15, transmission data information, and kernel time when the NVMe command is received and returned;

[0022] When the kernel allocates driver layer queue resources, it records the PCIe configuration space register, Bar register, CQID, SQID, Door Bell information and kernel time;

[0023] After the kernel creates an SQ, it records the SQ information;

[0024] After the kernel updates the SQ Door Bell register, record the updated SQ Door Bell;

[0025] After the kernel completes the DMA data transfer, record the transferred data;

[0026] After the kernel reads and processes the CQ, it reads the updated CQ information;

[0027] After the kernel updates the CQ Door Bell register, record the updated CQ Door Bell register;

[0028] Also record the kernel timestamps for each step of the above kernel processing.

[0029] A Linux-based NVMe protocol test and analysis device, comprising:

[0030] File configuration module, used to set error injection configuration files and analysis configuration files;

[0031] Among them, the analysis configuration file is used to configure whether to enable the NVMe protocol test analysis function; the error injection configuration file is used to set the error injection type and error injection data to guide the NVMe protocol error injection;

[0032] NVMe standard driver module, used to receive NVMe protocol commands sent by the test software and perform standard NVMe protocol command processing, send commands and data to the NVMe target storage device under test, and receive the status of the command;

[0033] NVMe protocol monitoring module, used to monitor and record relevant information of the standard NVMe protocol command processing flow in the NVMe standard driver module;

[0034] The NVMe protocol analysis module is used to summarize the information obtained by the NVMe protocol monitoring module in real time, and then parse the data information when the NVMe protocol command is received according to the NVMe protocol manual, and output it from the kernel to the NVMe protocol analysis result file through the virtual file system technology according to the processing flow of the NVMe protocol and the data format for easy viewing;

[0035] The data when receiving NVMe protocol commands include Opcode, DWORD10 to 15, SQID, CQID, SQ DoorBell, CQ Door Bell, transmission data, corresponding kernel time, command processing results and abnormal error information;

[0036] NVMe protocol error annotation module, used to read the error annotation configuration file, establish an error annotation set according to the error annotation type and error annotation data specified in the error annotation configuration file and the analysis results obtained by the NVMe protocol analysis module, and complete the NVMe protocol error annotation in the kernel; the error annotation set includes command error annotation set, SQ error annotation set, SQ Door bell error annotation set, transmission data error annotation set, CQ error annotation set and CQ Door Bell error annotation set;

[0037] The NVMe protocol display module is used to parse the NVMe protocol analysis result file in real time, display its content as a UI interface to the user, and provide users with data searches specified in the NVMe protocol, including Opcode, SQ, CQ, PCIe configuration registers, Door Bell, and command processing results.

[0038] According to the above scheme, the information monitoring and recording in the NVMe protocol monitoring module includes:

[0039] When the kernel receives the NVMe protocol command, the Opcode, DWORD10 to 15, transmission data information and kernel time when the NVMe command is sent and received are recorded;

[0040] When the kernel allocates driver layer queue resources, it records the PCIe configuration space register, Bar register, CQID, SQID, Door Bell information and kernel time;

[0041] After the kernel creates an SQ, it records the SQ information;

[0042] After the kernel updates the SQ Door Bell register, record the updated SQ Door Bell;

[0043] After the kernel completes the DMA data transfer, record the transferred data;

[0044] After the kernel reads and processes the CQ, it reads the updated CQ information;

[0045] After the kernel updates the CQ Door Bell register, record the updated CQ Door Bell register;

[0046] Also record the kernel timestamps for each step of the above kernel processing.

[0047] According to the above scheme, in the NVMe protocol analysis module, after parsing the data information returned by the NVMe protocol command, the real-time NVMe command and protocol parsing result data are compressed and output; the compression algorithm adopts the Sequential Algorithms (SA) algorithm, and the SA algorithm parameters are modified by predicting the data generation trend.

[0048] According to the above scheme, in the NVMe protocol analysis module, the data returned by the NVMe protocol command includes Opcode, DWORD10 to 15, SQID, CQID, SQ Door Bell, CQ Door Bell, transmission data, corresponding kernel time, command processing results and abnormal error information.

[0049] According to the above scheme, in the NVMe protocol analysis module, the error annotation sets established include command error annotation sets, SQ error annotation sets, SQ Door bell error annotation sets, transmission data error annotation sets, CQ error annotation sets and CQ Door Bell error annotation sets.

[0050] According to the above solution, the target storage device is a physical NVMe device or a simulated NVMe device.

[0051] According to the above scheme, the NVMe standard driver module adopts the native NVMe driver module of the Linux operating system.

[0052] The beneficial effects produced by the present invention are:

[0053] 1. The method of the present invention is based on the modification of the original NVMe driver of Linux and the NVMe protocol analysis, which can analyze the NVMe protocol commands sent by the general test software and custom test software currently available on the market, has strong reusability, and can greatly reduce the amount of test code development;

[0054] 2. The test method of the present invention is applicable to the case where the target device is a physical NVMe device or a simulated NVMe device, and has strong versatility. At the same time, no other test environment needs to be built during test analysis, and the method is easy to use.

[0055] 3. The improved NVMe driver module of the present invention can monitor and analyze the standard process of the kernel for NVMe protocol processing, and quickly locate the details of the abnormality when the kernel processes the NVMe protocol; at the same time, errors can be injected when the kernel processes the NVMe protocol to test and analyze whether the NVMe device's abnormal processing of the NVMe protocol is perfect. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:

[0057] Figure 1 is a method flow chart of an embodiment of the present invention;

[0058] Figure 2 It is a flow chart of a method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0060] like Figure 1 As shown, a Linux-based NVMe protocol test and analysis method includes the following steps:

[0061] 1) Set up error injection configuration files and analysis configuration files;

[0062] Among them, the analysis configuration file is used to determine whether to enable the NVMe protocol test analysis function through configuration information; the error injection configuration file is used to set the error injection type and error injection data to guide the NVMe protocol error injection;

[0063] 2) Send NVMe protocol commands to the target storage device through the test software, use the improved NVMe driver module to replace the original NVMe driver module, and perform NVMe protocol test analysis; wherein the target storage device is a physical NVMe device or a simulated NVMe device;

[0064] Process such as Figure 2 ;

[0065] Uninstall the native NVMe driver module of the linux operating system, install the improved NVMe driver module of the present invention, which adds an NVMe protocol monitoring module, an NVMe protocol analysis module, an NVMe protocol display module, and an NVMe protocol error injection module based on the native linux NVMe driver, and can implement the test analysis of the entire NVMe protocol processing flow without changing the original NVMe driver interface. At the same time, when the NVMe driver module is loaded, it will read the analysis configuration file, and decide whether to turn on the NVMe protocol test analysis function through the configuration information. If it is not started, it is consistent with the native NVMe driver of the linux operating system.

[0066] The improved NVMe driver module is obtained by modifying the NVMe standard driver module. The improved NVMe driver module includes: an NVMe standard driver module, an NVMe protocol monitoring module, an NVMe protocol analysis module, an NVMe protocol error injection module and an NVMe protocol display module;

[0067] The NVMe standard driver module is used for standard NVMe protocol command processing, sends commands and data to the NVMe target storage device under test, and recovers the status of the command; in this embodiment, the NVMe standard driver module adopts the native NVMe driver module of the Linux operating system, and other optimized NVMe driver modules are also applicable to the method of the present invention.

[0068] NVMe protocol monitoring module, used to monitor and record all information of the process of receiving standard NVMe protocol commands in the NVMe standard driver module;

[0069] Information monitoring and recording in the NVMe protocol monitoring module include:

[0070] When the kernel receives the NVMe protocol command, it records the Opcode, DWORD10 to 15, transmission data information, and kernel time when the NVMe command is received and returned;

[0071] When the kernel allocates driver layer queue resources, it records the PCIe configuration space register, Bar register, CQID, SQID, Door Bell information and kernel time;

[0072] After the kernel creates an SQ, it records the SQ information;

[0073] After the kernel updates the SQ Door Bell register, record the updated SQ Door Bell;

[0074] After the kernel completes the DMA data transfer, record the transferred data;

[0075] After the kernel reads and processes the CQ, it reads the updated CQ information;

[0076] After the kernel updates the CQ Door Bell register, record the updated CQ Door Bell register;

[0077] At the same time, the kernel timestamp of each step of the above kernel processing is recorded;

[0078] The NVMe protocol analysis module is used to summarize the information obtained by the NVMe protocol monitoring module in real time, and then parse out the Opcode, DWORD10 to 15, SQID, CQID, SQ Door Bell, CQDoor Bell, transmission data, corresponding kernel time, command processing results, abnormal error information, etc. when the NVMe protocol command is returned according to the NVMe protocol manual, and output it from the kernel to the NVMe protocol analysis result file through the virtual file system technology according to the processing flow of the NVMe protocol and the data format for easy viewing;

[0079] In order to further improve the speed of data transmission, we compress the real-time NVMe commands and protocol analysis result data using the Sequential Algorithms (SA) algorithm, and modify the SA algorithm parameters by predicting the data generation trend to improve the data compression performance of the SA algorithm. Then, the compressed data is output from the kernel to the NVMe protocol analysis result file through the virtual file system technology. The high compression performance ensures the high efficiency of data transmission, and the whole process does not affect the efficiency of NVMe protocol command processing.

[0080] NVMe protocol error annotation module, used to read the error annotation configuration file, establish an error annotation set according to the error annotation type and error annotation data specified in the error annotation configuration file and the analysis results obtained by the NVMe protocol analysis module, and complete the NVMe protocol error annotation in the kernel; the error annotation set includes command error annotation set, SQ error annotation set, SQ Door bell error annotation set, transmission data error annotation set, CQ error annotation set and CQ Door Bell error annotation set;

[0081] When a protocol error is made, random algorithms such as the Monte Carlo algorithm are used to select the error from the established error set to ensure the randomness of the error. At the same time, a completed error database is established. The reinforcement learning strategy adjusts the wrong injection set and increases the proportion of the wrong injection types that have not appeared in the next Monte Carlo algorithm to ensure the coverage of the wrong injection types.

[0082] The NVMe protocol display module is used to decompress the contents of the NVMe protocol analysis result file, parse the NVMe protocol analysis result file in real time, and display its contents as a UI interface for users to watch. At the same time, the NVMe protocol display module supports users to search for any data specified in the NVMe protocol, including Opcode, SQ, CQ, PCIe configuration register, Door Bell, and command processing results.

[0083] According to the above method, the present invention also provides a NVMe protocol test and analysis device based on Linux, comprising:

[0084] File configuration module, used to set error injection configuration files and analysis configuration files;

[0085] Among them, the analysis configuration file is used to configure whether to enable the NVMe protocol test analysis function; the error injection configuration file is used to set the error injection type and error injection data to guide the NVMe protocol error injection;

[0086] NVMe standard driver module, used to receive NVMe protocol commands sent by the test software and perform standard NVMe protocol command processing, send commands and data to the tested NVMe target storage device, and recover the command status;

[0087] NVMe protocol monitoring module, used to monitor and record all information of the standard NVMe protocol command processing flow in the NVMe standard driver module;

[0088] Information monitoring and recording in the NVMe protocol monitoring module include:

[0089] When the kernel receives the NVMe protocol command, it records the Opcode, DWORD10 to 15, transmission data information, and kernel time when the NVMe command is received and returned;

[0090] When the kernel allocates driver layer queue resources, it records the PCIe configuration space register, Bar register, CQID, SQID, Door Bell information and kernel time;

[0091] After the kernel creates an SQ, it records the SQ information;

[0092] After the kernel updates the SQ Door Bell register, record the updated SQ Door Bell;

[0093] After the kernel completes the DMA data transfer, record the transferred data;

[0094] After the kernel reads and processes the CQ, it reads the updated CQ information;

[0095] After the kernel updates the CQ Door Bell register, record the updated CQ Door Bell register;

[0096] Also record the kernel timestamps for each step of the above kernel processing.

[0097] The NVMe protocol analysis module is used to summarize the information obtained by the NVMe protocol monitoring module in real time, and then parse the data information returned by the NVMe protocol command according to the NVMe protocol manual, compress the real-time NVMe command and protocol analysis result data, and then output it from the kernel to the NVMe protocol analysis result file through the virtual file system technology; the compression adopts the Sequential Algorithms (SA) algorithm, and modifies the SA algorithm parameters by predicting the data generation trend to improve the data compression performance of the SA algorithm;

[0098] The data returned by the NVMe protocol command includes Opcode, DWORD10 to 15, SQID, CQID, SQ DoorBell, CQ Door Bell, transmission data, corresponding kernel time, command processing results and abnormal error information;

[0099] NVMe protocol error annotation module, used to read the error annotation configuration file, establish an error annotation set according to the error annotation type and error annotation data specified in the error annotation configuration file and the analysis results obtained by the NVMe protocol analysis module, and complete the NVMe protocol error annotation in the kernel; the error annotation set includes command error annotation set, SQ error annotation set, SQ Door bell error annotation set, transmission data error annotation set, CQ error annotation set and CQ Door Bell error annotation set;

[0100] The NVMe protocol display module is used to parse the NVMe protocol analysis result file in real time, display its content as a UI interface to the user, and provide users with data searches specified in the NVMe protocol, including Opcode, SQ, CQ, PCIe configuration registers, Door Bell, and command processing results.

[0101] The present invention does not require independent hardware equipment, and uses software to test and analyze the NVMe protocol. At the same time, it does not need to build any other test environment when used, and only needs to install a new driver, which is easy to use;

[0102] Compared with other NVMe protocol analysis software, the present invention performs testing and analysis based on the original Linux NVMe driver, so that a large number of original test software or user-defined test software can be reused, which greatly reduces the development amount of test code; by monitoring the original Linux NVMe driver processing flow, the detailed abnormal situation when the kernel processes the NVMe protocol can be quickly located, and at the same time, through the error injection function, it can be tested whether the device's abnormal processing of the NVMe protocol is perfect.

[0103] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all these improvements and changes should fall within the scope of protection of the appended claims of the present invention.

Claims

1. A Linux-based NVMe protocol test and analysis method, characterized in that: The following steps are involved: 1) Set up error injection configuration files and analysis configuration files; Among them, the analysis configuration file is used to configure whether to enable the NVMe protocol test analysis function; the error injection configuration file is used to set the error injection type and error injection data to guide the NVMe protocol error injection; 2) Sending NVMe protocol commands to the target storage device through the test software, and using the improved NVMe driver module to perform NVMe protocol test analysis; the improved NVMe driver module is obtained by modifying the NVMe standard driver module, including: NVMe standard driver module, used for standard NVMe protocol command processing, sending commands and data to the NVMe target storage device under test, and receiving the return status of the command; NVMe protocol monitoring module, used to monitor and record relevant information of NVMe protocol command processing flow in NVMe standard driver module; In the NVMe protocol monitoring module, information monitoring and recording include: When the kernel receives the NVMe protocol command, it records the Opcode, DWORD10 to 15, transmission data information, and kernel time when the NVMe command is received and returned; When the kernel allocates driver layer queue resources, it records the PCIe configuration space register, Bar register, CQID, SQID, Door Bell information and kernel time; After the kernel creates an SQ, it records the SQ information; After the kernel updates the SQ Door Bell register, record the updated SQ Door Bell; After the kernel completes the DMA data transfer, record the transferred data; After the kernel reads and processes the CQ, it reads the updated CQ information; After the kernel updates the CQ Door Bell register, record the updated CQ Door Bell register; At the same time, the kernel timestamp of each step of the above kernel processing is recorded; The NVMe protocol analysis module is used to summarize the information obtained by the NVMe protocol monitoring module in real time, and then parse the data information returned by the NVMe protocol command according to the NVMe protocol manual, and output it to the NVMe protocol analysis result file; The NVMe protocol error injection module is used to read the error injection configuration file and complete the NVMe protocol error injection in the kernel according to the error injection type and error injection data specified in the error injection configuration file; The NVMe protocol display module is used to parse the NVMe protocol analysis result file in real time, display its content as a UI interface to the user, and provide users with data search specified in the NVMe protocol.

2. The NVMe protocol test analysis method based on Linux according to claim 1, characterized in that, In the NVMe protocol analysis module, after parsing the data information returned by the NVMe protocol command, the real-time NVMe command and the protocol analysis result data are compressed and output; The compression algorithm uses Sequential Algorithms.

3. The NVMe protocol test analysis method based on Linux according to claim 1, characterized in that, In the NVMe protocol analysis module, the data returned by the NVMe protocol command includes Opcode, DWORD10 to 15, SQID, CQID, SQDoor Bell, CQ Door Bell, transmission data, corresponding kernel time, command processing results and abnormal error information.

4. The NVMe protocol test analysis method based on Linux according to claim 3, characterized in that, In the step 3) NVMe protocol analysis module, the error annotation sets established include command error annotation sets, SQ error annotation sets, SQ Door bell error annotation sets, transmission data error annotation sets, CQ error annotation sets and CQ Door Bell error annotation sets.

5. The NVMe protocol test analysis method based on Linux according to claim 1, characterized in that, The NVMe standard driver module in step 2) is a native NVMe driver module of the Linux operating system.

6. A Linux-based NVMe protocol test and analysis device, characterized in that: include: File configuration module, used to set error injection configuration files and analysis configuration files; Among them, the analysis configuration file is used to configure whether to enable the NVMe protocol test analysis function; the error injection configuration file is used to set the error injection type and error injection data to guide the NVMe protocol error injection module to perform error injection; NVMe standard driver module, used to receive NVMe protocol commands sent by the test software and perform standard NVMe protocol command processing, send commands and data to the NVMe target storage device under test, and finally return the command processing results to the test software; NVMe protocol monitoring module, used to monitor and record relevant information of the standard NVMe protocol command processing flow in the NVMe standard driver module; In the NVMe protocol monitoring module, information monitoring and recording include: When the kernel receives the NVMe protocol command, it records the Opcode, DWORD10 to 15, transmission data information, and kernel time when the NVMe command is received and returned; When the kernel allocates driver layer queue resources, it records the PCIe configuration space register, Bar register, CQID, SQID, Door Bell information and kernel time; After the kernel creates an SQ, it records the SQ information; After the kernel updates the SQ Door Bell register, record the updated SQ Door Bell; After the kernel completes the DMA data transfer, record the transferred data; After the kernel reads and processes the CQ, it reads the updated CQ information; After the kernel updates the CQ Door Bell register, record the updated CQ Door Bell register; At the same time, the kernel timestamp of each step of the above kernel processing is recorded; The NVMe protocol analysis module is used to summarize the information obtained by the NVMe protocol monitoring module in real time, and then parse the data information returned by the NVMe protocol command according to the NVMe protocol manual, and output it from the kernel to the NVMe protocol analysis result file through the virtual file system technology; The data returned by the NVMe protocol command includes Opcode, DWORD10 to 15, SQID, CQID, SQ Door Bell, CQ Door Bell, transmission data, corresponding kernel time, command processing results and abnormal error information; NVMe protocol error injection module, used to read the error injection configuration file, and complete the NVMe protocol error injection in the kernel according to the error injection type and error injection data specified in the error injection configuration file, including command error injection, SQ error injection, SQ Door bell error injection, transmission data error injection, CQ error injection, and CQ Door Bell error injection; The NVMe protocol display module is used to parse the NVMe protocol analysis result file in real time, display its content as a UI interface to the user, and provide users with data searches specified in the NVMe protocol, including Opcode, SQ, CQ, PCIe configuration registers, Door Bell, and command processing results.

7. An electronic device, characterized in that: include: one or more processors; as well as a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the method according to any one of claims 1 to 5.

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