Packet sending apparatus and receiving apparatus
By designing the message sending and receiving devices, and using the first bit diagram and sending information to generate retransmission requests, selective retransmission of messages in the RDMA protocol is realized, solving the network bandwidth waste and congestion problems caused by out-of-order packet loss and improving data transmission efficiency.
Patent Information
- Application Number
- PCT/CN2025/108997
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-17
- Filing Date
- 2025-07-17
- Publication Date
- 2026-01-22
AI Technical Summary
In RDMA protocol data transmission, out-of-order packet loss leads to retransmissions that waste network bandwidth and cause network congestion.
By employing a message sending device and a receiving device, a retransmission request is generated using the first bit diagram and sending information to achieve selective retransmission of messages, retransmitting only messages that have not been received.
It reduces network bandwidth waste, avoids network congestion, and improves data transmission efficiency.
Smart Images

Figure CN2025108997_22012026_PF_FP_ABST
Abstract
Description
Message sending device and receiving device
[0001] Related applications
[0002] The present application claims priority to the Chinese patent application No. 2024109568644, filed on July 17, 2024, and entitled "Message sending device and receiving device", the contents of which are hereby incorporated by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to the technical field of data transmission, and in particular to a message sending device and a receiving device. BACKGROUND
[0004] The Remote Direct Memory Access (RDMA) protocol is a data transmission protocol applied in a distributed system. Generally, the data volume of a RDMA transmission task is large, and when data is transmitted on a network, the RDMA transmission task is split into multiple messages, and each message is independently transmitted from a sending end to a receiving end.
[0005] At present, for the data transmission of the RDMA protocol, generally in a parallel computer system, once there is an out-of-order packet loss, all the messages after the out-of-order packet loss must be retransmitted. For example, if only one packet is lost during transmission while all other data packets are received, retransmission of all the messages is also required. Based on this, the retransmission after the loss of the out-of-order message will waste a large amount of network bandwidth and easily cause network congestion. SUMMARY
[0006] According to various embodiments of the present application, a message sending device and a receiving device are provided.
[0007] According to an aspect of the present application, a message sending device is provided, which comprises a first message sending module, a first on-chip cache, a first message receiving module and a first processing logic module.
[0008] The first message sending module is configured to send a target message corresponding to a message transmission task according to a preset message transmission window, and record sending information of the target message.
[0009] The first message receiving module is configured to receive a response message of the target message, and in a case where the response message carries a first bitmap, update the first bitmap to the first on-chip cache, wherein the first bitmap stores an identification field for indicating a receiving state of the target message.
[0010] The first processing logic module is configured to generate a retransmission request according to the first bitmap and the sending information in a case where message retransmission is required.
[0011] The first packet sending module is further configured to generate a retransmission packet according to the retransmission request, and send the retransmission packet.
[0012] In some embodiments, the size of the first bitmap is greater than or equal to the size of the packet transmission window, and the plurality of packet sequence numbers corresponding to the identification fields saved in the first bitmap are continuous.
[0013] In some embodiments, the sending information at least includes a packet sequence number of a first target packet to be sent, a message sequence number, and a message internal sequence number.
[0014] In some embodiments, the first processing logic module is specifically configured to, in the case that the first bitmap includes a target field, determine a packet sequence number to be retransmitted according to the relative position information of a first identification field and the target field in the first bitmap, and generate a retransmission request according to the packet sequence number to be retransmitted and the packet transmission window, wherein the target field is used to represent that the target packet of the identification field is not received.
[0015] In some embodiments, the first on-chip cache stores a second bitmap, and the second bitmap is used to store the sending state of the packet task.
[0016] In some embodiments, the first processing logic module is further configured to determine the receiving state of a last target packet of the packet task according to the first bitmap, and update the second bitmap according to the receiving state of the last target packet.
[0017] In some embodiments, the packet sending device further includes an event reporting module.
[0018] The first processing logic module is further configured to generate an event completion notification corresponding to the packet task according to the second bitmap, and send the event completion notification to the event reporting module.
[0019] In some embodiments, the first processing logic module is specifically configured to, in the case that packet retransmission is needed, determine a packet sequence number to be retransmitted according to the first bitmap and the sending information, in the case that the number of the target packets to be retransmitted is less than the packet transmission window, determine an unfinished sending packet task according to the second bitmap, obtain newly added packet sequence numbers to be transmitted according to the unfinished sending packet task, and generate a retransmission request according to the packet sequence numbers to be retransmitted and the newly added packet sequence numbers to be transmitted.
[0020] According to another aspect of the present application, a packet receiving device is provided, which includes a second packet sending module, a second on-chip cache, a second packet receiving module, and a second processing logic module.
[0021] a second packet receiving module, configured to receive a target packet;
[0022] a second processing logic module, configured to generate a first bitmap according to the received target packet, and store the first bitmap into a second on-chip cache, and generate a response packet according to the first bitmap, wherein the first bitmap stores an identification field used to indicate a receiving state of the target packet;
[0023] a second packet sending module, configured to feed back the response packet to a packet sending device.
[0024] In some embodiments, the target packet is sent in a preset packet transmission window; the second processing logic module is further configured to update the first bitmap according to a first packet sequence number corresponding to the identification field used to indicate that the target packet is not received and the packet transmission window after the response packet is fed back to the packet sending device.
[0025] In some embodiments, the second packet sending module is further configured to feed back the response packet to the packet sending device through the second packet sending module after the response packet is generated based on the second processing logic module, so that the packet sending device can explicitly indicate the target packet that is not received.
[0026] In some embodiments, the second processing logic module is further configured to determine a first packet sequence number corresponding to the identification field used to indicate that the target packet is not received from the first bitmap, update the first bitmap according to the first packet sequence number and the packet transmission window, and store the updated first bitmap into the second on-chip cache.
[0027] In some embodiments, the second processing logic module is further configured to set the identification field corresponding to the packet sequence number of the received target packet in the first bitmap.
[0028] According to another aspect of the present application, an electronic device is provided, which comprises:
[0029] at least one processor; and
[0030] a memory connected with the at least one processor in communication; wherein,
[0031] 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 to enable the at least one processor to perform the method flow involved in any embodiment of the present application.
[0032] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for causing a processor to implement the method procedure involved in any of the embodiments of the present application when executed.
[0033] The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the application will be apparent from the description and drawings, and from the claims. BRIEF DESCRIPTION OF DRAWINGS
[0034] For better understanding of those embodiments and / or examples of the application disclosed herein, reference can be made to one or more drawings. Additional details or examples used to describe the drawings should not be considered as limiting the scope of any of the disclosed applications, presently described embodiments and / or examples, and the best mode presently contemplated of these applications.
[0035] Fig. 1 is a structural schematic diagram of a packet sending device according to an embodiment of the present application;
[0036] Fig. 2 is a structural example diagram of a first bitmap according to an embodiment of the present application;
[0037] Fig. 3 is a structural example diagram of a packet sending device according to an embodiment of the present application;
[0038] Fig. 4 is a structural example diagram of a second bitmap according to an embodiment of the present application;
[0039] Fig. 5 is a structural schematic diagram of a packet receiving device according to an embodiment of the present application;
[0040] Fig. 6 is a structural schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative work should fall within the protection scope of the present application.
[0042] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative work should fall within the protection scope of the present application.
[0043] It should be noted that the terms "first", "second", and the like in the description and in the claims of the present application and above-described accompanying drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or apparatus including a series of steps or units does not necessarily have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products, or apparatuses.
[0044] Embodiment one
[0045] FIG. 1 is a structural schematic diagram of a packet sending device provided by an embodiment of the present application. The present embodiment can be applied to the case of selectively retransmitting packets when data transmission is performed through the RDMA protocol. The packet sending device can be implemented in the form of hardware and / or software, and can be configured in an electronic device such as a computer or a server. As shown in FIG. 1, the method comprises:
[0046] As shown in FIG. 1, the packet sending device comprises a first packet sending module 110, a first on-chip cache 120, a first packet receiving module 130, and a first processing logic module 140.
[0047] The first packet sending module 110 is configured to send a target packet corresponding to a packet transmission task according to a preset packet transmission window, and record sending information of the target packet.
[0048] The packet transmission window is a communication window for transmitting packets and is set in advance. The packet transmission task can be understood as an operation or task performed in a network communication process to achieve data transmission. The packet transmission task can be a task of sending multiple target packets. The target packet can be understood as a packet data corresponding to a current data transmission request. The target packet can contain complete data information to be sent. The sending information can include a packet sequence number, a message sequence number, and a message internal sequence number corresponding to the target packet.
[0049] Specifically, when it is determined that data transmission is needed, the first packet sending module sends a target packet corresponding to a packet transmission task according to a preset packet transmission window, and records sending information of a data table in the target packet. Based on this, the recorded sending information can be compared with a subsequent first bitmap to confirm the sending situation of the target packet. That is, data support is provided for subsequent determination of the sending situation of the target packet.
[0050] Optionally, the apparatus can further comprise a doorbell notification module configured to generate a doorbell notification corresponding to the data transmission request in response to the data transmission request, and transmit a write pointer in the doorbell notification to the first packet sending module, so that the first packet sending module confirms whether the packet task has enabled the timer in a case that the write pointer of the doorbell notification is received. The timer is used to time the packet task sent by the first packet sending module.
[0051] The data transmission request is a request for notifying the first packet sending module to transmit data. The doorbell notification is used to remind the first packet sending module to confirm whether the packet task has enabled the timer. The write pointer in the doorbell notification is used to indicate the next target packet to be written in the packet transmission window. The timing time of the timer is set according to actual needs, and is a time corresponding to the packet task. The purpose of enabling the timer is that if no response packet is received within the timing time corresponding to the timer, it is considered that the packet task is timed out, and at this time, the retransmission of the target packet is needed.
[0052] Specifically, the doorbell notification module generates the doorbell notification corresponding to the data transmission request in response to the data transmission request. The write pointer corresponding to the doorbell notification is transmitted to the first packet sending module, so that the first packet sending module determines whether the current packet task has enabled the timer when the write pointer is received. Based on this, it is convenient for subsequent judgment whether the packet needs to be retransmitted according to the timing time corresponding to the timer, so that the timing of retransmitting the packet is more accurate.
[0053] Optionally, the sending information at least includes a packet sequence number of a first target packet sent at this time, a message sequence number and a message internal sequence number.
[0054] The packet sequence number (PSN) is an identifier for identifying the target message, and the packet sequence number corresponding to each target message is unique. Optionally, the packet sequence number can be counted in a global incremental counting manner, and counting is started from 0 after counting to 2 to the power of 24. For example, the packet sequence number corresponding to the target message of the message task is 3, and the packet sequence number corresponding to the next target message in the message task is 4. The message sequence number (MSN) is an identifier for identifying the message task, and the message sequence number corresponding to each message task is unique. The internal packet sequence number (IPSN) is an identifier for identifying the number of target messages in the current message task. Optionally, the message sequence number is counted from 0. For example, for the current message task, the number of target messages corresponding to the current message task is counted from 0. The next message task clears the internal packet sequence number and counts the number of target messages corresponding to the next message task from 0.
[0055] Specifically, the first message sending module can record the packet sequence number, the message sequence number, and the internal packet sequence number of the first target message sent at this time when sending the target message corresponding to the message task, so as to facilitate subsequent determination of the starting identification field in the first bitmap when the first bitmap is received. Optionally, the packet sequence number, the message sequence number, and the internal packet sequence number corresponding to each target message can be recorded. In order to save memory and improve the speed of subsequent determination of retransmission messages, the sending information at least includes the packet sequence number, the message sequence number, and the internal packet sequence number of the first target message sent at this time in the current message task.
[0056] The first message receiving module 130 is configured to receive a response message of the target message, and in the case that the first bitmap is carried in the response message, update the first bitmap to the first on-chip cache 120, wherein the first bitmap stores identification fields for indicating the receiving state of the target message.
[0057] The response message can be a message sent by the message receiving device to the message sending device in response to receiving the target message. The response message contains feedback information corresponding to the target message. The identification field stored in the first bitmap is used to represent whether the target message is received. For example, referring to FIG. 2, which is a structural example diagram of the first bitmap. In FIG. 2, a valid identification field is stored in a small grid. Optionally, the identification field can be a number. For example, the identification field 0 or 1 can be used to represent the receiving state of the target message, that is, 0 represents that the target message is not received, and 1 represents that the target message is received. The identification field in the first bitmap corresponds to the packet sequence number of the target message. For example, if the identification field in a certain position in the first bitmap is 0, it can be determined that the packet sequence number of the target message corresponding to the current position. The first on-chip cache can be a cache module for storing the first bitmap. Optionally, the sending information of the target message can also be stored in the first on-chip cache.
[0058] Specifically, the response message corresponding to the target message is received through the first message receiving module, and in the case that the first bitmap is carried in the response message, the first bitmap is updated to the first on-chip cache to facilitate subsequent direct acquisition of the first bitmap from the first on-chip cache to determine the receiving state of the target message. Based on the first message receiving module, the receiving of the response message and the updating operation of the first bitmap are realized, which provides data support for subsequent determination of the receiving state of the target message.
[0059] For example, as shown in FIG. 3, when the first message receiving module receives the response message and determines that the first bitmap is carried in the response message, the first bitmap is stored in the first on-chip cache to facilitate the first processing logic module to acquire the first bitmap from the first on-chip cache and analyze and process the first bitmap.
[0060] Optionally, the size of the first bitmap is greater than or equal to the size of the message transmission window, and the packet sequence numbers of the plurality of target messages corresponding to the identification fields saved by the first bitmap are continuous.
[0061] The size of the first bitmap can be greater than or equal to the size of the message transmission window. It can be understood that the number of target messages corresponding to the identification fields stored in the first bitmap is greater than the number of target messages that can be transmitted by the message transmission window. For example, the identification fields stored in the first bitmap are "01011
[0062] 10100", the packet sequence numbers corresponding to the plurality of target messages can be "1, 2, 3, 4, 5, 6, 7, 8, 9, 10" in turn, and based on this, the packet sequence numbers of the target messages that need to be retransmitted again by the message transmission window are "1, 3, 7, 9, 10". Based on the above, the number of target messages corresponding to the first bitmap is 10, and the number of target messages that can be transmitted by the message transmission window is often less than or equal to the number of target messages corresponding to the first bitmap, that is, the size of the first bitmap is greater than or equal to the size of the message transmission window. Based on this, the packet sequence number of the target message can be accurately determined according to the identification field in the first bitmap, and the omission of the target message is avoided.
[0063] Optionally, the first on-chip cache stores a second bitmap, and the second bitmap is used to store the sending state of the message task.
[0064] The second bitmap is used to represent the sending state of the message task. Optionally, the message sequence numbers of the plurality of message tasks corresponding to the identification field saved by the second bitmap are continuous. For example, the sending state of the message task can be represented by the number 0 or 1. That is, 0 represents that the current message task is not sent completely, and 1 represents that the current message task is sent completely. The sending state of the current message task can be determined through the second bitmap, and the repeated retransmission of the message is avoided after the message task is completed.
[0065] Illustratively, referring to FIG. 4, the second bitmap can be as shown in FIG. 4. The message sequence number of the message task corresponding to the identification field of the second bitmap is used to confirm whether the current message task is completed according to the identification field. When eop (end of packet) in one small cell in FIG. 4 is 1, it means that the execution of this message task is completed.
[0066] The first processing logic module 140 is configured to generate a retransmission request according to the first bitmap and the sending information in the case that the message needs to be retransmitted.
[0067] The retransmission request can be a request for informing the first message sending module of the packet sequence number of the target message that needs to be retransmitted.
[0068] Specifically, the case that needs to be retransmitted can be the case that the message task is timed out, or the case that the first bitmap determines that there is a target message that has not been received. The first case can be understood as the case that the first bitmap in the first on-chip cache is obtained, the packet sequence number of the target message that needs to be retransmitted in the first bitmap is determined according to the packet sequence number of the first target message in the sending information, and the retransmission request is generated based on the packet sequence number, in the case that the message task enables the timer and the value of the timer indicates that the message task is timed out. The second case can be the case that the target task does not enable the timer, the first bitmap and the sending information in the first on-chip cache are obtained, the number of target messages that need to be retransmitted and the packet sequence number of the target message that need to be retransmitted are determined, and the retransmission request is generated based on the packet sequence number. The generation of the message retransmission request is realized by the first processing logic module, which facilitates the selective retransmission of the target message according to the retransmission request.
[0069] For example, in combination with the above example, referring to FIG. 3, when the doorbell notification module generates the doorbell notification, the write pointer in the doorbell notification is transmitted to the first message sending module, so that the first message sending module determines whether the timer is enabled in the message task. If the timer is enabled in the first message sending module, in the case that the timer is timed out, the packet sequence number of the first target message that needs to be retransmitted in the first bitmap is determined by the first processing logic module, so as to realize the message retransmission operation. If the timer is not enabled in the first message sending module, the first bitmap, the packet sequence number, the message sequence number and the message internal sequence number of the target message in the first on-chip cache are obtained by the first processing logic module, the number of target messages that need to be retransmitted is determined, and the retransmission operation is realized. In addition, the read-write pointer can be set to indicate the identification field of the first bitmap based on the read-write pointer, so as to determine the target message that needs to be retransmitted.
[0070] Optionally, the first processing logic module 140 is specifically configured to determine the packet sequence number to be retransmitted according to the relative position information of the first identification field and the target field in the first bitmap, and generate the retransmission request according to the packet sequence number to be retransmitted and the message transmission window, in the case that the first bitmap includes the target field, wherein the target field is used to represent the identification field of the target message that has not been received.
[0071] The target field can be an identification field indicating that the target packet is not received. For example, the identification field is described as 0 or 1, 0 indicating that the identification field of the target packet is not received, and 1 indicating that the identification field of the target packet is received. If the first bitmap contains the identification field 0, it indicates that the identification field of the target packet is not received in the first bitmap. The relative position information can be understood as the position of the target field in the first bitmap. For example, the first bitmap is described as a one-dimensional bitmap, and the identification fields saved in the first bitmap are "1101" in sequence. The relative position information of the target field can be that the target field is the third position in the first bitmap. This is only an example, and the specific structure of the first bitmap and the specific relative position information are not limited.
[0072] Specifically, the first processing logic module determines the relative position information of each target field with the first identification field in sequence according to the first identification field in the first bitmap when detecting that the first bitmap contains the target field. The first identification field in the first bitmap corresponds to the target packet corresponding to the minimum packet sequence number of the current sending. The packet sequence number corresponding to the first target packet is determined according to the pre-recorded sending information of the first target packet. The packet sequence number to be retransmitted is determined through the packet sequence number of the first target packet and the relative position information. The retransmission request is generated according to the packet sequence number to be retransmitted and the size of the packet transmission window, and the packet retransmission processing is performed based on the retransmission request. Based on this, the accurate packet sequence number to be retransmitted is determined, which facilitates the subsequent retransmission processing of the target packet corresponding to the packet sequence number to be retransmitted, realizes the selective retransmission of the target packet, and reduces the bandwidth consumption on the network.
[0073] An example is taken to illustrate the identification field saved in the first bitmap: "1101101100". If the packet sequence number corresponding to the first target message of the current sending is 3, the packet sequence number of the target message corresponding to the first identification field "1" is 3, and the first target message has been received. The relative position information of the target field in the first bitmap is determined according to the position of the first identification field, so as to determine the packet sequence numbers to be retransmitted as "5, 8, 11, 12" by the relative position information. The retransmission request is generated according to the number of target messages corresponding to the packet sequence numbers to be retransmitted and the message transmission window. If the number of messages that can be retransmitted by the message transmission window is 3, the packet sequence numbers corresponding to the target messages to be retransmitted in the current time are determined as "5, 8, 11". The target message with the sequence number "12" can be retransmitted based on the next message transmission window. Correspondingly, if the number of messages that can be retransmitted by the message transmission window is 5, the target message required to be transmitted by the new message task can be transmitted at the same time while the target messages corresponding to the packet sequence numbers to be retransmitted are retransmitted.
[0074] Optionally, the first processing logic module 140 is further configured to determine the receiving state of the last target message of the message task according to the first bitmap, and update the second bitmap according to the receiving state of the last target message.
[0075] The receiving state of the last target message can be used to represent whether the current message task is received completely.
[0076] Specifically, the receiving state of the last target message of the message task is determined according to the first bitmap. If the receiving state of the last target message is received, and the receiving states of all target messages before the last target message are received, it is determined that the message task has been completed, and the identification field corresponding to the current message task in the second bitmap can be updated. By determining the receiving state of the last target message, it can be determined whether the target messages corresponding to the current message task are all received. After the update, the second bitmap can not only accurately know whether the current message task is completed, but also determine the completion of other message tasks.
[0077] An example is taken to illustrate the identification field saved in the first bitmap: "1101101100". If the packet sequence number corresponding to the first target message of the current sending is 3, the packet sequence number of the target message corresponding to the first identification field "1" is 3, and the first target message has been received. The relative position information of the target field in the first bitmap is determined according to the position of the first identification field, so as to determine the packet sequence numbers to be retransmitted as "5, 8, 11, 12" by the relative position information. The retransmission request is generated according to the number of target messages corresponding to the packet sequence numbers to be retransmitted and the message transmission window. If the number of messages that can be retransmitted by the message transmission window is 3, the packet sequence numbers corresponding to the target messages to be retransmitted in the current time are determined as "5, 8, 11". The target message with the sequence number "12" can be retransmitted based on the next message transmission window. Correspondingly, if the number of messages that can be retransmitted by the message transmission window is 5, the target message required to be transmitted by the new message task can be transmitted at the same time while the target messages corresponding to the packet sequence numbers to be retransmitted are retransmitted.
[0078] Optionally, the message sending device further comprises an event reporting module; and the first processing logic module 140 is further configured to generate an event completion notification corresponding to the message task according to the second bitmap, and send the event completion notification to the event reporting module.
[0079] The event completion notification can be understood as a notification for informing the event reporting module that the current message task is received and completed. The event reporting module can be a module for reporting the completion of the current message task of other hardware or software modules.
[0080] Specifically, since the identification field in the second bitmap corresponds to the message sequence number of the message task, the completion of the message task corresponding to the message sequence number can be determined according to the identification field, so as to determine the message task that has been received and completed. The event completion notification is generated based on the message task that has been received and completed, and the event completion notification is sent to the event reporting module, so that the event reporting module reports the completion of the message task, and the target software or module can further process the data information corresponding to the current message task in time, so as to improve the data processing efficiency.
[0081] For example, the message sequence number can be "2, 5". The event completion notification can be generated based on the message sequence number of the message task, for example, the message task with the message sequence number 2 and the message task with the message sequence number 5 are executed and completed. In combination with the above example, the event reporting module in FIG. 3 can report the event completion notification to inform the target software of the completion of the current message task.
[0082] Optionally, the first processing logic module 140 is specifically configured to, in the case that message retransmission is needed, determine the packet sequence number to be retransmitted according to the first bitmap and the sending information, in the case that the number of target messages to be retransmitted is less than the message transmission window, determine the message task that has not been completed according to the second bitmap, obtain the newly added packet sequence number to be transmitted according to the message task that has not been completed, and generate a retransmission request according to the packet sequence number to be retransmitted and the newly added packet sequence number to be transmitted.
[0083] The newly added packet sequence number to be transmitted can be the packet sequence number corresponding to the target message that has not been sent in the message task that has not been completed.
[0084] Specifically, in the case of packet retransmission, according to the identification field in the first bitmap and the packet sequence number in the sending information, the packet sequence number corresponding to the position of the identification field as the target field is determined, that is, the packet sequence number to be retransmitted is determined. If the number of target packets corresponding to the packet sequence number to be retransmitted is less than the packet transmission window, the target packets in other unfinished sending packet tasks can be obtained for sending together. That is, according to the message sequence number corresponding to the identification field in the second bitmap, the unfinished sending packet task is determined. According to the unfinished sending packet task, the packet sequence number of the target packet to be transmitted is determined. The retransmission request is generated according to the packet sequence number to be retransmitted and the packet sequence number to be transmitted, so that the packet transmission window performs packet transmission processing. Based on the above, while completing the sending of the current packet task, the unfinished sending packet task can be processed synchronously, and the completion efficiency of the packet task is improved.
[0085] For example, the first bitmap is a one-dimensional bitmap. If the identification fields in the first bitmap are "0111010110" in turn, and the packet sequence number corresponding to the first target packet in the sending information is 1, it can be known based on the above that the packet sequence numbers to be retransmitted are "1, 5, 7, 10" in turn, and the number of target packets to be retransmitted is 4. If the number of packets that can be transmitted by the packet transmission window at a time is 5, the message sequence number M SN corresponding to the position of the next identification field being 0 after the current packet task can be determined from the second bitmap. The packet task corresponding to the message sequence number is the unfinished sending packet task. The newly added packet sequence number to be transmitted is "11" obtained from the unfinished sending packet task. The retransmission request is generated according to the packet sequence numbers "1, 5, 7, 10, 11", so as to realize the transmission processing of the target packets corresponding to the above packet sequence numbers.
[0086] The first packet sending module 110 is also configured to generate a retransmission packet according to the retransmission request, and send the retransmission packet.
[0087] The retransmission packet can be a target packet that needs to be transmitted according to the packet sequence number in the retransmission request.
[0088] Specifically, when the first packet sending module receives the retransmission request, the target packet that needs to be retransmitted is determined according to the packet sequence number in the retransmission request, that is, the retransmission packet is generated. By sending the retransmission packet, the selective retransmission operation of the target packet is realized.
[0089] The technical scheme of the embodiment realizes the sending processing of the packet through the first packet sending module, the first on-chip cache, the first packet receiving module and the first logic processing module in the packet sending device. The first packet sending module is configured to send the target packet corresponding to the packet sending task according to the preset packet transmission window and record the sending information of the target packet, thereby realizing the sending of the target packet and facilitating the subsequent judgment of the retransmission packet through the sending information. The first packet receiving module is configured to receive the response packet of the target packet, and in the case that the first bitmap is carried in the response packet, update the first bitmap to the first on-chip cache, so that the receiving state of the target packet can be accurately known through the first bitmap, thereby determining whether the packet retransmission is needed. The first processing logic module is configured to generate a retransmission request according to the first bitmap and the sending information in the case that the packet retransmission is needed, so that the first packet sending module generates and sends the retransmission packet according to the retransmission request. The situation that all packets after the out-of-order retransmission need to be retransmitted when the data is transmitted through the RDMA protocol in the related art, thereby causing a large amount of network bandwidth to be wasted and network congestion to be caused, is solved. The packet that needs to be retransmitted can be clearly known through the first bitmap and the sending information, so that only the retransmission processing of the retransmission packet is needed, the selective retransmission of the packet is realized, and the bandwidth consumption on the network can be reduced.
[0090] Embodiment two
[0091] FIG. 5 is a structural schematic diagram of a packet receiving device provided by the embodiment two of the application. In the process of determining the sending of the retransmission packet based on the packet sending end, the packet receiving end will perform the operation of interacting with the packet sending end. The specific implementation manner can be referred to the technical scheme of the embodiment. The same or corresponding technical terms as the above embodiment are not described herein.
[0092] As shown in FIG. 5, the packet receiving device includes a second packet sending module 210, a second on-chip cache 220, a second packet receiving module 230 and a second processing logic module 240.
[0093] The second packet receiving module 210 is configured to receive the target packet.
[0094] Specifically, the target packet is received through the second packet receiving module, so as to facilitate the subsequent judgment of the receiving state of the target packet.
[0095] The second processing logic module 220 is configured to generate a first bitmap according to the received target packet and store the first bitmap into the second on-chip cache 230, and generate a response packet according to the first bitmap, wherein the first bitmap saves an identification field for indicating the receiving state of the target packet.
[0096] The second on-chip cache is a cache module for storing the first bitmap.
[0097] Specifically, a packet sequence number of the target packet is determined according to the received target packet, and a first bitmap is generated based on the packet sequence number. In the first bitmap, an identification field corresponding to the packet sequence number of the received target packet is set. For example, the identification field corresponding to the packet sequence number of the received target packet is set to 1, and the identification field corresponding to the packet sequence number of the target packet not received is set to 0. Through the above, the first bitmap can clearly indicate the receiving status of each target packet in the current sending. The first bitmap is saved to the second on-chip cache for recording and processing. The response packet is generated according to the packet sequence number corresponding to the identification field in the first bitmap, which can inform the packet sending device of the receiving status of the target packet.
[0098] For example, if the packet sequence numbers corresponding to the currently received target packets are "1, 2, 4, 6, 7, 8, and 9" and the packet sequence numbers of the target packets expected to be received are 1 to 10, the first bitmap can be generated according to the received packet sequence numbers. The identification field corresponding to the packet sequence number of the received target packet in the first bitmap is set to 1, and the identification field corresponding to the packet sequence number of the target packet not received is set to 0. The first bitmap can be as shown in Table 1.
[0099] Table 1
[0100] After obtaining the first bitmap, the first bitmap can be stored in the second on-chip cache. The response packet is generated according to the identification field contained in the first bitmap, so that the packet sending device can clearly know that the target packets with packet sequence numbers "3, 5, and 10" are not received. It should be noted that if the packet sequence numbers corresponding to the currently received target packets are consistent with the packet sequence numbers corresponding to the target packets expected to be received, it means that all the target packets in the current sending have been received. Correspondingly, all the identification fields in the generated first bitmap are 1.
[0101] The second packet sending module 240 is configured to feed back the response packet to the packet sending device.
[0102] Specifically, after the response packet is generated based on the second processing logic module, the response packet can be fed back to the packet sending device through the second packet sending module, so that the packet sending device can clearly know the target packets not received.
[0103] Optionally, the target packet is sent in a preset packet transmission window; and the second processing logic module 220 is further configured to update the first bitmap according to the packet sequence number corresponding to the first identification field in the first bitmap and the packet transmission window after the response packet is fed back to the packet sending device.
[0104] The identification field used to represent the target packet not received is the target field mentioned above.
[0105] Specifically, after determining the response message, the second message sending module feeds back the response message to the message sending device. The first packet sequence number corresponding to the identification field representing the target message not received is determined from the first bitmap, that is, the packet sequence number of the first target field is determined. The first bitmap is updated according to the packet sequence number of the first target field and the message transmission window, and the updated first bitmap is stored in the second on-chip cache. Based on this, it is convenient to determine the reception of the target message according to the first bitmap, and the out-of-order reception of the target message is realized.
[0106] For example, in combination with the above example, the number of target messages that can be transmitted at a time according to the message transmission window is determined to determine the packet sequence number of the target message to update the first bitmap based on the packet sequence number. For example, the number of target messages that can be transmitted at a time according to the message transmission window is 5, and the first bitmap fed back to the message sending device is shown in Table 1. The packet sequence number corresponding to the position of the target field 0 is determined. If the packet sequence number corresponding to the position of the first identification field 0 is 3, the packet sequence numbers of the target messages that can be transmitted by the message transmission window next time are “3, 5, 10, 11, 12”. The updated first bitmap can be shown in Table 2 as follows.
[0107] Table 1
[0108] It should be noted that the updated first bitmap can be a bitmap regenerated based on the first bitmap, or a bitmap obtained by modifying the first bitmap.
[0109] The technical scheme of the embodiment realizes the reception and response of the target message through the second message sending module, the second on-chip cache, the second message receiving module and the second processing logic module of the message receiving device. The second message receiving module is used to receive the target message. The second processing logic module is used to generate the first bitmap according to the received target message, and store the first bitmap in the second on-chip cache. Based on this, it is convenient to determine the reception of the target message according to the first bitmap, and the out-of-order reception of the target message is realized. Further, the response message is generated according to the first bitmap, and the response message is fed back to the message sending device through the second message sending module, which is convenient for subsequent selective retransmission operation of the target message according to the response message corresponding to the first bitmap. The present application generates the first bitmap and feeds back the response message corresponding to the first bitmap to the message sending device, which is convenient for subsequent retransmission message, realizes the selective retransmission operation of the target message, and reduces the bandwidth consumption on the network.
[0110] Embodiment three
[0111] Those skilled in the art can understand that all or part of the processes of the methods involved in the implementation of the above embodiments can be completed by an electronic device. FIG. 6 is a structural schematic diagram of an electronic device provided in an embodiment of the present application. The electronic device 10 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, 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 meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.
[0112] As shown in FIG. 6, the electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11, wherein the memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform 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. An input / output (I / O) interface 15 is also connected to the bus 14.
[0113] A plurality of 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, a loudspeaker, etc.; a storage unit 18, such as a magnetic disk, an optical disk, 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.
[0114] The processor 11 can be various general-purpose and / or special-purpose 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 special-purpose 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 performs various methods and processes described above, such as the method processes involved in the above embodiments.
[0115] In some embodiments, the method flow involved in each of the above embodiments can be implemented as a computer program tangibly embodied 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 onto and / or installed in the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded onto the RAM 13 and executed by the processor 11, the method flow involved in each of the above embodiments can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the method flow involved in each of the above embodiments by any other appropriate means, such as by means of firmware.
[0116] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation 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 special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0117] Computer programs used to implement processes of the present application for packet transmission and reception 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 to produce a machine, such that the computer program running on the processor implements the functions / operations specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, and partially on a remote machine or a server.
[0118] Embodiment Four
[0119] Those of ordinary skill in the art can understand that all or part of the method flow involved in the above embodiments can be implemented by a computer program instructing relevant hardware. Embodiment Four of the present application further provides a computer readable storage medium, which stores computer instructions for causing a processor to perform the method flow involved in each of the above embodiments.
[0120] In the context of this application, a computer readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium can be a machine readable signal medium. More specific examples of the machine readable storage medium will include a one or more lines of a electrical connection, 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.
[0121] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, 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, speech, or tactile input.
[0122] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), blockchain network, and the Internet.
[0123] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0124] It should be understood that the various forms of flow shown above can be reordered, additional steps added, or steps deleted. For example, the steps described in this application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions of this application can be achieved, and this application does not limit herein.
[0125] The above specific embodiments do not constitute a limitation on the scope of protection of the present application. 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 replacements and improvements made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
[0126] The technical features of the above-described embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above-described embodiments are not described, however, as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present application.
[0127] The above-described embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the patentable scope of the application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of variations and improvements can be made, which are within the scope of protection of the present application. Therefore, the patent protection scope of the present application should be subject to the appended claims.
Claims
1. A packet transmitting apparatus characterized by comprising: include: The module comprises a first message sending module, a first on-chip buffer, a first message receiving module, and a first processing logic module. The first message sending module is used to send the target message corresponding to the message task according to the preset message transmission window, and record the sending information of the target message; The first message receiving module is configured to receive a response message of the target message, and when the response message carries a first bit image, update the first bit image to the first on-chip buffer, wherein the first bit image stores an identifier field for indicating the reception status of the target message; The first processing logic module is used to generate a retransmission request based on the first bitmap and the sending information when message retransmission is required. The first message sending module is further configured to generate a retransmission message based on the retransmission request and send the retransmission message.
2. The apparatus of claim 1, wherein, The size of the first bitmap is greater than or equal to the size of the message transmission window, and the packet sequence numbers of the multiple target messages corresponding to the identifier field stored in the first bitmap are consecutive.
3. The apparatus of claim 1, wherein, The transmission information includes at least the packet sequence number, message sequence number, and message internal sequence number of the first target message transmitted in this transmission.
4. The apparatus of claim 3, wherein, The first processing logic module is specifically used to determine the packet sequence number to be retransmitted based on the relative position information of the first identifier field and the target field in the first bit image when the target field is included in the first bit image, and to generate a retransmission request based on the packet sequence number to be retransmitted and the message transmission window, wherein the target field is used to characterize the identifier field that has not received the target message.
5. The apparatus of claim 1, wherein, The first on-chip buffer stores a second bitmap, which is used to store the sending status of the message task.
6. The apparatus of claim 5, wherein, The first processing logic module is further configured to determine the reception status of the last target message of the message task based on the first bitmap, and update the second bitmap based on the reception status of the last target message.
7. The message transmitting apparatus according to claim 5, wherein Also includes: Event reporting module; The first processing logic module is further configured to generate an event completion notification corresponding to the message task based on the second bitmap, and send the event completion notification to the event reporting module.
8. The apparatus of claim 5, wherein, The first processing logic module is specifically configured to, when message retransmission is required, determine the packet sequence number to be retransmitted based on the first bitmap and the sending information; when the number of target messages to be retransmitted is less than the message transmission window, determine the message tasks that have not been completed based on the second bitmap; obtain the newly added packet sequence number to be transmitted based on the message tasks that have not been completed; and generate a retransmission request based on the packet sequence number to be retransmitted and the newly added packet sequence number to be transmitted.
9. A packet receiving apparatus characterized by comprising: include: The second message sending module, the second on-chip buffer, the second message receiving module, and the second processing logic module; The second message receiving module is used to receive the target message; The second processing logic module is configured to generate a first bitmap according to the received target packet, store the first bitmap into the second on-chip cache, and generate a response packet according to the first bitmap, wherein the first bitmap stores an identification field used to indicate a receiving state of the target packet. The second packet sending module is configured to feed back the response packet to a packet sending device.
10. The packet receiving apparatus according to claim 9, wherein The target packet is sent in a preset packet transmission window; and the second processing logic module is further configured to update the first bitmap according to a first packet sequence number corresponding to the identification field used to indicate that the target packet is not received and the packet transmission window after the response packet is fed back to the packet sending device.
11. The packet receiving apparatus according to claim 9, wherein The second processing logic module is further configured to feed back the response packet to the packet sending device through the second packet sending module after the response packet is generated based on the second processing logic module, so that the packet sending device can explicitly know the target packet that is not received.
12. The packet receiving apparatus according to claim 9, wherein The second processing logic module is further configured to determine a first packet sequence number corresponding to the identification field used to indicate that the target packet is not received from the first bitmap, update the first bitmap according to the first target field and the packet transmission window, and store the updated first bitmap into the second on-chip cache.
13. The packet receiving apparatus according to claim 9, wherein The second processing logic module is further configured to set the identification field corresponding to the received target packet in the first bitmap to 1.
14. The packet receiving apparatus according to claim 9, wherein The size of the first bitmap is greater than or equal to the size of the packet transmission window, and the packet sequence numbers of the target packets corresponding to the identification fields stored in the first bitmap are continuous.
15. The packet receiving apparatus according to claim 9, wherein The second processing logic module is further configured to determine the packet sequence number of the target packet according to the received target packet, and generate the first bitmap based on the packet sequence number.
Citation Information
Patent Citations
RDMA data transmission method, related device and system
CN107104902A
Message retransmission method and device
CN116114199A
Method, device and system for reducing RDMA engine on-chip cache and chip
CN116303173A
Message sending device and receiving device
CN118694490A
Apparatus and method for in-line insertion and removal of markers
US20080043750A1