Data transmission method, device, equipment and medium

By receiving and parsing submission queue entries in the disk array card controller, and using the direct memory access channel to realize bidirectional data transmission between the host and the controller, the problem of limited functions of the existing NVMe Admin commands in configuration management is solved, and efficient disk array card configuration management and rich error code return is achieved.

CN120104546APending Publication Date: 2025-06-06SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510344185.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The existing NVMe Admin commands have limited functions such as bidirectional data transmission and error code return in the configuration management of disk array cards, making it difficult to achieve efficient custom command interaction.

Method used

By receiving the submitted queue entries sent by the host in the disk array card controller, analyzing the data transmission direction and address, using the direct memory access channel to realize bidirectional data transmission between the host and the controller, and returning command execution results and error description information through the construction of the queue entries.

Benefits of technology

It realizes efficient configuration management of disk array cards, reduces command interaction between the host and the controller, improves data transmission efficiency, and supports the return of rich error codes and dynamic error description information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104546A_ABST
    Figure CN120104546A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method, device and equipment and a medium, relates to the technical field of data transmission, is applied to a disk array card controller, and comprises the following steps: receiving a submission queue entry corresponding to a disk array card command sent by a host; the submission queue entry comprises a data transmission direction, an operation object of a disk array card command, a length of transmission data, an address of the transmission data and a length of a data area; acquiring corresponding transmission data from the data area of the host based on the direct memory access channel through the data transmission direction determined according to the submission queue entry and the length of the transmission data; executing a disk array card command according to the transmission data, and obtaining a corresponding command execution result and data after command execution; and sending data after command execution to the host through the direct memory access channel, and returning a corresponding completion queue entry to the host based on a command execution result to complete data transmission. According to the invention, efficient bidirectional data transmission is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and in particular to a data transmission method, device, equipment and medium. Background Art

[0002] In the process of defining commands for RAID (Redundant Array of Independent Disks) cards, due to the single-directional data transmission (host to controller (H2C) data transmission, controller to host (C2H) data transmission) in traditional NVME (Non-Volatile Memory express) commands, there are many scenarios that are difficult to implement with traditional NVMe Admin commands. For example, in a query command, the host needs to carry some data to the controller for query. If the DW12-DW15 (Double Word, registry key value) field in the separate extended SQE (Submission Queue Entry) is limited in the number of extended bytes, the functions and compatibility of the defined commands are limited. Therefore, a large number of commands need to be customized, or multiple commands need to be sent to meet the user's functional requirements. For example, for some configuration commands, after the host sends and receives configuration data in the commands, after the controller parses the data and executes the commands, some response data needs to be returned to the host. However, according to traditional NVMe Admin command definition, because the data direction of the configuration management command can only be from the host to the controller, the current command definition implementation cannot directly return the information required by the host. In order to implement this function, the host needs to send a query command to obtain the information required by the host. For example, since the CQE (Completion Queue Entry) of the NVMe Admin custom command can only extend 255 return codes, when implementing the configuration management business of the RAID card, the host needs a large number of error codes during the interaction between the host and the controller, and even needs to return dynamic error description information of the command execution. In order to implement this function, the error description information needs to be placed in the command data area and transferred to the host, but the traditional NVMe Admin command host to controller unidirectional data transmission command cannot be implemented.

[0003] It can be seen that how to implement configuration management of disk array cards through efficient custom commands for bidirectional data transmission is a problem that those skilled in the art need to solve. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a data transmission method, device, equipment and medium, which can realize the configuration management of disk array cards through efficient custom commands for bidirectional data transmission. The specific scheme is as follows:

[0005] In a first aspect, the present invention provides a data transmission method, applied to a disk array card controller, comprising:

[0006] receiving a submission queue entry corresponding to a disk array card command sent by a host; the submission queue entry includes a data transmission direction, an operation object of the disk array card command, a length of the transmission data, an address of the transmission data, and a length of a data area; the data area is a data area for storing transmission data between the host and the disk array card controller;

[0007] Obtain corresponding transmission data from the data area of ​​the host based on the direct memory access channel by determining the data transmission direction and the length of the transmission data according to the submission queue entry;

[0008] Execute disk array card commands according to the transmitted data, and obtain corresponding command execution results and data after command execution;

[0009] The data after command execution is sent to the host through the direct memory access channel, and the corresponding completion queue entry is returned to the host based on the command execution result to complete the data transmission.

[0010] Optionally, before receiving the submission queue entry corresponding to the disk array card command sent by the host, the method further includes:

[0011] The host constructs a disk array card command; the disk array card command includes a disk redundant array query command and / or a disk redundant array management command; wherein the disk redundant array query command is used to obtain description information of target attributes of a disk redundant array management object; the disk redundant array management command is used to add, delete, and modify configuration information of a disk redundant array management object;

[0012] The host defines the data transmission direction between the host and the disk array card controller through the operation code field;

[0013] The host uses the target field to define the data area pointer of the operation object of the disk array card command, the length of the transmission data and the address of the transmission data;

[0014] The host defines the type, identifier, operation command type and length of the data area of ​​the operation object through the data pointer register field;

[0015] Based on the non-volatile memory host controller interface specification standard, a submission queue entry corresponding to the disk array card command is constructed according to the operation code field, the target field and the data pointer register field.

[0016] Optionally, before the host defines the type, identifier, operation command type and length of the data area of ​​the operation object through the data pointer register field, it also includes:

[0017] Apply for target memory on the host through the redundant disk array management tool and determine the target memory as the data area;

[0018] A physical area page list is constructed, and a data area pointer is filled into a data pointer register field according to the physical area page list; wherein the length of the data area is greater than or equal to the maximum length of the transmitted data.

[0019] Optionally, before obtaining corresponding transmission data from a data area of ​​a host based on a direct memory access channel by determining a data transmission direction and a length of the transmission data according to the submission queue entry, the method further includes:

[0020] A direct memory access channel of a high-speed serial computer expansion bus standard device is configured so that a host and a disk array card controller perform data transmission based on the direct memory access channel.

[0021] Optionally, a corresponding completion queue entry is returned to the host based on the command execution result, including:

[0022] According to the command execution result, determine whether the disk array card command is executed successfully and obtain the corresponding judgment result;

[0023] Constructing a complete queue entry based on the judgment result;

[0024] Returns the completion queue entry to the host.

[0025] Optionally, a completion queue entry is constructed based on the judgment result, including:

[0026] If the disk array card command is executed successfully, the length of the data after the command execution is written into the preset field, and a completion queue entry is constructed according to the preset field;

[0027] If the disk array card command execution fails, the error return code corresponding to the dynamic error description information of the command execution is written into the preset status field, and a completion queue entry is constructed according to the preset status field.

[0028] Optionally, after returning a corresponding completion queue entry to the host based on the command execution result, the following is further included:

[0029] The host parses the completion queue entry, obtains the error return code, and obtains the dynamic error description information of the corresponding command execution from the data area according to the error return code.

[0030] In a second aspect, the present invention provides a data transmission device, applied to a disk array card controller, comprising:

[0031] A submission queue entry receiving module is used to receive a submission queue entry corresponding to a disk array card command sent by a host; the submission queue entry includes a data transmission direction, an operation object of the disk array card command, a length of the transmission data, an address of the transmission data, and a length of a data area; the data area is a data area for storing transmission data between the host and the disk array card controller;

[0032] A transmission data acquisition module, used for acquiring corresponding transmission data from a data area of ​​a host based on a direct memory access channel by determining a data transmission direction and a length of the transmission data according to a submission queue entry;

[0033] The data and result acquisition module is used to execute the disk array card command according to the transmission data, and obtain the corresponding command execution result and the data after the command execution;

[0034] The completion queue entry return module is used to send the data after the command execution to the host through the direct memory access channel, and return the corresponding completion queue entry to the host based on the command execution result to complete the data transmission.

[0035] In a third aspect, the present invention provides an electronic device, comprising:

[0036] Memory for storing computer programs;

[0037] The processor is used to execute the computer program to implement the above-mentioned data transmission method.

[0038] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the aforementioned data transmission method when executed by a processor.

[0039] In the present invention, a disk array card controller receives a submission queue entry corresponding to a disk array card command sent by a host; the submission queue entry includes a data transmission direction, an operation object of the disk array card command, a length of transmission data, an address of transmission data, and a length of a data area; the data area is a data area for storing transmission data between the host and the disk array card controller; corresponding transmission data is obtained from the data area of ​​the host based on a direct memory access channel according to the data transmission direction and the length of transmission data determined by the submission queue entry; the disk array card command is executed according to the transmission data to obtain a corresponding command execution result and command execution data; the command execution data is sent to the host through the direct memory access channel, and a corresponding completion queue entry is returned to the host based on the command execution result to complete the data transmission.

[0040] Beneficial effect: The present invention sends the submission queue entry of the custom command to the disk array card controller through the host. Then, the disk array card controller parses the command data transmission direction and address, and moves the host data to the disk array card controller by configuring the direct memory access channel. Finally, the disk array card controller parses the data and executes the command, and moves the returned data to the host by configuring the channel, and returns the command execution result to the host by constructing the completion queue entry. In this way, a configuration management method for bidirectional data transmission of the disk array card based on custom commands is realized, so that the command interaction between the host and the controller is reduced, and the transmission efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 A flow chart of a data transmission method provided by an embodiment of the present invention;

[0043] Figure 2 A timing diagram of a specific data transmission method provided by an embodiment of the present invention;

[0044] Figure 3 A schematic diagram of the structure of a data transmission device provided by an embodiment of the present invention;

[0045] Figure 4 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.

[0048] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0049] According to the traditional NVMe Admin command definition, since the data direction of the configuration management command can only be from the host to the controller, the current command definition implementation cannot directly return the information required by the host. In order to implement this function, the host also needs to issue a query command to obtain the information required by the host. For example, since the CQE extensible return code of the NVMe Admin custom command is only 255, when implementing the configuration management business of the RAID card, during the interaction between the host and the controller, the host needs a large number of error codes, and even needs to return dynamic error description information of the command execution. In order to implement this function, the error description information needs to be placed in the command data area and transported to the host, but the traditional NVMe Admin command for the host to transmit data unidirectionally to the controller cannot be implemented. In order to solve the above technical problems, the present invention discloses a data transmission method, device, equipment and medium, which can realize the configuration management of the disk array card through efficient custom commands for two-way data transmission.

[0050] See also Figure 1 As shown, an embodiment of the present invention provides a data transmission method, which is applied to a disk array card controller, comprising:

[0051] Step S11, receiving a submission queue entry corresponding to a disk array card command sent by a host; the submission queue entry includes a data transmission direction, an operation object of the disk array card command, a length of the transmission data, an address of the transmission data, and a length of a data area; the data area is a data area for storing transmission data between the host and the disk array card controller.

[0052] In an embodiment of the present invention, in the traditional NVMe Admin command set, the data transmission direction of the query command is C2H, and the data transmission direction of the configuration management command is H2C. In the card RAID custom commands, the commands are divided into two categories according to the data operation type, RAID card query commands and RAID card configuration management commands. In a specific embodiment, the data transmitted by the present invention may be a RAID card configuration management command. The RAID card configuration management tool is divided according to the RAID business objects: RAID controller, RAID array, logical volume and physical disk, etc. The characteristics and status of each object can be represented by a series of attributes, and the host completes the management and control of the RAID system by reading or setting the attribute value of the object. Therefore, the configuration management function of the RAID card is the configuration management function for the above-mentioned various objects.

[0053] According to the basic format of NVMe Admin custom commands, the RAID card configuration management tool designs a set of basic rules for custom commands. The host sends RAID configuration commands in three parts: command code, command area, and data area. The command code corresponds to Opcodes in NVME command SQE, the command area corresponds to DW10-DW15 in NVME Admin command SQE, and the command data area corresponds to DPTR (Data Pointer) in NVME Admin command SQE. The command code encapsulates the command type constructed by the RAID card and the transmission direction of the data area; the command area encapsulates the object type (controller, array, logical volume and physical disk, other), operation type (add, delete, modify) and object ID parameter of the command; the data area encapsulates the attribute information and dynamic error description information of the command configuration or query object.

[0054] RAID card NVMe management commands belong to the manufacturer-defined command type in the NVMe Admin command set. These commands can be submitted to the NVMe Admin command queue. The NVMe standard defines the SQE structure of the basic Admin manufacturer-defined commands, as shown in Table 1.

[0055] Table 1

[0056]

[0057] Among them, the full name of PRP is Physical Region Page, which means physical region page; PRPs refers to PRP List, which means physical region page list (Physical Region Page List).

[0058] Therefore, before the disk array card controller receives the submission queue entry corresponding to the disk array card command sent by the host, the host constructs the disk array card command; the disk array card command includes a disk redundant array query command and / or a disk redundant array management command; wherein the disk redundant array query command is used to obtain the description information of the target attribute of the disk redundant array management object; the disk redundant array management command is used to add, delete and modify the configuration information of the disk redundant array management object; the host defines the data transmission direction between the host and the disk array card controller through the operation code field; the host uses the target field to define the data area pointer, the length of the transmission data and the address of the transmission data of the operation object of the disk array card command; the host defines the type, identifier, operation command type and data area length of the operation object through the data pointer register field; based on the non-volatile memory host controller interface specification standard, the submission queue entry corresponding to the disk array card command is constructed according to the operation code field, the target field and the data pointer register field. As can be seen from Table 1, in the SQE of the standard NVMe Admin custom command, DPTR defines the space address of the command data application, and CDW10 (Command Dword 10, a command used to define write parameters) defines the space size of the command application data area. The expandable custom area in the command includes Opcode, CDW12 to CDW15 field area. In the custom command specification of the RAID card configuration, the Opcode field defines the command type of the RAID command and the data transmission direction, and CDW12 to CDW15 define the operation object (object type and object ID) of the RAID command, the operation command type (addition, deletion, modification) and the length of the data area and other parameters. DPTR defines the data area pointer of the operation object in the RAID command, and the data address of the configuration or query object will be encapsulated in this area.

[0059] In addition, before the host defines the type, identifier, operation command type and length of the data area of ​​the operation object through the data pointer register field, the host applies for the target memory on the host through the disk redundant array management tool, and determines the target memory as the data area; constructs a physical area page list, and fills the data area pointer into the data pointer register field according to the physical area page list; wherein the length of the data area is greater than or equal to the maximum length of the transmitted data. In other words, the configuration management tool applies for a data area on the host, stores the data that the command needs to transmit in the data area, and encapsulates the address of the data area in the PRPs of the SQE. This data area stores all the data transmitted between the disk array card controller and the host.

[0060] In the embodiment of the present invention, when the host sends a disk array card command, it will construct a submission queue entry. When constructing the command SQE, the following fields need to be set: Opcode in CDW0 sets the command operation code; a memory is applied on the host to store the data transmitted between the host and the controller (bidirectional transmission), a PRP List is constructed and the pointer is filled into the DPTR field, the length of the memory is filled into the CDW10 field, and the length of the memory is not less than the maximum length of the data transmission; the operation object information and operation type defined by the command are filled into the control area CDW12; the real length of the issued data defined by the command is filled into the control area CDW13. Then the disk array card controller receives the submission queue entry corresponding to the disk array card command sent by the host. Among them, the submission queue entry includes the data transmission direction, the operation object of the disk array card command, the length of the transmitted data and the address of the transmitted data, and the length of the data area. Then the RAID controller parses the Opcodes field in SQE to determine the direction and length of the data transmission.

[0061] Step S12: Acquire corresponding transmission data from the data area of ​​the host based on the direct memory access channel by determining the data transmission direction and the length of the transmission data according to the submission queue entry.

[0062] In the embodiment of the present invention, a direct memory access channel of a high-speed serial computer expansion bus standard device is configured, and the host and the disk array card controller can perform data transmission based on the direct memory access channel. That is, the DMA (Direct Memory Access) channel of PCIeEP (Peripheral Component Interconnect Express Endpoint, a terminal node in the PCIe bus topology) is configured to move data from the host to the cache inside the controller according to the data transmission direction determined by the submission queue entry and the length of the transmission data.

[0063] Step S13: Execute the disk array card command according to the transmitted data, and obtain the corresponding command execution result and command execution data.

[0064] In the embodiment of the present invention, the disk array card controller parses the transmission data, executes the command, and waits for the command processing result and the data after the command execution. For example, if the current command is a configuration command, the disk array card controller parses the transmission data, and then executes the configuration command according to the parsed data. After the configuration is completed, the execution result of the configuration completion and various configuration data after the configuration is completed are obtained.

[0065] Step S14: Send the data after the command execution to the host through the direct memory access channel, and return the corresponding completion queue entry to the host based on the command execution result to complete the data transmission.

[0066] In an embodiment of the present invention, after the disk array card controller obtains the corresponding command execution result and the data after the command execution, it will send the data after the command execution to the host through the direct memory access channel, and return the corresponding completion queue entry to the host based on the command execution result. In the process of returning the corresponding completion queue entry to the host based on the command execution result, it is judged whether the disk array card command is executed successfully according to the command execution result, and the corresponding judgment result is obtained; the completion queue entry is constructed according to the judgment result; and the completion queue entry is returned to the host. More specifically, if the disk array card command is executed successfully, the length of the data after the command execution is written into the preset field, and the completion queue entry is constructed according to the preset field; if the disk array card command fails to execute, the error return code corresponding to the dynamic error description information of the command execution is written into the preset status field, and the completion queue entry is constructed according to the preset status field. Among them, the real length of the returned data is filled in CDW0. The command return code is filled in the Status Field.

[0067] It should be pointed out that the NVMe standard defines the CQE structure of the basic Admin vendor custom command as shown in Table 2.

[0068] Table 2

[0069]

[0070] In the CQE of the standard NVMe Admin custom command, the defined extensible custom areas include CDW0 and the custom error code segment area in the Status Field. In the custom command specification for RAID card configuration, CDW0 defines the actual length of the data returned by the controller to the host in the RAID command. The return code of the RAID command execution status is defined in the StatusField custom area, and the return code defined in the protocol can only represent fixed error description information. When implementing the configuration management service of the RAID card, during the interaction between the host and the controller, the host requires a large number of error codes, and even needs to return dynamic error description information of the command execution. In order to achieve this function, the present invention proposes to define a general error code in the custom area of ​​the Status Field, indicating that the specific error information is obtained in the returned data area. After the host receives the general error code parsed by CQE and returns, it parses the error description information of the data area pointed to by PRP. At the same time, the data area of ​​the RAID configuration command encapsulates the attribute information and dynamic error description information of the command configuration or query object. The object attributes in the data area use the TLV (Tagid, Length, Value) format for data encapsulation. Tagid represents the number of the object attribute, and each TLV represents an attribute of the RAID object. Multiple attributes can be encapsulated into a data area consisting of multiple TLVs. The dynamic error description information returned after the command execution fails is also an attribute of the object.

[0071] In addition, after returning the corresponding completion queue entry to the host based on the command execution result, the host will parse the completion queue entry, obtain the error return code, and obtain the dynamic error description information of the corresponding command execution from the data area according to the error return code. At this point, complete two-way data transmission is achieved.

[0072] When the host and the disk array card controller perform bidirectional data transmission, in addition to data transmission by configuring the DMA channel of the PCIe EP, data transmission between the host and the RAID card can also be achieved through the PCIe Switch expansion. Specifically, the host is connected to the upstream port of the Switch through the PCIe slot, and the RAID card is connected to the downstream port of the Switch through the PCIe link, forming a multi-level expansion structure, breaking through the end-to-end connection limitation of the PCIe link, and each link uses full-duplex differential signal transmission. At the same time, the Switch parses and forwards transaction layer packets, supports address mapping, traffic priority division and error detection, and ensures reliable data transmission between the host and the RAID card. Efficient access to cross-network RAID storage pools is achieved through the Switch, adapting to distributed storage scenarios.

[0073] Beneficial effect: The present invention sends the submission queue entry of the custom command to the disk array card controller through the host. Then, the disk array card controller parses the command data transmission direction and address, and moves the host data to the disk array card controller by configuring the direct memory access channel. Finally, the disk array card controller parses the data and executes the command, and moves the returned data to the host by configuring the channel, and returns the command execution result to the host by constructing the completion queue entry. In this way, a configuration management method for bidirectional data transmission of the disk array card based on custom commands is realized, so that the command interaction between the host and the controller is reduced, and the transmission efficiency is improved.

[0074] In the embodiment of the present invention, in the standard NVMe Admin command, the Opcode field defines the type of command, wherein two bits define the data transfer direction of the data area (Data Transfer), 01 represents the host to controller transmission, and 10 represents the controller to host data transmission. In the present invention, the Data Transfer value is defined as 11 in the RAID card custom command, representing bidirectional data transmission between the host and the controller.

[0075] The NVME Admin custom commands of the RAID card configuration management tool can include RAID query commands, RAID conditional query commands, RAID management commands, and RAID management commands with responses. Among them, the RAID query command is used to query the full attribute description information about the RAID management object. The data transmission direction in the command sent by the host is from the host to the controller. The RAID query command uses the CDW12 field of the SQE structure. CDW12 defines the operation object information of the command, as shown in Table 3 below. The CDW0 field in the CQE structure and the DPTR of the SQE structure are used in the command result. The CDW0 field defines the length of the full information data obtained by the command operation object, and the data area pointed to by DPTR carries the query data result.

[0076] Table 3

[0077]

[0078] The RAID conditional query command is used to obtain the descriptive information of the specified attributes (one or more) of the RAID management object. The data transmission direction in the command sent by the host is bidirectional. The DPTR, CDW12 and CDW13 fields in the SQE structure are used when the command is sent. The data area pointed to by DPTR carries the query condition data; CDW12 defines the operation object information of the command, and CDW13 defines the query condition data length sent by the command. In the command return result, CDW0 in the CQE structure and DPTR of the SQE structure are used. CDW0 defines the length of the query data result of the command operation object, and the data area pointed to by DPTR carries the conditional query result data.

[0079] RAID management commands are used to add, delete, and modify the configuration information of RAID management objects. The data transmission direction in the command sent by the host is from the controller to the host. When the command is sent, the command uses the DPTR, CDW10, and CDW12 fields in the SQE structure. The data area pointed to by DPTR carries the data of the configuration management object, and CDW12 defines the operation object information and operation type of the command, as shown in Table 4 below. In the command return result, no special definition fields are used in the CQE structure.

[0080] Table 4

[0081]

[0082] RAID management commands with responses are used to add, delete, and modify the configuration information of RAID management objects. The data transmission direction in the command sent by the host is bidirectional. The sent command uses the DPTR, CDW12, and CDW13 fields in the SQE structure. The data area pointed to by DPTR carries the configured data. CDW12 defines the operation object information and operation type of the command. CDW13 defines the length of the configuration data sent by the command. The command result uses CDW0 in the CQE structure and the DPTR of the SQE structure. CDW0 defines the length of the data returned by the command result. The data area pointed to by DPTR carries the detailed results after the command is executed.

[0083] In the bidirectional data output mode from the host to the RAID card controller, the interactive steps of the RAID conditional query command and the RAID response management command are as follows: Figure 2 shown.

[0084] First, the host constructs a RAID attribute management command and needs to set the following fields when constructing the command SQE:

[0085] Opcode in CDW0 sets the command operation code;

[0086] Apply for a block of memory on the host to store the data transmitted between the host and the controller (bidirectional transmission), construct a PRP List and fill the pointer into the DPTR field, fill the length of the memory into the CDW10 field, and the length of the memory shall not be less than the maximum length of data transmission;

[0087] Fill the operation object information and operation type defined by the command into the control area CDW12;

[0088] Fill the actual length of the data to be sent defined by the command into the control area CDW13.

[0089] Then, the host sends the command to the RAID controller. The RAID controller parses the Opcodes field in the SQE to determine the data transmission direction and length. Configure the DMA channel of the PCIe EP to transfer the data from the host to the cache inside the controller. Parse the command and data, and execute the command. Configure the DMA channel of the PCIe EP to transfer the command result data to the host. Construct a CQE and return it to the host. Among them, the CQE fills the actual length of the returned data into CDW0. Fill the command return code into the StatusField. Finally, the host receives the CQE. The command processing ends.

[0090] Beneficial effects: The present invention proposes to formulate the NVMe Admin custom command protocol for adding, deleting, modifying, and querying the operation object attributes of the RAID card. The custom command protocol of the RAID card is formulated uniformly and simply, with strong scalability. The configuration management method for bidirectional data transmission reduces the command interaction between the host and the controller and improves the transmission efficiency. At the same time, the RAID card configuration management protocol has wide applicability.

[0091] See Figure 3 As shown, an embodiment of the present invention provides a data transmission device, which is applied to a disk array card controller and includes:

[0092] A submission queue entry receiving module 11, configured to receive the submission queue entry corresponding to the disk array card command sent by the host; the submission queue entry includes the data transmission direction, the operation object of the disk array card command, the length of the transmitted data, the address of the transmitted data, and the length of the data area; the data area is the data area for storing the data transmitted between the host and the disk array card controller;

[0093] A transmitted data acquisition module 12, configured to acquire the corresponding transmitted data from the data area of the host based on the data transmission direction and the length of the transmitted data determined according to the submission queue entry through the direct memory access channel;

[0094] A data and result acquisition module 13, configured to execute the disk array card command according to the transmitted data, and acquire the corresponding command execution result and the data after the command execution;

[0095] The completion queue entry returning module 14 is used to send the data after the command execution to the host through the direct memory access channel, and return the corresponding completion queue entry to the host based on the command execution result to complete the data transmission.

[0096] Since the embodiments of the device part correspond to the above embodiments, please refer to the description of the embodiments of the method part for the embodiments of the device part, and will not be repeated here.

[0097] Beneficial effect: The present invention sends the submission queue entry of the custom command to the disk array card controller through the host. Then, the disk array card controller parses the command data transmission direction and address, and moves the host data to the disk array card controller by configuring the direct memory access channel. Finally, the disk array card controller parses the data and executes the command, and moves the returned data to the host by configuring the channel, and returns the command execution result to the host by constructing the completion queue entry. In this way, a configuration management method for bidirectional data transmission of the disk array card based on custom commands is realized, so that the command interaction between the host and the controller is reduced, and the transmission efficiency is improved.

[0098] Furthermore, the present application also discloses an electronic device. Figure 4 It is a structural diagram of an electronic device according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the data transmission method disclosed in any of the aforementioned embodiments. In addition, the electronic device in this embodiment may specifically be an electronic computer.

[0099] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0100] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0101] The operating system 221 is used to manage and control various hardware devices on the electronic device and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the data transmission method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0102] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed data transmission method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.

[0103] Furthermore, the present application also discloses a computer program product, including a computer program / instruction; wherein the computer program / instruction, when executed by a processor, implements the aforementioned disclosed data transmission method. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.

[0104] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0105] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0106] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0107] Finally, it should be noted that, in this article, relational terms such as first and second, etc. 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 terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0108] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data transmission method, characterized in that: Applicable to disk array card controllers, including: receiving a submission queue entry corresponding to a disk array card command sent by a host; the submission queue entry includes a data transmission direction, an operation object of the disk array card command, a length of the transmission data, an address of the transmission data, and a length of a data area; the data area is a data area for storing transmission data between the host and the disk array card controller; Acquire corresponding transmission data from a data area of ​​the host based on a direct memory access channel by determining a data transmission direction and a length of the transmission data according to the submission queue entry; Execute the disk array card command according to the transmission data, and obtain the corresponding command execution result and command execution data; The command-executed data is sent to the host through the direct memory access channel, and a corresponding completion queue entry is returned to the host based on the command execution result to complete the data transmission.

2. The data transmission method according to claim 1, characterized in that: Before receiving the submission queue entry corresponding to the disk array card command sent by the host, the method further includes: The host constructs a disk array card command; the disk array card command includes a disk redundant array query command and / or a disk redundant array management command; wherein the disk redundant array query command is used to obtain description information of a target attribute of a disk redundant array management object; the disk redundant array management command is used to add, delete, or modify configuration information of a disk redundant array management object; The host defines the data transmission direction between the host and the disk array card controller through the operation code field; The host uses the target field to define the data area pointer of the operation object of the disk array card command, the length of the transmission data and the address of the transmission data; The host defines the type, identifier, operation command type and length of the data area of ​​the operation object through the data pointer register field; The submission queue entry corresponding to the disk array card command is constructed according to the operation code field, the target field and the data pointer register field based on the non-volatile memory host controller interface specification standard.

3. The data transmission method according to claim 2, characterized in that: Before the host defines the type, identifier, operation command type and length of the data area of ​​the operation object through the data pointer register field, it also includes: Applying for a target memory on the host through a redundant array of disks management tool, and determining the target memory as the data area; A physical area page list is constructed, and the data area pointer is filled into the data pointer register field according to the physical area page list; wherein the length of the data area is greater than or equal to the maximum length of the transmission data.

4. The data transmission method according to claim 1, characterized in that: Before acquiring corresponding transmission data from the data area of ​​the host based on a direct memory access channel by determining the data transmission direction and the length of the transmission data according to the submission queue entry, the method further includes: A direct memory access channel of a high-speed serial computer expansion bus standard device is configured so that the host and the disk array card controller perform data transmission based on the direct memory access channel.

5. The data transmission method according to any one of claims 1 to 4, characterized in that: The returning a corresponding completion queue entry to the host based on the command execution result comprises: Determine whether the disk array card command is executed successfully according to the command execution result, and obtain the corresponding determination result; Constructing the completion queue entry according to the determination result; The completion queue entry is returned to the host.

6. The data transmission method according to claim 5, characterized in that: The constructing the completion queue entry according to the determination result includes: If the disk array card command is executed successfully, the length of the data after the command is executed is written into a preset field, and the completion queue entry is constructed according to the preset field; If the disk array card command execution fails, the error return code corresponding to the dynamic error description information of the command execution is written into the preset status field, and the completion queue entry is constructed according to the preset status field.

7. The data transmission method according to claim 6, characterized in that: After returning the corresponding completion queue entry to the host based on the command execution result, the method further includes: The host parses the completion queue entry, obtains the error return code, and obtains dynamic error description information of the corresponding command execution from the data area according to the error return code.

8. A data transmission device, characterized in that: Applicable to disk array card controllers, including: A submission queue entry receiving module is used to receive a submission queue entry corresponding to a disk array card command sent by a host; the submission queue entry includes a data transmission direction, an operation object of the disk array card command, a length of the transmission data, an address of the transmission data, and a length of a data area; the data area is a data area for storing transmission data between the host and the disk array card controller; A transmission data acquisition module, configured to acquire corresponding transmission data from a data area of ​​the host based on a direct memory access channel by determining a data transmission direction according to the submission queue entry and a length of the transmission data; A data and result acquisition module, used to execute the disk array card command according to the transmission data, and obtain the corresponding command execution result and command execution data; The completion queue entry returning module is used to send the data after the command execution to the host through the direct memory access channel, and return the corresponding completion queue entry to the host based on the command execution result to complete the data transmission.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the data transmission method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 7 are implemented.