Data processing method, device and system
By configuring a low packet loss rate for important data packets and adding tags, important and unimportant packets are distinguished and processed differently, which solves the problem of frequent timeout retransmissions in RDMA networks and reduces network latency.
Patent Information
- Application Number
- CN202210118788.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-08
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2042-02-08
AI Technical Summary
In RDMA networks based on converged Ethernet, when all data packets are processed with the same packet loss rate, frequent timeout retransmissions are triggered, resulting in significant network latency.
By configuring a lower packet loss rate for important packets than for unimportant packets, and adding markers to the packets to indicate their importance, important and unimportant packets can be processed differently, reducing the number of timeout retransmissions.
This reduces the number of important data packets lost and the number of timeout retransmissions, thereby reducing the impact of network latency.
Smart Images

Figure CN116633911B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a data processing method, device and system. BACKGROUND
[0002] Remote direct memory access (RDMA) technology realizes direct access of a network card to a memory, and gradually becomes a mainstream scheme of high-speed network communication. In a RDMA over converged Ethernet (RoCE) network, a same packet loss rate is configured for to-be-processed data packets, and all the to-be-processed data packets are processed according to the same packet loss rate.
[0003] However, the above data processing method of configuring the same packet loss rate may frequently trigger timeout retransmission of the network, so that the influence of packet loss on network delay is greater. SUMMARY
[0004] The present application provides a data processing method, device and system, which are used for reducing the number of timeout retransmissions when data packets are lost.
[0005] In a first aspect, a data processing method is provided, which is executed by a first device. The first device receives a first data packet from a second device. When the first data packet is an important packet, the first device configures a first packet loss rate for the first data packet, the first packet loss rate being lower than a packet loss rate of a non-important packet, and the important packet refers to a data packet whose loss triggers timeout retransmission. Then, the first device processes the first data packet according to the first packet loss rate.
[0006] The data processing method processes the important packet according to a packet loss rate lower than that of the non-important packet, which can reduce the number of losses of the important packet, and in turn reduces the number of timeout retransmissions. Since timeout retransmission causes greater network delay, the reduction of the number of timeout retransmissions reduces the influence of packet loss on network delay.
[0007] In a possible implementation, the first data packet carries a first mark, the first mark being added by the second device and used to indicate that the first data packet is an important packet; after receiving the first data packet from the second device, the first device further determines that the first data packet is an important packet based on the first mark.
[0008] When the first data packet carries the first mark, the first device can directly determine that the first data packet is an important packet according to the first mark, which improves the identification efficiency of the important packet.
[0009] In a possible implementation, the first data packet is the last data packet of a data stream sent by the second device, or the first data packet is a data packet sent by the second device after receiving a not acknowledgement (NAK) packet, or the first data packet is an RDMA read request packet, and there is a fence operation queue in the sending queue of the second device.
[0010] For the second device as a sending end, the last data packet of a data stream, the first data packet sent after receiving a NAK packet, or an RDMA read request packet with a fence operation queue in the sending queue of the second device is determined as an important packet, so that the determination result of the important packet is more accurate and comprehensive, and the loss of the important packet is reduced more effectively.
[0011] In a possible implementation, the first data packet is a NAK packet sent by the second device, or the first data packet is an acknowledgement (ACK) packet sent by the second device after receiving a data packet carrying a first mark, or the first data packet is the last response packet in all response packets sent by the second device after receiving an RDMA read request packet carrying the first mark, or the first data packet is the first response packet sent by the second device after receiving a duplicate RDMA read request packet.
[0012] For the second device as a receiving end, the NAK packet, the ACK packet sent after receiving the data packet carrying the first mark, the last response packet in all response packets sent after receiving the RDMA read request packet carrying the first mark, or the first response packet sent after receiving the duplicate RDMA read request packet is determined as an important packet, so that the determination result of the important packet is more accurate and comprehensive, and the loss of the important packet is reduced more effectively.
[0013] In a possible implementation, after the first device receives the first data packet from the second device, the first device further detects whether the first data packet is an ACK packet or a NAK packet; when the first data packet is the ACK packet or the NAK packet, the first device determines that the first data packet is an important packet.
[0014] When the first data packet does not carry the first mark, the first device can actively determine the ACK packet or the NAK packet as an important packet, so that the determination result of the important packet is more accurate and comprehensive, the timeout retransmission triggered by the loss of the ACK packet or the NAK packet is reduced, and the influence of the packet loss on network delay is reduced more effectively.
[0015] In a possible implementation, after the first device receives the first data packet from the second device, the first device further detects whether the first data packet is the first data packet sent by retransmission; when the first data packet is the first data packet sent by retransmission, the first device determines that the first data packet is an important packet.
[0016] In the case that the first data packet does not carry the first mark, the first device can actively determine the first data packet retransmitted as the important packet, so that the determination result of the important packet is more accurate and comprehensive, and the timeout retransmission triggered by the loss of the first data packet retransmitted is reduced, and the influence of the packet loss on the network delay is more effectively reduced.
[0017] In a possible implementation, after determining that the first data packet is the important packet, the first device further adds a second mark to the first data packet, and the second mark is used to indicate that the first data packet is the important packet.
[0018] In the case that the first device can actively detect the first data packet and determine whether the first data packet is the important packet according to the detection result, the first device adds the second mark used to indicate the important packet to the first data packet, so that a device subsequently receiving the first data packet can determine that the first data packet is the important packet by identifying the second mark, and process the first data packet based on the processing manner of the important packet, thereby improving the data processing efficiency.
[0019] In a possible implementation, the first device further receives a second data packet from a second device; when the second data packet is a non-important packet, the first device configures a second packet loss rate for the second data packet, the second packet loss rate is higher than the first packet loss rate, and the non-important packet refers to a data packet whose loss does not trigger the timeout retransmission; and the first device processes the second data packet according to the second packet loss rate.
[0020] The data processing method processes the non-important packet according to the packet loss rate higher than that of the important packet, so that the non-important packet and the important packet can be processed differently, the loss number of the important packet is correspondingly reduced, the number of timeout retransmissions is also reduced, and the influence of the packet loss on the network delay is reduced.
[0021] In a possible implementation, when the second data packet is the non-important packet, the first device further adds a third mark to the second data packet, and the third mark is used to indicate that the second data packet is the non-important packet.
[0022] The third mark used to indicate the non-important packet is added to the second data packet, so that a device subsequently receiving the second data packet can determine that the second data packet is the non-important packet by identifying the third mark, and process the second data packet based on the processing manner of the non-important packet, thereby improving the data processing efficiency.
[0023] In a second aspect, a data processing method is provided, which is executed by a second device. The second device obtains a first data packet to be sent. When the first data packet is an important packet, the second device adds a first mark to the first data packet, the first mark is used to indicate that the first data packet is the important packet, and the important packet refers to a data packet whose loss triggers the timeout retransmission. The second device sends the first data packet including the first mark.
[0024] When the first data packet is an important packet, a first mark is added in the first data packet, so that a device subsequently receiving the first data packet can determine that the first data packet is an important packet by identifying the first mark, and process the first data packet based on the processing manner of the important packet, thereby improving data processing efficiency.
[0025] In a possible implementation, after the second device acquires the first data packet to be sent, the second device further determines that the first data packet is an important packet when the first data packet is the last data packet of a data stream sent by the second device.
[0026] Determining the last data packet of the data stream as an important packet makes the determination result of the important packet more accurate and comprehensive, reduces the timeout retransmission triggered by the loss of the last data packet of the data stream, and more effectively reduces the impact of packet loss on network delay.
[0027] In a possible implementation, after the second device acquires the first data packet to be sent, the second device further determines that the first data packet is an important packet when the first data packet is the first data packet sent by the second device after receiving a NAK packet.
[0028] Determining the first data packet sent after receiving a NAK packet as an important packet makes the determination result of the important packet more accurate and comprehensive, reduces the timeout retransmission triggered by the loss of the first data packet sent after receiving a NAK packet, and more effectively reduces the impact of packet loss on network delay.
[0029] In a possible implementation, after the second device acquires the first data packet to be sent, the second device further determines that the first data packet is an important packet when the first data packet is an RDMA read request packet and there is a fence operation queue in a sending queue of the second device.
[0030] Determining the RDMA read request packet with the fence operation queue in the sending queue as an important packet makes the determination result of the important packet more accurate and comprehensive, reduces the timeout retransmission triggered by the loss of the RDMA read request packet with the fence operation queue in the sending queue, and more effectively reduces the impact of packet loss on network delay.
[0031] In a possible implementation, after the second device acquires the first data packet to be sent, the second device further determines that the first data packet is an important packet when the first data packet is a NAK packet.
[0032] Determining the NAK packet as an important packet makes the determination result of the important packet more accurate and comprehensive, reduces the timeout retransmission triggered by the loss of the NAK packet, and more effectively reduces the impact of packet loss on network delay.
[0033] In a possible implementation, after the second device acquires the first data packet to be sent, the second device determines that the first data packet is an important packet when the first data packet is the last response packet sent by the second device after the second device receives a data packet carrying the first mark.
[0034] Determining the ACK packet sent after receiving the data packet carrying the first mark as the important packet makes the determination result of the important packet more accurate and comprehensive, reduces the timeout retransmission triggered by the loss of the ACK packet sent after receiving the data packet carrying the first mark, and more effectively reduces the impact of packet loss on network delay.
[0035] In a possible implementation, after the second device acquires the first data packet to be sent, the second device determines that the first data packet is an important packet when the first data packet is the last response packet sent by the second device after the second device receives an RDMA read request packet carrying the first mark.
[0036] Determining the last response packet sent after receiving the RDMA read request packet carrying the first mark as the important packet makes the determination result of the important packet more accurate and comprehensive, reduces the timeout retransmission triggered by the loss of the last response packet sent after receiving the RDMA read request packet carrying the first mark, and more effectively reduces the impact of packet loss on network delay.
[0037] In a possible implementation, after the second device acquires the first data packet to be sent, the second device determines that the first data packet is an important packet when the first data packet is the first response packet sent by the second device after the second device receives a duplicate RDMA read request packet.
[0038] Determining the first response packet sent after receiving the duplicate RDMA read request packet as the important packet makes the determination result of the important packet more accurate and comprehensive, reduces the timeout retransmission triggered by the loss of the first response packet sent after receiving the duplicate RDMA read request packet, and more effectively reduces the impact of packet loss on network delay.
[0039] In a possible implementation, the second device further acquires a second data packet to be sent; when the second data packet is a non-important packet, the second device adds a second mark to the second data packet, and the second mark is used to indicate that the second data packet is a non-important packet. The second device sends the second data packet including the second mark.
[0040] When the second data packet is a non-important packet, the second mark is added to the second data packet, so that a device subsequently receiving the second data packet can determine that the second data packet is a non-important packet by identifying the second mark, and process the second data packet based on the processing manner of the non-important packet, thereby improving data processing efficiency.
[0041] In a third aspect, a data processing apparatus is provided, comprising:
[0042] a receiving module configured to receive a first data packet from a second device;
[0043] a configuring module configured to configure the first data packet with a first packet loss rate when the first data packet is an important packet, the first packet loss rate being lower than a packet loss rate of a non-important packet, the important packet being a data packet whose loss triggers a timeout retransmission;
[0044] a processing module configured to process the first data packet according to the first packet loss rate.
[0045] In a possible implementation, the apparatus further comprises a determining module configured to determine that the first data packet is an important packet.
[0046] In a possible implementation, the first data packet carries a first mark, the first mark being added by the second device and used to indicate that the first data packet is an important packet; and the determining module is configured to determine that the first data packet is an important packet based on the first mark.
[0047] In a possible implementation, the first data packet is a last data packet of a data stream sent by the second device, or the first data packet is a first data packet sent by the second device after receiving a NAK packet, or the first data packet is an RDMA read request packet, and there is a fence operation queue in a sending queue of the second device.
[0048] In a possible implementation, the first data packet is a NAK packet sent by the second device, or the first data packet is an ACK packet sent by the second device after receiving a data packet carrying the first mark, or the first data packet is a last response packet in all response packets sent by the second device after receiving an RDMA read request packet carrying the first mark, or the first data packet is a first response packet sent by the second device after receiving a duplicate RDMA read request packet.
[0049] In a possible implementation, the determining module is configured to detect whether the first data packet is an ACK packet or a NAK packet, and determine that the first data packet is an important packet when the first data packet is an ACK packet or a NAK packet.
[0050] In a possible implementation, the determining module is configured to detect whether the first data packet is a first data packet sent by retransmission, and determine that the first data packet is an important packet when the first data packet is a first data packet sent by retransmission.
[0051] In a possible implementation, the configuring module is further configured to add a second mark to the first data packet, the second mark being used to indicate that the first data packet is an important packet.
[0052] In a possible implementation, the receiving module is further configured to receive a second data packet from the second device; the configuring module is further configured to configure a second packet loss rate for the second data packet when the second data packet is a non-important packet, the second packet loss rate being higher than the first packet loss rate, the non-important packet being a data packet whose loss does not trigger a timeout retransmission; and the processing module is further configured to process the second data packet according to the second packet loss rate.
[0053] In a possible implementation, the configuring module is further configured to add a third mark to the second data packet when the second data packet is a non-important packet, the third mark being used to indicate that the second data packet is a non-important packet.
[0054] In a fourth aspect, a data processing apparatus is provided, which comprises:
[0055] a receiving module configured to receive a first data packet to be sent;
[0056] a marking module configured to add a first mark to the first data packet when the first data packet is an important packet, the first mark being used to indicate that the first data packet is an important packet;
[0057] a sending module configured to send the first data packet.
[0058] In a possible implementation, the apparatus further comprises a determining module configured to determine that the first data packet is an important packet.
[0059] In a possible implementation, the determining module is configured to determine that the first data packet is an important packet when the first data packet is the last data packet of a data stream sent by the second device.
[0060] In a possible implementation, the determining module is configured to determine that the first data packet is an important packet when the first data packet is the first data packet sent after the second device receives a NAK packet.
[0061] In a possible implementation, the determining module is configured to determine that the first data packet is an important packet when the first data packet is an RDMA read request packet and there is a fence operation queue in a sending queue of the second device.
[0062] In a possible implementation, the determining module is configured to determine that the first data packet is an important packet when the first data packet is a NAK packet.
[0063] In a possible implementation, the determining module is configured to determine that the first data packet is an important packet when the first data packet is an ACK packet sent after the second device receives a data packet carrying the first mark.
[0064] In a possible implementation, the determining module is configured to determine that the first data packet is an important packet when the first data packet is the last response packet sent by the second device after receiving a repeated RDMA read request packet carrying the first mark.
[0065] In a possible implementation, the determining module is configured to determine that the first data packet is an important packet when the first data packet is the first response packet sent by the second device after receiving a repeated RDMA read request packet.
[0066] In a possible implementation, the obtaining module is further configured to obtain a second data packet to be sent; the marking module is further configured to add a second mark to the second data packet when the second data packet is a non-important packet, the second mark being used to indicate that the second data packet is a non-important packet; and the sending module is further configured to send the second data packet including the second mark.
[0067] In a fifth aspect, a data processing device is provided, which includes a processor and a memory coupled with the processor, the memory storing at least one program instruction or code, the at least one program instruction or code being loaded and executed by the processor to enable the data processing device to implement the data processing method according to any of the first aspect or the second aspect.
[0068] Optionally, the processor is one or more, and the memory is one or more.
[0069] Optionally, the memory can be integrated with the processor, or the memory and the processor are separately arranged, and when the memory and the processor are separately arranged, they can be integrated on the same chip or arranged on different chips.
[0070] In a sixth aspect, a communication apparatus is provided, which includes a transceiver, a memory and a processor. The transceiver, the memory and the processor communicate with each other through internal connection paths. The memory is configured to store instructions, and the processor is configured to execute the instructions stored in the memory to control the transceiver to receive a signal and control the transceiver to send a signal. When the processor executes the instructions stored in the memory, the communication apparatus executes the method according to the first aspect or any possible implementation of the first aspect, or executes the method according to the second aspect or any possible implementation of the second aspect.
[0071] In a seventh aspect, a data processing system is provided, which includes a first device and a second device.
[0072] The first device is configured to perform the method of the first aspect or any possible implementation of the first aspect, and the second device is configured to perform the method of the second aspect or any possible implementation of the second aspect.
[0073] In an eighth aspect, a computer readable storage medium is provided, and the storage medium stores at least one instruction, which is loaded and executed by a processor to enable a computer to implement the method in the first aspect or any possible implementation of the first aspect, or implement the method in the second aspect or any possible implementation of the second aspect.
[0074] In a ninth aspect, a computer program (product) is provided, and the computer program (product) includes computer program code, which, when executed by a computer, causes the computer to perform the method in the first aspect or any possible implementation of the first aspect, or perform the method in the second aspect or any possible implementation of the second aspect.
[0075] In a tenth aspect, a chip is provided, and the chip is configured to implement the method in the first aspect or any possible implementation of the first aspect, or implement the method in the second aspect or any possible implementation of the second aspect.
[0076] It should be understood that the beneficial effects achieved by the third aspect to the tenth aspect of the present application and the corresponding possible implementations can refer to the technical effects of the first aspect and the second aspect and the corresponding possible implementations described above, and will not be described here. BRIEF DESCRIPTION OF DRAWINGS
[0077] Figure 1 A schematic diagram of an implementation environment of a data processing method provided by an embodiment of the present application;
[0078] Figure 2 An interaction schematic diagram of a data processing method provided by an embodiment of the present application;
[0079] Figure 3 An interaction schematic diagram of another data processing method provided by an embodiment of the present application;
[0080] Figure 4 A process schematic diagram of a data processing method provided by an embodiment of the present application;
[0081] Figure 5 A schematic diagram of a data processing process of a sending end or a receiving end provided by an embodiment of the present application;
[0082] Figure 6 A schematic diagram of a data processing process of a switch provided by an embodiment of the present application;
[0083] Figure 7 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0084] Figure 8 This is a schematic diagram of another data processing apparatus provided in an embodiment of this application;
[0085] Figure 9 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0086] Figure 10 This is a schematic diagram of the structure of another data processing device provided in an embodiment of this application;
[0087] Figure 11 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation
[0088] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0089] This application provides a data processing method, which can be applied to... Figure 1 The implementation environment shown. For example... Figure 1 As shown, the implementation environment includes at least two first devices 101 and at least one second device 102. The at least two first devices 101 are communicatively connected via at least one second device 102. Optionally, the first devices 101 and the second devices 102 communicate via the RoCE protocol. For example, one first device 101 sends a data packet to the second device 102, and the second device 102 forwards the received data packet to the other first device 101, thus realizing data transmission between the two first devices 101.
[0090] Optionally, the first device 101 in the embodiments of the present application is a sending end or a receiving end of data transmission, configured to send or receive data packets. The first device 101 can be a terminal or a server. The terminal can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a personal communication service (PCS) phone, a desktop computer, a personal digital assistant (PDA), a wearable device, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The server can be a standalone physical server, or a server cluster or a distributed system composed of multiple physical servers, etc. Optionally, the second device 102 in the embodiments of the present application is an intermediate forwarding device of data transmission, configured to forward the received data packets. The second device 102 includes but is not limited to a router, a switch, a server, etc.
[0091] In Figure 1 In the implementation environment shown, when the sending rate of the first device 101 exceeds the processing rate of the second device 102, the data packets will be accumulated in the receiving queue of the second device 102, causing network congestion. If the network continues to be in the congestion state until the receiving queue is full, the second device 102 will perform corresponding processing on the data packets received thereafter to alleviate the network congestion state. For example, the second device 102 discards the data packets sent by the first device 101 received thereafter, which is referred to as packet loss.
[0092] In the related art, a data processing method using a go-back-N-frames (GBN) retransmission mechanism is adopted. The GBN retransmission mechanism allows a sending end to continuously send data packets in a specified order. When the receiving end receives the data packets sent by the sending end, an ACK packet is returned to the sending end, so that the sending end determines that the sent data packets have been received according to the received ACK packet. When the receiving end does not receive the data packets sent by the sending end in the specified order, a not acknowledgement (NAK) packet is returned to the sending end, so that the sending end determines that the sent data packets have not been received according to the received NAK packet. Thus, the sending end starts to retransmit the data packets from the sequence number of the un-received data packet.
[0093] In the above GBN retransmission mechanism, since the sending end starts to retransmit the data packet after receiving the NAK packet returned by the receiving end, and the receiving end returns the NAK packet when an out-of-order data packet is received, the transmission time of one out-of-order data packet from the sending end to the receiving end and the transmission time of one NAK packet from the receiving end to the sending end are separated between the first sending and the second retransmission of the data packet. That is, each time the GBN retransmission is triggered, a round-trip time (RTT) network delay is caused. Optionally, the RTT refers to the time interval between the sending of the data packet by the sending end and the reception of the ACK packet from the receiving end.
[0094] Thus, the GBN retransmission mechanism can ensure that after the data packet is discarded, the receiving end returns the NAK packet to the sending end according to the received out-of-order data packet, to inform the sending end to retransmit the discarded data packet. However, there are some special cases of packet discarding, and the lost data packet does not trigger the GBN retransmission. For example, the receiving end does not receive the out-of-order data packet, so that the data packet does not generate the NAK packet returned to the sending end. For the case that does not trigger the GBN retransmission, the sending end usually triggers the timeout retransmission according to the timeout retransmission mechanism.
[0095] The timeout retransmission mechanism is that the sending end waits for a retransmission timeout (RTO) time after sending the data packet. If the ACK packet or the NAK packet corresponding to the data packet returned by the receiving end is not received after waiting for the RTO time, the sending end starts to retransmit the data packet. Usually, the RTO time is set to be 2 to 4 times of the RTT, or even larger. That is, compared with the GBN retransmission, the timeout retransmission causes greater network delay.
[0096] Based on this, in combination with Figure 1In the illustrated implementation environment, the embodiment of the present application provides a data processing method, which is executed by interaction of a first device and a second device, and can reduce the number of times of triggering timeout retransmission. Exemplarily, taking the first device as device 2, the second device as device 1, and the first data packet sent by device 1 to device 2 as data packet 1 as an example, referring to Figure 2 The method comprises the following steps 201 to 206.
[0097] In step 201, device 1 acquires data packet 1 to be sent.
[0098] In the embodiment of the present application, device 1 can be a sending end of data transmission, or a receiving end of data transmission. When device 1 is the sending end of data transmission, data packet 1 sent by device 1 to device 2 is a data packet or an RDMA read request packet sent by device 1 to the receiving end; when device 1 is the receiving end of data transmission, data packet 1 sent by device 1 to device 2 is an ACK packet, a NAK packet or a response packet sent by device 1 to the sending end.
[0099] In a possible implementation, after device 1 acquires data packet 1 to be sent, the method further comprises: determining whether the data packet 1 is an important packet. Optionally, the important packet refers to a data packet whose loss will trigger timeout retransmission.
[0100] In the embodiment of the present application, when device 1 is the sending end of data transmission, the process of determining whether data packet 1 is an important packet comprises but is not limited to the following cases one to three.
[0101] In case one, when data packet 1 is the last data packet of a data stream sent by device 1, it is determined that data packet 1 is an important packet.
[0102] In case one, when data packet 1 is the last data packet of a data stream sent by device 1, it is determined that data packet 1 is an important packet.
[0103] Optionally, the present application does not limit the way of identifying whether data packet 1 is the last data packet of a data stream sent by device 1. Exemplarily, after acquiring data packet 1 to be sent, it is detected whether the sending queue of device 1 is empty. When the sending queue of device 1 is empty, it indicates that the data packet is the last data packet of the corresponding data stream, and at this time, it is determined that the data packet 1 is an important packet.
[0104] In this case, the data packet 1 is the tail packet of the data stream. If the tail packet of the data stream is lost, since there is no subsequent out-of-order data packet to be sent, the receiving end will not receive the out-of-order data packet, and thus will not return a NAK packet to the device 1, resulting in the device 1 needing to wait for a timeout retransmission to be triggered.
[0105] In case two, the data packet 1 is the first data packet sent by the device 1 after receiving the NAK packet, and it is determined that the data packet 1 is an important packet.
[0106] In this case two, the data packet 1 is the first data packet sent by the device 1 after receiving the NAK packet, that is, the retransmission first packet, that is, the lost data packet. For example, the data stream A includes the data packet A1, the data packet A2, and the data packet A3 in order, when the data packet A2 is lost, the receiving end receives the data packet A3 without receiving the data packet A2, and thus the receiving end generates a NAK packet A2 corresponding to the data packet A2 and sends the NAK packet A2 to the sending end. Optionally, after the sending end receives the NAK packet A2 through an RTT time, it is determined that the data packet A2 is lost, and starts retransmission from the data packet A2. If the data packet 1 is the data packet A2 at this time, the data packet 1 is the first data packet sent by the device 1 after receiving the NAK packet.
[0107] Optionally, the application embodiment is not limited to the way of determining whether the data packet 1 is the first data packet sent by the device 1 after receiving the NAK packet. For example, after obtaining the data packet 1 to be sent, the data packet record received by the device 1 is detected, and when the last received data packet is a NAK packet corresponding to the data packet 1, it indicates that the data packet is the first data packet sent by the device 1 after receiving the NAK packet, and at this time, it is determined that the data packet 1 is an important packet.
[0108] In this case two, the data packet 1 is the retransmission first packet. If the retransmission first packet is lost, since the receiving end is waiting to receive the retransmission first packet, before receiving the retransmission first packet, the receiving end will directly discard the other data packets (non-first data packets) received, and will not generate a NAK packet corresponding to the retransmission first packet, and thus will not trigger GBN retransmission, and further resulting in the device 1 needing to wait for a timeout retransmission to be triggered.
[0109] In case three, when the data packet 1 is an RDMA read request packet, and there is a fence operation queue in the sending queue of the device 1, it is determined that the data packet 1 is an important packet.
[0110] In this case three, the data packet 1 is an RDMA read request packet, and there is a fence operation queue in the sending queue of the device 1. Optionally, the RDMA read request packet is used to request a data storage location, and the device 1 can request multiple storage locations for each time of sending the RDMA read request packet, that is, the receiving end will return a plurality of response packets corresponding thereto.
[0111] In the embodiment of the present application, the fence operation queue refers to that after the device 1 sends a previous RDMA read request packet, the device 1 does not send a subsequent RDMA read request packet until all response packets corresponding to the previous RDMA read request packet are received. Therefore, if there is a fence operation queue in the sending queue of the device 1, when the RDMA read request packet is lost, the device 1 does not send a subsequent RDMA read request packet, so the receiving end does not generate a NAK packet, which also causes the device 1 to need to wait for a timeout retransmission to be triggered.
[0112] Optionally, the present application does not limit the way of determining whether there is a fence operation queue in the sending queue. For example, when there is a fence operation queue in the sending queue, the sending queue includes an identifier of the fence operation queue. After the data packet 1 to be sent is obtained, it is determined that the data packet 1 is an RDMA read request packet, and then the identifier for indicating the fence operation queue in the sending queue is detected. When the identifier for indicating the fence operation queue is detected in the sending queue, it is indicated that the data packet is an RDMA read request packet, and there is a fence operation queue in the sending queue of the device 1. At this time, it is determined that the data packet 1 is an important packet.
[0113] In the embodiment of the present application, when the device 1 is a receiving end of data transmission, the process of determining whether the data packet 1 is an important packet includes but is not limited to the following four cases to seven cases.
[0114] Case four, when the data packet 1 is a NAK packet, it is determined that the data packet 1 is an important packet.
[0115] In the case four, the data packet 1 is a NAK packet. The NAK packet is generated after the device 1 receives an out-of-order data packet, and is sent to the sending end to inform the sending end to retransmit from the data packet 1. Therefore, when the NAK packet is lost, the sending end cannot receive the NAK packet, which causes the sending end to need to wait for a timeout retransmission to be triggered.
[0116] Optionally, the present application does not limit the way of determining whether the data packet 1 is a NAK packet. For example, when the data packet 1 is a NAK packet, the data packet 1 includes an identifier for indicating the NAK packet. After the data packet 1 to be sent is obtained, it is determined whether the data packet 1 includes the identifier for indicating the NAK packet. When it is detected that the data packet 1 includes the identifier for indicating the NAK packet, it is indicated that the data packet is a NAK packet. At this time, it is determined that the data packet 1 is an important packet.
[0117] Case five, when the data packet 1 is an ACK packet sent by the device 1 after receiving a data packet carrying a flag 1, it is determined that the data packet 1 is an important packet.
[0118] In the case five, the data packet 1 is an ACK packet sent by the device 1 after receiving the data packet carrying the mark 1, i.e., the important packet. For example, the ACK packet is sent by the device 1 after receiving the tail packet of the data stream, or the ACK packet is sent by the device 1 after receiving the retransmitted first packet.
[0119] Optionally, the application does not limit the way of determining whether the data packet 1 is an ACK packet sent by the device 1 after receiving the data packet carrying the mark 1. For example, when the data packet 1 is an ACK packet, the data packet 1 includes an identifier indicating the ACK packet. After obtaining the data packet 1 to be sent, it is determined whether the data packet 1 includes the identifier indicating the ACK packet. When it is detected that the data packet 1 includes the identifier indicating the ACK packet, it is detected whether the received data packet confirmed by the ACK packet is the important packet. When the received data packet confirmed by the ACK packet is the important packet, it indicates that the data packet is an ACK packet sent by the device 1 after receiving the data packet carrying the mark 1. At this time, it is determined that the data packet 1 is the important packet.
[0120] In the case five, the data packet 1 is an ACK packet sent by the device 1 after receiving the data packet carrying the mark 1. If the ACK packet sent by the device 1 after receiving the data packet carrying the mark 1 is lost, the timeout retransmission will be triggered due to the loss of the important packet. The loss of the ACK packet sent by the device 1 after receiving the data packet carrying the mark 1 makes the sending end not receive the ACK packet, and the sending end will mistakenly think that the important packet sent by the sending end is lost, which also causes the sending end to trigger the timeout retransmission.
[0121] In the case six, the data packet 1 is the last response packet in all response packets sent by the device 1 after receiving the RDMA read request packet carrying the mark 1, and it is determined that the data packet 1 is the important packet.
[0122] In the case six, the data packet 1 is the last response packet in all response packets sent by the device 1 after receiving the RDMA read request packet carrying the mark 1, and it is determined that the data packet 1 is the important packet. In the application, when the sending end sends the RDMA request packet carrying the mark 1 to the device 1, the device 1 will send a plurality of continuous response packets to the sending end in sequence after receiving the RDMA request packet carrying the mark 1. The last response packet in the plurality of continuous response packets is the last response packet in all response packets sent by the device 1 after receiving the RDMA read request packet carrying the mark 1.
[0123] Optionally, the application does not limit the way of determining whether the data packet 1 is the last response packet sent by the device 1 after receiving the RDMA read request packet carrying the mark 1. For example, each of the to-be-sent response packets has a corresponding sequence number. After obtaining the data packet 1 to be sent, when it is determined that the data packet 1 is a response packet, the sequence number corresponding to the response packet is obtained. When the sequence number corresponding to the response packet indicates that the response packet is the last response packet among all the response packets, it is determined that the data packet 1 is an important packet.
[0124] For example, the sending end sends the RDMA read request packet 4 carrying the first mark to the device 1 in sequence. After receiving the RDMA read request packet 4 carrying the first mark, the device 1 returns the response packet 4, the response packet 5 and the response packet 6 to the sending end, that is, all the response packets. If the last response packet 6 is lost, the sending end will wait for triggering the timeout retransmission after receiving the response packet 5, because the response packet 6 cannot be received.
[0125] In case seven, the data packet 1 is the first response packet sent by the device 1 after receiving the repeated RDMA read request packet, and it is determined that the data packet 1 is an important packet.
[0126] In this case seven, the data packet 1 is the first response packet sent by the device 1 after receiving the repeated RDMA read request packet, and the repeated RDMA read request packet is the retransmitted RDMA read request packet received.
[0127] Optionally, the application does not limit the way of determining that the device 1 receives the first response packet after receiving the repeated RDMA read request packet. For example, each of the to-be-sent response packets has a corresponding sequence number. After obtaining the data packet 1 to be sent, when it is determined that the data packet 1 is a response packet, and the RDMA read request packet responded by the response packet is a repeatedly received RDMA read request packet, the sequence number corresponding to the response packet is obtained. When the sequence number corresponding to the response packet indicates that the response packet is the first response packet among all the response packets, it is determined that the data packet 1 is an important packet.
[0128] For example, the sending end sends the RDMA read request packet 1 and the RDMA read request packet 4 to the device 1 in sequence. After receiving the RDMA read request packet 1 and the RDMA read request packet 4, the device 1 returns the response packet 1, the response packet 2, the response packet 3, the response packet 4, the response packet 5 and the response packet 6 to the sending end. If the response packet 3 is lost, the sending end receives the response packet 4 without receiving the response packet 3, that is, the sending end receives the out-of-order response packet. At this time, the sending end retransmits the RDMA read request packet 3 and the RDMA read request packet 4.
[0129] Optionally, after receiving the retransmitted RDMA read request packet 3 and RDMA read request packet 4, the device 1 returns the response packet 3, response packet 4, response packet 5 and response packet 6 corresponding to the retransmitted RDMA read request packet 3 and RDMA read request packet 4 to the sending end. At this time, the response packet 3 is the first response packet sent after receiving the duplicated RDMA read request packet. If the response packet 3 is lost, the sending end directly discards the received response packet 4, response packet 5 and response packet 6, and then waits for triggering the timeout retransmission.
[0130] In the embodiments of the present application, the execution order of determining whether the data packet 1 is an important packet according to the above-mentioned at least 7 cases is not limited. Optionally, the above-mentioned at least 7 cases can be judged in a specified order one by one until it is determined that the data packet 1 is an important packet. If the above-mentioned at least 7 cases are all processed and it is still not determined that the data packet 1 is an important packet, it is determined that the data packet 1 is a non-important packet. Alternatively, the above-mentioned at least 7 cases are judged at the same time. If any one of the above-mentioned at least 7 cases is met, it is determined that the data packet 1 is an important packet. Otherwise, it is determined that the data packet 1 is a non-important packet.
[0131] In step 202, when the data packet 1 is an important packet, the device 1 adds a mark 1 to the data packet 1. The mark 1 is used to indicate that the data packet 1 is an important packet.
[0132] The mark 1 is a first mark. The first mark is used to indicate that the first data packet is an important packet. In a possible implementation, after determining that the data packet 1 is an important packet, the mark 1 is added to the data packet 1, so that the device receiving the data packet 1 subsequently can recognize that the data packet 1 is an important packet, and then can process the data packet 1 according to the data processing mode of the important packet.
[0133] Optionally, the present application does not limit the adding position of the mark 1. For example, the mark 1 is added to any position in the packet header of the data packet 1.
[0134] In step 203, the device 1 sends the data packet 1 to the device 2.
[0135] In a possible implementation, the device 1 sends the data packet 1 with the added mark 1 to the device 2, and the device 2 completes the processing of the data packet 1.
[0136] In step 204, the device 2 receives the data packet 1 from the device 1.
[0137] In the embodiments of the present application, after receiving the data packet 1 from the device 1, the device 2 determines whether the data packet 1 is an important packet.
[0138] In one possible implementation, the data packet 1 carries a first mark, i.e., mark 1, indicating that the data packet 1 is an important packet, and the mark 1 is added by the device 1. Optionally, after receiving the data packet 1 from the device 1, the device 2 further includes determining that the data packet 1 is an important packet based on the mark 1.
[0139] In another possible implementation, if the device 1 does not have the function of adding the mark 1, or the device 1 fails to identify that the data packet 1 is an important packet, the data packet 1 does not carry the mark 1 indicating that the data packet 1 is an important packet. Optionally, after receiving the data packet 1 from the device 1, the device 2 further includes determining whether the data packet 1 is an important packet.
[0140] Optionally, the manner in which the device 2 determines whether the data packet 1 is an important packet includes but is not limited to the following two manners.
[0141] Manner one, detecting whether the data packet 1 is an ACK packet or a NAK packet, and determining that the data packet 1 is an important packet when the data packet 1 is an ACK packet or a NAK packet.
[0142] In one possible implementation, when the data packet 1 is an ACK packet or a NAK packet, the data packet 1 carries an identification indicating the ACK packet or the NAK packet. After receiving the data packet 1 from the device 1, the device 2 determines whether the data packet 1 carries the identification indicating the ACK packet or the NAK packet, and determines that the data packet 1 is an ACK packet or a NAK packet if the data packet 1 carries the identification indicating the ACK packet or the NAK packet, and further determines that the data packet 1 is an important packet. According to the analysis in the fourth aspect above, the loss of a NAK packet triggers the timeout retransmission, and according to the analysis in the fifth aspect to the seventh aspect above, the loss of an ACK packet in the fifth aspect to the seventh aspect triggers the timeout retransmission.
[0143] Since the ACK packet or the NAK packet is a notification packet returned by the receiving end to the sending end, the ACK packet is used to notify the sending end that the data packet sent has been received, and the NAK packet is used to notify the sending end that the data packet sent has not been received. If the ACK packet or the NAK packet used to notify the sending end whether the data packet sent has been received is lost, the execution of the GBN retransmission mechanism is affected. Since the ACK packet or the NAK packet is usually a data packet with a small data volume, determining the ACK packet or the NAK packet as an important packet helps the execution of the GBN retransmission mechanism.
[0144] Manner two, detecting whether the data packet 1 is a first data packet retransmitted, and determining that the data packet 1 is an important packet when the data packet 1 is a first data packet retransmitted.
[0145] In a possible implementation, the device 2 records the data processing result in the process of data processing. For example, the device 2 records a retransmission first packet sequence list. When the device 2 performs packet loss processing on a data packet, the device 2 records the sequence number of a data stream corresponding to the data packet and the sequence number of the data packet in the corresponding data stream. The sequence number of the data stream corresponding to the data packet and the sequence number of the data packet in the corresponding data stream are the sequence numbers corresponding to the retransmission first packet, and the retransmission first packet is the first data packet sent by retransmission.
[0146] Optionally, after the device 2 receives the data packet 1 from the device 1, the device 2 searches the retransmission first packet sequence list for the sequence number corresponding to the data packet 1. If the sequence number corresponding to the data packet 1 is found in the retransmission first packet sequence list, it is determined that the data packet 1 is the first data packet sent by retransmission, and it is further determined that the data packet 1 is an important packet. According to the analysis in the above case two, if the retransmission first packet is lost, the timeout retransmission is triggered.
[0147] In the embodiments of the present application, the execution order of the above-mentioned at least two ways of determining that the data packet 1 is an important packet is not limited. Optionally, it is first determined whether the data packet 1 is an ACK packet or a NAK packet. When the data packet 1 is an ACK packet or a NAK packet, it is determined that the data packet 1 is an important packet. When the data packet 1 is not an ACK packet or a NAK packet, it is further determined whether the data packet 1 is the first data packet sent by retransmission. When the data packet 1 is the first data packet sent by retransmission, it is determined that the data packet 1 is an important packet. When the data packet 1 is not the first data packet sent by retransmission, it is determined that the data packet 1 is a non-important packet.
[0148] Optionally, it is first determined whether the data packet 1 is the first data packet sent by retransmission. When the data packet 1 is the first data packet sent by retransmission, it is determined that the data packet 1 is an important packet. When the data packet 1 is not the first data packet sent by retransmission, it is further first determined whether the data packet 1 is an ACK packet or a NAK packet. When the data packet 1 is an ACK packet or a NAK packet, it is determined that the data packet 1 is an important packet. When the data packet 1 is not an ACK packet or a NAK packet, it is determined that the data packet 1 is a non-important packet.
[0149] In a possible implementation, if the device 2 determines whether the data packet 1 is an important packet, after it is determined that the data packet 1 is an important packet, the device 2 further adds a second mark for indicating that the data packet 1 is an important packet to the data packet 1. For example, the second mark is mark 2, and the mark 2 is used to indicate that the data packet 1 is an important packet. This enables a device subsequently receiving the data packet 1 to determine that the data packet 1 is an important packet.
[0150] In step 205, when the data packet 1 is an important packet, the device 2 configures a first packet loss rate for the data packet 1, and the first packet loss rate is lower than the packet loss rate of a non-important packet.
[0151] In a possible implementation, the first packet loss rate is not limited in value, and the packet loss rate of the non-important packet is enough. Alternatively, the packet loss rate refers to the probability of discarding the data packet, and the greater the packet loss rate, the greater the possibility of discarding the data packet. For example, the packet loss rate of the non-important packet is 80%, and the first packet loss rate can be any value between 0-80%, and the first packet loss rate can be 10% optionally.
[0152] In the embodiment of the application, the first packet loss rate is configured for the important packet, so that the packet loss rate of the important packet is lower than that of the non-important packet, and the loss frequency of the important packet is reduced. Since the loss of the important packet triggers the timeout retransmission, the number of timeout retransmissions is reduced, and the influence of packet loss on network delay is reduced.
[0153] In step 206, the device 2 processes the data packet 1 according to the first packet loss rate.
[0154] In a possible implementation, processing the data packet 1 according to the first packet loss rate includes: when the device 2 needs to discard the packet, generating a random number based on the first packet loss rate; when the random number is greater than a threshold value, discarding the data packet 1; and when the random number is not greater than the threshold value, forwarding the data packet 1.
[0155] For example, the first packet loss rate is 20%, and when the device 2 needs to discard the packet, there is a 20% probability that the generated random number is greater than the threshold value. Alternatively, the threshold value is 6, the generated random number based on the first packet loss rate 20% is 3, and then the data packet 1 is forwarded, that is, the data packet 1 is not discarded.
[0156] The data processing method provided in the embodiment of the application can identify the important packet in the data packet, and configure the packet loss rate of the important packet to be lower than that of the non-important packet. The important packet is processed according to the packet loss rate lower than that of the non-important packet, so that the loss frequency of the important packet is reduced, and the number of timeout retransmissions is also reduced. Since the timeout retransmission causes a large network delay, the reduction of the number of timeout retransmissions reduces the influence of packet loss on network delay.
[0157] For example, the first device is the device 2, the second device is the device 1, the device 1 sends the second data packet to the device 2, and the second data packet is the data packet 2. For example, see Figure 3 The data processing method provided in the embodiment of the application includes the following steps 301-306.
[0158] In step 301, the device 1 acquires the data packet 2 to be sent.
[0159] In a possible implementation, after the device 1 acquires the data packet 2 to be sent, the method further includes: determining whether the data packet 2 is an important packet.
[0160] In the embodiment of the present application, the step 301 of determining whether the data packet 2 is an important packet can refer to the step 201 of determining whether the data packet 1 is an important packet, which will not be repeated here. Alternatively, when the data packet 2 is not an important packet, the data packet 2 is a non-important packet, which means a packet that will not trigger a timeout retransmission.
[0161] In step 302, when the data packet 2 is a non-important packet, the device 1 adds a mark 4 to the data packet 2, which is used to indicate that the data packet 2 is a non-important packet.
[0162] The mark 4 is a second mark, which is used to indicate that the second data packet is a non-important packet. In a possible implementation, after determining that the data packet 2 is a non-important packet, the mark 4 is added to the data packet 2, so that the device that subsequently receives the data packet 2 can determine that the data packet 2 is a non-important packet, and then can process the data packet 2 according to the data processing mode of the non-important packet, thereby improving the data processing efficiency.
[0163] Alternatively, the present application does not limit the position of the mark 4, for example, the mark 4 is added to any position in the packet header of the data packet 2.
[0164] In step 303, the device 1 sends the data packet 2 to the device 2.
[0165] In a possible implementation, the device 1 sends the data packet 2 with the mark 4 to the device 2, and the device 2 completes the data processing of the data packet 2.
[0166] In step 304, the device 2 receives the data packet 2 from the device 1.
[0167] In the embodiment of the present application, after the device 2 receives the data packet 2 from the device 1, it determines whether the data packet 2 is an important packet.
[0168] In a possible implementation, the data packet 2 carries a second mark for indicating that the data packet 2 is a non-important packet, that is, the mark 4, which is added by the device 1. Alternatively, after the device 2 receives the data packet 1 from the device 1, it further includes determining that the data packet 2 is a non-important packet based on the mark 4.
[0169] In another possible implementation, if the device 1 does not have the function of adding the mark 4, or the device 1 fails to identify that the data packet 2 is a non-important packet, so that the data packet 2 does not carry the mark 4 for indicating that the data packet 2 is a non-important packet. Alternatively, after the device 2 receives the data packet 1 from the device 1, it further includes determining whether the data packet 2 is an important packet.
[0170] In the embodiment of the present application, the step 304 of determining whether the data packet 2 is an important packet can refer to the step 204 of determining whether the data packet 1 is an important packet, which will not be repeated here. Alternatively, when the data packet 2 is not an important packet, the data packet 2 is a non-important packet.
[0171] In the step 305, when the data packet 2 is a non-important packet, the device 2 configures a second packet loss rate for the data packet 2, and the second packet loss rate is higher than the first packet loss rate.
[0172] In a possible implementation, the value of the configured second packet loss rate is not limited, and the second packet loss rate can be any value between 20% and 100% as long as it is higher than the first packet loss rate of the important packet. For example, the first packet loss rate of the important packet is 20%, and the second packet loss rate can be any value between 20% and 100%, and alternatively, the second packet loss rate can be 80%.
[0173] In the embodiment of the present application, the second packet loss rate is configured for the non-important packet, so that the packet loss rate of the non-important packet is higher than that of the non-important packet, the loss times of the non-important packet are increased, the timeout retransmission times are reduced, and the network delay time is reduced.
[0174] In the step 306, the device 2 processes the data packet 2 according to the second packet loss rate.
[0175] In a possible implementation, the processing of the data packet 2 according to the second packet loss rate includes: when the device 2 needs to drop a packet, generating a random number based on the second packet loss rate; when the random number is greater than a threshold, discarding the data packet 2; and when the random number is not greater than the threshold, forwarding the data packet 2.
[0176] For example, the second packet loss rate is 80%, when the device 2 needs to drop a packet, there is an 80% probability that the generated random number is greater than the threshold, and alternatively, the threshold is 6. Based on the second packet loss rate 80%, the generated random number is 9, and then the data packet 2 is discarded. Alternatively, after the data packet 2 is processed by the packet dropping, the sequence number of the data stream corresponding to the data packet 2 and the sequence number of the data packet 2 in the corresponding data stream are recorded in the retransmission first packet sequence list.
[0177] The data processing method provided by the embodiment of the present application can identify important packets in data packets, configure a packet loss rate higher than that of important packets for non-important packets when the data packets are non-important packets, process the non-important packets according to the packet loss rate higher than that of the important packets, distinguish the processing of the important packets and the non-important packets, correspondingly reduce the loss times of the important packets, also reduce the timeout retransmission times, and reduce the influence of packet loss on network delay.
[0178] Referring to Figure 4 , Figure 4A process schematic diagram of a data processing method provided in an embodiment of the present application. Optionally, the second device in the embodiment of the present application is a sending end or a receiving end as shown in Figure 4 The first device in the embodiment of the present application is a switch as shown in Figure 4 As shown in Figure 4 The data processing method includes the following S1-S4, taking the transmission process of a data packet from the sending end to the receiving end via the switch as an example.
[0179] S1, the sending end acquires a data packet to be sent based on a sending queue, and then determines whether the data packet is an important packet based on an important packet determinator, marks the determination result of whether it is an important packet in the data packet, and sends the data packet with the mark of whether it is an important packet to the switch.
[0180] In the embodiment of the present application, the sending queue includes a plurality of data packets corresponding to a data stream, the plurality of data packets are queued in the sending queue according to a sending order, and the sending end acquires the data packets to be sent in turn based on the sending queue. Optionally, the important packet determinator deployed in the sending end is used to identify a tail packet of a data stream, a retransmission first packet, or an RDMA read request packet with a barrier operation in the sending queue, and determine the tail packet of the data stream, the retransmission first packet, or the RDMA read request packet with the barrier operation in the sending queue as an important packet.
[0181] In a possible implementation, the execution process of the important packet determinator deployed in the sending end is as shown in Figure 5 Figure 5 A schematic diagram of the data processing process of the sending end or the receiving end. As an example, after the sending end acquires a data packet to be sent, the sending end first determines whether the sending end is a sending end of a data stream. If the sending end determines that the sending end is the sending end of the data stream, it is determined whether the sending queue in which the data packet is located is empty. If the sending queue is empty, it is determined that the data packet is a tail packet of the data stream, and the data packet is marked as an "important packet". If the sending queue is not empty, it is determined whether the data packet is a first packet sent after a NAK packet is received. If the data packet is the first packet sent after the NAK packet is received, it is determined that the data packet is a retransmission first packet, and the data packet is marked as an "important packet". If the data packet is not the first packet sent after the NAK packet is received, it is determined whether the data packet is a request packet and whether there is a barrier operation queue in the sending queue in which the request packet is located. If the data packet is the request packet and there is the barrier operation queue in the sending queue in which the request packet is located, the data packet is marked as an "important packet". If the data packet is not the request packet or is the request packet but there is no barrier operation queue in the sending queue in which the request packet is located, the data packet is marked as a "non-important packet".
[0182] S2, the switch determines whether the data packet is an important packet based on the important packet determinator, marks the determination result in the data packet, maps the packet loss policy corresponding to the data packet based on the packet loss policy executor, and processes the data packet according to the mapped packet loss policy.
[0183] In the embodiments of the present application, the important packet determinator deployed in the switch is used to identify the retransmission first packet and the ACK / NAK packet, and determine the retransmission first packet and the ACK / NAK packet as important packets. The packet loss policy executor deployed in the switch is used to map the corresponding packet loss policy for the data packet. Optionally, the important packet loss policy is mapped for the important packet, for example, the important packet loss policy is configured with a lower packet loss rate. The non-important packet loss policy is mapped for the non-important packet, for example, the non-important packet loss policy is configured with a higher packet loss rate. Optionally, the packet loss rate of the important packet loss policy is lower than the packet loss rate of the non-important packet loss policy.
[0184] In a possible implementation, the execution process of the important packet determinator deployed in the switch is as shown in Figure 6 Figure 6 is a schematic diagram of the data processing process of the switch. Exemplarily, after the data packet arrives at the switch, the switch checks whether the data packet has been marked as an important packet. If the data packet has been marked as an important packet, the important packet loss policy is mapped for the data packet. If the data packet has not been marked as an important packet, it is checked whether the data packet is an ACK / NAK packet. If the data packet is an ACK / NAK packet, the important packet is marked in the data packet, and the important packet loss policy is mapped for the data packet. If the data packet is not an ACK / NAK packet, it is checked whether the data packet is a retransmission first packet by table lookup. If the data packet is a retransmission first packet, the important packet is marked in the data packet, and the important packet loss policy is mapped for the data packet. If the data packet is not a retransmission first packet, the non-important packet is marked in the data packet, and the non-important packet loss policy is mapped for the data packet.
[0185] Optionally, the switch updates the retransmission first packet sequence list according to the discarded data packet after performing the packet loss operation. The retransmission first packet sequence list includes the index of the data stream corresponding to the discarded data packet and the sequence number of the data packet in the data stream, i.e., the retransmission first packet sequence number. Thus, the switch can check whether the data packet is a retransmission first packet by table lookup. Exemplarily, if the index of the data stream corresponding to the data packet and the sequence number are included in the retransmission first packet sequence list, it is determined that the data packet is a retransmission first packet. If the index of the data stream corresponding to the data packet and the sequence number are not included in the retransmission first packet sequence list, it is determined that the data packet is not a retransmission first packet.
[0186] In the embodiments of the present application, when the switch does not need to drop the packet, the packet is directly sent to the receiving end; when the switch needs to drop the packet, the switch processes the packet according to the packet drop policy corresponding to the packet. Optionally, if it is determined to forward the packet according to the packet drop policy corresponding to the packet, the packet with the mark of whether it is an important packet is sent to the receiving end; if it is determined to drop the packet according to the packet drop policy corresponding to the packet, the packet with the mark of whether it is an important packet is dropped, and the retransmission first packet sequence list is updated.
[0187] Since the packet drop rate of the important packet drop policy is lower than that of the non-important packet drop policy, when the switch needs to drop the packet, the non-important packet is preferentially dropped, and the number of important packet loss is reduced. Since important packet loss will trigger timeout retransmission, causing network delay of one RTO time, and non-important packet loss will trigger GNB retransmission, causing network delay of one RTT, RTO time is often set to 2 to 4 times of RTT. Therefore, the data processing method reduces the probability of important packet loss, thereby reducing the number of timeout retransmission triggered, and further reducing the impact of packet loss on network delay.
[0188] S3, the receiving end obtains the ACK packet / NAK packet / response packet to be sent based on the receiving queue, and then determines whether the ACK packet / NAK packet / response packet is an important packet based on the important packet determinator, marks the determination result of whether it is an important packet in the ACK / NAK packet, and sends the ACK packet / NAK packet / response packet to the switch.
[0189] In the embodiments of the present application, after receiving the correctly ordered data packet, the receiving end puts the received data packet into the receiving queue, and returns the ACK packet corresponding to the data packet to the switch; after receiving the out-of-order data packet, the receiving end discards the out-of-order data packet, and returns the NAK packet corresponding to the data packet to the sending end; the data packet is an RDMA read request packet, and after receiving the correctly ordered RDMA read request packet, the receiving end returns a plurality of response packets corresponding to the RDMA read request packet to the switch.
[0190] The important packet determinator deployed in the receiving end is used to identify the NAK packet, the ACK packet of the important packet, the tail packet of all response packets of the important request packet, and the first packet of all response packets of the repeated request packet, and determine the NAK packet, the ACK packet of the important packet, the tail packet of all response packets of the important request packet, and the first packet of all response packets of the repeated request packet as important packets. Optionally, the request packet is an RDMA read request packet.
[0191] In a possible implementation, the execution process of the important packet determinator deployed in the receiving end is as follows: Figure 5As shown. For example, after the receiving end receives the ACK / NAK / response packet to be returned (here referred to as the data packet), it first determines whether the receiving end is the sender of the data stream. If it is not the sender, it determines whether the data packet is a NAK packet. If the data packet is a NAK packet, it marks it as an "important packet." If the data packet is not a NAK packet, it determines whether the data packet is an ACK packet. If the data packet is an ACK packet, if the received data packet used by the ACK packet to acknowledge is marked as an "important packet," it marks it as an "important packet." If the received data packet used by the ACK packet to acknowledge is not marked as an "important packet," it marks it as a "non-important packet." If the data packet is not an ACK packet, then... The data packet is the response packet. At this point, it is determined whether the request packet used by the response packet is an important packet. If the request packet used by the response packet is marked as an "important packet", it is marked as an "important packet" in the data packet if it is the last packet of all response packets, and marked as an "unimportant packet" in the data packet if it is not the last packet of all response packets. If the request packet used by the response packet is not marked as an "important packet", it is determined whether the request packet used by the response packet is a duplicate request packet. If the request packet used by the response packet is a duplicate request packet, it is marked as an "unimportant packet" in the data packet if it is the first packet of all response packets, and marked as an "unimportant packet" in the data packet if it is not the first packet of all response packets.
[0192] S4. After receiving an ACK packet / NAK packet / response packet, the switch determines whether the ACK packet / NAK packet / response packet is an important packet based on the important packet determiner, marks the determination result of whether it is an important packet in the ACK packet / NAK packet / response packet, maps the packet loss policy corresponding to the ACK packet / NAK packet / response packet based on the packet loss policy executor, and processes the ACK packet / NAK packet / response packet according to the mapped packet loss policy.
[0193] The execution process of S4 can be found in the content of S2 above, and will not be repeated here.
[0194] The data processing method of the present application embodiments has been described above. Corresponding to the above method, the present application embodiments also provide a data processing device. Figure 7 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. The device is applied to a first device, which is the aforementioned... Figure 2 or Figure 3 The device 2 shown, or the first device as described above Figure 4 The switch shown is based on... Figure 7 The following modules are shown. Figure 7The data processing apparatus shown can perform all or part of the operations performed by the first device. It should be understood that the apparatus can include more additional modules than those shown or omit part of the modules shown, and the embodiments of the present application do not limit this. As shown in Figure 7 The apparatus shown includes:
[0195] The receiving module 701 is configured to receive the first data packet from the second device.
[0196] The configuration module 702 is configured to configure the first data packet with a first packet loss rate when the first data packet is an important packet, the first packet loss rate being lower than a packet loss rate of a non-important packet, and the important packet being a data packet whose loss triggers a timeout retransmission.
[0197] The processing module 703 is configured to process the first data packet according to the first packet loss rate.
[0198] Optionally, the apparatus further includes a determination module 704 configured to determine that the first data packet is an important packet.
[0199] In a possible implementation, the first data packet carries a first mark, the first mark being added by the second device and used to indicate that the first data packet is an important packet; and the determination module 704 is configured to determine that the first data packet is an important packet based on the first mark.
[0200] In a possible implementation, the first data packet is the last data packet of a data stream sent by the second device, or the first data packet is the first data packet sent by the second device after receiving a NAK packet, or the first data packet is an RDMA read request packet, and there is a fence operation queue in a sending queue of the second device.
[0201] In a possible implementation, the first data packet is a NAK packet sent by the second device, or the first data packet is an ACK packet sent by the second device after receiving a data packet carrying the first mark, or the first data packet is the last response packet in all response packets sent by the second device after receiving an RDMA read request packet carrying the first mark, or the first data packet is the first response packet sent by the second device after receiving a duplicate RDMA read request packet.
[0202] In a possible implementation, the determination module 704 is configured to detect whether the first data packet is an ACK packet or a NAK packet; and when the first data packet is an ACK packet or a NAK packet, determine that the first data packet is an important packet.
[0203] In a possible implementation, the determination module 704 is configured to detect whether the first data packet is the first data packet sent by retransmission; and when the first data packet is the first data packet sent by retransmission, determine that the first data packet is an important packet.
[0204] In one possible implementation, the configuration module 702 is further configured to add a second tag to the first data packet, the second tag being used to indicate that the first data packet is an important packet.
[0205] In one possible implementation, the receiving module 701 is further configured to receive a second data packet from the second device; the configuration module 702 is further configured to configure a second packet loss rate for the second data packet when the second data packet is a non-critical packet, wherein the second packet loss rate is higher than the first packet loss rate, and a non-critical packet refers to a data packet that will not trigger a timeout retransmission if lost; the processing module 703 is further configured to process the second data packet according to the second packet loss rate.
[0206] In one possible implementation, the configuration module 702 is further configured to add a third flag to the second data packet when the second data packet is a non-critical packet, the third flag being used to indicate that the second data packet is a non-critical packet.
[0207] The data processing apparatus provided in this application embodiment can configure a lower packet loss rate for important packets than for non-important packets, thereby reducing the packet loss rate of important packets, reducing the number of timeout retransmissions when data packets are lost, and reducing the impact of packet loss on network latency.
[0208] Figure 8 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. The device is applied to a second device, which is the aforementioned... Figure 2 or Figure 3 The device 1 shown, or the second device, is as described above. Figure 4 The sending or receiving end shown. Based on Figure 8 The following modules are shown. Figure 8 The data processing apparatus shown is capable of performing all or part of the operations performed by the second device. It should be understood that the apparatus may include more additional modules than those shown, or may omit some of the modules shown; this application embodiment does not impose limitations in this regard. Figure 8 As shown, the device includes:
[0209] The acquisition module 801 is used to acquire the first data packet to be sent;
[0210] The tagging module 802 is used to add a first tag to the first data packet when the first data packet is an important packet. The first tag is used to indicate that the first data packet is an important packet.
[0211] The sending module 803 is used to send the first data packet.
[0212] In one possible implementation, the device further includes a determining module 804 for determining that the first data packet is an important packet. For example, the determining module 804 determines that the first data packet is an important packet by any of the following methods:
[0213] (1) when the first data packet is the last data packet of a data stream sent by the second device, determining that the first data packet is an important packet;
[0214] (2) when the first data packet is the first data packet sent by the second device after receiving a NAK packet, determining that the first data packet is an important packet;
[0215] (3) when the first data packet is an RDMA read request packet, and there is a fence operation queue in the sending queue of the second device, determining that the first data packet is an important packet;
[0216] (4) when the first data packet is a NAK packet, determining that the first data packet is an important packet;
[0217] (5) when the first data packet is an ACK packet sent by the second device after receiving a data packet carrying a first mark, determining that the first data packet is an important packet;
[0218] (6) when the first data packet is the last response packet in all response packets sent by the second device after receiving an RDMA read request packet carrying the first mark, determining that the first data packet is an important packet;
[0219] (7) when the first data packet is the first response packet sent by the second device after receiving a repeated RDMA read request packet, determining that the first data packet is an important packet.
[0220] In a possible implementation, the obtaining module 801 is further configured to obtain a second data packet to be sent; the marking module 802 is further configured to add a second mark to the second data packet when the second data packet is a non-important packet, the second mark being used to indicate that the second data packet is a non-important packet; and the sending module 803 is further configured to send the second data packet.
[0221] The data processing apparatus provided by the embodiments of the present application can add a first mark to a data packet when the data packet is an important packet, so that a device receiving the data packet subsequently can determine that the data packet is an important packet by identifying the first mark, and process the data packet based on the processing manner of important packets.
[0222] It should be understood that the apparatuses provided by the above Figure 7 and Figure 8 are only used as examples for the division of the functional modules, and in actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above-described functions. In addition, the apparatuses and method embodiments provided by the above embodiments are of the same concept, and the specific implementation process is described in detail in the method embodiments, which will not be described here.
[0223] Referring to Figure 9 , Figure 9A schematic diagram of the structure of a data processing device 2000 provided in one embodiment of this application is shown. Figure 9 The data processing device 2000 shown is used to perform the above. Figures 2-4 The data processing method shown involves the following operations. The data processing device 2000 is, for example, a switch, a router, etc., and can be implemented using a general bus architecture.
[0224] like Figure 9 As shown, the data processing device 2000 includes at least one processor 2001, a memory 2003, and at least one communication interface 2004.
[0225] Processor 2001 may be, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the embodiments of this application. For example, processor 2001 includes application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A PLD may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in connection with the embodiments of this invention. The processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0226] Optionally, the data processing device 2000 further includes a bus. The bus is used to transmit information between the components of the data processing device 2000. The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 Only one thick line is used to represent the bus in the middle, but it does not mean that there is only one bus or only one type of bus.
[0227] The memory 2003 is, for example, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magneto-optical disk, a solid state disk, a floppy disk, a cartridge, a cassette, or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 2003 is, for example, independently present and connected to the processor 2001 through the bus. The memory 2003 can also be integrated with the processor 2001.
[0228] The communication interface 2004 uses any transceiver-type device for communicating with other devices or communication networks, which can be an Ethernet, a radio access network (RAN), a wireless local area networks (WLAN), etc. The communication interface 2004 can include a wired communication interface and also include a wireless communication interface. Specifically, the communication interface 2004 can be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a wireless local area networks (WLAN) interface, a cellular network communication interface, or a combination thereof. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. In embodiments of the present application, the communication interface 2004 can be used for the data processing device 2000 to communicate with other devices.
[0229] In a particular implementation, as one example, the processor 2001 can include one or more CPUs, such as the CPU0 and the CPU1 shown in FIG. 2B. Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. Figure 9
[0230] In a particular implementation, as one example, the data processing device 2000 can include multiple processors, such as the processor 2001 and the processor 2005 shown in FIG. 2C. Figure 9
[0231] In a particular implementation, as one example, the data processing device 2000 can also include an output device and an input device. The output device is in communication with the processor 2001 and can display information in various ways. For example, the output device can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, a projector, or the like. The input device is in communication with the processor 2001 and can receive user input in various ways. For example, the input device can be a mouse, a keyboard, a touch screen device, a sensor device, or the like.
[0232] In some embodiments, the memory 2003 stores program code 2010 for executing the solution of this application, and the processor 2001 can execute the program code 2010 stored in the memory 2003. That is, the data processing device 2000 can implement the data processing method provided in the method embodiment through the processor 2001 and the program code 2010 in the memory 2003. The program code 2010 may include one or more software modules. Optionally, the processor 2001 itself may also store program code or instructions for executing the solution of this application.
[0233] In a specific embodiment, the data processing device 2000 of this application embodiment can correspond to the first device in the above-described method embodiments. The processor 2001 in the data processing device 2000 reads instructions from the memory 2003, causing... Figure 9 The data processing device 2000 shown is capable of performing all or part of the operations performed by the first device.
[0234] Specifically, the processor 2001 is used to receive a first data packet through the communication interface; when the first data packet is an important packet, a first packet loss rate is configured for the first data packet, the first packet loss rate being lower than the packet loss rate of non-important packets, and an important packet being a data packet that would trigger a timeout retransmission if lost; the first data packet is processed according to the first packet loss rate.
[0235] Other alternative implementation methods will not be described in detail here for the sake of brevity.
[0236] The data processing device 2000 can also correspond to the above. Figure 7 or Figure 8 The data processing apparatus shown is configured such that each functional module is implemented using software from the data processing device 2000. In other words, the functional modules included in the data processing apparatus are generated by the processor 2001 of the data processing device 2000 reading the program code 2010 stored in the memory 2003.
[0237] Optionally, Figures 2-4 Each step of the data processing method shown can also be completed by the integrated logic circuitry of the hardware in the processor of the data processing device 2000.
[0238] See Figure 10 , Figure 10 This illustration shows a schematic diagram of the structure of a data processing device 2100 provided in another embodiment of this application. Figure 10 The data processing device 2100 shown is used to perform the above. Figures 2-4 The data processing method shown involves all or part of the operations. The data processing device 2100 is, for example, a switch, a router, etc., and can be implemented using a general bus architecture.
[0239] As shown in Figure 10 Fig. 1, the data processing device 2100 comprises a main board 2110 and an interface board 2130.
[0240] The main board 2110 is also called a main processing unit (MPU) or a route processor card. The main board 2110 is used for control and management of various components in the data processing device 2100, including route calculation, device management, device maintenance, and protocol processing functions. The main board 2110 comprises a central processor 2111 and a memory 2112.
[0241] The interface board 2130 is also called a line processing unit (LPU), a line card, or a service board. The interface board 2130 is used to provide various service interfaces and implement forwarding of data packets. The service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, and the like. The Ethernet interface is, for example, a Flexible Ethernet Client (FlexE Client). The interface board 2130 comprises a central processor 2131, a network processor 2132, a forwarding table item memory 2134, and a physical interface card (PIC) 2133.
[0242] The central processor 2131 on the interface board 2130 is used to control and manage the interface board 2130 and communicate with the central processor 2111 on the main board 2110.
[0243] The network processor 2132 is configured to implement the forwarding processing of the data packet. The network processor 2132 can be a forwarding chip. The forwarding chip can be a network processor (NP). In some embodiments, the forwarding chip can be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Specifically, the network processor 2132 is configured to configure a first packet loss rate for the data packet when the data packet is an important packet, the first packet loss rate being lower than a packet loss rate of a non-important packet, the important packet being a data packet whose loss triggers a timeout retransmission, and process the data packet according to the first packet loss rate; or the network processor 2132 is configured to add a mark to the data packet when the data packet is an important packet, the mark indicating that the data packet is an important packet. In some embodiments, the central processor can also perform the function of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, so that the interface board does not need a forwarding chip.
[0244] The physical interface card 2133 is configured to implement the interfacing function of the physical layer, through which the original traffic enters the interface board 2130, and the processed data packet is sent out from the physical interface card 2133. The physical interface card 2133, also referred to as a daughter card, can be installed on the interface board 2130, and is responsible for converting an optical-electrical signal into a data packet and forwarding the data packet to the network processor 2132 for processing after performing a legality check. In some embodiments, the central processor 2131 can also perform the function of the network processor 2132, such as implementing software forwarding based on a general-purpose CPU, so that the physical interface card 2133 does not need a network processor 2132.
[0245] Optionally, the data processing device 2100 includes multiple interface boards, for example, the data processing device 2100 further includes an interface board 2140, the interface board 2140 including a central processor 2141, a network processor 2142, a forwarding table item storage 2144, and a physical interface card 2143. The functions and implementation manners of the components in the interface board 2140 are the same as or similar to those of the interface board 2130, and are not described herein again.
[0246] Optionally, the data processing device 2100 further includes a switch fabric 2120. The switch fabric 2120 can also be referred to as a switch fabric unit (SFU). In the case where the data processing device 2100 has multiple interface boards, the switch fabric 2120 is configured to complete data exchange between the interface boards. For example, the interface board 2130 and the interface board 2140 can communicate through the switch fabric 2120.
[0247] The master board 2110 is coupled with the interface boards. For example, the master board 2110, the interface board 2130, the interface board 2140, and the switching network board 2120 are connected with the system backboard through a system bus to realize intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the master board 2110, the interface board 2130, and the interface board 2140, and the master board 2110 and the interface board 2130 and the interface board 2140 communicate through the IPC channel.
[0248] In logic, the data processing device 2100 includes a control plane and a forwarding plane. The control plane includes the master board 2110 and the central processor 2111, and the forwarding plane includes various components performing forwarding, such as the forwarding table item memory 2134, the physical interface card 2133, and the network processor 2132. The control plane performs functions such as router, generating a forwarding table, processing signaling and protocol packets, configuring and maintaining the state of the data processing device, and the like. The control plane distributes the generated forwarding table to the forwarding plane, and in the forwarding plane, the network processor 2132 performs table lookup and forwarding based on the forwarding table distributed by the control plane. The forwarding table distributed by the control plane can be stored in the forwarding table item memory 2134. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same data processing device.
[0249] The master board can have one or more, and when there are multiple master boards, the master boards can include a primary master board and a backup master board. The interface board can have one or more, and the more powerful the data processing capability of the data processing device, the more interface boards are provided. The physical interface card on the interface board can also have one or more. The switching network board can be absent or have one or more, and when there are multiple switching network boards, the switching network boards can collectively implement load sharing and redundancy. Under the centralized forwarding architecture, the data processing device can not need the switching network board, and the interface board assumes the function of processing the entire system service data. Under the distributed forwarding architecture, the data processing device can have at least one switching network board, and the data exchange between multiple interface boards is implemented through the switching network board to provide large-capacity data exchange and processing capability. Therefore, the data access and processing capability of the data processing device of the distributed architecture is greater than that of the data processing device of the centralized architecture. Alternatively, the form of the data processing device can also be only one board card, that is, the functions of the interface board and the master board are integrated on the one board card, and at this time, the central processor on the interface board and the central processor on the master board can be combined into one central processor on the one board card to perform the functions of the two superimposed central processors. The data exchange and processing capability of such a form of data processing device is relatively low (for example, low-end switches or routers, and the like). The specific architecture to be adopted depends on the specific networking deployment scenario, and no limitation is made herein.
[0250] In specific embodiments, the data processing device 2100 corresponds to the data processing apparatus applied to the first device shown in FIG. 10. In some embodiments, the receiving module 701, the configuration module 702, the processing module 703 and the determining module 704 in the data processing apparatus shown in FIG. 10 correspond to the physical interface card 2133, the central processor 2111 or the network processor 2132 in the data processing device 2100. Figure 7 In specific embodiments, the data processing device 2100 corresponds to the data processing apparatus applied to the first device shown in FIG. 10. In some embodiments, the receiving module 701, the configuration module 702, the processing module 703 and the determining module 704 in the data processing apparatus shown in FIG. 10 correspond to the physical interface card 2133, the central processor 2111 or the network processor 2132 in the data processing device 2100. Figure 7 In specific embodiments, the data processing device 2100 corresponds to the data processing apparatus applied to the first device shown in FIG. 10. In some embodiments, the receiving module 701, the configuration module 702, the processing module 703 and the determining module 704 in the data processing apparatus shown in FIG. 10 correspond to the physical interface card 2133, the central processor 2111 or the network processor 2132 in the data processing device 2100.
[0251] In specific embodiments, the data processing device 2100 corresponds to the data processing apparatus applied to the first device shown in FIG. 10. In some embodiments, the receiving module 701, the configuration module 702, the processing module 703 and the determining module 704 in the data processing apparatus shown in FIG. 10 correspond to the physical interface card 2133, the central processor 2111 or the network processor 2132 in the data processing device 2100. Figure 8 In specific embodiments, the data processing device 2100 corresponds to the data processing apparatus applied to the first device shown in FIG. 10. In some embodiments, the receiving module 701, the configuration module 702, the processing module 703 and the determining module 704 in the data processing apparatus shown in FIG. 10 correspond to the physical interface card 2133, the central processor 2111 or the network processor 2132 in the data processing device 2100. Figure 8 In specific embodiments, the data processing device 2100 corresponds to the data processing apparatus applied to the first device shown in FIG. 10. In some embodiments, the receiving module 701, the configuration module 702, the processing module 703 and the determining module 704 in the data processing apparatus shown in FIG. 10 correspond to the physical interface card 2133, the central processor 2111 or the network processor 2132 in the data processing device 2100.
[0252] Figure 11 FIG. 11 is a structural schematic diagram of a server provided by an embodiment of the present application. The server 1100 can have great differences due to different configurations or performances, and can include one or more processors 1101 and one or more memories 1102. The one or more memories 1102 store at least one computer program, which is loaded and executed by the one or more processors 1101, so that the server implements the data processing method provided by each method embodiment described above. Of course, the server 1100 can also have a wired or wireless network interface, a keyboard, an input and output interface and other components for realizing the functions of the device, and will not be described here.
[0253] The embodiments of the present application also provide a data processing system, which includes a first device and a second device. Optionally, the first device is configured to perform any method performed by the device 2 described above, and the second device is configured to perform any method performed by the device 1 described above. For example, the first device and the second device are the data processing device 2000 shown in FIG. 8 or the data processing device 2100 shown in FIG. 10, or the server 1100 shown in FIG. 11. Figure 9 Figure 10 Figure 11
[0254] The data processing method performed by the first device and the second device can refer to the related description of the embodiments shown in FIG. 8, FIG. 10 and FIG. 11, which will not be described here. Figures 2-4
[0255] The embodiment of the present application further provides a computer readable storage medium, at least one instruction is stored in the storage medium, the instruction is loaded and executed by a processor, so that the computer implements the data processing method described in any of the above.
[0256] The computer readable medium can be any tangible medium that includes or stores the program for or in connection with the instruction execution system, device or equipment. The machine readable medium can be a machine readable signal medium or a machine readable storage medium. The machine readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor system, device or equipment, or any suitable combination thereof. More detailed examples of machine readable storage medium include electrical connection with one or more wires, portable computer disk, hard disk, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical storage device, magnetic storage device, or any suitable combination thereof.
[0257] The embodiment of the present application further provides a computer program (product), when the computer program is executed by a computer, can make the processor or computer execute the corresponding steps and / or processes in the above method embodiment.
[0258] The computer program product includes one or more computer program instructions. As an example, the method of the embodiment of the present application can be described in the context of machine executable instructions, such as program modules including devices executed on the real or virtual processor of the target. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc., which perform specific tasks or implement specific abstract data structures. In various embodiments, the functions of the program modules can be combined or divided among the described program modules. Machine executable instructions for program modules can be executed within local or distributed devices. In distributed devices, program modules can be located in both local and remote storage media.
[0259] The computer program code for implementing the method of the embodiment of the present application can be written in one or more programming languages. These computer program codes can be provided to the processor of a general purpose computer, a special purpose computer or other programmable data processing device, so that the program codes cause the functions / operations specified in the flowchart and / or block diagram to be implemented when the computer or other programmable data processing device executes the computer program codes. The program codes can be executed completely on the computer, partially on the computer, as a separate software package, partially on the computer and partially on a remote computer, or completely on a remote computer or server.
[0260] In the context of the embodiments of the present application, the computer program code or related data can be carried by any suitable carrier to enable the device, apparatus or processor to perform the various processes and operations described above. Examples of carriers include signals, computer readable media, and the like.
[0261] Examples of signals can include electrical, optical, radio, sound or other forms of propagated signals, such as carrier waves, infrared signals, and the like.
[0262] The embodiments of the present application also provide a chip for executing the data processing method as described in any of the above.
[0263] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and module described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0264] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are merely schematic, for example, the division of the module is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interfaces, devices or modules, and can also be electrical, mechanical or other form of connection.
[0265] The modules described as separate components can or can not be physically separated, and the components displayed as modules can or can not be physical modules, that is, they can be located in one place, or can be distributed to multiple network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0266] In addition, each functional module in each embodiment of the present application can be integrated in one processing module, or each module can be physically present alone, or two or more modules can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of software functional module.
[0267] The terms "first", "second", etc. are used in this application to distinguish between similar or identical items or elements having substantially the same function, and it should be understood that there is no logical or chronological dependency between "first", "second", "nth", and that the quantity and execution order are not limited. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another.
[0268] It should also be understood that the size of the serial number of various processes in various embodiments of the present application does not mean the order of execution, and the execution order of various processes should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0269] The term "at least one" in this application means one or more, and the term "multiple" in this application means two or more. The terms "system" and "network" are often used interchangeably in this document.
[0270] It should be understood that the terms used in the description of various described examples herein are only for the purpose of describing specific examples and are not intended to be limiting. As used in the description of various described examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0271] It should also be understood that the term "comprise" (also "comprises", "comprising", "includes" and / or "including") when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0272] It should also be understood that the terms "if" and "when" can be interpreted to mean "when" or "upon" or "in response to a determination" or "in response to detecting". Similarly, the phrase "if determined" or "if detected [a stated condition or event]" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]", depending on the context.
[0273] It should be understood that determining B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.
[0274] It should also be understood that, throughout the specification, "an embodiment", "one embodiment", "a possible implementation" means that a particular feature, structure, or characteristic described in connection with the embodiment or implementation is included in at least one embodiment of the application. Therefore, appearances of the phrases "in one embodiment" or "in an embodiment", "a possible implementation" in various places throughout the specification are not necessarily referring to the same embodiment. Furthermore, the particular features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.
[0275] The above description is merely optional embodiments of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A data processing method, characterized by, The method comprises: The first device receives a first data packet from a second device; In a case where the first data packet carries a first mark, the first device determines that the first data packet is an important packet based on the first mark, the first mark being added by the second device and used to indicate that the first data packet is an important packet; wherein, in a case where the second device is a sending end of data transmission, the first data packet is a first data packet sent by the second device after receiving a negative acknowledgement (NAK) packet, or the first data packet is a remote direct memory access (RDMA) read request packet and there is a fence operation queue in a sending queue of the second device; in a case where the second device is a receiving end of data transmission, the first data packet is a NAK packet sent by the second device, or the first data packet is an acknowledgement (ACK) packet sent by the second device after receiving a data packet carrying the first mark, or the first data packet is a last response packet in all response packets sent by the second device after receiving an RDMA read request packet carrying the first mark, or the first data packet is a first response packet sent by the second device after receiving a repeated RDMA read request packet; When the first data packet is an important packet, the first device configures a first packet loss rate for the first data packet, the first packet loss rate being lower than a packet loss rate of a non-important packet, the important packet being a data packet whose loss triggers a timeout retransmission; The first device processes the first data packet according to the first packet loss rate.
2. The method of claim 1, wherein, After the first device receives the first data packet from the second device, the method further comprises: In a case where the first data packet does not carry the first mark, the first device detects whether the first data packet is an ACK packet or a NAK packet; When the first data packet is an ACK packet or a NAK packet, the first device determines that the first data packet is an important packet.
3. The method of claim 1, wherein, After the first device receives the first data packet from the second device, the method further comprises: In a case where the first data packet does not carry the first mark, the first device detects whether the first data packet is a first data packet sent by retransmission; When the first data packet is a first data packet sent by retransmission, the first device determines that the first data packet is an important packet.
4. The method according to claim 2 or 3, characterized in that, After the determination that the first data packet is an important packet, the method further comprises: The first device adds a second mark to the first data packet, the second mark being used to indicate that the first data packet is an important packet.
5. The method of claim 1, wherein, The method further comprises: The first device receives a second data packet from the second device; When the second data packet is a non-important packet, the first device configures a second packet loss rate for the second data packet, the second packet loss rate being higher than the first packet loss rate, the non-important packet being a data packet whose loss does not trigger a timeout retransmission; The first device processes the second data packet according to the second packet loss rate.
6. The method of claim 5, wherein, The method further comprises: When the second data packet is a non-important packet, the first device adds a third mark to the second data packet, the third mark being used to indicate that the second data packet is a non-important packet.
7. A data processing method, characterized by, The method comprises: The second device acquires a first data packet to be sent; When the first data packet is an important packet, the second device adds a first mark to the first data packet, the first mark being used to indicate that the first data packet is an important packet, the important packet being a packet whose loss will trigger a timeout retransmission; wherein, in the case that the second device is a sending end of data transmission, the first data packet is a first data packet sent by the second device after receiving a negative acknowledgement (NAK) packet, or the first data packet is a remote direct memory access (RDMA) read request packet and there is a fence operation queue in a sending queue of the second device; in the case that the second device is a receiving end of data transmission, the first data packet is a NAK packet sent by the second device, or the first data packet is an acknowledgement (ACK) packet sent by the second device after receiving a data packet carrying the first mark, or the first data packet is a last response packet in all response packets sent by the second device after receiving an RDMA read request packet carrying the first mark, or the first data packet is a first response packet sent by the second device after receiving a duplicate RDMA read request packet. The second device sends the first data packet comprising the first mark.
8. The method of claim 7, wherein, The method further comprises: The second device acquires a second data packet to be sent; When the second data packet is a non-important packet, the second device adds a second mark to the second data packet, the second mark being used to indicate that the second data packet is a non-important packet; The second device sends the second data packet comprising the second mark.
9. A data processing device, characterized by The data processing device comprises a processor coupled with a memory, the memory storing at least one program instruction or code, the at least one program instruction or code being loaded and executed by the processor to enable the data processing device to implement the data processing method of any one of claims 1-6, or to enable the data processing device to implement the data processing method of claim 7 or 8.
10. A data processing system, characterized by The data processing system comprises a first device and a second device; The first device is configured to implement the method of any one of claims 1-6, and the second device is configured to implement the method of claim 7 or 8.
11. A computer readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, the instruction being loaded and executed by a processor to enable a computer to implement the data processing method of any one of claims 1-6, or to enable the computer to implement the data processing method of claim 7 or 8.
12. A computer program product, characterised in that, The computer program product comprises computer program code, when the computer program code is run by a computer, to enable the computer to implement the data processing method of any one of claims 1-6, or to enable the computer to implement the data processing method of claim 7 or 8.
Citation Information
Patent Citations
Data transmission method, transmitting device and receiving device
CN106856457A