A drive test method and system

By calling the standardized Verbs interface in the DSP bare core simulation environment and creating protection domains and queue pairs, the problem of RDMA driver lacking standard APIs is solved, and the RDMA driver's unified API interface is realized, which reduces development difficulty and improves the flexibility of cross-platform migration.

CN119988177BActive Publication Date: 2025-07-08NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510466717.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-07-08
Estimated Expiration
2045-04-15

AI Technical Summary

Technical Problem

In the DSP naked core simulation environment, RDMA driver lacks standardized API, resulting in high development difficulty and poor cross-platform portability flexibility.

Method used

By calling the standardized Verbs interface, we create protection domains, register memory space, create and initialize queue pairs, and perform data transmission and event processing in the DSP simulation platform to provide a unified API interface.

Benefits of technology

It significantly reduces the development difficulty of RDMA drivers, improves the flexibility of cross-platform migration, and ensures the compatibility and efficiency of RDMA drivers on different simulation platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988177B_ABST
    Figure CN119988177B_ABST
Patent Text Reader

Abstract

This application relates to a driving test method and system. In this application, by calling a standardized Verbs interface, a protection domain is created, a memory space is registered, a completion queue and a queue pair are created, and the queue pair is initialized. The state of the queue pair is modified to the ready state, and a work request is submitted to start data transmission. The completion queue is polled to obtain and process the completion event of the work request, so as to implement the basic functions of the RDMA driver, provide a unified API interface for the RDMA driver verification test in the DSP bare core simulation environment, avoid developing specific versions of the RDMA driver API for different simulation platforms, significantly reduce the development difficulty of the RDMA driver, and improve the flexibility of cross-platform transplantation of the RDMA driver.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of drive testing, and particularly relates to a drive testing method and system. Background Art

[0002] With the growth of high-performance computing requirements (such as in the fields of artificial intelligence, big data processing, cloud computing, etc.) and the increasing demand for real-time performance and low latency, RDMA (Remote Direct Memory Access) technology has gradually been introduced into the DSP (Digital Signal Processing) system to accelerate data transmission and improve overall performance. In the DSP bare core environment, without the high-level services provided by the operating system (such as memory mapping, interrupt handling, etc.), the RDMA driver must manage functions such as memory mapping and interrupt handling by itself. Therefore, it is necessary to develop a lightweight but fully functional RDMA driver.

[0003] Before the RDMA driver is applied to an actual DSP device, it generally needs to be verified and tested in a DSP simulation platform. However, currently, when implementing RDMA in a DSP bare core simulation environment, there is a problem of lacking a standardized API (Application Programming Interface). Due to the lack of a unified standard, it is necessary to develop specific versions of the RDMA driver API for different simulation platforms, which not only increases the development difficulty of the RDMA driver but also limits the flexibility of cross-platform transplantation of the RDMA driver. Summary of the Invention

[0004] The purpose of this application is to provide a drive testing method and system. The drive testing method and system provided by this application implement the basic functions of the RDMA driver by calling the standardized Verbs interface, providing a unified API interface for the verification and testing of the RDMA driver in the DSP bare core simulation environment, avoiding the development of specific versions of the RDMA driver API for different simulation platforms, significantly reducing the development difficulty of the RDMA driver, and enhancing the flexibility of cross-platform transplantation of the RDMA driver.

[0005] The technical solution provided by this application is as follows:

[0006] A drive testing method is applied to the testing of a Remote Direct Memory Access (RDMA) driver in a DSP simulation platform. The method includes:

[0007] Build a DSP bare core simulation environment and configure the initial values of the simulation registers;

[0008] Call the standardized Verbs interface to create a protection domain, register memory space, create a completion queue and a queue pair, initialize the queue pair, modify the state of the queue pair to the ready state, submit a work request to start data transfer, and poll the completion queue to obtain and process the completion event of the work request;

[0009] Generate test data, configure the test environment, trigger the test data transfer, record the performance metrics during the test data transfer, check the memory data and the completion events in the completion queue, verify the correctness and integrity of the test data transfer, and obtain the simulation test results of the RDMA driver.

[0010] Optionally, the Verbs interface includes a first sub-interface to an eighth sub-interface. The call to the standardized Verbs interface to create a protection domain, register memory space, create a completion queue and a queue pair, initialize the queue pair, modify the state of the queue pair to the ready state, submit a work request to start data transfer, and poll the completion queue to obtain and process the completion event of the work request includes:

[0011] Call the first sub-interface to allocate a protection domain for the RDMA operation;

[0012] Call the second sub-interface to register the memory space so that the memory space can be remotely accessed;

[0013] Call the third sub-interface to create a completion queue;

[0014] Call the fourth sub-interface to create a queue pair, where the queue pair includes a send queue and a receive queue, and initialize the send queue and the receive queue;

[0015] Call the fifth sub-interface to modify the state of the send queue and the receive queue to the ready state;

[0016] Call the sixth sub-interface to submit a send work request to the send queue, and call the seventh sub-interface to submit a receive work request to the receive queue to start data transfer;

[0017] Call the eighth sub-interface to poll the completion queue to obtain and process the completion event of the work request.

[0018] Optionally, the call to the fourth sub-interface to create a queue pair, where the queue pair includes a send queue and a receive queue, and initialize the send queue and the receive queue includes:

[0019] Call the fourth sub-interface to create a queue pair, where the queue pair includes a send queue and a receive queue;

[0020] Allocate contiguous memory space for the said transmission queue and the said reception queue;

[0021] Initialize the structure of the said transmission queue and the structure of the said reception queue;

[0022] Configure the attributes of the said queue pair.

[0023] Optionally, the initialization of the structure of the said transmission queue and the structure of the said reception queue includes:

[0024] Initialize and set the depth, width, and address information of the structure of the said transmission queue and the structure of the said reception queue.

[0025] Optionally, the configuration of the attributes of the said queue pair includes:

[0026] Set the initial values of the current index and the maximum capacity of the said queue pair;

[0027] Set the status of the said queue pair to the initial state.

[0028] Optionally, the work request includes: work request index, operation code, starting address, and length.

[0029] This application also provides a driver test system, which is applied to the test of the Remote Direct Memory Access (RDMA) driver in the DSP simulation platform. The system includes:

[0030] A configuration module, which is used to build a DSP bare core simulation environment and configure the initial values of the simulation registers;

[0031] A creation module, which is used to call the standardized Verbs interface, create a protection domain, register the memory space, create a completion queue and a queue pair, initialize the said queue pair, modify the status of the said queue pair to the ready state, submit a work request to start data transmission, and poll the completion queue to obtain and process the completion event of the said work request;

[0032] A test module, which is used to generate test data, configure the test environment, trigger the said test data transmission, record the performance metrics during the said test data transmission, check the memory data and the completion events in the completion queue, verify the correctness and integrity of the said test data transmission, and obtain the simulation test results of the said RDMA driver.

[0033] Optionally, the Verbs interface includes a first sub-interface to an eighth sub-interface. When the creation module executes the call to the standardized Verbs interface to create a protection domain, register a memory space, create a completion queue and a queue pair, and initialize the queue pair, modify the state of the queue pair to the ready state, submit a work request to start data transmission, and poll the completion queue to obtain and process the completion event of the work request, it is specifically used for:

[0034] Call the first sub-interface to allocate a protection domain for the RDMA operation;

[0035] Call the second sub-interface to register the memory space so that the memory space can be remotely accessed;

[0036] Call the third sub-interface to create a completion queue;

[0037] Call the fourth sub-interface to create a queue pair, where the queue pair includes a send queue and a receive queue, and initialize the send queue and the receive queue;

[0038] Call the fifth sub-interface to modify the states of the send queue and the receive queue to the ready state;

[0039] Call the sixth sub-interface to submit a send work request to the send queue, and call the seventh sub-interface to submit a receive work request to the receive queue to start data transmission;

[0040] Call the eighth sub-interface to poll the completion queue to obtain and process the completion event of the work request.

[0041] Optionally, when the creation module executes the call to the fourth sub-interface to create a queue pair, where the queue pair includes a send queue and a receive queue, and initialize the send queue and the receive queue, it is specifically used for:

[0042] Call the fourth sub-interface to create a queue pair, where the queue pair includes a send queue and a receive queue;

[0043] Allocate continuous memory space to the send queue and the receive queue;

[0044] Initialize the structure of the send queue and the structure of the receive queue;

[0045] Configure the attributes of the queue pair.

[0046] Optionally, when the creation module executes the initialization of the structure of the send queue and the structure of the receive queue, it is specifically used for:

[0047] Initialize and set the depth, width, and address information of the structure of the sending queue and the structure of the receiving queue.

[0048] Compared with the prior art, a drive test method and system provided by the present application are applied to the test of a remote direct memory access (RDMA) drive in a DSP simulation platform. By building a DSP bare core simulation environment, configuring the initial values of simulation registers, then calling a standardized Verbs interface, creating a protection domain, registering a memory space, creating a completion queue and a queue pair, and initializing the queue pair, changing the state of the queue pair to the ready state, submitting a work request to start data transmission, polling the completion queue to obtain and process the completion event of the work request, thereby generating test data, configuring the test environment, triggering test data transmission, and recording performance metrics during the test data transmission, checking the memory data and the completion events in the completion queue, verifying the correctness and integrity of the test data transmission, and obtaining the simulation test result of the RDMA drive. In the present application, by calling a standardized Verbs interface, creating a protection domain, registering a memory space, creating a completion queue and a queue pair, and initializing the queue pair, changing the state of the queue pair to the ready state, submitting a work request to start data transmission, polling the completion queue to obtain and process the completion event of the work request, the basic functions of the RDMA drive are implemented, providing a unified API interface for the verification test of the RDMA drive in the DSP bare core simulation environment, avoiding developing specific versions of the RDMA drive API for different simulation platforms, significantly reducing the development difficulty of the RDMA drive, and improving the flexibility of cross-platform transplantation of the RDMA drive. Description of the Drawings

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0050] Figure 1 It is a flowchart of a drive test method disclosed in an embodiment of the present application;

[0051] Figure 2 It is a schematic structural diagram of a drive test system provided in an embodiment of the present invention. Detailed Embodiments

[0052] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.

[0053] It should be noted that when an element is referred to as "fixed to" or "disposed on" another element, it can be directly on the other element or indirectly disposed on the other element; when an element is referred to as "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.

[0054] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of this application, the meaning of "a plurality of" and "several" is two or more, unless otherwise specifically defined.

[0055] As Figure 1 shown, the embodiment of this application provides a drive test method, which is applied to the test of the Remote Direct Memory Access (RDMA) drive in the DSP simulation platform. The method includes:

[0056] S1. Build a DSP bare core simulation environment and configure the initialization values of the simulation registers;

[0057] In this embodiment, the DSP bare core simulation environment is reset and initialized, the program entry point is set, the boot loader is used to jump to the main application entry point, the memory layout is set, the system memory mapping is defined, including the stack position, global variable area, etc., the DSP registers are set, and the PHY (Physical Layer) switch register, cache switch register, bypass switch register, etc. are set according to the requirements of the simulation environment. The register values on some RDMA network interface cards are initialized, such as initializing the group identifier GID of the MAC address (i.e., Media Access Control address) of the device, and initializing the peripherals as needed.

[0058] S2. Call the standardized Verbs interface, create a protection domain, register the memory space, create a completion queue and a queue pair, and initialize the queue pair. Modify the state of the queue pair to the ready state, submit a work request to start data transmission, and poll the completion queue to obtain and process the completion event of the work request;

[0059] In this embodiment, the standardized Verbs interface is a set of software interfaces in the standard C language library for using the Remote Direct Memory Access (RDMA) service. By calling the standardized Verbs interface, a protection domain for managing subsequent memory spaces and queue pair resources is created. Through registering the memory space, the memory space is allowed for remote read or write operations. A completion queue for receiving and storing completed work request entries and a queue pair for managing and tracking the transmission of data packets are created, and the queue pair is initialized. The status of the queue pair is modified to the ready state to make the queue pair ready for data transmission. Send work requests and receive work requests can be submitted to initiate data transmission. Poll the completion queue to obtain the completion events of the work requests and process the corresponding completion events, which can implement the basic logic and basic functions of RDMA and provide a unified API interface for the RDMA driver verification test in the DSP bare core simulation environment.

[0060] S3. Generate test data, configure the test environment, trigger the test data transmission, record the performance metrics during the test data transmission, check the memory data and the completion events in the completion queue, verify the correctness and integrity of the test data transmission, and obtain the simulation test results of the RDMA driver.

[0061] In this embodiment, generating test data can be generating random data or generating data with a specific pattern. A checksum can be added during data generation to verify the integrity of the data after transmission. Configuring the test environment can be to ensure that the test environment supports the RDMA function and simulate different network topologies (such as single-node, multi-node, etc.) to evaluate the performance of RDMA in different environments. Triggering the test data transmission can be to test different RDMA transmission modes to ensure that each mode works correctly, simulate multi-threaded or multi-process concurrent transmission to evaluate the performance of RDMA under high load conditions, and inject network errors (such as packet loss, latency, out-of-order, etc.) during the transmission to verify the fault tolerance of the RDMA driver. Recording performance metrics can be to record key performance metrics such as throughput, latency, and memory bandwidth, analyze their change trends, monitor the usage of system resources to ensure that the RDMA driver does not consume excessive resources, and detailedly record the log information during the test process, including error messages, warning messages, etc., for subsequent analysis. Checking the memory data and completion events in the completion queue can be to check whether the data in the receiving-end memory is consistent with the sending-end to ensure that the data is not tampered with or lost during transmission, check the completion events in the completion queue to ensure that each transmission operation is correctly completed and there are no missed or duplicate events, and check the error events in the completion queue to verify whether the RDMA driver can correctly handle errors during transmission. Verifying the correctness and integrity of the test data transmission can be to use the pre-generated checksum to verify whether the received data is complete and correct, test the boundary conditions of the test data transmission (such as the maximum transmission unit, minimum data packet, etc.) to ensure that the RDMA driver can work properly under various extreme conditions, and verify whether the RDMA driver can correctly retransmit data in case of transmission failure to ensure the reliability of the data. Obtaining the simulation test results of the RDMA driver can be to obtain the simulation test results of the RDMA driver based on the performance metrics recorded during the test data transmission, the inspection results of the memory data and completion events in the completion queue, and the verification results of the correctness and integrity of the test data transmission.

[0062] Compared with the prior art, a drive test method and system provided by the present application are applied to the test of the Remote Direct Memory Access (RDMA) drive in the DSP simulation platform. By building a DSP bare core simulation environment, configuring the initial values of the simulation registers, then calling the standardized Verbs interface to create a protection domain, registering the memory space, creating a completion queue and a queue pair, and initializing the queue pair, modifying the state of the queue pair to the ready state, submitting a work request to start data transmission, polling the completion queue to obtain and process the completion event of the work request, thereby generating test data, configuring the test environment, triggering the test data transmission, and recording the performance metrics during the test data transmission, checking the memory data and the completion events in the completion queue, verifying the correctness and integrity of the test data transmission, and obtaining the simulation test result of the RDMA drive. In the present application, by calling the standardized Verbs interface to create a protection domain, registering the memory space, creating a completion queue and a queue pair, and initializing the queue pair, modifying the state of the queue pair to the ready state, submitting a work request to start data transmission, and polling the completion queue to obtain and process the completion event of the work request, the basic functions of the RDMA drive are realized, providing a unified API interface for the verification test of the RDMA drive in the DSP bare core simulation environment, avoiding developing specific versions of the RDMA drive API for different simulation platforms, significantly reducing the development difficulty of the RDMA drive, and improving the flexibility of cross-platform transplantation of the RDMA drive.

[0063] As an implementation, in the embodiment of the present application, the Verbs interface includes a first sub-interface to an eighth sub-interface. Step S2 includes:

[0064] S21. Call the first sub-interface to allocate a protection domain for the RDMA operation;

[0065] In this embodiment, the first sub-interface can be the ibv_alloc_pd() interface. By calling the ibv_alloc_pd() interface, a protection domain can be allocated for the RDMA operation, and subsequent memory space and queue pair resources can be managed through the protection domain. In the bare core environment, it is necessary to directly operate the registers on the RDMA network interface card for initialization. At the software level, a corresponding C language structure is created for each newly allocated protection domain to save the relevant information of the protection domain, such as the ID of the protection domain, status flags, etc. In the bare core environment, the conversion from virtual address to physical address must be processed, and memory space must be allocated for the structure of the created protection domain.

[0066] S22. Call the second sub-interface to register the memory space so that the memory space can be remotely accessed;

[0067] In this embodiment, the second sub-interface can be the ibv_reg_mr() interface. The ibv_reg_mr() interface can be called to register a memory space, identify the accessible memory space in the physical address space, thereby allowing remote read or write operations. This process requires passing in information pointing to the protection domain to associate the newly created memory space. The virtual address parameter of the interface can be allocated as a physical address according to the actual address space in the DSP bare core simulation environment, reducing unnecessary virtual-to-physical address conversions. Information such as the memory space size, access permissions, and starting address of the memory space can be set according to the parameters passed in by the application program to complete the initialization of the memory space-related structure.

[0068] S23. Call the third sub-interface to create a completion queue.

[0069] In this embodiment, the third sub-interface can be the ibv_create_cq() interface. The ibv_create_cq() interface can be called to create a completion queue, receive and store the completed work request entries through the completion queue, construct the structure related to the completion queue, and allocate continuous memory space. By passing in the number of completion queue entries and the context information of the RDMA device by the application program, information such as the starting address and length of the completion queue can be set according to the environmental requirements to perform the initialization settings of the completion queue-related structure.

[0070] S24. Call the fourth sub-interface to create a queue pair. The queue pair includes a send queue and a receive queue, and initialize the send queue and the receive queue.

[0071] In this embodiment, the fourth sub-interface can be the ibv_create_qp() interface. The ibv_create_qp() interface can be called to create a queue pair including a send queue and a receive queue, manage and track the transmission of data packets through the queue pair, allocate continuous memory space to the send queue and the receive queue, initialize the structures of the send queue and the receive queue, and configure the attributes of the queue pair.

[0072] S25. Call the fifth sub-interface to change the states of the send queue and the receive queue to the ready state.

[0073] In this embodiment, the fifth sub-interface can be the ibv_modify_qp() interface. The ibv_modify_qp() interface can be called to modify the states of the send queue and the receive queue to the ready state. The ibv_modify_qp() interface can also be called to modify the configuration of the queue pair. Different parameters need to be set when the state of the queue pair is transferred. Before the state transition, the status information of the current queue pair can be obtained by querying the corresponding register information. According to the target state, the parameters of the new queue pair can be set, such as port number, access permission, maximum transmission unit, transmission service type, etc.

[0074] S26. Call the sixth sub-interface to submit a send work request to the send queue, and call the seventh sub-interface to submit a receive work request to the receive queue to start data transmission.

[0075] In this embodiment, the sixth sub-interface can be the ibv_post_send() interface, and the seventh sub-interface can be the ibv_post_recv() interface. The ibv_post_send() interface can be called to submit a send work request to the send queue, and the ibv_post_recv() interface can be called to submit a receive work request to the receive queue to start data transmission. Each work request can contain information describing the operation to be performed, such as the index of the work request, operation code, start address, length, etc. The memory area involved in direct access in the work request can be a remotely accessible memory space registered through the ibv_reg_mr() interface.

[0076] S27. Call the eighth sub-interface to poll the completion queue to obtain and process the completion events of the work requests.

[0077] In this embodiment, the eighth sub-interface can be the ibv_poll_cq() interface. The ibv_poll_cq() interface can be called to poll the completion queue to obtain and process the completion events of the work requests. After the work request is completed, the completion event information can be written into a pre-allocated register. In the interface, mainly read specific registers or use special assembly language instructions to query the status of the completion event. After obtaining a certain number of completion events, these completion events can be filled into a structure or array for saving the completion events.

[0078] As an implementation manner, in the embodiment of the present application, step S24 includes:

[0079] S241. Call the fourth sub-interface to create a queue pair, where the queue pair includes a send queue and a receive queue.

[0080] In this embodiment, the ibv_create_qp() interface can be called to create a queue pair including a send queue and a receive queue.

[0081] S242. Allocate contiguous memory space for the send queue and the receive queue;

[0082] In this embodiment, by allocating contiguous memory space for the send queue and the receive queue, memory fragmentation can be reduced, access latency can be decreased, data transmission speed can be accelerated, memory management can be simplified, and complex memory mapping and address conversion operations can be reduced.

[0083] S243. Initialize the structure of the send queue and the structure of the receive queue;

[0084] In this embodiment, by initializing the structure of the send queue and the structure of the receive queue, the send queue is made ready to manage the data to be sent, ensuring that the data is sent in order, and the receive queue is made ready to receive and store the data, ensuring that the data is received in order.

[0085] S244. Configure the attributes of the queue pair.

[0086] In this embodiment, by configuring the attributes of the queue pair, the communication mode of the queue pair (such as reliable connection, unreliable datagram, etc.) can be specified, so as to ensure that the simulation test can accurately simulate the behavior of actual RDMA communication.

[0087] As an implementation, in the embodiment of the present application, initializing the structure of the send queue and the structure of the receive queue includes:

[0088] Initialize and set the depth, width, and address information of the structure of the send queue and the structure of the receive queue.

[0089] In this embodiment, by initializing and setting the depth, width, and address information of the structure of the send queue and the structure of the receive queue, efficient allocation and management of resources can be ensured, data transmission performance can be optimized, and the correctness and reliability of data access can be ensured.

[0090] As an implementation, in the embodiment of the present application, step S244 includes:

[0091] S2441. Set the initial values of the current index and the maximum capacity of the queue pair;

[0092] In this embodiment, by setting the initial values of the current index and the maximum capacity of the queue pair, initialization and consistency of the queue state can be ensured, resources can be managed, queue boundaries can be controlled, and the repeatability and accuracy of the simulation test can be improved.

[0093] S2442. Set the state of the queue pair to the initial state.

[0094] In this embodiment, by setting the state of the queue pair to the initial state, the consistency and independence of the test environment can be ensured, historical states and residual data can be cleared, and different simulation test scenarios can be adapted.

[0095] As an implementation manner, in the embodiments of the present application, the work request includes: a work request index, an opcode, a start address, and a length.

[0096] In this embodiment, the work request may include a send work request and a receive work request. The send work request includes: a send work request index, an opcode, a start address, and a length. The receive work request includes: a receive work request index, an opcode, a start address, and a length.

[0097] As Figure 2 shown, the embodiments of the present application further provide a drive test system, which is applied to the test of the remote direct memory access (RDMA) drive in the DSP simulation platform. The system includes:

[0098] A configuration module 21, configured to build a DSP bare core simulation environment and configure the initial values of the simulation registers;

[0099] A creation module 22, configured to call a standardized Verbs interface, create a protection domain, register a memory space, create a completion queue and a queue pair, initialize the queue pair, modify the state of the queue pair to the ready state, submit a work request to start data transmission, and poll the completion queue to obtain and process the completion event of the work request;

[0100] A test module 23, configured to generate test data, configure a test environment, trigger test data transmission, record performance metrics during the test data transmission, check the memory data and the completion events in the completion queue, verify the correctness and integrity of the test data transmission, and obtain the simulation test result of the RDMA drive.

[0101] As an implementation manner, in the embodiments of the present application, the Verbs interface includes a first sub-interface to an eighth sub-interface. When the creation module executes the call to the standardized Verbs interface to create a protection domain, register a memory space, create a completion queue and a queue pair, initialize the queue pair, modify the state of the queue pair to the ready state, submit a work request to start data transmission, and poll the completion queue to obtain and process the completion event of the work request, it is specifically used for:

[0102] Call the first sub-interface to allocate a protection domain for the RDMA operation;

[0103] Call the second sub-interface to register the memory space so that the memory space can be remotely accessed;

[0104] Invoke the third sub-interface to create a completion queue;

[0105] Invoke the fourth sub-interface to create a queue pair, which includes a send queue and a receive queue, and initialize the send queue and the receive queue;

[0106] Invoke the fifth sub-interface to change the status of the send queue and the receive queue to the ready state;

[0107] Invoke the sixth sub-interface to submit a send work request to the send queue, and invoke the seventh sub-interface to submit a receive work request to the receive queue to start data transmission;

[0108] Invoke the eighth sub-interface to poll the completion queue to obtain and process the completion events of the work requests.

[0109] As an implementation, in the embodiment of the present application, when the creation module executes invoking the fourth sub-interface to create a queue pair, which includes a send queue and a receive queue, and initialize the send queue and the receive queue, it is specifically used for:

[0110] Invoke the fourth sub-interface to create a queue pair, which includes a send queue and a receive queue;

[0111] Allocate continuous memory space to the send queue and the receive queue;

[0112] Initialize the structures of the send queue and the receive queue;

[0113] Configure the attributes of the queue pair.

[0114] As an implementation, in the embodiment of the present application, when the creation module executes initializing the structures of the send queue and the receive queue, it is specifically used for:

[0115] Initialize the settings of the depth, width, and address information of the structures of the send queue and the receive queue.

[0116] It should be understood that in the present application, if "system", "device", "unit", and / or "module" are used, it is only a method for distinguishing different components, elements, parts, portions, or assemblies at different levels. However, if other words can achieve the same purpose, they can be replaced by other expressions.

[0117] The embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other.

[0118] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.

Claims

1. A driving test method, characterized in that, Applied to the test of the Remote Direct Memory Access (RDMA) driver in the DSP simulation platform, the method includes: Build a DSP bare core simulation environment and configure the initialization values of the simulation registers; Call the standardized Verbs interface to create a protection domain, register a memory space, create a completion queue and a queue pair, initialize the queue pair, modify the state of the queue pair to the ready state, submit a work request to start data transmission, and poll the completion queue to obtain and process the completion event of the work request; Generate test data, configure the test environment, trigger the test data transmission, record the performance metrics during the test data transmission, check the memory data and the completion events in the completion queue, verify the correctness and integrity of the test data transmission, and obtain the simulation test results of the RDMA driver; The Verbs interface includes a first sub-interface to an eighth sub-interface. The step of calling the standardized Verbs interface to create a protection domain, register a memory space, create a completion queue and a queue pair, initialize the queue pair, modify the state of the queue pair to the ready state, submit a work request to start data transmission, and poll the completion queue to obtain and process the completion event of the work request includes: Call the first sub-interface to allocate a protection domain for the RDMA operation; Call the second sub-interface to register the memory space so that the memory space can be remotely accessed; Call the third sub-interface to create a completion queue; Call the fourth sub-interface to create a queue pair, where the queue pair includes a send queue and a receive queue, and initialize the send queue and the receive queue; Call the fifth sub-interface to modify the states of the send queue and the receive queue to the ready state; Call the sixth sub-interface to submit a send work request to the send queue, and call the seventh sub-interface to submit a receive work request to the receive queue to start data transmission; Call the eighth sub-interface to poll the completion queue to obtain and process the completion event of the work request.

2. The drive test method according to claim 1, wherein The step of calling the fourth sub-interface to create a queue pair, where the queue pair includes a send queue and a receive queue, and initialize the send queue and the receive queue includes: Call the fourth sub-interface to create a queue pair, where the queue pair includes a send queue and a receive queue; Allocate continuous memory space to the send queue and the receive queue; Initialize the structures of the send queue and the receive queue; Configure the attributes of the queue pair.

3. The drive test method according to claim 2, wherein The step of initializing the structures of the send queue and the receive queue includes: Initialize and set the depth, width, and address information of the structures of the send queue and the receive queue.

4. The drive test method according to claim 2, wherein The step of configuring the attributes of the queue pair includes: Set the initial values of the current index and the maximum capacity of the queue pair; Set the state of the queue pair to the initial state.

5. The drive test method according to claim 1, wherein The work request includes: a work request index, an operation code, a starting address, and a length.

6. A driving test system, characterized in that, Applied to the test of the Remote Direct Memory Access (RDMA) driver in the DSP simulation platform, the system includes: Configuration module, used to build a DSP bare core simulation environment and configure the initial values of simulation registers; Creation module, used to call the standardized Verbs interface, create a protection domain, register a memory space, create a completion queue and a queue pair, initialize the queue pair, modify the state of the queue pair to the ready state, submit a work request to start data transmission, and poll the completion queue to obtain and process the completion event of the work request; Testing module, used to generate test data, configure a test environment, trigger the test data transmission, record the performance metrics during the test data transmission, check the memory data and the completion events in the completion queue, verify the correctness and integrity of the test data transmission, and obtain the simulation test results of the RDMA driver; The Verbs interface includes a first sub-interface to an eighth sub-interface. When the creation module executes the operation of calling the standardized Verbs interface, creating a protection domain, registering a memory space, creating a completion queue and a queue pair, initializing the queue pair, modifying the state of the queue pair to the ready state, submitting a work request to start data transmission, and polling the completion queue to obtain and process the completion event of the work request, it specifically uses: Call the first sub-interface to allocate a protection domain for the RDMA operation; Call the second sub-interface to register the memory space so that the memory space can be remotely accessed; Call the third sub-interface to create a completion queue; Call the fourth sub-interface to create a queue pair, where the queue pair includes a send queue and a receive queue, and initialize the send queue and the receive queue; Call the fifth sub-interface to modify the states of the send queue and the receive queue to the ready state; Call the sixth sub-interface to submit a send work request to the send queue, and call the seventh sub-interface to submit a receive work request to the receive queue to start data transmission; Call the eighth sub-interface to poll the completion queue to obtain and process the completion event of the work request.

7. The drive test system according to claim 6, wherein When the creation module executes the operation of calling the fourth sub-interface to create a queue pair, where the queue pair includes a send queue and a receive queue, and initialize the send queue and the receive queue, it specifically uses: Call the fourth sub-interface to create a queue pair, where the queue pair includes a send queue and a receive queue; Allocate continuous memory space to the send queue and the receive queue; Initialize the structures of the send queue and the receive queue; Configure the attributes of the queue pair.

8. The drive test system according to claim 7, characterized in that, When the creation module executes the operation of initializing the structures of the send queue and the receive queue, it specifically uses: Perform initialization settings on the depth, width, and address information of the structures of the send queue and the receive queue.