WO2022056791A1 - 一种报文重传方法和装置 - Google Patents

一种报文重传方法和装置 Download PDF

Info

Publication number
WO2022056791A1
WO2022056791A1 PCT/CN2020/115985 CN2020115985W WO2022056791A1 WO 2022056791 A1 WO2022056791 A1 WO 2022056791A1 CN 2020115985 W CN2020115985 W CN 2020115985W WO 2022056791 A1 WO2022056791 A1 WO 2022056791A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
message
sack
sequence number
sender
Prior art date
Application number
PCT/CN2020/115985
Other languages
English (en)
French (fr)
Inventor
屈向峰
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2020/115985 priority Critical patent/WO2022056791A1/zh
Priority to EP20953649.9A priority patent/EP4207654A4/en
Priority to CN202080103655.5A priority patent/CN116114199A/zh
Publication of WO2022056791A1 publication Critical patent/WO2022056791A1/zh
Priority to US18/183,509 priority patent/US20230224084A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1809Selective-repeat protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • H04L1/1628List acknowledgements, i.e. the acknowledgement message consisting of a list of identifiers, e.g. of sequence numbers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/08Arrangements for detecting or preventing errors in the information received by repeating transmission, e.g. Verdan system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • H04L1/1614Details of the supervisory signal using bitmaps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • H04L1/1887Scheduling and prioritising arrangements

Definitions

  • the present application relates to the field of chip technology, and in particular, to a method and apparatus for retransmitting a message.
  • Ethernet technology currently dominates the global interconnected Internet, but has revealed many drawbacks in high-bandwidth, low-latency proprietary networks.
  • RDMA remote direct memory access
  • Ethernet has its own standard in the field of private networks.
  • RoCE uses priority-based flow control (PFC) for flow control. For example, once the receiving queue of the port (port) of the switch exceeds a certain threshold (shreshold), a PFC pause frame (pause frame) will be sent to the receiving end to notify the receiving end to stop sending packets.
  • PFC priority-based flow control
  • the fast retransmitted packet fails to be retransmitted again and is discarded, when the timeout period expires, the lost packet and all subsequent packets will continue to be retransmitted. That is to say, when retransmitting again, it is necessary to wait for the timeout period to expire before retransmitting the lost packet and subsequent packets, which will lead to a significant increase in delay and make the retransmission untimely.
  • the embodiments of the present application provide a method and apparatus for retransmitting a message, which solves the problem of large retransmission delay caused by untimely retransmission of a message.
  • a first aspect provides a message retransmission method, the method is applied in an RDMA network, the method includes: a sending end receives a first selective response SACK message from a receiving end, and the first SACK message instructs the sending end to send a message to the receiving end At least one of the packets sent by the sender fails to be sent; the sender retransmits at least one packet to the receiver, and when retransmitting the last packet of the at least one packet, records the first message to be sent by the sender The packet sequence number of the new packet; when the sender receives the second SACK packet, and the packet sequence number of the packet carried in the second SACK packet is greater than or equal to the packet sequence number of the first new packet, if it sends If the terminal has not received the ACK packet corresponding to the first packet in the at least one packet, the transmitting terminal retransmits the first packet to the receiving terminal again.
  • the retransmission starts from the first retransmitted message and the message is sent.
  • the SACK message is used to indicate which messages failed to be sent by the sender, so that the sender can only send the message. Retransmit the failed packets to shorten the retransmission delay.
  • the present application retransmits the last message indicated by the SACK message, by recording the PSN of the next new message, and by comparing the PSN carried by the received SACK with the recorded PSN, it can be determined whether there is a retransmission failure message, that is, whether there is a "discarded retransmission message".
  • retransmission can be performed again immediately.
  • the duration is usually much less than a timeout period, and the retransmission period can start again within one RTT period, that is, in a
  • the "discarded retransmission packets" can be retransmitted within the RTT period, and one RTT period is much less than a timeout period, and the "discarded retransmission packets" can be retransmitted in time, shortening the retransmission delay.
  • the first SACK packet carries a bitmap
  • the bitmap includes at least one bit
  • some bits in the at least one bit indicate that at least one of the packets sent by the sender to the receiver fails to be sent .
  • the receiver receives the first SACK packet, it can accurately determine which packets are successfully sent and which ones fail to be sent according to the bitmap. Shorten the retransmission delay.
  • the method before the transmitting end retransmits at least one packet to the receiving end, the method further includes: the transmitting end suspends sending new packets to the receiving end; after the transmitting end retransmits the at least one packet to the receiving end, The method further includes: the sending end continues to send new messages to the receiving end.
  • the message When there is a message that fails to be sent in the prior art, the message is retransmitted from the message that fails to be sent, and the message that is successfully sent after the message that fails to be sent is also retransmitted. The message is retransmitted, and when the retransmission is determined, the sending of new messages to the receiving end is suspended. After retransmitting the packet, continue to send new packets to the receiving end, which can shorten the retransmission delay.
  • the sender when the sender receives the second SACK packet, and the packet sequence number of the packet carried in the second SACK packet is greater than or equal to the packet sequence number of the first new packet, if the sender sends If the sender has not received the ACK packet corresponding to the first packet in the at least one packet, the sender retransmits the first packet to the receiver again.
  • the sender determines whether there is a packet sequence number that has not been received for at least An ACK message for one message; if the sender has not received an ACK message corresponding to the first message in the at least one message, the sender retransmits the first message to the receiver again.
  • the new packet to be sent is sent after the retransmitted packet. If the response message of the retransmitted message has not been received, it indicates that the retransmitted message failed the first retransmission and needs to be retransmitted for the second time. It needs to wait until the timeout period expires, but the second retransmission can be started immediately, which shortens the retransmission delay.
  • the time period from when the sender starts retransmitting at least one packet to retransmitting the first packet is less than a timeout period.
  • the time period during which the application performs the first retransmission and the second retransmission is much less than a timeout period. Since this application performs the second retransmission immediately when it is determined that the second retransmission is required, it does not need to wait until the timeout period expires before performing the second retransmission, starting from the first retransmission to the second retransmission
  • the time of the packet can be one RTT period, and one RTT period is far less than one timeout period, so that the packet retransmission is timely and the retransmission delay is shortened. That is to say, the message can be retransmitted for the second time within one RTT cycle.
  • a method for retransmitting a message is provided.
  • the method is applied to an RDMA network.
  • the method includes: a sending end receives a first selective response SACK message from a receiving end, and the first SACK message instructs the sending end to send a message to the receiving end. At least one of the sent packets fails to be sent; the sender retransmits at least one packet to the receiver, and when retransmitting each packet in the at least one packet, records that the sender is retransmitting each packet.
  • the packet sequence number of the first new packet is the packet sequence number of the first new packet; when the sender receives the second SACK packet, the packet sequence number of the packet carried in the second SACK packet is greater than or equal to the recorded first new packet
  • the sender will retransmit the second packet again.
  • the sender can not only choose to retransmit only the failed message to the receiver, but also record the PSN of the next new message to be sent when retransmitting each failed message. If the message whose PSN is greater than or equal to the new message is acknowledged, but the message that is recorded and retransmitted at the same time is not responded, it can be determined that the retransmission of the retransmitted message fails and needs to be retransmitted again. When retransmission is required, the sender can immediately retransmit to the receiver without waiting for the timeout period to time out before retransmission, so that the message can be retransmitted in time and the delay is shortened.
  • the time from the first retransmission of the message to the retransmission of the message can be one RTT period, and one RTT period is much less than one timeout period, so that multiple retransmission failures can be accurately retransmitted within one RTT period. packets, shortening the retransmission delay.
  • the first SACK packet carries a bitmap
  • the bitmap includes at least one bit
  • some bits in the at least one bit indicate that at least one of the packets sent by the sender to the receiver fails to be sent .
  • the first SACK packet may carry a bitmap, where the bitmap includes bit values of multiple bits, and the bit values of multiple bits indicate whether multiple packets in the current QC are correctly received.
  • the method before the sender retransmits at least one packet to the receiver, the method further includes: the sender establishes a linked list for each packet queue in the multiple packet queues, and the linked list is used to record the transmission The packet sequence number of the first new packet to be sent by the end after retransmitting any packet in the packet queue. It can also be understood that the linked list is used to establish a correspondence between the retransmitted message and the first new message to be sent. This is to consider that in the subsequent execution of the message sending process, the new message is sent after the retransmitted message.
  • the sender If the sender has received the recorded response message of the first new message to be sent, However, the corresponding response message of the retransmitted message has not been received, indicating that the retransmission of the retransmitted message fails. In this way, the sender can be made aware of the failed packet being sent in a timely manner, and once the packet is known, the packet is retransmitted immediately, so that the packet can be retransmitted in time.
  • recording the packet sequence number of the first new packet to be sent after the transmitting end retransmits each packet includes: When transmitting the second packet, the sender determines the first linked list corresponding to the packet queue where the second packet is located, and records the first new packet to be sent by the sender after retransmitting the second packet in the first linked list.
  • the packet sequence number of the message, and the packet sequence number is the packet sequence number of the first new message. Since the first new packet is sent after the retransmitted second packet, and when the sender retransmits the second packet, the recorded first new packet to be sent is the packet of the first new packet Sequence number.
  • the sender When the sender receives the response message of the first new message, but has not received the response message of the second message, it indicates that the retransmission of the retransmitted second message failed, and can immediately send the message to the receiver. To retransmit the second packet again, it is not necessary to wait until the timeout period expires before starting the second retransmission, so that the packet can be retransmitted in time and the retransmission delay can be shortened.
  • the time period from when the sender starts to retransmit at least one packet to when it retransmits the second packet is less than a timeout period.
  • the time period during which the application performs the first retransmission and the second retransmission is much less than a timeout period. Since this application performs the second retransmission immediately when it is determined that the second retransmission is required, it does not need to wait until the timeout period expires before performing the second retransmission, starting from the first retransmission to the second retransmission
  • the time of the packet can be one RTT period, and one RTT period is far less than one timeout period, so that the packet retransmission is timely and the retransmission delay is shortened. That is to say, the message can be retransmitted for the second time within one RTT cycle.
  • a communication device is provided.
  • the communication device is used as a sending end.
  • the communication device is applied to a remote direct memory access RDMA network.
  • the communication device includes: a receiver for receiving a first selective response SACK message from the receiving end.
  • the first SACK message indicates that at least one of the messages sent by the sending end to the receiving end fails to be sent; the transmitter is used to retransmit at least one message to the receiving end; and the memory is used for the sending end to retransmit at least one message
  • the processor is also used to determine that the sender receives the second SACK packet, the second SACK packet The packet sequence number of the packet carried in the packet is greater than or equal to the packet sequence number of the first new packet. If the sender has not received the ACK packet corresponding to the first packet in at least one packet, it instructs the transmitter to also It is used to retransmit the first packet to the receiving end again.
  • the first SACK packet carries a bitmap
  • the bitmap includes at least one bit
  • some bits in the at least one bit indicate that at least one of the packets sent by the sender to the receiver fails to be sent .
  • the processor is configured to: when the sender receives each SACK message, compare the packet sequence number carried in each SACK message with the recorded packet sequence number of the first new message By comparison, determine whether the packet sequence number carried by each SACK packet is greater than or equal to the packet sequence number of the first new packet; when the second SACK packet is received, the packet sequence of the packet carried in the second SACK packet When the number is greater than or equal to the packet sequence number of the first new message, determine whether there is an ACK message for at least one message that has not been received; the transmitter is used if the sender has not received at least one message in the For the ACK message corresponding to the first message, the first message is retransmitted to the receiving end again.
  • the time period from when the sender starts retransmitting at least one packet to retransmitting the first packet is less than a timeout period.
  • a communication device is provided.
  • the communication device is used as a sending end.
  • the communication device is applied to a remote direct memory access RDMA network.
  • the communication device includes: a receiver for receiving a first selective response SACK message from the receiving end.
  • the first SACK message indicates that at least one of the messages sent by the sender to the receiver failed to be sent;
  • the transmitter is used to retransmit at least one message to the receiver;
  • the memory is used to retransmit at least one message
  • the recorded packet sequence number of the first new packet to be sent is the packet sequence number of the first new packet; the receiver is also used for receiving the second SACK packet, the second When the packet sequence number of the packet carried in the SACK packet is greater than or equal to the recorded packet sequence number of the first new packet, if the ACK packet corresponding to the second packet has not been received, the transmitter is instructed to be used for The second packet is retransmitted again.
  • the first SACK packet carries a bitmap
  • the bitmap includes at least one bit
  • some bits in the at least one bit indicate that at least one of the packets sent by the sender to the receiver fails to be sent .
  • the processor further includes a processor for: establishing a linked list for each packet queue in the multiple packet queues, the linked list is stored in the memory, and the linked list is used to record the sending end in the retransmission packet queue The packet sequence number of the first new message to be sent after any message in the .
  • the memory is used to: when retransmitting the second packet, determine the first linked list corresponding to the packet queue where the second packet is located, and record in the first linked list that the sender is retransmitting the first link list.
  • the packet sequence number of the first new packet to be sent after two packets, and the packet sequence number is the packet sequence number of the first new packet.
  • the time period from when the sender starts to retransmit at least one packet to when it retransmits the second packet is less than a timeout period.
  • embodiments of the present application provide a computer-readable storage medium, including computer instructions, when the computer instructions are executed on an electronic device, the electronic device is made to perform the above-mentioned first and second aspects and the first and second aspects.
  • the packet retransmission method in any of the possible implementation manners of the two aspects.
  • an embodiment of the present application provides a computer program product that, when the computer program product runs on a computer, enables an electronic device to perform the first aspect and the second aspect and any one of the first aspect and the second aspect.
  • the message retransmission method in the possible implementations of the item.
  • an embodiment of the present application provides a system, and the system may include a sending end and a receiving end in any possible implementation manner of any of the above aspects.
  • the sending end and the receiving end may execute the packet retransmission method in any one of the foregoing aspects and any possible implementation manner.
  • Fig. 1 is a kind of signal interaction schematic diagram of message retransmission
  • Fig. 2 is a kind of signal interaction schematic diagram of message retransmission
  • FIG. 3 is a schematic diagram of a network architecture provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a transmitter and a receiver according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a bitmap corresponding to a QP provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a message retransmission provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of signal interaction for packet retransmission according to an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a message retransmission provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of signal interaction for message retransmission according to an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a server according to an embodiment of the present application.
  • RDMA is a direct memory access technology, which directly transfers data from the memory of one computer to another computer without the intervention of the operating systems of both computers. It is generated to solve the delay of server-side data processing in network transmission. .
  • RoCE A network protocol that allows RDMA over Ethernet. Its lower network header is an Ethernet header, and its upper network header (including data) is an InfiniBand header (a new-generation network protocol supporting RDMA). This allows the use of RDMA over standard Ethernet infrastructure (switches). Since RDMA is a new network technology, network cards and switches that support this technology are required.
  • RTT Round trip time
  • Queue pair is a virtual interface between hardware and software.
  • QP is a queue structure, which stores the tasks issued by the software to the hardware in order. The tasks include where to take out and how long the data is, and to which destination to send it.
  • Each QP is independent, so a QP can be regarded as a resource exclusive to a user, and a user can also use multiple QPs at the same time.
  • Connection context used to store QP related properties.
  • the entity of QP on the hardware is just a piece of storage space.
  • the software applies for a continuous space in advance through the operating system.
  • QPC can be used to carry the relevant information of the QP, and the hardware can understand the relevant properties of the QP through the QPC.
  • the network card and its supporting driver have agreed in advance what content is in the QPC, how much space these content occupies, and in what order. In this way, the driver and hardware can read and write information such as the status of the QP through the QPC space.
  • Bitmap Mark the value corresponding to at least one element with at least one bit.
  • Acknowledge (ACK) message In data communication, a transmission type control character sent by the receiver to the sender, indicating that the received data has been confirmed to be received without error.
  • SACK Selective acknowledgement
  • Pack sequence number The sequence number of a data packet or message.
  • first and second are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features.
  • a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • plural means two or more.
  • the embodiments of the present application are applied to the scenario of packet retransmission in RoCE.
  • the sender sends multiple packets with PSNs of 0, 1, 2, 3, 4, 5...
  • the negative acknowledgement (NACK) message of the message with the PSN of 1 is directly fed back to the sender, that is, the PSN carried in the NACK message is 1, indicating that the message with the PSN of 1 failed to receive. Therefore, The sender can determine that the transmission of a packet with a PSN of 1 fails.
  • the sender receives the NACK message, it starts a timeout period, starting from the beginning of the timeout period, and retransmits the PSN 1 message and the PSN 1 message starting from the PSN 1 message.
  • the message after the message (the message with the PSN of 1 to the last message received before the timeout period is enabled). If the sending end retransmits the message to the receiving end within the timeout period, and there is a message that fails to send, for example, the message with PSN of 1 in Figure 1 fails to retransmit within the timeout period, then the sending end is within the timeout period. All the sent packets are discarded. After the timeout period expires, the sender starts to retransmit the packets with PSN of 1, which can be called retransmission after retransmit timeout (RTO). The transmission is not timely enough, the delay increases significantly, and the bandwidth decreases.
  • RTO retransmission after retransmit timeout
  • the sender may also selectively retransmit to the receiver. As shown in Figure 2, the sender sends multiple packets with PSNs of 0, 1, 2, 3, 4, 5...
  • the SACK message indicates that the message with PSN 3 is successfully sent, but the message with PSN 1 and 2 fails to be sent, so the terminal device needs to retransmit the message with PSN 1 and 2.
  • the sender can only retransmit the failed packets within the timeout period, that is, after the sender retransmits the packets with PSNs 1 and 2 within the timeout period, it continues to send The receiving end sends a new message, for example, the new message is a plurality of messages such as PSNs N, N+1, and N+2 in FIG. 2 .
  • the sender similar to the solution in Figure 1, if the sender still has a packet that fails to retransmit within the timeout period, for example, a packet with a PSN of 1 fails to retransmit within the timeout period, the sender A SACK packet with a PSN of 2 is received.
  • the SACK packet indicates that the packet with a PSN of 2 was successfully retransmitted, but the packet with a PSN of 1 failed to be retransmitted. At this time, the sender still has to wait until the timeout period expires. Continue to retransmit the packet whose PSN is 1 again.
  • the new message is the PSN of M
  • the messages of M+1 and M+2, etc. are retransmitted successfully again, that is, the sender receives the ACK messages of the messages with PSNs of 1, M, M+1, and M+2 from the receiver. Therefore, in the retransmission method shown in FIG. 2 , the retransmission is not timely enough, the delay increases significantly, and the bandwidth decreases.
  • an embodiment of the present application proposes a packet retransmission method.
  • the method is applied in RDMA.
  • the sender determines that there is a packet that fails to be sent, it can selectively retransmit the packet, that is, only for sending The failed message is retransmitted, and when it is determined that there is a failed message to be sent, the failed message can be retransmitted immediately. If the retransmitted packet fails to be retransmitted again, it is not necessary to wait until the timeout period expires before retransmitting it again. When the retransmitted message fails to be retransmitted again, the sender can immediately retransmit the message again to shorten the retransmission delay.
  • the sender can record the PSN of the first new packet to be sent.
  • the sender receives a SACK packet and the packet sequence number of the packet carried in the SACK packet is greater than or equal to the PSN of the first new packet, if the sender has not received multiple failed packets If the sending end determines that the retransmission of the first message fails, the sending end may retransmit the first message to the receiving end again. That is to say, the sender can not only choose to retransmit only the failed packets to the receiver, but also can immediately compare the PSN in the SACK packet with the recorded PSN of the new packet to be sent and find that the retransmission fails. To retransmit to the receiving end again, there is no need to wait until the timeout period expires before retransmitting again, so that the message is retransmitted in time and the delay is shortened.
  • the sender can not only choose to retransmit only the failed message to the receiver, but also record the PSN of the next new message to be sent when retransmitting each failed message. If the message whose PSN is greater than or equal to the new message is acknowledged, but the message that is recorded and retransmitted at the same time is not responded, it can be determined that the retransmission of the retransmitted message fails and needs to be retransmitted again. When retransmission is required, the sender can immediately retransmit to the receiver without waiting for the timeout period to time out before retransmission, so that the message can be retransmitted in time and the delay is shortened.
  • the network architecture to which the retransmission method proposed in this application can be applied may be as shown in FIG. 3 .
  • the network architecture of the present application may include multiple servers, and data communication may be performed between the servers, for example, one server sends a message to another server. Data communication can be performed between servers through switches. As shown in FIG. 3 , the server 31 sends a message to the server 32 , the server 31 serves as a data sender, and the server 32 serves as a data receiver.
  • the network architecture of the present application can be applied to the above-mentioned RDMA network, and can also be applied to other networks or network cards using the above-mentioned RDMA technology, for example, to a data center with a fat tree structure.
  • the network card can be applied to a sending end and a receiving end
  • the RDMA network card may include a receiving unit, a sending unit, a QPC storage unit, a BM management unit, a timer unit, and the like.
  • the transmitting end may include a receiving unit 41, a transmitting unit 42, a QPC storage unit 43, a BM management unit 44 and a timer unit 45
  • the receiving end may include a receiving unit 46, a transmitting unit 47, a QPC storage unit 48, BM management unit 49 and timer unit 50 .
  • the sending unit can be used for sending data packets or sending messages or sending data, etc.
  • the receiving unit can be used to receive data packets or messages or data, etc., for example, can receive ACK messages or SACK messages, etc.;
  • the QPC storage unit may be used to store linked context information.
  • the context information can include the sequence number of the message that the sender expects to send.
  • the sending unit of the sender can perform QPC read and write, indicating that the QPC storage unit update is expected to be sent.
  • the serial number of the message; for the receiving end, the context information may include the serial number of the message that the receiving end expects to receive, and the address information to be stored in the message, etc.
  • the receiving unit of the receiving end can perform QPC reading and writing, instructing the QPC storage unit to update the sequence number of the next expected received message and the address information to be stored.
  • different links can be the same sender and correspond to different receivers.
  • the sender of one link is server 1
  • the receiver is server 2
  • the sender of another link is server 1
  • the receiver is Server 3
  • the sender when used as the receiver, the receiver can also be used as the sender;
  • the BM management unit which can be understood as a bitmap management unit, can store bitmaps of QPs corresponding to multiple links. For example, as shown in FIG. 5 , the bit value of the bitmap corresponding to QP0 is 0101...00, the bit value of the bitmap corresponding to QP1 is 00001...00, and the bit value of the bitmap corresponding to QP2 is 0100...00. Taking QP0 as an example, its bitmap indicates that the bit value of the starting PSN packet is 0, indicating that the starting PSN packet has not been received, and the bit value of the starting PSN+1 packet is 1, indicating the starting PSN.
  • the packet of +1 has been received, the bit value of the packet of the starting PSN+2 is 0, indicating that the packet of the starting PSN+2 has not been received, and the bit value of the packet of the starting PSN+3 is 0. Indicates that the packet with the starting PSN+3 has not been received.
  • the receiving unit can be used to perform BM read and write operations on the BM management unit according to whether the message is successfully received or not, so as to update the bitmap in the BM management unit (the corresponding bit value when the message is successfully received can be If it is 1, the corresponding bit value can be 0 when the message fails to receive.), the sending unit can be used to perform a BM read operation on the BM management unit to read the bitmap in the BM management unit to know which messages are successfully received. , which packets fail to be sent, when the reception is successful, the sending unit can send an ACK packet, and when the reception fails, the sending unit can send a SACK packet. Or, when the receiving unit receives a duplicate message, it knows that the bit value of the message in the bitmap is already 1 by performing a BM read operation, and can discard the received duplicate message.
  • the timer unit can be used to set the timeout period. If after a message is sent, there is still no response message after the timeout period, the timer unit generates a timeout retransmission trigger signal, which triggers the sending unit to send the message again.
  • the flow of the packet retransmission method proposed in this application may be as in Embodiment 1 and Embodiment 2, but is not limited to these two embodiments.
  • An embodiment of the present application provides a packet retransmission method, which can be applied to RDMA. As shown in FIG. 6 , the method includes:
  • the sender sends multiple packets to the receiver.
  • the sending unit 42 of the sending end When the sending unit 42 of the sending end receives the DoorBell sent by the software of the sending end, it means that the sending end unit 42 of the sending end will periodically send a message to the receiving end.
  • the sending unit 42 of the sending end When the sending unit 42 of the sending end needs to send a message to the sending end, it first reads the PSN of the first message to be sent from the QPC storage unit 43 of the sending end. The message starts to send the message to the receiver.
  • the PSN of the first packet to be sent is not necessarily 0, and may also be an initial value negotiated between the sender and the receiver.
  • the sender sends packets with PSNs of 0, 1, 2, 3, 4, 5 . . . to the receiver in sequence.
  • the sending unit 42 of the sending end sends a message to the receiving end, it first reads the PSN of the message to be sent from the QPC storage unit 43, and carries the PSN in the message.
  • the sending unit 42 instructs the QPC storage unit 43 to update the PSN of the message expected to be sent.
  • the sending unit 42 reads from the QPC storage unit 43 that the PSN expected to be sent is 0, and after the sending unit 42 sends a message with a PSN of 0, it instructs the QPC storage unit 43 to update the PSN of the message expected to be sent, the QPC The storage unit 43 updates the PSN of the message expected to be sent to be 1, and so on.
  • the receiving end receives multiple packets sent by the sending end, and when receiving the packets sent by the sending end, returns an ACK packet to the sending end.
  • the sender receives the ACK message.
  • the receiving unit 46 of the receiving end Each time the receiving unit 46 of the receiving end receives a message, the receiving unit 46 will trigger the sending unit 47 to send a response message, such as an ACK message, to the sending end to inform the sending end that the message has been received.
  • a response message such as an ACK message
  • the QPC storage unit 48 of the receiving end may store the PSN of the message that the receiving end expects to receive. Each time the receiving unit 46 of the receiving end receives an expected message, the QPC storage unit 48 will update the next expected message. PSN. If the PSN of the message received by the receiving unit 46 is equal to the PSN of the message expected to be received by the QPC storage unit 48, the sending unit 47 will send an ACK message to the sending end. At the same time, for each QC, each time the receiver correctly receives a message, the bit value corresponding to the message is set to 1 in the bitmap.
  • the receiving unit 46 after receiving the message with a PSN of 0, the receiving unit 46 will instruct the QPC storage unit 48 to update the PSN of the message expected to be received to be 1; the receiving unit receives a message with a PSN of 3. After the message is sent, the QPC storage unit 48 is instructed to update the PSN of the message expected to be received to 4, and so on.
  • the receiving end determines that there is a message that fails to receive, it sends a first SACK message to the sending end, and the first SACK message indicates that at least one of the messages sent by the sending end to the receiving end failed to be sent; correspondingly, The sender receives the first SACK message from the receiver.
  • the receiver may determine that the packet of the expected PSN fails to receive.
  • the BM management unit 49 may set the corresponding value in the bitmap of the packet received this time to 1, and set the corresponding value in the bitmap of the packet expected to be received but not received to 0.
  • the sending unit 47 sends a first SACK message to the receiving end for the message correctly received this time.
  • the first SACK message may carry a bitmap, and the bitmap includes bit values of multiple bits, and bit values of multiple bits. An indication of whether multiple messages in the current QC were received correctly.
  • the plurality of bits include at least one bit, and the at least one bit indicates that at least one of the packets sent by the sender to the receiver fails to be sent.
  • the packets with the PSNs of 0, 3, 4, and 5 are sent successfully.
  • the receiver succeeds in receiving packets with PSNs 0, 3, 4, and 5, but fails to send packets with PSNs 1 and 2, or fails in receiving packets with PSNs 1 and 2.
  • the receiving unit 46 of the receiving end is used to receive a message with a PSN of 0, the bit value corresponding to the message with a PSN of 0 in the bitmap is set to 1, and the QPC storage unit 48 is used to store the value of the next message expected to be received. PSN is set to 1.
  • the BM management unit 49 may set the bit value corresponding to the packet with the PSN of 3 in the bitmap to 1, and simultaneously set the bit value corresponding to the packet with the PSN of 1 and 2 to 0.
  • the sending unit 48 determines that the response message to be sent is the first SACK message, and reads the PSN as 1, 2 and 1 from the BM management unit 49.
  • the bit value corresponding to the packet of 3 is carried in the first SACK packet, and the PSN of the packet with the PSN of 3 is carried in the first SACK packet.
  • the sending end after the receiving unit 41 receives the first SACK, the sending end can read the bit value 001 and the PSN in the first SACK, the PSN is 3, and determine that the message before the message whose PSN is 3 is lost, Since the BM management unit 44 of the sender has recorded that the bit value corresponding to the packet with the PSN of 0 is 1, the sender can determine that the packets with the PSN of 1 and 2 failed to be sent, and the BM management unit 44 will also record the PSN as 1 and 2.
  • the bit value corresponding to the message of 3 is 001.
  • the sender suspends sending a new message to the receiver, retransmits the at least one message to the receiver, and records the first new message to be sent by the sender when retransmitting the last message in the at least one message. Packet sequence number of the packet.
  • the last packet in the at least one packet may be understood as a packet with the largest PSN in the at least one packet.
  • the sender When the sender receives the first SACK packet, it can read the PSN and bitmap in the first SACK packet, and can determine which packets fail to be sent and need to be retransmitted according to the PSN and bitmap in the first SACK packet.
  • the sending end may read the PSN and the bitmap in the first SACK message, and store the bitmap in the BM management unit 44 .
  • the PSN is 3
  • the packet with the PSN of 3 is sent successfully.
  • the bitmap is 001, it can be known that the packets with PSNs 1 and 2 fail to be sent. Therefore, the sender determines that the packets with PSNs of 1 and 2 need to be retransmitted to the receiver. Therefore, when the sender receives the first SACK, it suspends sending new messages to the receiver, and retransmits the messages with PSNs of 1 and 2 to the receiver.
  • the new message in this application can be understood as the first new message to be sent by the sender after sending the retransmitted message.
  • the PSN of the first new packet to be sent by the sender may be recorded in the QPC storage unit 43, that is, the current maximum sending PSN.
  • the sender retransmits the message with the PSN of 2
  • it records that the PSN of the first new message to be sent is N.
  • the sending unit 42 is used to retransmit the message with the PSN of 2
  • N is an integer greater than or equal to 6.
  • the sender receives each SACK packet, it compares the packet sequence number carried in each SACK packet with the recorded packet sequence number of the first new packet, and determines the packet sequence number carried by each SACK packet. Whether the packet sequence number is greater than or equal to the packet sequence number of the first new packet.
  • the sending end when the sending unit 42 is used to start retransmitting the above at least one message to the receiving end, whenever the receiving unit 41 is used to receive a SACK message, the sending end reads the SACK message. In the PSN, compare the read PSN with the recorded PSN of the first new packet to determine whether the PSN carried in the received ACK packet is greater than or equal to the PSN of the first new packet. For example, when the receiving unit 41 receives the ACK of the packet whose PSN is 2, it compares 2 with the recorded N, and determines that 2 is smaller than N.
  • the sender determines whether there is a packet sequence number that has not been received for at least the first new packet. ACK message for a message.
  • the sender Since the first recorded new packet is sent after the retransmitted packet, if the sender has received the SACK of the first recorded new packet, but has not received the ACK of the retransmitted packet , indicating that the retransmission of the retransmitted packet fails.
  • the sending unit 42 is configured to retransmit the packets with PSNs 1 and 2, the first retransmission of the packet with PSN 1 fails, but the first retransmission of the packet with PSN 2 fails.
  • the receiver will reply to the sender with a third SACK packet for the packet whose PSN is 2.
  • the PSN carried in the third SACK packet is 2, indicating that the packet whose PSN is 2 is successfully retransmitted, but the PSN is 1. Packet retransmission failed.
  • the PSN carried by the third SACK is 2, which is smaller than the recorded N.
  • the receiving end Since the next packet sent after the retransmission of the packet with the PSN of 2 is a new packet with the PSN of N, the receiving end will continue to send the second SACK packet for the packet with the PSN of N to the transmitting end.
  • the PSN carried in the second SACK packet is N, and the retransmission of the packet with PSN of 1 indicating retransmission fails, and the retransmission of the packet with PSN of 2 succeeds.
  • the PSN carried in the second SACK is N, which is equal to the record of N.
  • the transmitting end When the receiving unit 41 receives the second SACK packet with the PSN of N, the transmitting end will determine whether there is an ACK packet for the packets with the PSN of 1 and 2 that has not been received according to the second SACK packet, so as to determine that the PSN is Whether the packets of 1 and 2 are retransmitted successfully.
  • the sender determines that the ACK packet corresponding to the first packet in the at least one packet has not been received, the sender retransmits the first packet to the receiver again.
  • the sender determines that the PSN is 1.
  • the packet retransmission fails and needs to be retransmitted again.
  • the sender suspends sending new packets to the receiver, and the sender does not need to wait until the timeout period expires before retransmitting the packet with a PSN of 1, as in the prior art, but can immediately retransmit the packet. Retransmit again. As shown in FIG. 7 , assuming that the first message is a message with a PSN of 1, if the sender finds that the receiving unit 41 has not received an ACK of the message with a PSN of 1, then the sender determines that the PSN is 1.
  • the packet retransmission fails and needs to be retransmitted again.
  • the sender suspends sending new packets to the receiver, and the sender does not need to wait until the timeout period expires before retransmitting the packet with a PSN of 1, as in the prior art, but can immediately retransmit the packet. Retransmit again.
  • FIG. 7
  • the sending unit 41 immediately retransmits the message whose PSN is 1, and then continues to send a new message to the receiving end.
  • the new message may be M, M+1, and M as shown in FIG. 7 . +2 new message, M is an integer greater than N+2.
  • the sender can not only use the bitmap carried in the SACK to accurately know the packets that were successfully sent and the packets that failed to be sent, but also only retransmit the failed packets, which can improve the retransmission efficiency and reduce the Occupation of retransmission bandwidth. Moreover, by recording the PSN of a new message when retransmitting the last message, and comparing the PSN carried in the received SACK with the recorded PSN, the sender can determine whether there is a retransmission failed message, that is, whether there is a retransmission failure. "Discarded retransmissions". If it is determined that there is a packet that fails to be retransmitted, retransmission can be performed again immediately.
  • the duration is usually much less than a timeout period, and the retransmission period can start again within one RTT period, that is, in a
  • the "discarded retransmission packets" can be retransmitted within the RTT period, and one RTT period is much less than a timeout period, and the "discarded retransmission packets" can be retransmitted in time, shortening the retransmission delay.
  • An embodiment of the present application provides a packet retransmission method, which can be applied to RDMA. As shown in FIG. 8 , the method includes:
  • the sending end sends multiple packets to the receiving end.
  • step 801 For the implementation of step 801, reference may be made to step 601.
  • the receiving end receives multiple packets sent by the transmitting end, and when receiving the packets sent by the transmitting end, returns an ACK packet to the transmitting end.
  • the sender receives the ACK message.
  • step 802 For the implementation of step 802, reference may be made to step 602.
  • the sender establishes a linked list for each message queue in the multiple message queues, and the linked list is used to record the packet of the first new message to be sent by the sender after retransmitting any message in the message queue. serial number.
  • Each packet queue (ie, QP) includes multiple packets, and each packet queue corresponds to one connection.
  • the linked list may be stored in the QPC storage unit 43 .
  • the linked list is used to establish a correspondence between the retransmitted message and the first new message to be sent. This is to consider that in the subsequent execution of the message sending process, the new message is sent after the retransmitted message. If the sender has received the recorded response message of the first new message to be sent, However, the corresponding response message of the retransmitted message has not been received, indicating that the retransmission of the retransmitted message fails.
  • the receiving end determines that there is a packet that fails to receive, it sends a first SACK packet to the transmitting end, where the first SACK packet indicates that at least one of the packets sent by the transmitting end to the receiving end failed to be sent; correspondingly, The sender receives the first SACK message from the receiver.
  • step 804 is similar to that of step 603 .
  • the sender suspends sending a new packet to the receiver, and retransmits the at least one packet to the receiver, and when retransmitting each packet in the at least one packet, records that the sender retransmits each packet.
  • the sending end determines that the previously sent message contains a message that fails to be sent. Therefore, the sending end controls the sending unit 42 to suspend sending new messages to the receiving end, and needs to start retransmission. failed message.
  • the sending end needs to record in the QPC storage unit 43 the PSN of the first new message to be sent after each retransmitted message is sent. Wherein, if multiple retransmitted packets fail to be sent continuously, the PSN of the first new packet recorded corresponding to the multiple retransmitted packets is the same. If the multiple retransmitted packets do not fail to be sent continuously, the PSNs of the first new packet recorded corresponding to the multiple retransmitted packets are different.
  • the sender may not receive the successful retransmission response packet of the later retransmitted packet, so it needs to send a new packet first. After the ACK message of the retransmitted message is reached, the new message continues to be sent, and the new message to be sent is different twice.
  • the receiving unit 41 receives the SACK packet carrying the PSN of 2 (the packet with the PSN of 2 is successfully sent), it determines, according to the bitmap in the SACK packet, that the transmission of the packet with the PSN of 1 fails, and the packets of the PSN of 0 and 2 fail to be sent. The message was sent successfully. Therefore, the sending unit 42 suspends sending the new message, and retransmits the message whose PSN is 1.
  • the sending end When retransmitting the message whose PSN is 1, the sending end records the retransmission of the message whose PSN is 1 in the linked list in the QPC storage unit 43.
  • the PSN of the first new message to be sent after the message is N; then, the receiving unit 41 receives a SACK message carrying a PSN of 3 (the SACK message indicates that the messages with PSNs of 0 and 3 are successfully sent, but the PSN A message with a value of 1 failed to send).
  • the sender also sends a message with a PSN of 5 after the message with a PSN of 4. Since the message with a PSN of 4 also failed to be sent for the first time, the receiving unit 41 receives a message that carries a PSN of 5.
  • the sending unit 42 suspends sending the new message, and retransmits the message whose PSN is 4.
  • the sending end records the retransmission of the message whose PSN is 4 in the linked list in the QPC storage unit 43.
  • the PSN of the first new message to be sent after the message is N+2. Then, the sending unit 42 continues to send new packets whose PSN is N+3 and other packet sequence numbers.
  • At least one packet includes the second packet.
  • the sender determines the first linked list corresponding to the packet queue where the second packet is located, and records in the first linked list that the sender is retransmitting the first link.
  • the packet sequence number of the first new packet to be sent after two packets, and the packet sequence number is the packet sequence number of the first new packet.
  • the second message may be the foregoing retransmitted message with PSNs 1 and 4.
  • the method can also include:
  • the sender When the sender receives the second SACK packet, and the packet sequence number of the packet carried in the second SACK packet is greater than or equal to the recorded packet sequence number of the first new packet, if the second SACK packet has not been received yet. If the ACK message corresponding to the message is received, the sender retransmits the second message again.
  • the sender When the sender starts to retransmit the first packet of at least one packet, every time it receives a SACK packet of a packet, it reads the PSN in the SACK packet, and associates the PSN with the PSN in the record list. For comparison, if it is found that the PSN carried by the second SACK is greater than or equal to the PSN of a certain packet in the linked list, check whether the second packet that was retransmitted when the PSN of the packet was recorded in the linked list is received, that is, whether The retransmitted message corresponding to the message recorded in the linked list is received.
  • the retransmitted second packet may be understood as a retransmitted packet with a PSN of 1 or 4 in FIG. 9 .
  • the receiving unit 41 has received the SACK message of the message whose PSN is N, but has not received the ACK message of the retransmitted message whose PSN is 1, the sender determines that the PSN is 1 The retransmission of the message fails, and the message with the PSN of 1 needs to be retransmitted again.
  • the sender determines that the message whose PSN is 4 is retransmitted If it fails, the packet with the PSN of 4 needs to be retransmitted again. As can be seen from FIG.
  • the sending unit 42 when the sending unit 42 retransmits the message whose PSN is 1 for the second time, it can also record in the linked list that the PSN of the first new message to be sent is M; When a packet with a PSN of 4 is retransmitted, you can also record the PSN of the first new packet to be sent as M+2 in the linked list to determine whether the second retransmitted packets with PSNs of 1 and 4 are The retransmission was successful.
  • the sender for a message that fails to be sent, the sender records the PSN of the next new message to be sent every time it retransmits a message that fails to send, and when it has received the recorded next new message If the SACK message of the retransmitted message is not received, but the ACK message of the corresponding retransmitted message has not been received, it is determined that the retransmission of the retransmitted message fails, and the sender can immediately retransmit the message again without waiting for the When the timeout period expires, retransmission is performed again, which can make the packet retransmission timely.
  • the time from the first retransmission of the message to the retransmission of the message can be one RTT period, and one RTT period is much less than one timeout period, so that multiple retransmission failures can be accurately retransmitted within one RTT period. packets, shortening the retransmission delay.
  • the communication device for example, the transmitting end
  • the communication device includes corresponding hardware and/or software modules for executing each function.
  • the present application can be implemented in hardware or in the form of a combination of hardware and computer software in conjunction with the algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
  • the communication device may be divided into functional modules according to the foregoing method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that, the division of modules in this embodiment is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • FIG. 10 shows a possible schematic composition diagram of a communication device 100, and the communication device may be the transmitter involved in the above embodiment, as shown in FIG. 10 .
  • the sending end may include: a receiving unit 1001 , a sending unit 1002 , a recording unit 1003 and a determining unit 1004 .
  • the receiving unit 1001 may be configured to support the sending end to perform the above-mentioned steps 602, 603, 802, 806, etc., and/or other processes for the techniques described herein.
  • the sending unit 1002 may be configured to support the sending end to perform the above steps 601, 604, 607, 801, 804, 805, 806, etc., and/or other processes for the techniques described herein.
  • the recording unit 1003 may be used to support the sending end to perform the above-mentioned steps 604, 805, etc., and/or other processes for the techniques described herein.
  • Determining unit 1004 may be used to support the sending end to perform steps 605, 606, 607, etc. above, and/or other processes for the techniques described herein.
  • a establishing unit 1005 may also be included for supporting the sending end to perform the above-mentioned step 803, etc., and/or other processes for the techniques described herein.
  • the sending unit 1002 in FIG. 10 is similar to the sending unit 41 at the sending end in FIG. 4
  • the receiving unit 1001 in FIG. 10 is similar to the receiving unit 41 in FIG. 4
  • the communication apparatus 100 provided in this embodiment is configured to execute the foregoing packet retransmission method, and thus can achieve the same effect as the foregoing implementation method.
  • the communication device 100 may include a processing module, a storage module and a communication module.
  • the processing module may be used to control and manage the actions of the communication apparatus 100, for example, may be used to support the communication apparatus 100 to perform the steps performed by the determining unit 1101 and the recording unit 1003.
  • the storage module can be used to support the communication device 100 to store program codes and data, etc., such as recording bitmap and PSN, and the like.
  • the communication module can be used to support the communication between the communication apparatus 100 and other devices, for example, the communication with the receiving end.
  • the processing module may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and the like.
  • the storage module may be a memory.
  • the communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
  • the processing module is a processor
  • the storage module is a memory
  • the communication module includes a transmitter and a receiver
  • the communication device involved in this embodiment may be a server having the structure shown in FIG. 11 .
  • Embodiments of the present application further provide an electronic device, including one or more processors and one or more memories.
  • the one or more memories are coupled to the one or more processors for storing computer program code, the computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform
  • the above related method steps implement the packet retransmission method in the above embodiment.
  • Embodiments of the present application further provide a computer storage medium, where computer instructions are stored in the computer storage medium, and when the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to realize the messages in the above-mentioned embodiments retransmission method.
  • Embodiments of the present application also provide a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the above-mentioned relevant steps, so as to implement the packet retransmission method executed by the electronic device in the above-mentioned embodiment.
  • the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the packet retransmission method executed by the electronic device in the foregoing method embodiments.
  • the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference can be made to the corresponding provided above. The beneficial effects in the method will not be repeated here.
  • Another embodiment of the present application provides a system, where the system may include the foregoing sending end and the receiving end, and may be used to implement the foregoing packet retransmission method.
  • the disclosed apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium.
  • the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

本申请实施例公开了一种报文重传方法和装置,涉及芯片技术领域,解决了报文重传不及时导致的重传时延大的问题。其方法包括:发送端接收来自接收端的选择性应答第一SACK报文,第一SACK报文指示发送端向接收端发送的报文中的至少一个报文发送失败;发送端向接收端重传至少一个报文,并在重传至少一个报文中最后一个报文时,记录发送端待发送的第一个新报文的包序列号;当发送端接收到第二SACK报文,第二SACK报文中携带的报文的包序列号大于或等于第一个新报文的包序列号时,若发送端还未接收到至少一个报文中的第一报文对应的ACK报文,则发送端再次向接收端重传第一报文。本申请实施例用于在RDMA中进行报文重传。

Description

一种报文重传方法和装置 技术领域
本申请涉及芯片技术领域,尤其涉及一种报文重传方法和装置。
背景技术
以太网技术目前在全球互联的因特网中占据主导地位,但在高带宽、低延时的专有网络中却透露出许多弊端。随着网络融合概念的兴起,基于远端直接内存访问(remote direct memory access,RDMA)的无损链路得以解决,以太网在专有网络领域内拥有了自己的标准,同时也提出了RDMA承载于融合以太网(RDMA over converged ethernet,RoCE)的概念。由于RDMA需要一个无损(lossless)的网络,例如,交换机不能因为缓冲区溢出而丢包。为此,RoCE使用优先级的流量控制(priority-based flow control,PFC)进行流量控制。例如,一旦交换机的端口(port)的接收队列超过一定阈值(shreshold)时,就会向接收端发送PFC暂停帧(pause frame),通知接收端停止继续发包。
随着RoCE组网规模越来越大,开启PFC进行流量控制会给大规模的组网带来很多弊端,例如容易产生PFC风暴,导致PFC死锁,从而发生丢包。因此,当RoCE应用于lossless的网络时,丢包后及时重传就很重要。现有的丢包重传技术中,可以利用返回N(Go-Back-N)协议进行重传,丢包后会产生包序列号(packet sequence number,PSN)错误(Error),会触发快速在一个超时周期内重传所丢的报文以及之后的所有的报文,但是,重传所丢的报文之后所有的报文会浪费大量的带宽。而且,如果快速重传的报文再次重传失败而被丢弃,当超时周期超时时,会继续重传所丢的报文以及之后的所有的报文。也就是说,再次重传时需要等待超时周期超时后才能再次重传丢失的报文以及之后的报文,这样会导致延时显著增大,使得重传不及时。
发明内容
本申请实施例提供一种报文重传方法和装置,解决了报文重传不及时导致的重传时延大的问题。
为达到上述目的,本申请实施例采用如下技术方案:
第一方面,提供一种报文重传方法,该方法应用于RDMA网络中,该方法包括:发送端接收来自接收端的第一选择性应答SACK报文,第一SACK报文指示发送端向接收端发送的报文中的至少一个报文发送失败;发送端向接收端重传至少一个报文,并在重传至少一个报文中最后一个报文时,记录发送端待发送的第一个新报文的包序列号;当发送端接收到第二SACK报文,第二SACK报文中携带的报文的包序列号大于或等于第一个新报文的包序列号时,若发送端还未接收到至少一个报文中的第一报文对应的ACK报文,则发送端再次向接收端重传第一报文。
由此,相对现有技术中重传报文时,从第一个重传报文开始重传开始发送报文,本申请通过SACK报文指示发送端哪些报文发送失败,可使得发送端只针对发送失败 的报文进行重传,缩短重传时延。而且,本申请重传至SACK报文指示的最后一个报文时,通过记录下一个新报文的PSN,通过对比接收到的SACK携带的PSN与记录的PSN,可以判定是否存在重传失败的报文,即是否存在“被丢弃的重传报文”。如果确定存在重传失败的报文,可以立即再次进行重传。通常,从发送端第一次重传报文开始到下一次重传报文开始,其时长通常远小于一个超时周期,该时长在一个RTT周期内就能再次开始重传报文,即在一个RTT周期内就能重传“被丢弃的重传报文”,一个RTT周期远小于一个超时周期,可以“被丢弃的重传报文”被及时重传,缩短了重传时延。
在一种可能的设计中,第一SACK报文中携带位图,位图包括至少一个比特,至少一个比特中的部分比特指示发送端向接收端发送的报文中的至少一个报文发送失败。当接收端接收到第一SACK报文时,可以根据位图准确至到那些报文发送成功,哪些报文发送失败,在重传报文时,只针对发送失败的报文进行重传,可以缩短重传时延。
在一种可能的设计中,发送端向接收端重传至少一个报文之前,该方法还包括:发送端暂停向接收端发送新报文;发送端向接收端重传至少一个报文后,该方法还包括:发送端继续向接收端发送新报文。现有技术存在发送失败的报文时,从发送失败的报文开始重传发送报文,包括发送失败的报文之后发送成功的报文也被重传,而本申请只针对发送失败的报文进行重传,在确定重传时,暂停向接收端发送新报文。在重传完报文后,继续向接收端发送新报文,可缩短重传时延。
在一种可能的设计中,当发送端接收到第二SACK报文,第二SACK报文中携带的报文的包序列号大于或等于第一个新报文的包序列号时,若发送端还未接收到至少一个报文中的第一报文对应的ACK报文,则发送端再次向接收端重传第一报文包括:当发送端接收到每个SACK报文时,将每个SACK报文中携带的包序列号与记录的第一个新报文的包序列号进行对比,确定每个SACK报文携带的包序列号是否大于或等于第一个新报文的包序列号;当接收到第二SACK报文,第二SACK报文中携带的报文的包序列号大于或等于第一个新报文的包序列号时,发送端确定是否存在未接收到针对至少一个报文的ACK报文;若发送端还未接收到至少一个报文中的第一报文对应的ACK报文,则发送端再次向接收端重传第一报文。由于在重传最后一个报文过程中,若记录的待发送的新报文的包序列号时,待发送的新报文是在重传的报文之后发送的,如果发送端已经接收到新报文的应答报文,但还未接收到重传的报文的应答报文时,说明重传的报文第一次重传失败,需要进行第二次重传,第二次重传不需要等到超时周期超时才开始,而是可以立即开始进行第二次重传,缩短了重传时延。
在一种可能的设计中,发送端从开始重传至少一个报文到再次重传第一报文的时间段小于一个超时周期。或者说,本申请进行第一次重传和第二次重传的时间段远小于一个超时周期。由于本申请在确定需进行第二次重传时,立即进行第二次重传,不需要等到超时周期超时时才进行第二次重传,从第一次重传开始到第二次重传报文的时间可以为一个RTT周期,一个RTT周期远小于一个超时周期,使得报文重传及时,缩短了重传时延。也就是说,一个RTT周期内就能进行第二次重传报文。
第二方面,提供一种报文重传方法,该方法应用于RDMA网络,该方法包括:发送端接收来自接收端的第一选择性应答SACK报文,第一SACK报文指示发送端向接 收端发送的报文中的至少一个报文发送失败;发送端向接收端重传至少一个报文,并在重传至少一个报文中的每个报文时,记录发送端在重传每个报文后待发送的第一个新报文的包序列号;其中,至少一个报文包括第二报文,发送端在重传第二报文时,记录的待发送的第一个新报文的包序列号为第一新报文的包序列号;当发送端接收到第二SACK报文,第二SACK报文中携带的报文的包序列号大于或等于记录的第一新报文的包序列号时,若还未接收到第二报文对应的ACK报文,则发送端再次重传第二报文。
也就是说,发送端不仅可以选择只向接收端重传发送失败的报文,而且通过记录重传每个发送失败的报文时,下一个待发送的新报文的PSN,当记录的PSN大于或等于新报文的PSN的报文被应答,而记录的同时重传的报文却未应答,可以判定重传的报文重传失败,需再次进行重传。需再次重传时,发送端可以立即向接收端再次重传,不需要等到超时周期超时时才进行再次重传,使得报文得到及时重传,缩短了延时。况且,第一次重传报文到再次重传报文的时间可以为一个RTT周期,一个RTT周期远小于一个超时周期,使得在一个RTT周期内可以精确的再次重传多个被重传失败的报文,缩短了重传时延。
在一种可能的设计中,第一SACK报文中携带位图,位图包括至少一个比特,至少一个比特中的部分比特指示发送端向接收端发送的报文中的至少一个报文发送失败。即第一SACK报文中可以携带bitmap,bitmap包括多个比特的比特值,多个比特的比特值指示当前QC中的多个报文是否被正确接收的指示。
在一种可能的设计中,在发送端向接收端重传至少一个报文之前,该方法还包括:发送端为多个报文队列中的每个报文队列建立链表,链表用于记录发送端在重传报文队列中的任一报文后待发送的第一个新报文的包序列号。也可以理解为,该链表用于为重传的报文与待发送的第一个新报文建立对应关系。这是考虑到,后续执行报文发送过程中,新报文是在重传的报文之后发送的,如果发送端已经接收到的记录的待发送的第一个新报文的应答报文,却还未接收到对应的重传报文的应答报文,说明重传的报文重传失败。这样,可以使得发送端及时了解被发送失败的报文,一旦了解,立即进行报文重传,使得报文得到及时重传。
在一种可能的设计中,在重传至少一个报文中的每个报文时,记录发送端重传每个报文后待发送的第一个新报文的包序列号包括:在重传第二报文时,发送端确定第二报文所在的报文队列对应的第一链表,并在第一链表中记录发送端在重传第二报文后待发送的第一个新报文的包序列号,且包序列号为第一新报文的包序列号。由于第一新报文是在重传的第二报文之后发送的,且发送端重传第二报文时,记录的待发送的第一个新报文为即第一新报文的包序列号,当发送端接收到第一新报文的应答报文,但还未接收到第二报文的应答报文时,说明重传的第二报文重传失败,可以立即向接收端再次进行第二报文的重传,不需要等到超时周期超时才开始进行第二次重传,可以使得报文得到及时重传,缩短重传时延。
在一种可能的设计中,发送端从开始重传至少一个报文到再次重传第二报文的时间段小于一个超时周期。或者说,本申请进行第一次重传和第二次重传的时间段远小于一个超时周期。由于本申请在确定需进行第二次重传时,立即进行第二次重传,不 需要等到超时周期超时时才进行第二次重传,从第一次重传开始到第二次重传报文的时间可以为一个RTT周期,一个RTT周期远小于一个超时周期,使得报文重传及时,缩短了重传时延。也就是说,一个RTT周期内就能进行第二次重传报文。
第三方面,提供一种通信装置,通信装置作为发送端,通信装置应用于远端直接内存访问RDMA网络中,通信装置包括:接收器,用于接收来自接收端的第一选择性应答SACK报文,第一SACK报文指示发送端向接收端发送的报文中的至少一个报文发送失败;发射器,用于向接收端重传至少一个报文;以及存储器,用于发送端在重传至少一个报文中最后一个报文时,记录发送端待发送的第一个新报文的包序列号;处理器,还用于确定发送端接收到第二SACK报文,第二SACK报文中携带的报文的包序列号大于或等于第一个新报文的包序列号,若发送端还未接收到至少一个报文中的第一报文对应的ACK报文,指示发射器还用于再次向接收端重传第一报文。
在一种可能的设计中,第一SACK报文中携带位图,位图包括至少一个比特,至少一个比特中的部分比特指示发送端向接收端发送的报文中的至少一个报文发送失败。
在一种可能的设计中,处理器用于:当发送端接收到每个SACK报文时,将每个SACK报文中携带的包序列号与记录的第一个新报文的包序列号进行对比,确定每个SACK报文携带的包序列号是否大于或等于第一个新报文的包序列号;当接收到第二SACK报文,第二SACK报文中携带的报文的包序列号大于或等于第一个新报文的包序列号时,确定是否存在未接收到针对至少一个报文的ACK报文;发射器,用于若发送端还未接收到至少一个报文中的第一报文对应的ACK报文,则再次向接收端重传第一报文。
在一种可能的设计中,发送端从开始重传至少一个报文到再次重传第一报文的时间段小于一个超时周期。
第四方面,提供一种通信装置,通信装置作为发送端,通信装置应用于远端直接内存访问RDMA网络中,通信装置包括:接收器,用于接收来自接收端的第一选择性应答SACK报文,第一SACK报文指示发送端向接收端发送的报文中的至少一个报文发送失败;发射器,用于向接收端重传至少一个报文;存储器,用于在重传至少一个报文中的每个报文时,记录发送端在重传每个报文后待发送的第一个新报文的包序列号;其中,至少一个报文包括第二报文,发送端在重传第二报文时,记录的待发送的第一个新报文的包序列号为第一新报文的包序列号;接收器,还用于当接收到第二SACK报文,第二SACK报文中携带的报文的包序列号大于或等于记录的第一新报文的包序列号时,若还未接收到第二报文对应的ACK报文,则指示发射器,用于再次重传第二报文。
在一种可能的设计中,第一SACK报文中携带位图,位图包括至少一个比特,至少一个比特中的部分比特指示发送端向接收端发送的报文中的至少一个报文发送失败。
在一种可能的设计中,还包括处理器,用于:为多个报文队列中的每个报文队列建立链表,链表存储在存储器中,链表用于记录发送端在重传报文队列中的任一报文后待发送的第一个新报文的包序列号。
在一种可能的设计中,存储器用于:在重传第二报文时,确定第二报文所在的报文队列对应的第一链表,并在第一链表中记录发送端在重传第二报文后待发送的第一个 新报文的包序列号,且包序列号为第一新报文的包序列号。
在一种可能的设计中,发送端从开始重传至少一个报文到再次重传第二报文的时间段小于一个超时周期。
第五方面,本申请实施例提供了一种计算机可读存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述第一方面以及第二方面以及第一方面和第二方面及的任一项可能的实现方式中的报文重传方法。
第六方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得电子设备执行上述第一方面以及第二方面以及第一方面和第二方面及的任一项可能的实现方式中的报文重传方法。
第七方面,本申请实施例提供了一种系统,该系统可以包括以上任一方面的任一项可能的实现方式中的发送端和接收端。该发送端和接收端可以执行上述任一方面及任一项可能的实现方式中的报文重传方法。
附图说明
图1为一种报文重传的信号交互示意图;
图2为一种报文重传的信号交互示意图;
图3为本申请实施例提供的一种网络架构的示意图;
图4为本申请实施例提供的一种发送端和接收端的结构示意图;
图5为本申请实施例提供的一种QP对应的bitmap的示意图;
图6为本申请实施例提供的一种报文重传的流程示意图;
图7为本申请实施例提供的一种报文重传的信号交互示意图;
图8为本申请实施例提供的一种报文重传的流程示意图;
图9为本申请实施例提供的一种报文重传的信号交互示意图;
图10为本申请实施例提供的一种通信装置的结构示意图;
图11为本申请实施例提供的一种服务器的结构示意图。
具体实施方式
为了便于理解,示例的给出了部分与本申请实施例相关概念的说明以供参考。如下所示:
RDMA:是一种直接内存访问技术,它将数据直接从一台计算机的内存传输到另一台计算机,无需计算机双方操作系统的介入,是为了解决网络传输中服务器端数据处理的延迟而产生的。
RoCE:一种允许通过以太网进行RDMA的网络协议。其较低的网络头是以太网头,其上网络头(包括数据)是InfiniBand头(支持RDMA的新一代网络协议)。这允许在标准以太网基础架构(交换机)上使用RDMA。由于RDMA是一种新的网络技术,因此需要支持该技术的网卡和交换机。
环路延时(round trip time,RTT):在计算机网络中,RTT是一个重要的性能指标,表示从发送端发送数据开始,到发送端收到来自接收端的确认(接收端收到数据后便立即发送确认),总共经历的时延。
队列对(queue pair,QP):是硬件和软件之间的一个虚拟接口。QP是队列结构,按顺序存储着软件给硬件下发的任务,任务中包含从哪里取出多长的数据,并且发送 给哪个目的地等信息。每个QP间都是独立的,因此一个QP可以被视为某个用户独占的一种资源,一个用户也可以同时使用多个QP。
连接上下文(queue pair context,QPC):用于存储QP相关属性。QP在硬件上的实体只是一段存储空间而已,软件通过操作系统提前申请好一片连续的空间,QPC可以用于来承载QP的相关信息,硬件可以通过QPC了解QP的相关属性。而网卡及其配套的驱动程序提前约定好了QPC中都有哪些内容,这些内容分别占据多少空间,按照什么顺序存放。这样驱动和硬件就可以通过QPC这段空间来读写QP的状态等信息。
位图(bitmap):用至少一个比特位(bit)来标记至少一个元素对应的值(value)。
应答(acknowledge,ACK)报文:数据通信中,接收端发给发送端的一种传输类控制字符,表示发来的数据已确认接收无误。
选择确认字符(selective acknowledge,SACK):用于接收端告诉发送端哪些报文段丢失,哪些报文段重传了,哪些报文段已经提前收到等信息。
包序列号(pack sequence number,PSN):数据包或报文的序列号。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
本申请实施例应用于RoCE中进行报文重传的场景中。
目前,RoCE中,一种报文重传方式中,当至少一个报文发送失败时,会从至少一个报文中第一个发送失败的报文开始重新发送报文,即发送端会发送第一个重传的报文(从一个超时周期的起始时刻开始)之后所有的报文。也就是说,即使只发送失败了一个报文,也会重传该报文之后所有的报文。这样会浪费大量的带宽。而且,如果重传报文时再次出现报文发送失败的情况,需要等待该超时周期超时后,再次从重传时第一个重传失败的报文开始进行报文重传,使得重传不够及时,延时显著增加,带宽下降。
如图1所示,发送端向接收端发送了PSN为0、1、2、3、4、5……的多个报文,但是接收端向发送端反馈了PSN为0的报文的ACK报文后,直接向发送端反馈了PSN为1的报文的否定应答(negative acknowledgement,NACK)报文,即NACK报文携带的PSN为1,指示PSN为1的报文接收失败,因此,发送端可以确定PSN为1的报文发送失败。由此,发送端在接收到NACK报文时,便开启一个超时周期,从该超时周期的起始时刻开始,从PSN为1的报文开始重传PSN为1的报文以及PSN为1的报文之后的报文(PSN为1的报文~超时周期开启前接收到的最后一个报文)。如果发送端在超时周期内向接收端重传报文的过程中,又存在发送失败的报文,例如图1 中PSN为1的报文在超时周期内重传失败,那么发送端在超时周期内发送的所有报文被丢弃,等到超时周期超时后,发送端再次开始从PSN为1的报文开始重传,可以称为重传超时(retransmit timeout,RTO)后的重传,这样会使得重传不够及时,延时显著增加,带宽下降。图1中,发送端在超时周期超时后再次从PSN为1的报文开始重传时,发送端都接收到了PSN为1、2、3和4等多个报文的ACK,表示再次重传的报文都重传成功。
另一种报文重传方式中,发送端也可以向接收端进行选择性重传。如图2所示,发送端向接收端发送了PSN为0、1、2、3、4、5……的多个报文,与图1的方案类似的,发送端接收到了携带PSN为3的SACK报文,该SACK报文指示PSN为3的报文发送成功,但是PSN为1和2的报文发送失败,因此终端设备需要重传PSN为1和2的报文。但是,与图1的方案不同的是,发送端可以在超时周期开启内只重传发送失败的报文,即发送端在超时周期内重传了PSN为1和2的报文之后,继续向接收端发送新的报文,例如新的报文为图2中PSN为N、N+1以及N+2等多个报文。但是图2的方案中,还与图1的方案类似的是,如果发送端在超时周期内还存在重传失败的报文,例如在超时周期内重传PSN为1的报文失败,发送端接收到了携带PSN为2的SACK报文,SACK报文指示PSN为2的报文重传成功,但是PSN为1的报文重传失败,这时,发送端依然要等到超时周期超时时,才能继续再次重传PSN为1的报文。可以看出,图2中,发送端在RTO后再次重传了PSN为1的报文后,才开始继续向接收端发送新的报文,例如新的报文为图2中PSN为M、M+1以及M+2的报文等,且再次重传都重传成功,即发送端接收到了来自接收端的PSN为1、M、M+1以及M+2的报文的ACK报文。因此,图2的这种重传方式中,也存在重传不够及时,延时显著增加,带宽下降的问题。
针对该问题,本申请实施例提出一种报文重传方法,该方法应用于RDMA中,当发送端在确定存在发送失败的报文时,可以选择性的重传报文,即只针对发送失败的报文进行重传,而且,在确定存在发送失败的报文时,可以立即重传发送失败的报文。如果重传的报文再次出现重传失败,也不需要等到超时周期超时时才进行再次重传。当重传的报文再次出现重传失败时,发送端可以再次立即重传报文,以缩短重传延时。
其中,在判断重传的报文是否重传成功时,可以通过以下方式确定:
1)在重传多个发送失败的报文时,如果重传到最后一个发送失败的报文时,发送端可以记录待发送的第一个新报文的PSN。当发送端接收到一个SACK报文,SACK报文中携带的报文的包序列号大于或等于上述第一个新报文的PSN时,若发送端还未接收到多个发送失败的报文中的第一报文对应的第二ACK报文,则发送端确定第一报文重传失败,发送端可以再次向接收端重传所述第一报文。也就是说,发送端不仅可以选择只向接收端重传发送失败的报文,而且根据SACK报文中的PSN与记录的待发送的新报文的PSN进行对比发现重传失败时,可以立即向接收端再次重传,不需要等到超时周期超时时才进行再次重传,使得报文得到及时重传,缩短了延时。
2)在重传多个发送失败的报文时,记录发送端在重传每个报文后待发送的第一个新报文的PSN,可以理解为建立有每个发送失败的报文与待发送的第一新报文的对应关系。当发送端接收到SACK报文,SACK报文中携带的报文的PSN大于或等于记录 的第一新报文的PSN时,若还未接收到第二报文对应的第二ACK报文,则发送端再次重传第二报文;其中,发送失败的报文包括第二报文,发送端在重传第二报文时,记录的第一个新报文的PSN为第一新报文的PSN。也就是说,发送端不仅可以选择只向接收端重传发送失败的报文,而且通过记录重传每个发送失败的报文时,下一个待发送的新报文的PSN,当记录的PSN大于或等于新报文的PSN的报文被应答,而记录的同时重传的报文却未应答,可以判定重传的报文重传失败,需再次进行重传。需再次重传时,发送端可以立即向接收端再次重传,不需要等到超时周期超时时才进行再次重传,使得报文得到及时重传,缩短了延时。
本申请提出的重传方法可以应用的网络架构可以如图3所示。
本申请的网络架构可以包括多个服务器,服务器与服务器之间可以进行数据通信,例如一个服务器向另一个服务器发送报文。服务器与服务器之间可以通过交换机进行数据通信。如图3所示,服务器31向服务器32发送报文,服务器31作为数据的发送端,服务器32作为数据的接收端。本申请的网络架构可以应用于上述RDMA的网络,还可以应用于使用上述RDMA技术的其他网络或网卡上,例如应用于胖树结构的数据中心。
以本申请应用于RDMA网卡为例,该网卡可以应用于发送端和接收端,该RDMA网卡可以包括接收单元、发送单元、QPC存储单元、BM管理单元以及定时器单元等。如图4所示,发送端可以包括接收单元41、发送单元42、QPC存储单元43、BM管理单元44以及定时器单元45,接收端可以包括接收单元46、发送单元47、QPC存储单元48、BM管理单元49以及定时器单元50。
其中,发送单元可以用于发送数据包或发送报文或发送数据等;
接收单元可以用于接收数据包或接收报文或接收数据等,例如可以接收ACK报文或SACK报文等;
QPC存储单元可以用于存储链接的上下文信息。对于发送端来讲,上下文信息可以包括发送端预期要发送的报文的序列号,当发送端已经发送了该报文,发送端的发送单元可以进行QPC读写,指示QPC存储单元更新预期要发送的报文的序列号;对于接收端来讲,上下文信息可以包括接收端预期要接收的报文的序列号,以及该报文将要存储的地址信息等,当接收端接收到预期的报文后,接收端的接收单元可以进行QPC读写,指示QPC存储单元更新下一个预期接收的报文的序列号以及将要存储的地址信息。应用上述网络架构中,不同的链接可以是相同的发送端对应不同的接收端,例如一个链接的发送端为服务器1,接收端为服务器2,另一个链接的发送端为服务器1,接收端为服务器3;该发送端作为接收端时,接收端也可以作为发送端;
BM管理单元,可以理解为bitmap管理单元,可以存储有多个链接对应的QP的bitmap。例如如图5所示,QP0对应的bitmap的比特值为0101…00,QP1对应的bitmap的比特值为00001…00,QP2对应的bitmap的比特值为0100…00。以QP0为例,其bitmap指示,起始PSN的报文的比特值为0,表示起始PSN的报文未接收到,起始PSN+1的报文的比特值为1,表示起始PSN+1的报文已接收到,起始PSN+2的报文的比特值为0,表示起始PSN+2的报文未接收到,起始PSN+3的报文的比特值为0,表示起始PSN+3的报文未接收到。
对于发送端和接收端来说,接收单元可以用于根据报文接收成功与否对BM管理单元进行BM读写操作,以更新BM管理单元中的bitmap(报文接收成功时相应的bit值可以为1,报文接收失败时相应的bit值可以为0。),发送单元可以用于对BM管理单元进行BM读操作,以读取BM管理单元中的bitmap,知道哪些报文是接收成功的,哪些报文是发送失败的,接收成功时,发送单元可以发送ACK报文,接收失败时,发送单元可以发送SACK报文。或者,当接收单元接接收到重复的报文时,通过进行BM读操作,知道bitmap中该报文的bit值已为1,可以丢弃接收到的重复的报文。
定时器单元,可以用于设定超时时间。如果一个报文发出后,经过超时时间,仍没有得到应答的报文,定时器单元产生超时重传触发信号,触发发送单元再次发送此报文。
应用以上网络架构,本申请提出的报文重传方法的流程可以如实施例一和实施例二,但不局限于这两种实施例。
实施例一
本申请实施例提供一种报文重传方法,该方法可以应用于RDMA中,如图6所示,该方法包括:
601、发送端向接收端发送多个报文。
当发送端的发送单元42接收到发送端的软件发送的DoorBell时,意味着发送端的发送端单元42将要周期性地向接收端发送报文。当发送端的发送单元42需要向发送端发送报文时,先从发送端的QPC存储单元43中读取第一个将要发送的报文的PSN,例如PSN为0,即发送端从PSN为0的报文开始向接收端发送报文。当然,第一个将要发送的报文的PSN也不一定为0,也可以为发送端与接收端协商的一个初始值。
示例性的,如图7所示,发送端依次向接收端发送PSN为0、1、2、3、4、5…的报文。发送端的发送单元42每向接收端发送一个报文时,从QPC存储单元43先读取将要发送的报文的PSN,并将PSN携带在报文中。发送单元42每发送一个报文后,发送单元42指示QPC存储单元43更新预期要发送的报文的PSN。例如发送单元42从QPC存储单元43中读取预期要发送的PSN为0,当发送单元42发送了PSN为0的报文后,指示QPC存储单元43更新预期要发送的报文的PSN,QPC存储单元43更新预期要发送的报文的PSN为1,以此类推。
602、接收端接收发送端发送的多个报文,当接收到发送端发送的报文时,向发送端回复ACK报文。相应地,发送端接收ACK报文。
接收端的接收单元46每接收到一个报文时,接收单元46会触发发送单元47向发送端发送应答报文,例如ACK报文,以告知发送端该报文已接收到。
对于接收端来说,期望按照PSN的顺序接收报文。接收端的QPC存储单元48中可以存储有接收端期望接收到的报文的PSN,接收端的接收单元46每接收到一个期望的报文时,QPC存储单元48会更新下一次期望接收到的报文的PSN。如果接收单元46接收到的报文的PSN等于QPC存储单元48期望接收到的报文的PSN,发送单元47会向发送端发送ACK报文。同时,对于每个QC,接收端每正确接收到一个报文,将该报文对应的比特值在bitmap中置1。
示例性的,如图7所示,接收单元46接收到PSN为0的报文后,会指示QPC存 储单元48更新期望接收到的报文的PSN为1;接收单元接收到PSN为3的报文后,会指示QPC存储单元48更新期望接收到的报文的PSN为4,以此类推。
603、接收端确定存在接收失败的报文时,向发送端发送第一SACK报文,第一SACK报文指示发送端向接收端发送的报文中的至少一个报文发送失败;相应的,发送端接收来自接收端的第一SACK报文。
在一些实施例中,如果接收端接收到的报文携带的PSN大于QPC存储单元48中存储的预期要接收的报文的PSN,那么接收端可以确定期望的PSN的报文接收失败。BM管理单元49可以将此次接收到的报文在bitmap中对应的值置为1,将期望接收到但又未接收到的报文在bitmap中对应的值置为0。并且,发送单元47针对此次正确接收到的报文向接收端发送第一SACK报文,该第一SACK报文中可以携带bitmap,bitmap包括多个比特的比特值,多个比特的比特值指示当前QC中的多个报文是否被正确接收的指示。多个比特包括至少一个比特,至少一个比特指示发送端向接收端发送的报文中的至少一个报文发送失败。
示例性的,参考图7,发送端向接收端发送的PSN为0、1、2、3、4、5…的多个报文中,PSN为0、3、4、5的报文发送成功,或者说,接收端接收PSN为0、3、4、5的报文成功,PSN为1和2的报文发送失败,或者说,接收端接收PSN为1和2的报文失败。当接收端的接收单元46用于接收到PSN为0的报文后,将bitmap中PSN为0的报文对应的比特值置1,QPC存储单元48用于将期望接收到的下一个报文的PSN置为1。但是,当接收单元46接收到的下一个报文的PSN为3时,PSN为3与期望接收到的报文的PSN为1不符,那么接收端可以确定PSN为1和2的报文接收失败,BM管理单元49可以将bitmap中PSN为3的报文对应的比特值置为1的同时,将PSN为1和2的报文对应的比特值置为0。发送单元48在向发送端发送PSN为3的报文对应的应答报文时,确定将要发送的应答报文为第一SACK报文,并从BM管理单元49中读取PSN为1、2和3的报文对应的比特值携带在第一SACK报文中,以及将PSN为3的报文的PSN携带在第一SACK报文中。对于发送端来说,接收单元41接收到第一SACK后,发送端可以读取第一SACK中的比特值001以及PSN,PSN为3,并确定PSN为3的报文之前的报文丢失,由于发送端的BM管理单元44已经记录了PSN为0的报文对应的比特值为1,那么发送端可以确定PSN为1和2的报文发送失败,BM管理单元44并记录PSN为1、2和3的报文对应的比特值为001。
604、发送端暂停向接收端发送新报文,并向接收端重传该至少一个报文,并在重传至少一个报文中最后一个报文时,记录发送端待发送的第一个新报文的包序列号。
至少一个报文中最后一个报文可以理解为至少一个报文中PSN最大的报文。当发送端接收到第一SACK报文时,可以读取第一SACK报文中的PSN以及bitmap,根据第一SACK报文中的PSN以及bitmap可以确定哪些报文发送失败需要重传。
示例性的,参考图7,接收单元41在接收到第一SACK报文时,发送端可以读取第一SACK报文中的PSN以及bitmap,并将bitmap存储到BM管理单元44中。当PSN为3时,说明PSN为3的报文发送成功。当bitmap为001时,可知PSN为1和2的报文发送失败。因此,发送端确定需向接收端重传PSN为1和2的报文。因此,当发送端在接收到第一SACK时,暂停向接收端发送新报文,并向接收端重传PSN为1和 2的报文。需要说明的是,本申请中的新报文可以理解为发送端发送完重传的报文后将要发送的第一个新的报文。
当发送端向接收端重传最后一个报文,即PSN为2的报文时,可以在QPC存储单元43中记录发送端待发送的第一个新报文的PSN,即当前最大发送PSN。图7的示例中,发送端重传了PSN为2的报文后,记录待发送的第一个新报文的PSN为N。而后,发送单元42在用于重传了PSN为2的报文后,可以用于继续向接收端发送新报文,例如继续发送PSN为N、N+1、N+2的新报文。图7中,N为大于或等于6的整数。
605、当发送端接收到每个SACK报文时,将每个SACK报文中携带的包序列号与记录的第一个新报文的包序列号进行对比,确定每个SACK报文携带的包序列号是否大于或等于第一个新报文的包序列号。
示例性的,参考图7,当发送单元42用于向接收端开始重传上述至少一个报文时,每当接收单元41用于接收到一个SACK报文时,发送端便读取SACK报文中的PSN,将读取的PSN与记录的第一个新报文的PSN进行对比,以确定接收到的ACK报文携带的PSN是否大于或等于第一个新报文的PSN。例如当接收单元41接收到PSN为2的报文的ACK时,将2与记录的N进行对比,确定2小于N。
606、当接收到第二SACK报文,第二SACK报文中携带的报文的包序列号大于或等于第一个新报文的包序列号时,发送端确定是否存在未接收到针对至少一个报文的ACK报文。
由于记录的第一个新报文是在重传的报文之后发送的,如果发送端已经接收到了记录的第一个新报文的SACK,但是还未接收到重传的报文的ACK时,说明重传的报文重传失败。
示例性的,参考图7,发送单元42用于重传了PSN为1和2的报文后,PSN为1的报文第一次重传失败,但是PSN为2的报文第一次重传成功,接收端针对PSN为2的报文会向发送端回复第三SACK报文,第三SACK报文携带的PSN为2,指示PSN为2的报文重传成功,但是PSN为1的报文重传失败。此时,第三SACK携带的PSN为2是小于记录的N的。由于PSN为2的报文重传后发送的下一个报文为PSN为N的新报文,因此,接收端还会继续向发送端发送针对PSN为N的报文的第二SACK报文的,第二SACK报文携带的PSN为N,并且指示重传的PSN为1的报文重传失败,PSN为2的报文重传成功,此时第二SACK携带的PSN为N是等于记录的N的。当接收单元41接收到PSN为N的第二SACK报文时,发送端会根据第二SACK报文确定是否存在未接收到针对PSN为1和2的报文的ACK报文,以确定PSN为1和2的报文是否都重传成功。
607、若发送端确定还未接收到至少一个报文中的第一报文对应的ACK报文,则发送端再次向接收端重传第一报文。
示例性的,参考图7,假设第一报文为PSN为1的报文时,如果发送端发现接收单元41还未接收到PSN为1的报文的ACK,那么发送端确定PSN为1的报文重传失败,需要再次进行重传。此时,发送端暂停向接收端发送新报文,且发送端再次重传PSN为1的报文不需要等如现有技术一样等到超时周期超时时才进行再次重传,而是 可以立即进行再次重传。如图7所示,发送单元41立即再次重传PSN为1的报文,而后,继续向接收端发送新报文,该新报文可以如图7中的PSN为M、M+1和M+2的新报文,M为大于N+2的整数。
由此,本申请中,发送端不仅可以利用SACK中携带的bitmap准确知道发送成功的报文和发送失败的报文,且发送端只重传发送失败的报文,可以提高重传效率,降低重传带宽的占用。而且,发送端通过在重传最后一个报文时记录下一个新报文的PSN,通过对比接收到的SACK携带的PSN与记录的PSN,可以判定是否存在重传失败的报文,即是否存在“被丢弃的重传报文”。如果确定存在重传失败的报文,可以立即再次进行重传。通常,从发送端第一次重传报文开始到下一次重传报文开始,其时长通常远小于一个超时周期,该时长在一个RTT周期内就能再次开始重传报文,即在一个RTT周期内就能重传“被丢弃的重传报文”,一个RTT周期远小于一个超时周期,可以“被丢弃的重传报文”被及时重传,缩短了重传时延。
实施例二
本申请实施例提供一种报文重传方法,方法可以应用于RDMA中,如图8所示,该方法包括:
801、发送端向接收端发送多个报文。
步骤801的实现方式可以参考步骤601。
802、接收端接收发送端发送的多个报文,当接收到发送端发送的报文时,向发送端回复ACK报文。相应地,发送端接收ACK报文。
步骤802的实现方式可以参考步骤602。
803、发送端为多个报文队列中的每个报文队列建立链表,链表用于记录发送端在重传报文队列中的任一报文后待发送的第一个新报文的包序列号。
每个报文队列(即QP)包括多个报文,每个报文队列对应一个连接。该链表可以存储在QPC存储单元43中。
也可以理解为,该链表用于为重传的报文与待发送的第一个新报文建立对应关系。这是考虑到,后续执行报文发送过程中,新报文是在重传的报文之后发送的,如果发送端已经接收到的记录的待发送的第一个新报文的应答报文,却还未接收到对应的重传报文的应答报文,说明重传的报文重传失败。
804、接收端确定存在接收失败的报文时,向发送端发送第一SACK报文,第一SACK报文指示发送端向接收端发送的报文中的至少一个报文发送失败;相应的,发送端接收来自接收端的第一SACK报文。
步骤804的实现方式与步骤603的实现方式类似。
805、发送端暂停向接收端发送新报文,并向接收端重传该至少一个报文,并在重传至少一个报文中的每个报文时,记录发送端在重传每个报文后待发送的第一个新报文的包序列号。
如果接收单元41接收到第一SACK报文,那么发送端确定之前发送的报文存在发送失败的报文,因此,发送端控制发送单元42暂停向接收端发送新报文,需要开始重传发送失败的报文。在重传每个报文时,发送端需要在QPC存储单元43中记录每个重传的报文被发送后,待发送的第一个新报文的PSN。其中,如果多个重传的报文 是连续发送失败的,那么这多个重传的报文对应记录的第一个新报文的PSN相同。如果多个重传的报文不是连续发送失败的,那么这多个重传的报文对应记录的第一个新报文的PSN不同。这是由于发送端接收到了在前重传的报文的ACK报文后,可能还未接收到在后重传的报文重传成功的应答报文时,需先发送新报文,当接收到在后重传的报文的ACK报文后,继续发送新报文,两次要发送的新报文不同。
示例性的,参考图9,假设发送端发送的PSN为0的报文为起始报文的多个报文均属于同一个QP。当接收单元41接收到了携带PSN为2的SACK报文(PSN为2的报文发送成功)时,根据SACK报文中的bitmap确定PSN为1的报文发送失败,PSN为0和2的报文发送成功。因此,发送单元42暂停发送新报文,并重传PSN为1的报文,在重传PSN为1的报文时,发送端在QPC存储单元43中的链表中记录重传PSN为1的报文后待发送的第一个新报文的PSN为N;而后,接收单元41接收到了携带PSN为3的SACK报文(该SACK报文指示PSN为0和3的报文发送成功,但是PSN为1的报文发送失败)。参考图9,发送端在PSN为4的报文之后还发送了PSN为5的报文,由于PSN为4的报文第一次也发送失败了,因此,接收单元41接收到携带PSN为5的SACK时,该SACK中的bitmap指示PSN为4的报文也发送失败。因此,发送单元42暂停发送新报文,并重传PSN为4的报文,在重传PSN为4的报文时,发送端在QPC存储单元43中的链表中记录重传PSN为4的报文后待发送的第一个新报文的PSN为N+2。而后,发送单元42继续发送PSN为N+3等包序列号的新报文。
也就是说,每重传一个报文时,都需要在链表中记录发送端在重传每个报文后待发送的第一个新报文的PSN,也可以说建立有重传的报文与待发送的新报文的对应关系。
假设在上述重传的报文过程中:
至少一个报文包括第二报文,在重传第二报文时,发送端确定第二报文所在的报文队列对应的第一链表,并在第一链表中记录发送端在重传第二报文后待发送的第一个新报文的包序列号,且包序列号为第一新报文的包序列号。第二报文例如可以为上述重传的PSN为1和4的报文。
那么,该方法还可以包括:
806、当发送端接收到第二SACK报文,第二SACK报文中携带的报文的包序列号大于或等于记录的第一新报文的包序列号时,若还未接收到第二报文对应的ACK报文,则发送端再次重传第二报文。
当发送端在重传至少一个报文中的第一个报文开始后,每接收到一个报文的SACK报文时,读取SACK报文中的PSN,将该PSN与记录链表中的PSN进行对比,如果发现第二SACK携带的PSN大于或等于链表中的某个报文的PSN时,检查是否接收到在链表中记录该报文的PSN时被重传的第二报文,即是否接收到链表中记录的报文对应的被重传的报文。
示例性的,重传的第二报文可以理解为图9中的PSN为1或4的重传报文。按照步骤805中的说明,当接收单元41已经接收到了PSN为N的报文的SACK报文,但是还没接收到重传的PSN为1的报文的ACK报文,发送端确定PSN为1的报文重传 失败,需再次重传PSN为1的报文。当接收单元41已经接收到了PSN为N+2的报文的SACK报文,但是还没接收到重传的PSN为4的报文的ACK报文,发送端确定PSN为4的报文重传失败,需再次重传PSN为4的报文。从图9可以看出,发送单元42第二次重传了PSN为1的报文时,还可以在链表中记录待发送的第一个新报文的PSN为M;发送单元42第二次重传了PSN为4的报文时,还可以在链表中记录待发送的第一个新报文的PSN为M+2,以确定第二次重传的PSN为1和4的报文是否重传成功。
由此,本申请中,发送端针对发送失败的报文,在每重传一个发送失败的报文时,记录待发送的下一个新报文的PSN,当已经接收到记录的下一个新报文的SACK报文,但还未接收到对应的重传报文的ACK报文时,确定重传的报文重传失败,发送端可以立即再次重传报文,不用等到重传报文的超时周期超时时才进行再次重传,可以使得报文重传及时。况且,第一次重传报文到再次重传报文的时间可以为一个RTT周期,一个RTT周期远小于一个超时周期,使得在一个RTT周期内可以精确的再次重传多个被重传失败的报文,缩短了重传时延。
可以理解的是,为了实现上述功能,通信装置(例如可以为发送端)包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本实施例可以根据上述方法示例对通信装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用对应各个功能划分各个功能模块的情况下,图10示出了一种通信装置100的一种可能的组成示意图,该通信装置可以为上述实施例中涉及的发送端,如图10所示,该发送端可以包括:接收单元1001、发送单元1002、记录单元1003和确定单元1004。
其中,接收单元1001可以用于支持发送端执行上述步骤602、步骤603、步骤802、步骤806等,和/或用于本文所描述的技术的其他过程。
发送单元1002可以用于支持发送端执行上述步骤601、步骤604、步骤607、步骤801、步骤804、步骤805以及步骤806等,和/或用于本文所描述的技术的其他过程。
记录单元1003可以用于支持发送端执行上述步骤604、步骤805等,和/或用于本文所描述的技术的其他过程。
确定单元1004可以用于支持发送端执行上述步骤605、步骤606、步骤607等,和/或用于本文所描述的技术的其他过程。
还可以包括建立单元1005,用于支持发送端执行上述步骤803等,和/或用于本文所描述的技术的其他过程。
图10中的发送单元1002与图4中发送端的发送单元41类似,图10中的接收单元1001与图4中的接收单元41类似,图10中的记录单元1003记录的区域可以为图4中的QPC存储单元43、BM管理单元44等。
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
本实施例提供的通信装置100,用于执行上述报文重传方法,因此可以达到与上述实现方法相同的效果。
在采用集成的单元的情况下,通信装置100可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对通信装置100的动作进行控制管理,例如,可以用于支持通信装置100执行上述确定单元1101和记录单元1003执行的步骤。存储模块可以用于支持通信装置100存储程序代码和数据等,例如记录bitmap和PSN等。通信模块,可以用于支持通信装置100与其他设备的通信,例如与接收端的通信。
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他电子设备交互的设备。
在一个实施例中,当处理模块为处理器,存储模块为存储器,通信模块包括发射器和接收器时,本实施例所涉及的通信装置可以为具有图11所示结构的服务器。
本申请实施例还提供一种电子设备,包括一个或多个处理器以及一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述相关方法步骤实现上述实施例中的报文重传方法。
本申请的实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的报文重传方法。
本申请的实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中电子设备执行的报文重传方法。
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中电子设备执行的报文重传方法。
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
本申请另一实施例提供了一种系统,该系统可以包括上述发送端和接收端,可以用于实现上述报文重传方法。
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简 洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (20)

  1. 一种报文重传方法,其特征在于,所述方法应用于远端直接内存访问RDMA网络中,所述方法包括:
    发送端接收来自接收端的第一选择性应答SACK报文,所述第一SACK报文指示所述发送端向所述接收端发送的报文中的至少一个报文发送失败;
    所述发送端向所述接收端重传所述至少一个报文,并在重传所述至少一个报文中最后一个报文时,记录所述发送端待发送的第一个新报文的包序列号;
    当所述发送端接收到第二SACK报文,所述第二SACK报文中携带的报文的包序列号大于或等于所述第一个新报文的包序列号时,若所述发送端根据所述第二SACK报文确定还未接收到所述至少一个报文中的第一报文,则所述发送端再次向所述接收端重传所述第一报文。
  2. 根据权利要求1所述的方法,其特征在于,所述第一SACK报文中携带位图,所述位图包括至少一个比特,所述至少一个比特中的部分比特指示所述发送端向所述接收端发送的报文中的至少一个报文发送失败。
  3. 根据权利要求1或2所述的方法,其特征在于,所述当所述发送端接收到第二SACK报文,所述第二SACK报文中携带的报文的包序列号大于或等于所述第一个新报文的包序列号时,若所述发送端根据所述第二SANK报文确定还未接收到所述至少一个报文中的第一报文,则所述发送端再次向所述接收端重传所述第一报文包括:
    当所述发送端接收到每个SACK报文时,将所述每个SACK报文中携带的包序列号与记录的所述第一个新报文的包序列号进行对比,确定所述每个SACK报文携带的包序列号是否大于或等于所述第一个新报文的包序列号;
    当接收到所述第二SACK报文,所述第二SACK报文中携带的报文的包序列号大于或等于所述第一个新报文的包序列号时,所述发送端确定重传的所述至少一个报文是否存在未接收到针对所述至少一个报文的ACK报文;
    若所述发送端还未接收到所述至少一个报文中的第一报文对应的ACK报文,则所述发送端再次向所述接收端重传所述第一报文。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述发送端从开始重传所述至少一个报文到再次重传所述第一报文的时间段小于一个超时周期。
  5. 一种报文重传方法,其特征在于,所述方法应用于远端直接内存访问RDMA网络中,所述方法包括:
    发送端接收来自接收端的第一选择性应答SACK报文,所述第一SACK报文指示所述发送端向所述接收端发送的报文中的至少一个报文发送失败;
    所述发送端向所述接收端重传所述至少一个报文,并在重传所述至少一个报文中的每个报文时,记录所述发送端在重传每个报文后待发送的第一个新报文的包序列号;其中,所述至少一个报文包括第二报文,所述发送端在重传所述第二报文时,记录的待发送的第一个新报文的包序列号为第一新报文的包序列号;
    当所述发送端接收到第二SACK报文,所述第二SACK报文中携带的报文的包序列号大于或等于记录的所述第一新报文的包序列号时,若还未接收到所述第二报文对应的ACK报文,则所述发送端再次重传所述第二报文。
  6. 根据权利要求5所述的方法,其特征在于,所述第一SACK报文中携带位图,所述位图包括至少一个比特,所述至少一个比特中的部分比特指示所述发送端向所述接收端发送的报文中的至少一个报文发送失败。
  7. 根据权利要求5或6所述的方法,其特征在于,在所述发送端向所述接收端重传所述至少一个报文之前,所述方法还包括:
    所述发送端为多个报文队列中的每个报文队列建立链表,所述链表用于记录所述发送端在重传报文队列中的任一报文后待发送的第一个新报文的包序列号。
  8. 根据权利要求7所述的方法,其特征在于,所述在重传所述至少一个报文中的每个报文时,记录所述发送端重传每个报文后待发送的第一个新报文的包序列号包括:
    在重传所述第二报文时,所述发送端确定所述第二报文所在的报文队列对应的第一链表,并在所述第一链表中记录所述发送端在重传所述第二报文后待发送的第一个新报文的包序列号,且包序列号为所述第一新报文的包序列号。
  9. 根据权利要求5-8任一项所述的方法,其特征在于,所述发送端从开始重传所述至少一个报文到再次重传所述第二报文的时间段小于一个超时周期。
  10. 一种通信装置,所述通信装置作为发送端,其特征在于,所述通信装置应用于远端直接内存访问RDMA网络中,所述通信装置包括:
    接收器,用于接收来自接收端的第一选择性应答SACK报文,所述第一SACK报文指示所述发送端向所述接收端发送的报文中的至少一个报文发送失败;
    发射器,用于向所述接收端重传所述至少一个报文;以及存储器,用于所述发送端在重传所述至少一个报文中最后一个报文时,记录所述发送端待发送的第一个新报文的包序列号;
    处理器,还用于确定所述发送端接收到第二SACK报文,所述第二SACK报文中携带的报文的包序列号大于或等于所述第一个新报文的包序列号,若所述发送端还未接收到所述至少一个报文中的第一报文对应的ACK报文,指示所述发射器还用于再次向所述接收端重传所述第一报文。
  11. 根据权利要求10所述的通信装置,其特征在于,所述第一SACK报文中携带位图,所述位图包括至少一个比特,所述至少一个比特中的部分比特指示所述发送端向所述接收端发送的报文中的至少一个报文发送失败。
  12. 根据权利要求10或11所述的通信装置,其特征在于,所述处理器用于:当所述发送端接收到每个SACK报文时,将所述每个SACK报文中携带的包序列号与记录的所述第一个新报文的包序列号进行对比,确定所述每个SACK报文携带的包序列号是否大于或等于所述第一个新报文的包序列号;
    当接收到所述第二SACK报文,所述第二SACK报文中携带的报文的包序列号大于或等于所述第一个新报文的包序列号时,确定是否存在未接收到针对所述至少一个报文的ACK报文;
    所述发射器,用于若所述发送端还未接收到所述至少一个报文中的第一报文对应的ACK报文,则再次向所述接收端重传所述第一报文。
  13. 根据权利要求10-12任一项所述的通信装置,其特征在于,所述发送端从开始重传所述至少一个报文到再次重传所述第一报文的时间段小于一个超时周期。
  14. 一种通信装置,所述通信装置作为发送端,其特征在于,所述通信装置应用于远端直接内存访问RDMA网络中,所述通信装置包括:
    接收器,用于接收来自接收端的第一选择性应答SACK报文,所述第一SACK报文指示所述发送端向所述接收端发送的报文中的至少一个报文发送失败;
    发射器,用于向所述接收端重传所述至少一个报文;
    存储器,用于在重传所述至少一个报文中的每个报文时,记录所述发送端在重传每个报文后待发送的第一个新报文的包序列号;其中,所述至少一个报文包括第二报文,所述发送端在重传所述第二报文时,记录的待发送的第一个新报文的包序列号为第一新报文的包序列号;
    所述接收器,还用于当接收到第二SACK报文,所述第二SACK报文中携带的报文的包序列号大于或等于记录的所述第一新报文的包序列号时,若还未接收到所述第二报文对应的ACK报文,则指示所述发射器,用于再次重传所述第二报文。
  15. 根据权利要求14所述的通信装置,其特征在于,所述第一SACK报文中携带位图,所述位图包括至少一个比特,所述至少一个比特中的部分比特指示所述发送端向所述接收端发送的报文中的至少一个报文发送失败。
  16. 根据权利要求14或15所述的通信装置,其特征在于,还包括处理器,用于:
    为多个报文队列中的每个报文队列建立链表,所述链表存储在所述存储器中,所述链表用于记录所述发送端在重传报文队列中的任一报文后待发送的第一个新报文的包序列号。
  17. 根据权利要求16所述的通信装置,其特征在于,所述存储器用于:
    在重传所述第二报文时,确定所述第二报文所在的报文队列对应的第一链表,并在所述第一链表中记录所述发送端在重传所述第二报文后待发送的第一个新报文的包序列号,且包序列号为所述第一新报文的包序列号。
  18. 根据权利要求14-17任一项所述的通信装置,其特征在于,所述发送端从开始重传所述至少一个报文到再次重传所述第二报文的时间段小于一个超时周期。
  19. 一种计算机可读存储介质,其特征在于,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述权利要求1-9中的任一项所述的方法。
  20. 一种计算机程序产品,其特征在于,当计算机程序产品在计算机上运行时,使得电子设备执行上述权利要求1-9中的任一项所述的方法。
PCT/CN2020/115985 2020-09-17 2020-09-17 一种报文重传方法和装置 WO2022056791A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/CN2020/115985 WO2022056791A1 (zh) 2020-09-17 2020-09-17 一种报文重传方法和装置
EP20953649.9A EP4207654A4 (en) 2020-09-17 2020-09-17 PACKET RETRANSMISSION METHOD AND APPARATUS
CN202080103655.5A CN116114199A (zh) 2020-09-17 2020-09-17 一种报文重传方法和装置
US18/183,509 US20230224084A1 (en) 2020-09-17 2023-03-14 Packet Retransmission Method and Apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/115985 WO2022056791A1 (zh) 2020-09-17 2020-09-17 一种报文重传方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/183,509 Continuation US20230224084A1 (en) 2020-09-17 2023-03-14 Packet Retransmission Method and Apparatus

Publications (1)

Publication Number Publication Date
WO2022056791A1 true WO2022056791A1 (zh) 2022-03-24

Family

ID=80777338

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/115985 WO2022056791A1 (zh) 2020-09-17 2020-09-17 一种报文重传方法和装置

Country Status (4)

Country Link
US (1) US20230224084A1 (zh)
EP (1) EP4207654A4 (zh)
CN (1) CN116114199A (zh)
WO (1) WO2022056791A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105846968A (zh) * 2015-01-14 2016-08-10 中兴通讯股份有限公司 一种实现重传的方法和装置、发送设备和接收设备
CN110460412A (zh) * 2019-07-11 2019-11-15 阿里巴巴集团控股有限公司 用于数据传输的方法和rdma网卡
CN110719294A (zh) * 2015-12-29 2020-01-21 亚马逊技术股份有限公司 网络技术
WO2020146910A1 (en) * 2019-01-09 2020-07-16 Atto Technology, Inc. System and method for accelerating iscsi command processing

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7889762B2 (en) * 2006-01-19 2011-02-15 Intel-Ne, Inc. Apparatus and method for in-line insertion and removal of markers
US20120155458A1 (en) * 2010-12-20 2012-06-21 Brocade Communications Systems, Inc. Repeated Lost Packet Retransmission in a TCP/IP Network
CN106656431B (zh) * 2015-09-21 2020-09-29 华为技术有限公司 一种报文传输方法及用户设备
US10430374B2 (en) * 2016-06-29 2019-10-01 Mellanox Technologies, Ltd. Selective acknowledgement of RDMA packets
CN108650064A (zh) * 2018-05-08 2018-10-12 昆明理工大学 一种有效检测重传数据包丢失并预防重传超时方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105846968A (zh) * 2015-01-14 2016-08-10 中兴通讯股份有限公司 一种实现重传的方法和装置、发送设备和接收设备
CN110719294A (zh) * 2015-12-29 2020-01-21 亚马逊技术股份有限公司 网络技术
WO2020146910A1 (en) * 2019-01-09 2020-07-16 Atto Technology, Inc. System and method for accelerating iscsi command processing
CN110460412A (zh) * 2019-07-11 2019-11-15 阿里巴巴集团控股有限公司 用于数据传输的方法和rdma网卡

Also Published As

Publication number Publication date
EP4207654A1 (en) 2023-07-05
EP4207654A4 (en) 2023-09-27
CN116114199A (zh) 2023-05-12
US20230224084A1 (en) 2023-07-13

Similar Documents

Publication Publication Date Title
US10430374B2 (en) Selective acknowledgement of RDMA packets
US11153041B2 (en) Packet transmission method and user equipment
US11412078B2 (en) Data transmission method and first device
US9577791B2 (en) Notification by network element of packet drops
US11381514B2 (en) Methods and apparatus for early delivery of data link layer packets
US7746786B2 (en) Retransmission control method and device
US7693070B2 (en) Congestion reducing reliable transport packet retry engine
WO2014092779A1 (en) Notification by network element of packet drops
JP5935940B2 (ja) 通信方法、通信装置、および、通信プログラム
US7653060B2 (en) System and method for implementing ASI over long distances
CN103141050B (zh) 快速通道互联系统中数据包重传方法、节点
US7305605B2 (en) Storage system
CN114520711A (zh) 数据包的选择性重传
US10461892B2 (en) Low latency communications
US8769137B2 (en) Systems and methods for negotiated accelerated block option for trivial file transfer protocol (TFTP)
WO2022056791A1 (zh) 一种报文重传方法和装置
WO2019128937A1 (zh) 一种上行数据调度方法以及相关设备
US8418017B2 (en) Adaptive acknowledgment mechanism for network communication
US20220368765A1 (en) Universal Transport Framework For Heterogeneous Data Streams
CN113612737A (zh) 一种基于分组与重传机制的长报文可靠传输方法
WO2019127533A1 (zh) 确定反馈的方法、发送端、接收端及系统
US11811877B2 (en) Universal transport framework for heterogeneous data streams
JP2005167352A (ja) 送信装置およびプログラム
JP2000253098A (ja) 信号処理装置及び信号処理システム
CN117692389A (zh) Rdma报文信息重传方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20953649

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020953649

Country of ref document: EP

Effective date: 20230327

NENP Non-entry into the national phase

Ref country code: DE