A Memory Semantic Tunnel Communication Method and Device Based on an RDMA Engine
Through packet reorganization and RDMA engine adaptation technology, the problem of low efficiency and poor reliability in small packet transmission is solved, and efficient, low latency and reliable memory semantic communication is achieved.
Patent Information
- Application Number
- CN202510592934.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-05-09
AI Technical Summary
The existing RDMA technology is inefficient in memory semantic communication scenarios that process small data packets, with long transmission delays and poor reliability, especially in high-frequency scenarios, which leads to a reduced payload transmission efficiency and is prone to data loss or damage during transmission.
Reorganize data by receiving memory semantic data for packet reorganization, use the RDMA engine interface adapter for adaptation, and back up the RDMA payload information to local memory for encapsulation and sending, reducing the overhead of the packet, and transmitting data using local direct push method to ensure low latency and reliability.
It improves the transmission efficiency of payload, significantly reduces the overall access delay, and ensures reliable data transmission through data backup, solving the efficiency and reliability problems of RDMA technology in small packet transmission.
Smart Images

Figure CN120111005B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, to a memory semantics communication method and apparatus based on an RDMA engine. Background Art
[0002] With the rapid development of computer system architectures and high-performance computing, the efficiency and stability of network communication have become key factors affecting overall performance. In current Remote Direct Memory Access (RDMA) technologies, although they are mainly characterized by efficient and low-latency direct memory access, there are still some problems in memory semantics communication scenarios for handling small data packets.
[0003] These problems are mainly reflected in low efficiency, long transmission delays in high-frequency scenarios, and poor reliability. Because in artificial intelligence scenarios, each small packet requires additional header information. When performing high-frequency small data packet transmissions, due to the high proportion of the header occupancy, the transmission efficiency of the payload will be significantly reduced; the traditional RDMA transmission implementation process has a complex software data transmission process, involving multiple Direct Memory Access (DMA) operations, which increases the complexity of data sending operations and the scheduling difficulty of the communication system, and multiple links will cause a significant increase in transmission delays; and there will be cases where data is lost or damaged during data transmission, resulting in data transmission failures. Therefore, the overall effect of the existing RDMA data transmission method is not very satisfactory. Summary of the Invention
[0004] The present invention provides a memory semantics tunnel communication method based on an RDMA engine to improve the overall performance of RDMA memory semantics communication.
[0005] According to a first aspect of the present invention, there is provided a memory semantics tunnel communication method based on an RDMA engine, including:
[0006] Receiving memory semantics data sent locally, and performing data packet recombination on the memory semantics data to obtain a merged data block;
[0007] Adapting the merged data block through a direct memory access RDMA engine interface adapter to obtain RDMA payload information;
[0008] Backing up the RDMA payload information to a local memory through the RDMA engine, and encapsulating the backed-up RDMA payload information and sending it to a remote device.
[0009] According to another aspect of the present invention, there is provided a memory semantics tunnel communication apparatus based on an RDMA engine, including:
[0010] A data reorganization module, configured to receive the memory semantic data sent locally, and reorganize the memory semantic data into data packets to obtain a merged data block;
[0011] An RDMA adaptation module, configured to adapt the merged data block through a direct memory access (RDMA) engine interface adapter to obtain RDMA payload information;
[0012] A data encapsulation module, configured to back up the RDMA payload information to a local memory through an RDMA engine, and encapsulate the backed-up RDMA payload information and send it to a remote device.
[0013] According to another aspect of the present invention, an electronic device is provided, where the electronic device includes:
[0014] At least one processor; and
[0015] A memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method according to any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, where the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the method according to any embodiment of the present invention when executed by a processor.
[0018] The technical solution of the embodiment of the present invention combines small memory semantic data into data blocks through data packet reorganization, and performs one-time encapsulation on the merged data block and then sends it, reducing the additional overhead of the packet header during the encapsulation process, thereby improving the transmission efficiency of the payload; using local direct push instead of actively grabbing the data stored in the memory to ensure low latency during the first transmission of the data packet, which can significantly reduce the overall access latency, and ensure reliable data transmission through data backup.
[0019] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Description of the Drawings
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0021] Figure 1 It is a flowchart of a memory semantic tunnel communication method based on an RDMA engine according to Embodiment 1 of the present invention;
[0022] Figure 2 It is a schematic diagram of an application framework for memory semantic encapsulation and decapsulation according to Embodiment 1 of the present invention;
[0023] Figure 3 It is a schematic diagram of the principle of memory semantic tunnel communication based on an RDMA engine according to Embodiment 1 of the present invention;
[0024] Figure 4 It is a schematic diagram of the principle of data interaction according to Embodiment 1 of the present invention;
[0025] Figure 5 It is a schematic diagram of the main memory path of three data paths according to Embodiment 1 of the present invention;
[0026] Figure 6 It is a flowchart of a memory semantic tunnel communication method based on an RDMA engine according to Embodiment 2 of the present invention;
[0027] Figure 7 It is a schematic diagram of the structure of an RDMA engine interface adapter according to Embodiment 2 of the present invention;
[0028] Figure 8 It is a schematic diagram of the structure of a memory semantic tunnel communication device based on an RDMA engine according to Embodiment 3 of the present invention;
[0029] Figure 9 It is a schematic diagram of the structure of an electronic device according to Embodiment 4 of the present invention. Detailed implementation manners
[0030] To enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the specification, claims and above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0032] Embodiment 1
[0033] Figure 1 The figure is a flowchart of a memory semantic tunnel communication method based on an RDMA engine provided for Embodiment 1 of the present invention. This embodiment is applicable to the situation of communicating internal promotion semantic data. This method can be executed by a memory semantic tunnel communication device based on an RDMA engine, and this device can be implemented in the form of hardware and / or software. As Figure 1 shown, the method includes:
[0034] Step S101: Receive the memory semantic data sent locally, and perform packet recombination on the memory semantic data to obtain a merged data block.
[0035] Among them, as Figure 2 shown is a schematic diagram of the application framework for memory semantic encapsulation and decapsulation in this embodiment. In the sending direction, it mainly includes key information extraction, packet recombination, adaptation of the RDMA engine interface adapter, and encapsulation and sending of the RDMA engine. While in the receiving direction, it mainly involves decapsulation of the RDMA engine, processing of the RDMA engine interface adapter, packet splitting, and recombination of key information, etc. As Figure 3 shown is a schematic diagram of the principle of memory semantic tunnel communication based on an RDMA engine. Figure 3 For Figure 2 the relevant structures involved are specifically expanded and described, and the relevant paths for data sending and receiving are specifically described. And when the local proximal device and the remote device communicate using the Figure 3 shown principle, the schematic diagram of the specific data interaction principle is specifically as Figure 4 shown, and a proximal device can communicate with multiple remote devices simultaneously. Figure 4 In
[0036] Optionally, receive the memory semantic data sent locally, and perform packet recombination on the memory semantic data to obtain a merged data block, including: receiving the memory semantic data sent by the local processor through the on-chip network bus, and sending the memory semantic data to the bus interface module; extracting parameters from each received memory semantic data through the bus interface module to obtain the Advanced eXtensible Interface (AXI) control information for the high-performance on-chip bus protocol, the memory semantic valid data, and the queue identifier, where the AXI control information includes the type of memory access; recombining the memory semantic valid data with the same queue identifier and belonging to the same type through the packet recombination component to obtain a merged data block, where the type includes write requests, read requests, or read responses.
[0037] Specifically, in this embodiment, different types of memory semantic data sent by the local processor through the on-chip network bus are received. To identify the specific type of the memory semantics, the memory semantic data is sent to the bus interface module, and the bus interface module extracts parameters from each received memory semantic data to obtain the AXI control information: AXI Meta, the memory semantic valid data: AXI Payload, and the queue identifier. The AXI control information: AXI Meta specifically includes the type of memory access, such as local write requests, local read requests, or remote read responses. Of course, in this embodiment, only examples are given, and the specific types of memory access are not limited. In addition, different types of memory semantic valid data, such as write requests, read requests, write responses, and read responses, respectively adopt the standard memory semantic access message structure to reduce the additional overhead in the RDMA protocol encapsulation. For example, the message structure corresponding to a write request includes data attributes, the target address, and the data payload; the message structure corresponding to a read request includes data attributes and the target address; the message structure corresponding to a write response includes the response status; the message structure corresponding to a read response includes data attributes, the response status, and the data payload. Of course, in this embodiment, only examples are given, and the specific forms of the message structures corresponding to different types of memory semantic valid data are not limited.
[0038] It should be noted that the queue identifier in this embodiment can be indirectly extracted. That is, first obtain the target address included in the memory semantic data, and query the address queue relationship table according to the target address to obtain the queue identifier matching the target address, where the address queue relationship table includes the corresponding relationship between the target address and the queue identifier; use the queried queue identifier as the queue identifier extracted from the memory semantic data. Of course, in this embodiment, only examples are given, and the specific extraction method of the queue identifier is not limited. From this, it can be known that the memory semantic data with the same queue identifier needs to be sent to the same remote device.
[0039] Optionally, the packet recombination component reorganizes the memory semantic valid data with the same queue identifier and belonging to the same type to obtain a merged data block, including: the packet recombination component groups the memory semantic valid data of the same type in the input order according to the queue identifier to obtain a memory semantic data group, where each memory semantic data group contains memory semantic valid data with the same type and queue identifier; obtaining a merge setting condition, and merging the memory semantic data groups according to the merge setting condition to obtain original merged data, where the merge setting condition includes a maximum allowable merged packet data and a maximum allowable merge duration; obtaining a data header according to the original merged data, and combining the original merged data with the data header to obtain a merged data block, where the number of merged data blocks corresponding to each memory semantic data group is at least one.
[0040] Specifically, in this embodiment, after obtaining the types and queue identifiers of each piece of memory semantic valid data, the data packet recombination component can group the memory semantic valid data according to the queue identifier and type, generate larger data blocks by merging the data within the same queue, so as to increase the payload ratio. In this embodiment, independent write channels and read channels are used to merge different types of local memory semantic data respectively, so as to achieve efficient management of data. For example, when the received memory semantic valid data are respectively: M, N, K, M+1, K+1, N+1, N+2, N+3, K+2, M+2, and the types of the above-mentioned memory semantic valid data are the same, for example, it can be a local write request. Therefore, in this case, when grouping, there is no need to consider the difference in types, and only need to group the above-mentioned memory semantic valid data in the input order according to the queue identifier to obtain the memory semantic data groups. For example, memory semantic data group 1={N N+1 N+2 N+3}, memory semantic data group 2={K K+1 K+2 K+3}, memory semantic data group 3={M M+1 M+2 M+3}. In addition, in this embodiment, in order to further improve the transmission efficiency, the merge setting conditions will be pre-configured according to user requirements. The merge setting conditions include the maximum allowed merge packet number and the maximum allowed merge duration. Based on the maximum allowed merge duration, a merge timeout mechanism is determined. Through the timeout mechanism, the data that has not been merged within a certain time can be directly transmitted, avoiding too high system response latency, so as to meet the real-time requirements while achieving efficient transmission. And in this embodiment, after weighing the transmission delay and the RDMA transmission efficiency corresponding to different merge numbers, the merge number selected by the user will be used as the maximum allowed merge packet number according to the actual transmission requirements. Therefore, when merging the memory semantic data groups subsequently, it is required that the number of each merged data block cannot exceed the set maximum allowed merge packet number. In this embodiment, after obtaining the memory semantic data groups, each memory semantic data group will be merged according to the above merge setting conditions to obtain the original merged data. If the maximum allowed merge duration is reached before the data in the memory semantic data group is merged, the merge process will be terminated, and the data merge result obtained at the termination moment will be used as the original merged data; if the maximum allowed merge duration is not reached before the data in the memory semantic data group is merged, the memory semantic data group will be merged according to the maximum allowed merge packet number to obtain the original merged data. When merging, both the merge time and the merge number need to be considered, so as to improve the data transmission efficiency while ensuring the transmission real-time. In addition, in this embodiment, the number of memory semantic valid data included in the original merged data will also be obtained, for example, 4; the type, for example, a local read request; the target address, for example, address 1, and the obtained number, type, and target address will be combined to obtain a data header, and the original merged data will be combined with the data header to obtain a merged data block.
[0041] It should be noted that in this embodiment, different types of memory semantic data are merged separately by different merging components. For example, the local write request merging component only merges the valid data of the local write request memory semantics, the local read request merging component only merges the valid data of the local read request memory semantics, and the remote read response merging component only merges the valid data of the remote read response memory semantics. Moreover, each merging component can execute independently and in parallel without affecting each other, thus further improving the efficiency of data merging. Herein, "local" mainly refers to the sender of the request, and "remote" mainly refers to the receiver of the request. For a local proximal device, there can be multiple corresponding remote devices, that is, a proximal device can interact with multiple remote devices simultaneously. This is not elaborated in this embodiment.
[0042] Optionally, the method further includes: constructing a first write task that matches the memory semantic data when it is determined that the type includes a write request, issuing the first write task, and updating the write status that matches the first write task in real time, where the write status includes issued but not completed or issued and completed; in response to a synchronization mark write request for the memory semantic data, constructing a synchronization mark update task that matches the memory semantic data; querying the target write status that matches the memory semantic data, and determining whether the target write status is issued and completed. If so, issuing the synchronization mark update task, otherwise, performing blocking control on the synchronization mark update task.
[0043] Among them, a data transmission and synchronization is disassembled into the form of Data + Flag. Among them, Data is the data to be transmitted, and Flag is the synchronization mark. When the receiving end queries that the Flag is updated, it is considered that the data transmission is completed. Due to the complex topology of the AI communication network and the internal bus of the chip, it is necessary to strictly ensure that the Flag update is later than the Data write-through to the memory to ensure efficient data ordering. However, as the chip bus topology becomes more and more complex, the Data update and the Flag update may pass through different data paths. At this time, the existing hardware structure cannot ensure that the Data must be earlier than the Flag write-through, thus causing data disorder and significantly affecting the system reliability. Therefore, when it is determined that the type of the memory semantic data is a write request, that is, when the memory semantic data on the local proximal device needs to be written to the remote chip, in order to ensure that the memory semantic data is written through before subsequent data is written, the write status of the Data is updated in real time, providing a reliable update basis for the subsequent update of the Flag corresponding to the Data, and accurately determining whether the update of the corresponding Flag needs to be blocked based on the write status of the Data, so as to achieve the final data barrier, that is, to ensure that the Data is written through the memory earlier than the Flag in the complex AI communication scenario, solve the problem of data transmission disorder in the complex AI communication scenario, realize the data ordering in the complex AI communication scenario, and effectively improve the system reliability. And the data transmission ordering method can achieve the data transmission ordering of the AI interconnected network, that is, when the chip of the proximal device writes data to the memory of another remote device chip, and when the data corresponding synchronization mark is updated in the memory of the remote chip, applying the aforementioned data transmission ordering method can strictly ensure that the synchronization mark update is later than the data write-through to the memory, realizing an efficient data barrier.
[0044] For example, as Figure 5 shown is a schematic diagram of a main memory path with three data paths. As Figure 5As shown in the figure, the dashed line represents the distribution path corresponding to a normal write request (the path for CPU1 to access main memory a2), the dotted line represents the distribution path corresponding to the synchronization marker write request (the path for CPU1 to access b2), and the solid line represents the path for reading the synchronization marker (the path for CPU2 to access main memory b2). After the CPU1 in the proximal device receives the responses to all the written Data returned by network port a, it then performs the step of updating the Flag. This can ensure that the Flag arrives at network port later than Data. When CPU1 sends out the network data packet for updating the Flag, the network data packet carries the attribute of whether a fence (data barrier) needs to be done. This fence attribute passes through SOC bus 1 and then through the communication network to reach the distal device and is used at network port b of the distal device. On the network path between the proximal device and the distal device, the Rocv2 protocol ensures that all data packets are not out of order. The attribute of whether the current data packet needs to do a fence is carried in the data packets across the AI communication network. At network port b of the distal device, it is checked whether the data packet carries the fence attribute. If it does, then after the network port of the distal device receives the responses to all the written Data returned by main memory a2, the Flag data packet carrying the Fence attribute is sent to SOC bus 2. This can ensure that the Flag arrives at network port b of the target device later than Data.
[0045] Step S102, adapt the merged data block through the direct memory access RDMA engine interface adapter to obtain the RDMA payload information.
[0046] Optionally, adapting the merged data block through the direct memory access RDMA engine interface adapter to obtain the RDMA payload information includes: performing RDMA adaptation on the merged data block through the RDMA engine interface adapter to obtain adaptation information, and combining the adaptation information with the merged data block to obtain the RDMA payload information, where the adaptation information includes a header and a trailer; monitoring the RDMA payload information through the RDMA engine interface adapter, and generating an automatic response when it is determined that the RDMA payload information has a fault timeout and feeding it back to the local processor.
[0047] Specifically, in this embodiment, the sequential transmission of memory semantic data is achieved through the above data order-preserving method, and the merged data block is obtained by reorganizing the memory semantic data through the data reorganization component. Then, the merged data block is adapted through the RDMA engine interface adapter to obtain adaptation information. The adaptation information may include an information header RDMA Header and an information tail. The information header includes the adaptation parameters of the adapter for the merged data block, such as the identifier of the RDMA tunnel used and the RDMA transmission resources occupied. The information tail is used to indicate the end position of the data block. Of course, only examples are given in this embodiment, and the specific parameters of the adaptation information are not limited. The RDMA engine interface adapter in this embodiment is connected to the RDMA engine and notifies the RDMA engine of the RDMA payload information, so that the RDMA engine pulls the RDMA payload information and performs RDMA encapsulation.
[0048] Step S103: Back up the RDMA payload information in the local memory through the RDMA engine, and after encapsulating the backed-up RDMA payload information, send it to the remote device.
[0049] Optionally, backing up the RDMA payload information in the local memory through the RDMA engine and, after encapsulating the backed-up RDMA payload information, sending it to the remote device includes: generating queued data to be backed up according to the RDMA payload information through the data sending component of the RDMA engine and backing up the queued data to be backed up in the local memory; obtaining non-queued data to be backed up, and arbitrating the currently to-be-encapsulated data from the queued data to be backed up and the non-queued data to be backed up, where the non-queued data to be backed up includes data reception responses and / or target retransmission data; adding a packet header to the to-be-encapsulated data to obtain encapsulated data, and sending the encapsulated data to the remote device through a switch.
[0050] Specifically, the RDMA payload information in this embodiment may specifically include a read request type, a write request type, and a read response type. Therefore, the data in the queue to be backed up can be the data to be transmitted sent by the local processor of the proximal device and the data to be read requested by the distal device, and exists in the form of a queue. In this embodiment, the data in the queue to be backed up can be stored in the local memory to implement the backup of the data in the queue to be backed up. At the same time as backing up the data in the queue to be backed up to the local memory, the data in the queue to be backed up in the form of an RDMA packet structure (the structure of the RDMA data packet) is sent to the target data receiving end. In addition, in this embodiment, non-backup queue data will also be obtained. The non-backup queue data can be data other than the data in the queue to be backed up that needs to be sent to the distal device and exists in the form of a queue. For example, data reception responses and / or target retransmission data. The target retransmission data can be the data that fails to be received by the distal device and is backed up in the local memory. The currently to-be-encapsulated data can be the data that is arbitrated and needs to be sent to the distal device and has not been encapsulated. The target encapsulated data can be the data packet encapsulated from the currently to-be-encapsulated data according to the RDMA packet structure. The encapsulated data can be the data packet encapsulated from the currently to-be-encapsulated data according to the RDMA packet structure. Among them, when sending the data in the queue to be backed up to the distal device, if there is also non-backup queue data sent to the distal device at the same time, the data in the queue to be backed up and the non-backup queue data can be sorted according to a preset data sorting rule, and the data ranked first in the sorting is used as the currently to-be-encapsulated data. Then, the currently to-be-encapsulated data is encapsulated according to the RDMA packet structure to obtain the target encapsulated data, and then the target encapsulated data is sent to the target data receiving end through Ethernet.
[0051] It should be noted that before sending the non-backup queue data to the remote device in this embodiment, it further includes: parsing the to-be-received RDMA data sent by the remote device, and generating a data reception response when the to-be-received RDMA data passes the verification; and / or, when there is a data reception anomaly at the remote device, determining the target retransmission data in the local memory. The to-be-received RDMA data may be data in the form of an RDMA packet structure sent by the remote device to the local processor. If the remote device sends the to-be-received RDMA data to the local processor side, then based on the RDMA packet structure, the to-be-received RDMA data sent by the remote device is de-encapsulated, and the data after de-encapsulation is subjected to data legality verification. When the data after de-encapsulation passes the data legality verification, it indicates that the to-be-received RDMA data passes the verification, and then a data reception response for the to-be-received RDMA data is generated. If there is a data reception anomaly at the target data receiving end, it indicates that the historical backup queue data (the queue data previously backed up in the local memory before the aforementioned to-be-backup queue data, and the specific data composition of the historical backup queue data can refer to the to-be-backup queue data) sent by the local processor to the remote device has not been successfully received, and then the target retransmission data that the target data receiving end has not successfully received is queried from the local memory.
[0052] It is worth mentioning that after parsing the to-be-received RDMA data sent by the remote device in this embodiment, it further includes, when the to-be-received RDMA data passes the verification, determining the header information of the target queue data successfully received by the remote device; and deleting data from the local memory according to the header information of the target queue data. The target queue data may be data sent by the local processor to the remote device and successfully received by the remote device, and exists in the form of a queue. If the to-be-received RDMA data passes the verification, it can be further determined that the remote device has successfully received the target queue data sent by the local processor, and then the header information of the target queue data is obtained. Thus, based on the header information of the target queue data, the space storing the target queue data is located from the network card memory and the space is cleared.
[0053] Optionally, adding a header to the to-be-encapsulated data to obtain the encapsulated data includes: adding an RDMA header to the to-be-encapsulated data based on the RDMA packet component in the RDMA tunnel to obtain the first packet result; adding UDP and IP headers to the first packet result based on the UDP and IP packet components in the RDMA tunnel to obtain the second packet result; adding an Ethernet header to the second packet result based on the Ethernet component in the RDMA tunnel to obtain the encapsulated data.
[0054] Among them, after obtaining the merged data block by merging the memory semantic data and determining the data to be encapsulated through arbitration of the merged data block, in order to achieve data transmission between different protocols, it is necessary to encapsulate the data to be encapsulated by adding a header through the RDMA tunnel, and different packet encapsulation components are used to add headers with different contents to the data to be encapsulated when encapsulating. For example, the RDMA header is added through the RDMA packet encapsulation component, the UDP or IP header is added through the UDP or IP packet encapsulation component, and the Ethernet header is added through the Ethernet component. Therefore, the headers in the obtained encapsulated data specifically include three items, namely the RDMA header, the UDP and IP headers, and the Ethernet header. In addition, in this embodiment, different RDMA headers are used for different types of data. The following table 1 shows the RDMA header corresponding to the memory write request type:
[0055] Table 1
[0056]
[0057] The following table 2 shows the RDMA header corresponding to the memory read request type:
[0058] Table 2
[0059]
[0060] The following table 3 shows the RDMA header corresponding to the memory read response type:
[0061] Table 3
[0062]
[0063] In addition, in order to distinguish the difference between the RDMA tunnel and the ordinary RDMA message, in this embodiment, custom Opcode programming is used to implement the memory semantic operation. The following table 4 shows the type examples of implementing the memory semantic operation:
[0064] Table 4
[0065]
[0066] In this embodiment, after merging multiple small memory semantic data and then encapsulating, only one header needs to be added, thus significantly reducing the proportion of the header in the encapsulated data and improving the transmission efficiency of the payload; and by logically merging multiple discrete local memory semantic data, the number of packets transmitted per unit time is reduced, and the hardware requirement for packet processing performance is reduced; on the premise of ensuring controlled latency, the hardware resource consumption of the RDMA tunnel transmitting small packets frequently is reduced through a reasonable merging strategy.
[0067] Optionally, the method further includes: receiving, by a data receiving component of the RDMA engine, remote encapsulated data sent by a remote device, and decrypting the remote encapsulated data to obtain remote RDMA payload information; sending the remote RDMA payload information to an RDMA engine interface adapter, and obtaining, by the RDMA engine interface adapter according to the RDMA payload information, a remote merged data block; splitting, by a data packet splitting component, the remote merged data block to obtain remote memory semantic valid data and remote AXI control information; merging, by a bus interface module, the remote memory semantic valid data and the remote AXI control information to obtain remote memory semantic data, and transmitting the remote memory semantic data to the local through an on-chip network bus.
[0068] Optionally, transmitting the remote memory semantic data to the local through an on-chip network bus includes: when the type of the remote memory semantic data is a remote write request or a remote read request, sending the remote memory semantic data to a local memory; when the type of the remote memory semantic data is a local read response, sending the remote memory semantic data to a local processor.
[0069] It should be noted that in this embodiment, on the one hand, memory semantic data can be merged, and the encapsulated data obtained by the merged encapsulation is sent to the remote device. On the other hand, the encapsulated data sent by the remote device can be decrypted, and the different types of remote merged data blocks sent after the RDMA component is decrypted can be split. Among them, the remote merged data block contains remote memory semantic data with the same type and queue identifier, and also contains a data header. When splitting the remote merged data block according to the data header to obtain remote memory semantic data, different components are used for different types of merged data blocks. For example, the remote write request splitting component only splits the remote write request merged data block, the remote read request splitting component only splits the remote read request merged data block, and the local read response splitting component only splits the local read response merged data block, and each splitting component can be executed independently and in parallel without affecting each other, thereby further improving the efficiency of data splitting. And when performing data splitting, the data is respectively passed through the RDMA engine, the RDMA engine interface adapter, the data packet splitting component, the bus interface module, and the NOC bus in the receiving direction, and the processing processes of each component in the receiving direction are respectively the reverse processes of the above-mentioned sending direction. Since the specific principles of each component have been specifically described above, they will not be elaborated in this embodiment.
[0070] In the embodiments of the present application, small in-memory semantic data is merged into data blocks through data packet recombination, and after a single encapsulation of the merged data blocks, they are sent, reducing the additional overhead of the packet header during the encapsulation process, thereby improving the transmission efficiency of the payload; local direct push is used instead of actively grabbing the data stored in the memory to ensure low latency during the first transmission of the data packet, significantly reducing the overall access latency, and ensuring reliable data transmission through data backup.
[0071] Embodiment 2
[0072] Figure 6 The flowchart of a memory semantic tunnel communication method based on the RDMA engine provided by the second embodiment of the present invention. This embodiment is based on the above embodiment and specifically describes the process of monitoring the RDMA payload information through the RDMA engine interface adapter and generating an automatic response when it is determined that the RDMA payload information fails and times out and feeding it back to the local processor, as Figure 6 shown, the method includes:
[0073] Step S201, monitor the incoming RDMA payload information through the RDMA engine interface adapter, and record the obtained queue status information in the queue pair status record table.
[0074] Specifically, this application mainly focuses on the situation where in the RDMA scenario, chips in the same system use the form of queue pairs (QP) for RDMA communication, as Figure 7 shown, which is a schematic diagram of the RDMA engine interface adapter structure in this embodiment. It mainly includes a queue pair status record table, an automatic response state machine, a multi-queue first-in-first-out component, a timeout queue record table, and a response filter. Of course, other structures are also included in the RDMA engine interface adapter in this embodiment, and only the structures related to automatic fault response are shown in this embodiment. When this structure is located in the proximal device, when the RDMA payload information sent in the form of a queue from the proximal device to the distal device fails, an automatic response inside the proximal device can be performed through the RDMA engine interface adapter to avoid the situation where the proximal device fails due to the inability to obtain the response from the distal device due to information failure.
[0075] Among them, in this embodiment, when the proximal device and the distal device are performing data transmission, the proximal device will send the RDMA payload information to the distal device in the form of a queue for request, Figure 7The shown RDMA engine interface adapter monitors the queue pairs flowing through the send data path in real time. The RDMA payload information in this embodiment includes multiple queue pairs, and when sending to a remote device, it is sent as a whole, but in the send data path inside the proximal chip, it can be transmitted in the form of queue pairs. Each queue pair is marked with a queue identifier. Therefore, queue pairs with the same queue identifier belong to the same RDMA payload information. In this embodiment, the specific number of queues included in the RDMA payload information sent from the proximal device to the remote device is not limited. The RDMA engine interface adapter obtains the queue identifier and detection timestamp of each queue pair flowing through the send data path through monitoring, determines the target queue to which the queue pair belongs according to the queue identifier, and updates the queue timestamp of the target queue recorded in the queue pair status record table according to the detection timestamp. For example, when it is determined that the queue identifier marked by the latest queue pair a flowing through the send data path is 1 and the detection time is T1, the queue timestamp TimeStamp of queue 1 in the queue pair status record table is updated to T1, and the outstanding counter of queue 1 is incremented by 1. Here, the outstanding counter refers to the number of outstanding matters where the proximal device has sent a request to the remote device but has not received a response from the remote device. Therefore, the queue timestamp and outstanding counter of each queue are specifically recorded in the queue pair status record table, and the queue timestamp and outstanding counter of each queue are constantly changing during the monitoring period.
[0076] After recording the obtained queue status information into the queue pair status record table, it further includes: obtaining the key information and queue identifier of the queue pair; saving the correspondence between the key information and the queue identifier to the multi-queue first-in-first-out component.
[0077] Step S202, polling the queue pair status record table through the automatic response state machine in the RDMA engine interface adapter, and determining the running status of each queue according to the queue status information.
[0078] Among them, polling the queue pair status record table through the auto - response state machine in the RDMA engine interface adapter includes: polling the queue pair status record table through the auto - response state machine in the RDMA engine interface adapter to obtain the queue status information of each queue; for each queue, judging whether the flight number in the queue status information is 0. If so, directly determine that the running state of the currently polled queue is normal. Otherwise, determine the running state of the currently polled queue according to the current polling time and the queue timestamp in the queue status information. And determining the running state of the currently polled queue according to the current polling time and the queue timestamp in the queue status information, specifically, it can be adopted to obtain the pre - configured time threshold and the time difference between the current polling time and the queue timestamp; judge whether the time difference is greater than the time threshold. If so, determine that the running state of the currently polled queue is fault timeout. Otherwise, determine that the running state of the currently polled queue is normal. Therefore, the running states in this embodiment include two states: fault timeout and normal.
[0079] Step S203, record the queue identifier with the running state of fault timeout into the timeout queue record table, and obtain the target queue identifier corresponding to the RDMA payload information.
[0080] Specifically, in this embodiment, the queue identifier with the running state determined to be fault timeout will be recorded into the timeout queue record table. Since the queue pair status record table is updated in real - time during the process of the proximal device sending information to the distal device, the corresponding timeout queue record table is also updated in real - time.
[0081] Step S204, when it is determined that the target queue identifier is in the timeout queue record table, generate an auto - response for the RDMA payload information and feedback it to the local processor.
[0082] Among them, in this embodiment, the target queue identifier corresponding to the RDMA payload information will be obtained. And when it is determined that the target queue identifier is in the timeout queue record table, an auto - response will be generated for the RDMA payload information, and the faulty queue pairs in the auto - response generated from the RDMA payload information will be filtered and discarded, so as to achieve isolation between the inside of the proximal chip and the distal device. And when generating an auto - response for the faulty queue, it does not affect obtaining the response from the distal device for the normal queue, that is, the normal queue can still be accessed normally, enabling the proximal device to obtain the execution result based on the responses of all the queues obtained, that is, always keeping the proximal device in a keep - alive state, and not causing the operation interruption of the entire device or even the entire system due to the failure of a single queue inside the proximal device, thus realizing the isolation of faults inside the chip from the external network.
[0083] In the embodiments of the present application, small in-memory semantic data is merged into data blocks through data packet recombination, and after a single encapsulation of the merged data blocks, they are sent, reducing the additional overhead of the packet header during the encapsulation process, thereby improving the transmission efficiency of the payload; local direct push is used instead of actively fetching the data stored in the memory to ensure low latency during the first transmission of data packets, significantly reducing the overall access latency, and ensuring reliable data transmission through data backup. And when a queue failure occurs in the request sent to the remote chip by the proximal chip requester due to a port failure, an automatic response will be generated for the failed queue and fed back to the proximal chip requester, and the failed queue does not interfere with other normal queues. Therefore, network failures do not affect the normal operation inside the proximal chip, achieving fault convergence and isolation, and ensuring the keep-alive of the proximal chip through automatic response, which can ensure the normal operation of other chips connected to the proximal chip to achieve the normal operation of the entire system. Therefore, the reliability and availability of the system are improved.
[0084] Embodiment III
[0085] Figure 8 The structural schematic diagram of a memory semantic tunnel communication device based on the RDMA engine provided by Embodiment IV of the present invention. As Figure 8 shown, the device includes: a data recombination module 310, an RDMA adaptation module 320, and a data encapsulation module 330.
[0086] Among them, the data recombination module 310 is used to receive the in-memory semantic data sent locally and perform data packet recombination on the in-memory semantic data to obtain merged data blocks;
[0087] The RDMA adaptation module 320 is used to adapt the merged data blocks through the direct memory access RDMA engine interface adapter to obtain RDMA payload information;
[0088] The data encapsulation module 330 is used to back up the RDMA payload information in the local memory through the RDMA engine, and encapsulate the backed-up RDMA payload information and send it to the remote device.
[0089] Optionally, the data recombination module is used to receive the in-memory semantic data sent by the local processor through the on-chip network bus and send the in-memory semantic data to the bus interface module;
[0090] The bus interface module extracts parameters from each received in-memory semantic data to obtain high-performance on-chip bus protocol AXI control information, in-memory semantic valid data, and queue identifiers, where the AXI control information includes the type of memory access;
[0091] The packet reorganization component reorganizes the memory semantic valid data with the same queue identifier and belonging to the same type to obtain a merged data block, where the type includes write requests, read requests, or read responses.
[0092] Optionally, the data reorganization module is further configured to group the memory semantic valid data of the same type according to the input order according to the queue identifier through the packet reorganization component to obtain a memory semantic data group, where each memory semantic data group contains memory semantic valid data with the same type and queue identifier;
[0093] Obtain the merge setting conditions, and merge the memory semantic data groups according to the merge setting conditions to obtain the original merged data, where the merge setting conditions include the maximum allowable merged packet data and the maximum allowable merge duration;
[0094] Obtain a data header according to the original merged data, and combine the original merged data with the data header to obtain a merged data block, where the number of merged data blocks corresponding to each memory semantic data group is at least one.
[0095] Optionally, the device further includes an order-preserving module, configured to construct a first write task matching the memory semantic data when it is determined that the type includes a write request, issue the task for the first write task, and update the write status matching the first write task in real time, where the write status includes issued but not completed or issued and completed;
[0096] In response to a synchronous mark write request for the memory semantic data, construct a synchronous mark update task matching the memory semantic data;
[0097] Query the target write status matching the memory semantic data, and determine whether the target write status is issued and completed. If so, issue the synchronous mark update task, otherwise, perform blocking control on the synchronous mark update task.
[0098] Optionally, the RDMA adaptation module includes an RDMA configuration unit, configured to perform RDMA adaptation on the merged data block through the RDMA engine interface adapter to obtain adaptation information, and combine the adaptation information with the merged data block to obtain RDMA payload information;
[0099] The fault automatic response unit is configured to monitor the RDMA payload information through the RDMA engine interface adapter, and generate an automatic response to feedback to the local processor when it is determined that the RDMA payload information fails and times out.
[0100] Optionally, a fault automatic response unit is used to monitor the incoming RDMA payload information through the RDMA engine interface adapter, and record the obtained queue status information into the queue pair status record table, where the queue status information includes queue timestamp and flight count;
[0101] Poll the queue pair status record table through the automatic response state machine in the RDMA engine interface adapter, and determine the running status of each queue according to the queue status information, where the running status includes fault timeout or normal;
[0102] Record the queue identifier with a running status of fault timeout into the timeout queue record table, and obtain the target queue identifier corresponding to the RDMA payload information;
[0103] When it is determined that the target queue identifier is in the timeout queue record table, an automatic response is generated for the RDMA payload information and fed back to the local processor.
[0104] Optionally, a data encapsulation module is used to generate data of a queue to be backed up according to the RDMA payload information through the data sending component of the RDMA engine, and back up the data of the queue to be backed up in the local memory;
[0105] Obtain the data of non-backup queues, and arbitrate the currently to-be-encapsulated data from the data of the queue to be backed up and the data of non-backup queues, where the data of non-backup queues includes data reception responses and / or target retransmission data;
[0106] Add a header to the to-be-encapsulated data to obtain the encapsulated data, and send the encapsulated data to the remote device through a switch.
[0107] Optionally, the data encapsulation module is used to add an RDMA header to the to-be-encapsulated data based on the RDMA packet component in the RDMA tunnel to obtain a first packet result;
[0108] Add UDP and IP headers to the first packet result based on the UDP and IP packet components in the RDMA tunnel to obtain a second packet result;
[0109] Add an Ethernet header to the second packet result based on the Ethernet component in the RDMA tunnel to obtain the encapsulated data.
[0110] Optionally, the device further includes a remote data processing module, which is used to receive the remote encapsulated data sent by the remote device through the data receiving component of the RDMA engine, and de-encapsulate the remote encapsulated data to obtain the remote RDMA payload information;
[0111] Send the remote RDMA payload information to the RDMA engine interface adapter, and obtain the remote merged data block according to the RDMA payload information through the RDMA engine interface adapter;
[0112] Split the remote merged data block through the packet splitting component to obtain the remote memory semantic valid data and the remote AXI control information;
[0113] Merge the remote memory semantic valid data and the remote AXI control information through the bus interface module to obtain the remote memory semantic data, and transmit the remote memory semantic data to the local through the on-chip network bus.
[0114] Optionally, the remote data processing module is further configured to send the remote memory semantic data to the local memory when the type of the remote memory semantic data is a write request or a remote read request;
[0115] When the type of the remote memory semantic data is a local read response, send the remote memory semantic data to the local processor.
[0116] The memory semantic tunnel communication device based on the RDMA engine provided by the embodiments of the present invention can execute the memory semantic tunnel communication method based on the RDMA engine provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0117] Embodiment Five
[0118] Figure 9 The structural schematic diagram of the electronic device 10 that can be used to implement the embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0119] As Figure 9As shown, the electronic device 10 includes at least one processor 11 and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0120] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0121] The processor 11 can be various general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the memory semantic tunnel communication method based on the RDMA engine.
[0122] In some embodiments, the memory semantic tunnel communication method based on the RDMA engine can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the memory semantic tunnel communication method based on the RDMA engine described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the memory semantic tunnel communication method based on the RDMA engine in any other appropriate way (e.g., by means of firmware).
[0123] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.
[0124] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
[0125] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0126] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0127] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0128] The computing system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The relationship between the client and the server is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0129] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.
[0130] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A memory semantic tunnel communication method based on an RDMA engine, characterized in that, Including: Receiving the memory semantic data sent locally, and performing packet recombination on the memory semantic data to obtain a merged data block; Adapting the merged data block through a direct memory access (RDMA) engine interface adapter to obtain RDMA payload information; Backing up the RDMA payload information to a local memory through the RDMA engine, and encapsulating the backed-up RDMA payload information and sending it to a remote device; The receiving the memory semantic data sent locally, and performing packet recombination on the memory semantic data to obtain a merged data block includes: receiving the memory semantic data sent by a local processor through a network-on-chip bus, and sending the memory semantic data to a bus interface module; Performing parameter extraction on each of the received memory semantic data through the bus interface module to obtain Advanced eXtensible Interface (AXI) control information for a high-performance on-chip bus protocol, memory semantic valid data, and a queue identifier, where the AXI control information includes the type of memory access; Recombining the memory semantic valid data with the same queue identifier and belonging to the same type through a packet recombination component to obtain the merged data block, where the type includes a write request, a read request, or a read response.
2. The method according to claim 1, wherein The recombining the memory semantic valid data with the same queue identifier and belonging to the same type through a packet recombination component to obtain the merged data block includes: Grouping the memory semantic valid data of the same type in the order of input according to the queue identifier through the packet recombination component to obtain a memory semantic data group, where each memory semantic data group contains memory semantic valid data with the same type and queue identifier; Obtaining a merge setting condition, and merging the memory semantic data groups according to the merge setting condition to obtain original merged data, where the merge setting condition includes a maximum allowable merged packet data and a maximum allowable merge duration; Obtaining a data header according to the original merged data, and combining the original merged data with the data header to obtain the merged data block, where the number of merged data blocks corresponding to each memory semantic data group is at least one.
3. The method according to claim 1, wherein The method further includes: When it is determined that the type includes a write request, constructing a first write task matching the memory semantic data, issuing the first write task, and updating in real time the write status matching the first write task, where the write status includes issued and not completed or issued and completed; In response to a synchronous marker write request for the memory semantic data, constructing a synchronous marker update task matching the memory semantic data; Querying a target write status matching the memory semantic data, and determining whether the target write status is issued and completed. If so, issuing the synchronous marker update task, otherwise, performing blocking control on the synchronous marker update task.
4. The method according to claim 1, wherein The adapting the merged data block through a direct memory access (RDMA) engine interface adapter to obtain RDMA payload information includes: Performing RDMA adaptation on the merged data block through the RDMA engine interface adapter to obtain adaptation information, and combining the adaptation information with the merged data block to obtain the RDMA payload information; The RDMA payload information is monitored by the RDMA engine interface adapter, and when it is determined that a fault timeout occurs in the RDMA payload information, an automatic response is generated and fed back to the local processor.
5. The method according to claim 4, wherein The RDMA engine interface adapter is used to monitor the RDMA payload information, and when it is determined that the RDMA payload information has a fault timeout, an automatic response is generated and fed back to the local processor, including: Monitoring the incoming RDMA payload information through the RDMA engine interface adapter, and recording the acquired queue status information into a queue pair status record table, wherein the queue status information includes a queue timestamp and a flight quantity; Polling the queue pair status record table through an automatic response state machine in the RDMA engine interface adapter, and determining the operating status of each queue according to the queue status information, wherein the operating status includes fault timeout or normal; Record the queue identifier of the operation state of the fault timeout in the timeout queue record table, and obtain the target queue identifier corresponding to the RDMA payload information; When it is determined that the target queue identifier is located in the timeout queue record table, an automatic acknowledgement response is generated for the RDMA payload information and fed back to the local processor.
6. The method according to claim 1, wherein The RDMA payload information is backed up in a local memory by an RDMA engine, and the backed-up RDMA payload information is encapsulated and sent to a remote device, including: Generates to-be-backed-up queue data according to the RDMA payload information by a data sending component of the RDMA engine, and backs up the to-be-backed-up queue data in the local memory; Acquire non-to-be-backed-up queue data, and arbitrate current to-be-encapsulated data from the to-be-backed-up queue data and the non-to-be-backed-up queue data, wherein the non-to-be-backed-up queue data includes a data reception response and / or target retransmission data; A packet header is added to the data to be encapsulated to obtain encapsulated data, and the encapsulated data is sent to the remote device through a switch.
7. The method according to claim 6, wherein The step of adding a header to the data to be encapsulated to obtain the encapsulated data includes: Adding an RDMA packet header to the data to be encapsulated based on the RDMA packet component in the RDMA tunnel to obtain a first packet result; Adding UDP and IP headers to the first packet result based on the UDP and IP packet components in the RDMA tunnel to obtain a second packet result; An Ethernet header is added to the second packet result based on the Ethernet component in the RDMA tunnel to obtain the encapsulated data.
8. The method according to claim 1, wherein The method further comprises: Receive the remote encapsulated data sent by the remote device through the data receiving component of the RDMA engine, and decapsulate the remote encapsulated data to obtain remote RDMA payload information; Send the remote RDMA payload information to the RDMA engine interface adapter, and obtain the remote merged data block according to the RDMA payload information through the RDMA engine interface adapter; Split the remote merged data block through a packet splitting component to obtain remote memory semantic valid data and remote AXI control information; Merge the remote memory semantic valid data and the remote AXI control information through a bus interface module to obtain remote memory semantic data, and transmit the remote memory semantic data to the local through the on-chip network bus.
9. The method according to claim 8, wherein The transmitting the remote memory semantic data to the local through the on-chip network bus includes: When the type of the remote memory semantic data is a remote write request or a remote read request, send the remote memory semantic data to the local memory; When the type of the remote memory semantic data is a local read response, send the remote memory semantic data to the local processor.
10. A memory semantic tunnel communication device based on an RDMA engine, characterized in that, Includes: A data recombination module, configured to receive the memory semantic data sent by the local, and perform packet recombination on the memory semantic data to obtain a merged data block; An RDMA adaptation module, configured to adapt the merged data block through a direct memory access RDMA engine interface adapter to obtain RDMA payload information; A data encapsulation module, configured to back up the RDMA payload information in the local memory through the RDMA engine, and encapsulate the backed-up RDMA payload information and send it to a remote device; The data recombination module is configured to receive the memory semantic data sent by the local processor through the on-chip network bus, and send the memory semantic data to the bus interface module; Extract parameters from each of the received memory semantic data through the bus interface module to obtain high-performance on-chip bus protocol AXI control information, memory semantic valid data, and a queue identifier, where the AXI control information includes the type of memory access; Recombine the memory semantic valid data with the same queue identifier and belonging to the same type through a packet recombination component to obtain the merged data block, where the type includes a write request, a read request, or a read response.
11. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a processor to implement the method according to any one of claims 1-9 when executed.
Citation Information
Patent Citations
DDR arbitration and scheduling method and system based on AXI protocol
CN113641603A
NVMe write data processing method, terminal and storage medium
CN118860290A