RDMA device, message transmission method, chip and RDMA system
By using the type information processing unit in the RDMA device to generate and directly transmit the data messages of the non -transmission link error type, it solves the problem of service links caused by the transmission error in the existing technology, reducing the transmission time and the system load of the system load. , Improving the user experience.
Patent Information
- Application Number
- CN202411566669.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-01-24
AI Technical Summary
During the data transmission process of the existing RDMA protocol, if there is an error in the transmission of data packets in the transmission task, the service link is usually required to be disconnected, resulting in other services needing to rebuild the link, which increases the workload of system software and hardware, and extends the processing. Time affects user experience.
By introducing the type information processing unit in the RDMA device to analyze the type information of the response message, if all the final type information of all response messages is a non -transmission link error type, generate a reputation message and directly transmit it. Links to reduce transmission time.
This method reduces the transmission time, avoids the disconnection and re-establishment of the service link, reduces the system load, and improves the user experience.
Smart Images

Figure CN119363299A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to an RDMA device, a message transmission method, a chip and an RDMA system. Background Art
[0002] In the field of communication technology, the RDMA (Remote Direct Memory Access) protocol is widely used due to its low latency and high throughput characteristics.
[0003] In the prior art, for data transmission of the RDMA protocol, XRD service (i.e., enhanced reliable data connection service) is often used to achieve efficient transmission of data packets of multiple transmission tasks, wherein multiple transmission tasks share one service link. When an error occurs in the transmission of a data packet of one of the transmission tasks, regardless of whether the error is a transmission link error or a non-transmission link error, the usual practice in the prior art is that the RDMA device reports CQE (Completion Queue Entry) to the host side, and then the host disconnects the service link. This processing method will cause other services on the service link to need to re-establish the link, thereby increasing the workload of the system software and hardware, prolonging the service processing time, and resulting in a poor user experience. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present application provides an RDMA device, a message transmission method, a chip and an RDMA system. If the final type information of all response messages of the current transmission task is a non-transmission link error type, the type information processing unit generates a retransmission message of the current transmission task according to the response message of the current transmission task. At this time, the RDMA device directly generates a retransmission message and retransmits it without disconnecting the transmission link, and does not affect the transmission of subsequent data messages, thereby reducing the transmission time.
[0005] To solve the above problems, the present invention provides the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides an RDMA device, including:
[0007] The sending end is used to send the data message of the current transmission task to the opposite end device;
[0008] A receiving end, used for receiving a response message sent by the opposite end device in response to the data message;
[0009] A message type information cache unit, used to cache type information corresponding to each response message of the current transmission task, wherein the type information includes a correct response type and an error response type, and the error response type includes a transmission link error type and a non-transmission link error type;
[0010] A type information processing unit, used for parsing the response message to obtain the type information of the response message, and determining the final type information of the response message of the current transmission task according to the type information of all the response messages of the current transmission task, if the final type information of all the response messages of the current transmission task is a non-transmission link error type, then generating a retransmission message of the current transmission task according to the response message of the current transmission task;
[0011] The sending end is further used to send the retransmission message to the opposite end device.
[0012] In some embodiments, the message type information cache unit includes a first bitmap and a second bitmap;
[0013] The first bitmap is used to cache NAK information of the response message;
[0014] The second bitmap is used to cache the SACK information of the response message;
[0015] The type information processing unit is specifically used for:
[0016] The intermediate type information of the response message of the current transmission task is obtained according to the NAK information in the first bitmap and the SACK information at the corresponding position in the second bitmap, and the final type information of the response message of the current transmission task is determined according to the intermediate type information of the response message, wherein the intermediate type information includes a transmission link error type, a non-transmission link error type and a correct response type.
[0017] In some implementations, the type information processing unit is specifically used to:
[0018] When the intermediate type information of any response message of the current transmission task is a transmission link error type, the final type information of all response messages of the current transmission task is determined as the transmission link error type; otherwise, the final type information of the response message of the current transmission task is determined as its corresponding intermediate type information.
[0019] In some implementations, the type information processing unit is further configured to generate corresponding first CQE information after the sending end completes retransmission of the retransmission message;
[0020] The sending end is also used to send the first CQE information to the host end.
[0021] In some implementations, the type information processing unit is specifically configured to generate corresponding second CQE information when the final type information of the response message of the current transmission task is a transmission link error type;
[0022] The sending end is also used to send the second CQE information to the host end.
[0023] In a second aspect, an embodiment of the present application provides a message transmission method, which is applied to the RDMA device as described in the first aspect, and the message transmission method includes:
[0024] The sending end sends the data message of the current transmission task to the opposite end device;
[0025] The receiving end receives a response message sent by the opposite end device in response to the data message;
[0026] The message type information cache unit caches type information corresponding to each response message of the current transmission task, wherein the type information includes a correct response type and an error response type, and the error response type includes a transmission link error type and a non-transmission link error type;
[0027] The type information processing unit parses the response message to obtain the type information of the response message, and determines the final type information of the response message of the current transmission task according to the type information of all the response messages of the current transmission task, and if the final type information of all the response messages of the current transmission task is a non-transmission link error type, a retransmission message of the current transmission task is generated according to the response message of the current transmission task;
[0028] The sending end sends the retransmission message to the opposite end device.
[0029] In some implementations, the message type information cache unit includes a first bitmap and a second bitmap, the first bitmap is used to cache the NAK information of the response message, and the second bitmap is used to cache the SACK information of the response message, and the method further includes:
[0030] The type information processing unit obtains the intermediate type information of the response message of the current transmission task according to the NAK information in the first bitmap and the SACK information at the corresponding position in the second bitmap, and determines the final type information of the response message of the current transmission task according to the intermediate type information of the response message, wherein the intermediate type information includes a transmission link error type, a non-transmission link error type and a correct response type.
[0031] In some implementations, determining the final type information of the response message of the current transmission task according to the intermediate type information of the response message includes:
[0032] When the intermediate type information of any response message of the current transmission task is a transmission link error type, the type information processing unit determines the final type information of all response messages of the current transmission task as a transmission link error type; otherwise, the final type information of the response message of the current transmission task is determined as its corresponding intermediate type information.
[0033] In some embodiments, the method further comprises:
[0034] The type information processing unit generates corresponding first CQE information after the sending end completes the retransmission of the retransmission message;
[0035] The sending end is also used to send the first CQE information to the host end.
[0036] In a third aspect, an embodiment of the present application provides a chip, comprising the RDMA device as described in the first aspect.
[0037] In a fourth aspect, an embodiment of the present application provides an RDMA system, comprising an RDMA device as described in the first aspect and a host end, wherein the host end is used to read the second CQE information, and disconnect the current transmission link or use other transmission links to transmit unsuccessfully transmitted messages according to the second CQE information.
[0038] The present application provides an RDMA device, a message transmission method, a chip and an RDMA system. The present application generates a retransmission message of the current transmission task according to the response message of the current transmission task if the final type information of all response messages of the current transmission task is a non-transmission link error type. At this time, the RDMA device does not need to report CQE to the host side first, but directly generates a retransmission message and retransmits it. There is no need to disconnect the transmission link and does not affect the transmission of subsequent data messages, thereby reducing the transmission time. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a schematic diagram of the structure of the RDMA device provided in an embodiment of the present application.
[0040] Figure 2 It is a schematic diagram of the structure of the RDMA system provided in the embodiment of the present application.
[0041] Figure 3 It is a flow chart of the message transmission method provided in the embodiment of the present application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0043] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0044] The present application provides an RDMA device, a message transmission method, a chip and an RDMA system. If the final type information of all response messages of the current transmission task is a non-transmission link error type, a type information processing unit generates a retransmission message of the current transmission task according to the response message of the current transmission task. At this time, the RDMA device directly generates the retransmission message and retransmits it without disconnecting the transmission link, and does not affect the transmission of subsequent data messages, thereby reducing the transmission time.
[0045] For the sake of convenience, the Chinese terms corresponding to the English abbreviations in this application are introduced: Remote Direct Memory Access (RDMA), CQE (Completion Queue Entry), NAK (Negative Acknowledgement), SACK (Selective Acknowledgement), and QP (Queue Pair).
[0046] The RDMA device provided by the present application will be described in detail below with reference to the accompanying drawings.
[0047] Figure 1 Schematic diagram of the structure of the RDMA device provided in the embodiment of the present application. Figure 1As shown, the RDMA device 100 includes a sending end 110, a receiving end 120, a message type information cache unit 130 and a type information processing unit 140. The sending end 110 is used to send a data message of the current transmission task to the opposite device. The receiving end 120 is used to receive a response message sent by the opposite device in response to the data message. The message type information cache unit 130 is used to cache the type information corresponding to each response message of the current transmission task. Among them, the type information includes a correct response type and an error response type, and the error response type includes a transmission link error type and a non-transmission link error type. The type information processing unit 140 is used to parse the response message to obtain the type information of the response message, and determine the final type information of the response message of the current transmission task according to the type information of all the response messages of the current transmission task. If the final type information of all the response messages of the current transmission task is a non-transmission link error type, then generate a retransmission message of the current transmission task according to the response message of the current transmission task. The sending end 110 is also used to send a retransmission message to the opposite device.
[0048] Among them, the RDMA device can be connected to the host side. In RDMA communication, when the host side needs to initiate a data transmission operation, the host side will create one or more transmission tasks, each of which includes at least one data message to be transmitted. The host side sends the transmission task to the RDMA device to guide the RDMA device to perform the data transmission operation.
[0049] Wherein, each time the opposite end device receives a data message sent by the RDMA device, it will generate and send a corresponding response message to the RDMA device.
[0050] In the case where the RDMA device of the embodiment of the present application determines that the final type information of all response messages of the current transmission task is a non-transmission link error type, the type information processing unit generates a retransmission message of the current transmission task according to the response message of the current transmission task, and transmits the retransmission message. In the present application, when the final type information of all response messages of the current transmission task is a non-transmission link error type, the RDMA device directly generates a retransmission message and retransmits it. In this case, the transmission link will not be disconnected, and the transmission of subsequent data messages will not be affected, thereby reducing the transmission time.
[0051] The message type information cache unit includes a first bitmap and a second bitmap, the first bitmap is used to cache the NAK information of the response message, and the second bitmap is used to cache the SACK information of the response message. The type information processing unit is specifically used to: obtain the intermediate type information of the response message of the current transmission task according to the NAK information in the first bitmap and the SACK information at the corresponding position in the second bitmap, and determine the final type information of the response message of the current transmission task according to the intermediate type information of the response message, wherein the intermediate type information includes a transmission link error type, a non-transmission link error type, and a correct response type.
[0052] Specifically, each bitmap includes multiple record bits, and the number of record bits in a bitmap is equal to the number of data packets of a transmission task. When 1 in the first bitmap and the second bitmap indicates a transmission link error type, and 0 indicates a non-transmission link error type, the type information processing unit is specifically used to perform a bitwise OR operation on the first bitmap and the second bitmap to obtain an updated second bitmap, and obtain the intermediate type information of the response message of the current transmission task according to the identifier of each record bit in the updated second bitmap. When 0 in the first bitmap and the second bitmap indicates a transmission link error type, and 1 indicates a non-transmission link error type, the type information processing unit is specifically used to perform a bitwise AND operation on the first bitmap and the second bitmap to obtain an updated second bitmap, and obtain the intermediate type information of the response message of the current transmission task according to the identifier of each record bit in the updated second bitmap.
[0053] Among them, the type information processing unit is specifically used for: when the intermediate type information of any response message of the current transmission task is a transmission link error type, the final type information of all response messages of the current transmission task is determined as the transmission link error type; otherwise, the final type information of the response message of the current transmission task is determined as its corresponding intermediate type information.
[0054] The type information processing unit is further used to generate corresponding first CQE information after the sending end completes the retransmission of the retransmission message. The sending end is also used to send the first CQE information to the host end. Specifically, the sending end is also used to send the first CQE information to the QP corresponding to the retransmission message in the host end. The host end can obtain information that the retransmission message has been retransmitted based on the first CQE information.
[0055] The type information processing unit is specifically used to generate the corresponding second CQE information when the final type information of the response message of the current transmission task is a transmission link error type. The transmitting end is also used to send the second CQE information to the host end. Specifically, the transmitting end sends the second CQE information to the corresponding QP in the host end to report the CQE of the error, and the CQE includes the final type information of the response message. The host end can decide how to retransmit the data message corresponding to the response message of the transmission link error type according to the second CQE information.
[0056] In summary, the RDMA device provided by the embodiment of the present application includes the following advantages: if the final type information of all response messages of the current transmission task is a non-transmission link error type, the type information processing unit generates a retransmission message of the current transmission task according to the response message of the current transmission task. The RDMA device directly generates a retransmission message and retransmits it without disconnecting the transmission link, and does not affect the transmission of subsequent data messages, thereby reducing the transmission time.
[0057] The present application also provides a chip, comprising the RDMA device as described above.
[0058] The present application also provides a network interface card, comprising the chip as described above and a plurality of interfaces, and the chip communicates externally through the interfaces.
[0059] See also Figure 2 , Figure 2 Schematic diagram of the structure of the RDMA system provided in the embodiment of the present application. Figure 2 As shown, the present application also provides an RDMA system 200, including the RDMA device 100 as described above and a host end 210, the host end 210 is used to read the second CQE information, disconnect the current transmission link according to the second CQE information, or use other transmission links to transmit the unsuccessfully transmitted message.
[0060] The present application also provides a message transmission method, which is applied to the RDMA device as described above. Figure 3 , Figure 3 Schematic diagram of the message transmission method provided in the embodiment of the present application. Figure 3 As shown, in some implementations, the message transmission method includes steps S100 to S400.
[0061] S100: The sending end sends a data message of the current transmission task to the opposite end device.
[0062] S200: The receiving end receives a response message sent by the opposite end device in response to the data message.
[0063] S300: The type information processing unit parses the response message to obtain the type information of the response message, and determines the final type information of the response message of the current transmission task based on the type information of all the response messages of the current transmission task. If the final type information of all the response messages of the current transmission task is a non-transmission link error type, a retransmission message of the current transmission task is generated based on the response message of the current transmission task, wherein the type information includes a correct response type and an error response type, and the error response type includes a transmission link error type and a non-transmission link error type.
[0064] In some embodiments, the message type information cache unit includes a first bitmap and a second bitmap, the first bitmap is used to cache the NAK information of the response message, and the second bitmap is used to cache the SACK information of the response message, and the method further includes: the type information processing unit obtains the intermediate type information of the response message of the current transmission task according to the NAK information in the first bitmap and the SACK information at the corresponding position in the second bitmap, and determines the final type information of the response message of the current transmission task according to the intermediate type information of the response message. The intermediate type information includes a transmission link error type, a non-transmission link error type, and a correct response type.
[0065] In some embodiments, the final type information of the response message of the current transmission task is determined based on the intermediate type information of the response message, including: when the intermediate type information of any response message of the current transmission task is a transmission link error type, the type information processing unit determines the final type information of all response messages of the current transmission task as the transmission link error type; otherwise, the final type information of the response message of the current transmission task is determined as its corresponding intermediate type information.
[0066] Step S400: The sending end sends a retransmission message to the opposite end device.
[0067] In some implementations, the method further includes: the type information processing unit generates corresponding first CQE information after the sending end completes retransmission of the retransmission message. The sending end is also used to send the first CQE information to the host end.
[0068] For more details, please refer to the contents in the aforementioned implementation manner.
[0069] In some embodiments, a computer program product is provided, including a computer program, which implements the above-mentioned message transmission method when executed by a processor.
[0070] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0071] In summary, the present application provides an RDMA device, a message transmission method, a chip and an RDMA system, wherein the RDMA device includes a sending end, which is used to send a data message of a current transmission task to a peer device; a receiving end, which is used to receive a response message sent by the peer device in response to the data message; a message type information caching unit, which is used to cache type information corresponding to each response message of the current transmission task, wherein the type information includes a correct response type and an error response type, and the error response type includes a transmission link error type and a non-transmission link error type; a type information processing unit, which is used to parse the response message to obtain the type information of the response message, and determine the final type information of the response message of the current transmission task according to the type information of all response messages of the current transmission task, if the final type information of all response messages of the current transmission task is a non-transmission link error type, then generate a retransmission message of the current transmission task according to the response message of the current transmission task; the sending end is also used to send a retransmission message to the peer device. In the present application, if the final type information of all response messages of the current transmission task is a non-transmission link error type, the type information processing unit generates a retransmission message of the current transmission task according to the response message of the current transmission task. At this time, the RDMA device directly generates the retransmission message and retransmits it without disconnecting the transmission link and does not affect the transmission of subsequent data messages, thereby reducing the transmission time.
[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An RDMA device, characterized in that: include: The sending end is used to send the data message of the current transmission task to the opposite end device; A receiving end, used for receiving a response message sent by the opposite end device in response to the data message; A message type information cache unit, used to cache type information corresponding to each response message of the current transmission task, wherein the type information includes a correct response type and an error response type, and the error response type includes a transmission link error type and a non-transmission link error type; A type information processing unit, used for parsing the response message to obtain the type information of the response message, and determining the final type information of the response message of the current transmission task according to the type information of all the response messages of the current transmission task, if the final type information of all the response messages of the current transmission task is a non-transmission link error type, then generating a retransmission message of the current transmission task according to the response message of the current transmission task; The sending end is further used to send the retransmission message to the opposite end device.
2. The RDMA device according to claim 1, characterized in that: The message type information cache unit includes a first bitmap and a second bitmap; The first bitmap is used to cache NAK information of the response message; The second bitmap is used to cache the SACK information of the response message; The type information processing unit is specifically used for: The intermediate type information of the response message of the current transmission task is obtained according to the NAK information in the first bitmap and the SACK information at the corresponding position in the second bitmap, and the final type information of the response message of the current transmission task is determined according to the intermediate type information of the response message, wherein the intermediate type information includes a transmission link error type, a non-transmission link error type and a correct response type.
3. The RDMA device according to claim 2, characterized in that: The type information processing unit is specifically used for: When the intermediate type information of any response message of the current transmission task is a transmission link error type, the final type information of all response messages of the current transmission task is determined as the transmission link error type; otherwise, the final type information of the response message of the current transmission task is determined as its corresponding intermediate type information.
4. The RDMA device according to claim 2 or 3, characterized in that: The type information processing unit is further configured to generate corresponding first CQE information after the sending end completes retransmission of the retransmission message; The sending end is also used to send the first CQE information to the host end.
5. The RDMA device according to claim 3, characterized in that: The type information processing unit is specifically used to generate corresponding second CQE information when the final type information of the response message of the current transmission task is a transmission link error type; The sending end is also used to send the second CQE information to the host end.
6. A message transmission method, characterized in that: Applied to the RDMA device according to any one of claims 1 to 5, the message transmission method comprises: The sending end sends the data message of the current transmission task to the opposite end device; The receiving end receives a response message sent by the opposite end device in response to the data message; The message type information cache unit caches type information corresponding to each response message of the current transmission task, wherein the type information includes a correct response type and an error response type, and the error response type includes a transmission link error type and a non-transmission link error type; The type information processing unit parses the response message to obtain the type information of the response message, and determines the final type information of the response message of the current transmission task according to the type information of all the response messages of the current transmission task, and if the final type information of all the response messages of the current transmission task is a non-transmission link error type, a retransmission message of the current transmission task is generated according to the response message of the current transmission task; The sending end sends the retransmission message to the opposite end device.
7. The message transmission method according to claim 6, characterized in that: The message type information cache unit includes a first bitmap and a second bitmap, the first bitmap is used to cache the NAK information of the response message, and the second bitmap is used to cache the SACK information of the response message, and the determining the final type information of the response message of the current transmission task according to the type information of all response messages of the current transmission task specifically includes: The type information processing unit obtains the intermediate type information of the response message of the current transmission task according to the NAK information in the first bitmap and the SACK information at the corresponding position in the second bitmap, and determines the final type information of the response message of the current transmission task according to the intermediate type information of the response message, wherein the intermediate type information includes a transmission link error type, a non-transmission link error type and a correct response type.
8. The message transmission method according to claim 7, characterized in that: The determining the final type information of the response message of the current transmission task according to the intermediate type information of the response message specifically includes: When the intermediate type information of any response message of the current transmission task is a transmission link error type, the type information processing unit determines the final type information of all response messages of the current transmission task as a transmission link error type; otherwise, the final type information of the response message of the current transmission task is determined as its corresponding intermediate type information.
9. The message transmission method according to claim 7 or 8, characterized in that: The method further comprises: The type information processing unit generates corresponding first CQE information after the sending end completes the retransmission of the retransmission message; The sending end is also used to send the first CQE information to the host end.
10. A chip, characterized in that: The invention comprises an RDMA device as claimed in any one of claims 1 to 5.
11. An RDMA system, characterized in that: comprising the RDMA device as claimed in any one of claims 1 to 5 and a host end, The host end is used to read the second CQE information, and disconnect the current transmission link or use other transmission links to transmit the unsuccessfully transmitted message according to the second CQE information.