Credit packet reutilization method and equipment
By reusing the credit packets that have been transferred that have been completed in the data center interconnection scenario and scheduling data packets that have not been completed, the problem of low credit packet utilization rate is solved and the link utilization rate and efficiency is improved.
Patent Information
- Application Number
- CN202410042100.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-07-11
AI Technical Summary
In the long-distance data center interconnection scenario, the existing active congestion control method leads to low credit packet utilization and insufficient link utilization, and the collision between unscheduled packets and scheduled packets and wasted credit packets.
By maintaining active flow tables and end flow tables in intermediate devices, reuse the credit packets that have been transferred that have been completed, schedule data packets that have not been completed, and improve the utilization rate of credit packets.
It improves the utilization rate of credit packets, reduces the overhead of credit packets in the link, improves the utilization rate of links, and reduces the waste of data packet transmission.
Smart Images

Figure CN120301845A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data transmission in data center networks, and particularly to a method and device for reusing credit packets. Background Art
[0002] With the development of network technology, data centers have become key facilities to support various application services, where data of various application services is centrally managed (stored, computed, exchanged) in the data center. With the continuous expansion of applications and services and the consideration of disaster recovery across different locations, traditional data centers can no longer meet the high-performance application requirements and security requirements. In the future, geographically separated data centers have become an inevitable development direction. A geographically separated data center can be understood as a collection of data centers in multiple different regions, and different regions can belong to the same city or different cities. Usually, the distance between such geographically separated data centers is relatively far, and the cost of long-distance links is more expensive. How to improve the link utilization rate in the scenario of interconnection between such data centers has become an urgent problem to be solved. Summary of the Invention
[0003] The present disclosure provides a method, device and computer-readable medium for reusing credit packets to improve the link utilization rate in the scenario of interconnection between data centers.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for reusing credit packets, which is applied to an intermediate device, or can also be applied to a structure or device disposed in the intermediate device, such as a chip, a chip system or a circuit system, etc. Taking the application of this method to the intermediate device as an example for description, the method includes: receiving a credit packet from a destination receiving end, where the credit packet is used to schedule data packets in a first transmission flow corresponding to the credit packet, obtaining flow identification information of the first transmission flow corresponding to the credit packet, and obtaining an active flow table and an ended flow table, where the active flow table includes flow identification information of transmission flows that have not ended transmission, and the ended flow table includes flow identification information of transmission flows that have ended transmission. In the case where it is determined that the flow identification information of the first transmission flow is included in the ended flow table, the credit packet is reused according to the active flow table to schedule data packets in the transmission flow that has not ended transmission through the credit packet.
[0005] In a second aspect, an embodiment of the present disclosure provides a device for reusing credit packets, and the device includes:
[0006] One or more processors;
[0007] A memory, on which one or more programs are stored. When the one or more programs are executed by the one or more processors, the one or more processors implement the first aspect and any possible embodiment in the first aspect;
[0008] One or more I / O interfaces, connected between the processor and the memory, configured to implement information interaction between the processor and the memory.
[0009] In a third aspect, embodiments of the present disclosure provide a computer-readable medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the first aspect and any possible embodiments in the first aspect.
[0010] In the present disclosure, by reusing credit packets corresponding to transmission streams whose transmissions have ended to schedule data packets of transmission streams whose transmissions have not ended, the utilization rate of credit packets can be improved, the credit packet overhead in the link can be reduced, and thus the utilization rate of the link can be improved. Description of the Drawings
[0011] In the drawings of the embodiments of the present disclosure:
[0012] Figure 1 is an architecture diagram of a data center interconnection system provided by an embodiment of the present disclosure;
[0013] Figure 2 is a schematic diagram of end-to-end active transmission based on ExpressPass provided by an embodiment of the present disclosure;
[0014] Figure 3 is a schematic diagram of end-to-end active transmission based on FlashPass provided by an embodiment of the present disclosure;
[0015] Figure 4 is a flowchart of a method for reusing credit packets provided by an embodiment of the present disclosure;
[0016] Figure 5 is another flowchart of a method for reusing credit packets provided by an embodiment of the present disclosure;
[0017] Figure 6 is yet another flowchart of a method for reusing credit packets provided by an embodiment of the present disclosure;
[0018] Figure 7 is a schematic diagram of the IP packet header format provided by an embodiment of the present disclosure;
[0019] Figure 8 is a block diagram of the composition of a device for reusing credit packets provided by an embodiment of the present disclosure;
[0020] Figure 9 is a block diagram of the composition of a computer-readable medium provided by an embodiment of the present disclosure. Detailed Embodiments
[0021] To enable those skilled in the art to better understand the technical solutions of the present disclosure, a method, device, and computer-readable medium for reusing credit packages provided by embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0022] In the following, the present disclosure will be described more fully with reference to the accompanying drawings. However, the illustrated embodiments may be embodied in different forms, and the present disclosure should not be construed as limited to the embodiments set forth below. On the contrary, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the present disclosure to those skilled in the art.
[0023] The accompanying drawings of the embodiments of the present disclosure are used to provide a further understanding of the embodiments of the present disclosure, and constitute a part of the specification. They are used to explain the present disclosure together with the detailed embodiments, and do not constitute a limitation to the present disclosure. By describing the detailed embodiments with reference to the accompanying drawings, the above and other features and advantages will become more apparent to those skilled in the art.
[0024] In the case of no conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.
[0025] The terms used in the present disclosure are only for describing specific embodiments and are not intended to limit the present disclosure. As used in the present disclosure, the term "and / or" includes any and all combinations of one or more of the associated listed items. As used in the present disclosure, the singular forms "a" and "the" are also intended to include the plural forms unless the context clearly indicates otherwise. As used in the present disclosure, the terms "including", "made of", specify the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their groups.
[0026] Unless otherwise defined, all terms (including technical and scientific terms) used in the present disclosure have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless the present disclosure clearly defines otherwise.
[0027] In the present disclosure, unless otherwise specified, the following technical terms should be understood according to the following explanations:
[0028] 1) Round-Trip Time (RTT) refers to the time from when a data packet is sent from the source sending end to when the source sending end receives an acknowledgment from the destination receiving end.
[0029] 2) Bandwidth-Delay Product (BDP) refers to the product of bandwidth and delay, representing the bits in flight in the pipeline.
[0030] 3) Minimum Transmission Unit (MinTU), the minimum frame size allowed by Ethernet, in bytes.
[0031] 4) Maximum Transmission Unit (MTU), the maximum frame size allowed by Ethernet, in bytes.
[0032] 5) Explicit Congestion Notification (ECN), which is usually used as a congestion signal indicating that the storage queue exceeds the threshold.
[0033] 6) A transmission flow, also known as a flow or communication flow or data stream, refers to a complete transmission process between a source sending end and a destination receiving end, including the collection of various types of data (such as control packets and data packets, etc.) transmitted bidirectionally during this complete transmission process.
[0034] 7) Reactive congestion control schemes in the data center interconnection scenario are usually designed based on the low-latency goal to enable small flows to be transmitted as soon as possible. First, packets are sent directly at the maximum rate, and then the packet sending rate or window size is adjusted according to the end-to-end congestion control signal to achieve congestion control. For example, DataCenter Quantification Congestion Notifications (DCQCN), Swift, and High Precision Congestion Control (HPCC) use explicit congestion notification, latency, and in-band network measurement as congestion control signals respectively. These schemes all require a feedback delay of one RTT and also take longer to converge. For example, in the long-distance data center interconnection scenario, in a lossless network implemented by hop-by-hop flow control using Priority-based Flow Control (PFC), the reactive congestion control scheme requires the buffer of the long-distance switch port to reach the BDP level of the long-distance link due to the characteristic of sending packets at the maximum rate, which is usually hundreds of times that in the data center and increases linearly with the increase of the link length.
[0035] 8) In the data center interconnection scenario, an active congestion control scheme based on credit usually achieves the effect of zero packet loss with a smaller switch buffer requirement and has the characteristic of fast convergence speed. Two relatively common active congestion control schemes for active transmission between data centers are ExpressPass and FlashPass.
[0036] 9) ExpressPass is an end-to-end credit-based scheduling congestion control with delay constraints for data centers. It uses credit packets to control the rate and schedule data packets. The destination receiver sends credit packets to the source sender on a per-flow basis. By scheduling data packets through credit packets, a source sender will only send data packets after receiving a credit packet from the destination receiver. One credit packet schedules one data packet. After receiving a credit packet, if there are data packets, the source sender will send them; if there are no data packets, it will ignore the credit packet. Different flows schedule the transmission of their data packets through different credit packets. A credit packet can represent the buffer size of the destination receiver for receiving data of the corresponding flow. The switch is an intermediate device between the source sender and the destination receiver, restricting the rate of credit packets on each link and determining the bandwidth that data packets can obtain in the opposite direction. By restricting the rate of credit packets in the switch, the system actively controls congestion.
[0037] 10) FlashPass is another end-to-end credit-based scheduling congestion control with delay constraints for data centers. The source sender sends simulation packets to the destination receiver on a per-flow basis. The destination receiver triggers the sending of credit packets through simulation packets, and then schedules data packets. One simulation packet schedules one credit packet, and one credit packet schedules one data packet. After receiving a credit packet, if there are data packets, the source sender will send them; if there are no data packets, it will ignore the credit packet. The switch randomly discards simulation packets, calculates the simulation packet loss rate by copying the simulation packet sequence number to the credit packet and passing it to the source sender, and actively controls congestion by adjusting the simulation packet rate.
[0038] Refer to the appendix Figure 1 , which is an architecture diagram of a data center interconnection system provided by an embodiment of the present disclosure. The applicable scenario of the present disclosure will be described in combination with the appendix Figure 1 Figure 1Taking the sending end as the local end and the receiving end as the remote end as an example, the local data center includes data centers S1 - Sn, and the remote data center includes data centers R1 - Rn. The source sending end of the local data center is connected to the local intermediate device S1, the local intermediate device S1 is connected to the remote intermediate device R1, and the remote intermediate device R1 is connected to the destination receiving end of the remote data center. The source sending end and the destination receiving end perform data transmission through the intermediate device, that is, the intermediate device forwards the data transmitted between the source sending end and the destination receiving end. It should be noted that in this disclosure, the local and remote are relative concepts. For the intermediate device R1, the directly connected data center can also be understood as its corresponding local data center, and the data center indirectly connected through other intermediate devices can be understood as its corresponding remote data center. In this disclosure, to save the storage resource occupancy of the intermediate device, the ports of the intermediate device can be divided into local ports (LPort) and remote ports (RPort). The LPort of the intermediate device is connected to the local data center, and the RPort is connected to the remote intermediate device through a long - distance link. In this disclosure, the source sending end and the destination receiving end can be servers in the data center, and the intermediate device can be a switch, which is not limited herein.
[0039] Next, the specific processes of ExpressPass and FlashPass will be described in conjunction with the system architecture applicable to this disclosure.
[0040] Refer to the appendix Figure 2, which is a schematic diagram of end-to-end active transmission based on ExpressPass provided by the embodiments of the present disclosure. It can be understood as a receiver-driven mode, which can be simply referred to as the request packet-credit packet-data packet mode. This mode is applicable to typical dual-active data center scenarios, that is, scenarios where only two data centers are interconnected. In this scenario, the end-to-end RTT is almost the same. When a flow arrives or is established at the source sender and data transmission is required, a request packet with a size of MinTU bytes is sent to the destination receiver to schedule credit packets. After receiving the request packet, the destination receiver triggers the continuous generation of credit packets with a size of MinTU bytes and returns them to the source sender to schedule the transmission of data packets. The generation interval of credit packets is the transmission time of one MTU. One credit packet can schedule one data packet. After receiving the credit packet, the source sender sends a data packet with a size of MTU bytes to the destination receiver. After receiving all the data packets corresponding to the flow, the destination receiver stops generating credit packets. In the case where the size of the transmission flow is unknown, it is impossible to estimate the credit in advance, and there are wasted credit packets with a duration of RTT after the flow ends. By copying the credit packet sequence number to the corresponding data packet and transmitting it to the destination receiver to calculate the credit packet loss rate, the destination receiver adjusts the credit packet sending rate through feedback control to keep the loss rate within a preset range. The local port and the remote port of the intermediate device respectively maintain two queues: the credit queue and the data packet queue, and limit the speed of the credit queue, so that the forwarding interval of the credit packets in the credit queue of the intermediate device is the transmission time of one MTU. At the same time, a relatively small threshold value N is set for the credit queue. th , and credit packets exceeding this threshold value are fairly discarded to achieve strong congestion avoidance through the allowable loss of reverse credit. To ensure that the paths of reverse credit packets and forward data packets are the same and make the planning of credit packets effective, the intermediate device adopts symmetric hashing for deterministic equal-cost multi-path (ECMP) forwarding, and symmetric routing does not affect the performance of long-distance interconnection of data centers.
[0041] Refer to the appendix Figure 3 , which is a schematic diagram of end-to-end active transmission based on FlashPass provided by the embodiments of the present disclosure. It can be understood as a sender-driven mode, which can be simply referred to as the simulated packet-credit packet-data packet mode. This mode is applicable to the structure of multi-data center cluster interconnection, in which different long-distance links bring large RTT differences. In this mode, it is necessary to determine the maximum RTT between data centers, denoted as RTT max, at time T, the source sender has data to send and starts continuously sending simulation packets of size MinTU bytes to the destination receiver. The interval between simulation packets is the transmission time of one MTU. The destination receiver returns a credit packet of size MinTU bytes for each received simulation packet. The source sender triggers the sending of a data packet of size MTU bytes for each received credit packet. In the case where the size of the transmitted data stream is unknown, it is impossible to estimate the credit in advance. After the data stream ends, there are credit packets wasted for a duration of RTT. The local port and the remote port of the intermediate device respectively maintain two queues: the simulation packet queue and the data packet queue. The forwarding interval of the simulation packet queue is the transmission time of one MTU. At the same time, a relatively small threshold N is set for the simulation packet queue. th , simulation packets exceeding this threshold are fairly discarded, and credit packets are hardly discarded. The source sender restricts the sending of data packets until T+RTT max to force the synchronization of all forward traffic to avoid packet accumulation caused by the RTT difference of long-distance links. The intermediate device calculates the simulation packet loss rate by copying the simulation packet sequence number to the credit packet and transmitting it to the source sender, and adjusts the simulation packet rate to make the simulation packet loss rate within the preset range. In the prior art, the source sender-driven active congestion control does not require symmetric routing, but the method of the embodiments of the present disclosure requires symmetric routing, which can be implemented by ECMP.
[0042] In some related technologies, in the scenario of long-distance data center interconnection, reactive congestion control and credit-based active congestion control can be adopted for active transmission. Since the disadvantages of reactive congestion control are obvious, it is no longer applicable to the long-distance data center interconnection scenario. The embodiments of the present disclosure mainly relate to credit-based active congestion control, for example, ExpressPass and FlashPass mentioned above. The disadvantages of active congestion control are also obvious. All data streams require a basic delay of one RTT. If data packets are also transmitted within the first RTT, collisions between unscheduled data packets (which can be understood as data packets directly transmitted without being scheduled by credit packets) and scheduled data packets (data packets triggered by credit packets) will inevitably occur, resulting in the selective discarding of data packets, and a data packet retransmission mechanism needs to be introduced, reducing the efficiency. Moreover, in the long-distance link between data centers, the delay is high and the load traffic has the characteristics of large and small data streams (various types of data streams). In the more general case where the size of the data stream is unknown, it is impossible to estimate in advance whether the credit supply of the destination receiver is sufficient. The destination receiver can only continuously send credit packets until all data packets of the data stream are received. After the data stream ends, there are credit packets wasted for a duration of RTT. These credit packets do not trigger the transmission of data packets, which will result in wasted credit packets for unscheduled data packets on the long-distance link, reducing the utilization rate of the link.
[0043] In some related technologies, for a flow of unknown size, its size is assumed, and at the destination receiving end, it is estimated in advance whether the generated credit is sufficient to supply the data transmission demand. By re - classifying the priority of the credit and performing priority - based selective discard, the credit overhead is reduced. However, such an assumption about the unknown flow size is too aggressive and not practical enough. Due to the phenomenon of large and small flows in the traffic between data centers, there are a large number of small flows with a size smaller than the long - distance BDP. The existence of this part of small flows makes the credit allocation mechanism of active transmission have a low credit utilization rate. Assume that the long - distance link bandwidth - delay product is BDP bytes, the flow size is f size bytes (obtained after completion of transmission), the number of flows sharing the long - distance link is N, and assume that fair credit packets or simulation packets are discarded to obtain a fair bandwidth share, and the credit utilization rate is u c :
[0044]
[0045] Furthermore, the additional overhead of active transmission is:
[0046]
[0047] And the theoretical link utilization rate in the ideal case (each credit packet schedules a data packet of MTU size) is:
[0048]
[0049] It is found that when the flow size is less than BDP, there is a large additional overhead, deviating from the original design intention of active transmission to obtain a low queue with low overhead. In the scenario of long - distance data center interconnection, due to the rapid growth of BDP caused by long delays, the additional overhead of active transmission is large, and the effective link utilization rate for data transmission is low.
[0050] In view of this, a method, device, and computer - readable medium for re - using credit packets provided by the embodiments of the present disclosure are mainly applied to the scenario of active congestion control in active transmission in long - distance data center interconnection, and can be applied to the ExpressPass and FlashPass scenarios introduced above and Figure 1 the system architecture. The following is a detailed description with reference to the accompanying drawings.
[0051] In the first aspect, referring to Figure 4 , the embodiments of the present disclosure provide a flowchart of a method for re - using credit packets, which is applied to an intermediate device. The intermediate device can be a switch or other devices with data processing and forwarding functions. The method includes:
[0052] S401: Receive a credit packet from the destination receiving end. The credit packet is used to schedule data packets in the first transmission flow corresponding to the credit packet.
[0053] The embodiments of the present disclosure do not limit the number of credit packets.
[0054] In some embodiments, to save the storage resource occupation of the intermediate device, the ports of the intermediate device are divided into local ports (LPort) and remote ports (RPort). The local ports of the intermediate device are connected to the local data center, and the remote ports are connected to remote intermediate devices through long-distance links. In S401, credit packets can be received from the destination receiving end through the remote ports of the intermediate device.
[0055] S402: Obtain the flow identification information of the first transmission flow corresponding to the credit packet.
[0056] It can be understood that different transmission flows correspond to different credit packets, and different transmission flows can be distinguished by the flow identification information.
[0057] In some embodiments, the flow identification information may at least include the source Internet Protocol (IP) address and the destination IP address. In addition, it may also include the source port number and the destination port number. In the present disclosure, the source IP address can be understood as the IP address of the source sending end, the source port number refers to the port number of the source sending end, the destination IP address can be understood as the IP address of the destination receiving end, and the destination port number refers to the port number of the destination receiving end.
[0058] In a possible design, the flow identification information of the first transmission flow is included in the credit packet, and the flow identification information of the corresponding first transmission flow can be obtained from the credit packet.
[0059] In another possible design, the intermediate device stores the credit packet and the flow identification information of its corresponding transmission flow, and the flow identification information of the first transmission flow corresponding to the received credit packet can be obtained from the storage unit.
[0060] S403: Obtain the active flow table and the complete flow table.
[0061] Among them, the active flow table (AFT) includes the flow identification information of the transmission flows that have not ended transmission, and the complete flow table (CFT) includes the flow identification information of the transmission flows that have ended transmission.
[0062] S404: When it is determined that the flow identification information of the first transmission flow is included in the complete flow table, the credit packet is reused according to the active flow table to schedule the data packets in the transmission flows that have not ended transmission through the credit packet.
[0063] Through the above method, a credit packet is received from the destination receiving end, and the stream identification information of the first transmission stream corresponding to the credit packet, the active flow table, and the end flow table are obtained. If it is determined that the stream identification information of the first transmission stream is included in the end flow table, it can be determined that the first transmission stream has completed transmission. Furthermore, the credit packets that no longer schedule the data packets of the first transmission stream in this part can be reused by using the active flow table, so as to schedule the data packets in the transmission stream that has not completed transmission in the active flow table through the credit packet. In this way, the invalid credit packets (also called wasted credit packets) in the transmission link can be reduced, the utilization rate of the credit packets can be improved, and then the link utilization rate can be improved.
[0064] In some embodiments, the end flow table may further include expiration time information, which is used to determine the expiration time of the stream identification information of the corresponding transmission stream that has completed transmission. In this case, the intermediate device may also determine the expiration time according to the expiration time information, and delete the stream identification information of the transmission stream that has completed transmission corresponding to the expiration time information in the end flow table after the expiration time is reached. In this way, the invalid information in the end flow table can be deleted in time, and the utilization rate of the storage space can be improved.
[0065] In some embodiments, the expiration time information includes a timer with a preset duration or an expiration timestamp. In a possible design, the preset duration may be less than or equal to the RTT. The RTT can be obtained by measurement. In the scenario of long-distance data center interconnection, the delay is in the range of hundreds of microseconds to dozens of milliseconds, and the basic time unit of the timer can be set to 1 microsecond.
[0066] In the case where the expiration time information includes a timer with a preset duration, the timer can be set as an overtime timer with the preset duration. The initial time of the timer is the preset duration, and it is determined that the stream identification information of the corresponding transmission stream that has completed transmission has expired when the timer reaches zero. The timer item with the preset duration can be used to determine the reuse time range of the wasted credit packets. With this design, using relative time to determine the expiration time can save storage space compared with using absolute time to determine the expiration time, and using a timer can avoid excessive accumulation and misjudgment of the table entries in the end flow table.
[0067] In the case where the expiration time information includes an expiration timestamp, the expiration timestamp can be an absolute expiration time, and it is determined that the stream identification information of the corresponding transmission stream that has completed transmission has expired when this time arrives. For example, the expiration timestamp can use the timestamp of the absolute time on the intermediate device.
[0068] In some embodiments, before determining that the stream identification information of the first transport stream is included in the end stream table, it further includes: querying whether the end stream table contains the stream identification information of the first transport stream, and if not, directly forwarding the credit packet. The query method is not limited. For example, a Bloom filter can be used for fast query. The advantage of using a Bloom filter is high space efficiency and low query time.
[0069] In some embodiments, reusing the credit packet according to the active stream table includes: determining updated stream identification information from the active stream table according to a preset rule, updating the stream identification information of the first transport stream corresponding to the credit packet to the updated stream identification information, and forwarding the credit packet according to the updated stream identification information, so as to schedule the data packets in the transport stream identified by the updated stream identification information through the credit packet. In this way, the data packets in the transport stream that has not ended can be scheduled by using the credit packet, avoiding waste of the credit packet, improving the utilization rate of the credit packet, and further improving the link utilization rate.
[0070] In some embodiments, the stream identification information includes the source IP address of the source sending end of the transport stream and the destination IP address of the destination receiving end, and the preset rule includes the path maximum coverage rule. The path maximum coverage rule includes being the same as the first source IP address and / or the first destination IP address included in the stream identification information of the first transport stream. In this case, determining the updated stream identification information from the active stream table according to the preset rule may include: comparing the first source IP address and / or the first destination IP address with the source IP address and / or the destination IP address included in the stream identification information of the transport streams that have not ended and are included in the active stream table; determining the stream identification information of the transport streams that have not ended and satisfy the path maximum coverage rule in the active stream table as the updated stream identification information. By reusing the credit packet through the path maximum coverage rule, the network data packet queue can be minimally affected, and the path of the active congestion control plan can be minimally affected.
[0071] In some embodiments, the preset rule further includes a random determination rule. The random determination rule can be understood as randomly determining at least one updated stream identification information from the stream identification information of the transport streams that have not ended and are included in the active stream table, so that the wasted credit packets can be randomly and evenly rematched to the stream identification information in the active stream table.
[0072] In some embodiments, the updated stream identification information can be preferentially determined from the active stream table according to the path maximum coverage rule, and in the case where there is no matching item in the path maximum coverage rule, the random determination rule is used to determine the updated stream identification information from the active stream table.
[0073] In some embodiments, when multiple updated stream identification information items are determined from the active stream table according to the preset rule, the original stream identification information of the credit packet can be updated using the multiple updated stream identification information items, which can be understood as evenly matching the credit packet to the multiple updated stream identification information items.
[0074] In some embodiments, before obtaining the active flow table and the end flow table, it further includes: receiving a credit scheduling packet from a source sender, where the credit scheduling packet is used to schedule credit packets, obtaining the flow identification information of the transmission flow corresponding to the credit scheduling packet, and where the credit scheduling packet corresponds to the same transmission flow as the credit packets it schedules, adding the flow identification information of the transmission flow corresponding to the credit scheduling packet to the active flow table to generate or update the active flow table.
[0075] In a possible design, the credit scheduling packet can be received from the source sender through the local port of the intermediate device.
[0076] In a possible design, the credit scheduling packet can be a credit request packet and / or an analog packet.
[0077] In a possible design, before adding the flow identification information of the transmission flow corresponding to the credit scheduling packet to the active flow table, query whether the active flow table already contains the flow identification information of the transmission flow corresponding to the credit scheduling packet. If it already contains it, directly forward the credit scheduling packet. If it does not contain it, add the flow identification information of the transmission flow corresponding to the credit scheduling packet to the active flow table and forward the credit scheduling packet. The method of forwarding the credit scheduling packet can adopt the methods in the prior art. The query method is not limited. For example, a Bloom filter can be used for fast query.
[0078] In some embodiments, before obtaining the active flow table and the end flow table, it further includes: receiving a data packet from a source sender, where the data packet includes flow end identification information, and the flow end identification information is used to determine whether the transmission of the transmission flow corresponding to the data packet has ended, obtaining the flow identification information of the transmission flow corresponding to the data packet, and in the case where it is determined according to the flow end identification information that the transmission of the transmission flow corresponding to the data packet has ended, deleting the flow identification information of the transmission flow corresponding to the data packet included in the active flow table to update the active flow table, and adding the flow identification information of the transmission flow corresponding to the data packet to the end flow table to generate or update the end flow table. In this implementation manner, the expiration time information corresponding to the flow identification information of the transmission flow corresponding to the data packet can also be added to the end flow table. Determining the transmission state of the transmission flow by carrying the flow end identification information in the data packet is more timely than using the timeout mechanism of the state machine to judge the transmission state of the transmission flow.
[0079] It should be noted that the flow end identification information is used to determine whether the transmission of the transmission flow corresponding to the data packet has ended, and it can also be understood that the flow end identification information is used to indicate or determine whether the data packet is the last data packet of the corresponding transmission flow.
[0080] In a possible design, the data packet can be received from the source sender through the local port of the intermediate device.
[0081] In some embodiments, the flow end identification information is at least one bit in the IP packet header of the data packet. The unused bits reserved in the IP packet header can be reused, or new bits can be added to the IP packet header.
[0082] In some embodiments, the flow end identification information is the ECN bit in the IP packet header. This can minimize the impact on the IP protocol stack. There is no limitation on which value of the ECN field is used to indicate or determine whether the transmission flow corresponding to the data packet has ended. In one possible design, ECN = 00 is used to indicate that the transmission flow corresponding to the data packet has ended or that the data packet is the last data packet of the corresponding transmission flow, and ECN ≠ 00 is used to indicate that the transmission flow corresponding to the data packet has not ended or that the data packet is not the last data packet of the corresponding transmission flow.
[0083] To enable those skilled in the art to more clearly understand the technical solutions provided by the embodiments of the present disclosure, the technical solutions provided by the embodiments of the present disclosure will be further described below through specific embodiments:
[0084] Refer to Figure 5 , which is a flowchart of another method for reusing credit packets provided by the embodiments of the present disclosure. In this embodiment, the intermediate device is a switch, and the ports of the switch include a local port (LPort) and a remote port (RPort). The switch storage area maintains two data structures regarding transmission flow information: AFT and CFT. The AFT includes the flow identification information (source IP address, destination IP address, source port, destination port) of the transmission flows that have not ended. The CFT includes the flow identification information of the transmission flows that have ended and the corresponding timer with a duration of RTT (source IP address, destination IP address, source port, destination port, timer with a duration of RTT). The flow identification information stored in the AFT and CFT of the switch only includes the flow identification information of the transmission flows whose source sender is the local data center. The switch uses symmetric hashing for ECMP forwarding, and the flow end identification information in the data packet is implemented through ECN. ECN = 00 indicates that the transmission flow corresponding to the data packet has ended. The method includes the following steps.
[0085] Processing process of the switch LPort:
[0086] S501: The switch determines whether the packet received by the LPort is a request packet or a simulation packet. If it is not a request packet or a simulation packet, S502 is executed; if it is a request packet or a simulation packet, the AFT is maintained. Maintaining the AFT may include: obtaining the flow identification information of the transmission flow corresponding to the request packet or simulation packet, and using a Bloom filter to query whether the flow identification information is included in the AFT; if the flow identification information is not in the AFT, adding the flow identification information to the AFT and forwarding the request packet or simulation packet; if the flow identification information is in the AFT, directly forwarding the request packet or simulation packet.
[0087] S502: The switch determines whether the packet received by the LPort is a data packet. If it is not a data packet, it is directly forwarded; if it is a data packet, S503 is executed.
[0088] S503: The switch determines whether the transmission flow corresponding to the data packet has ended based on the value of the ECN field in the data packet header. If ECN = 00, it is determined that the transmission flow corresponding to the data packet has ended, then the CFT is maintained, the AFT is updated, and the data packet is forwarded. Among them, maintaining the CFT may include: adding the flow identification information of the transmission flow corresponding to the data packet to the CFT and setting a timer with a corresponding duration of RTT. After the timer times out, the corresponding flow identification information in the CFT is deleted. Updating the AFT may include: querying and deleting the flow identification information of the transmission flow corresponding to the data packet contained in the AFT. If ECN ≠ 00, it is determined that the transmission flow corresponding to the data packet has not ended, and the data packet is forwarded.
[0089] The processing process of the Rport of the switch:
[0090] S504: The switch determines whether the packet received by the RPort is a credit packet. If it is not a credit packet, it is directly forwarded; if it is a credit packet, S505 is executed.
[0091] S505: The switch obtains the flow identification information (source IP address 1, destination IP address 1, source port number 1, destination port number 1) of the first transmission flow corresponding to the credit packet, and uses a Bloom filter to query whether the CFT contains the flow identification information of the first transmission flow based on the flow identification information of the first transmission flow. If the CFT does not contain the flow identification information of the first transmission flow, the credit packet is forwarded; if the CFT contains the flow identification information of the first transmission flow, S506 is executed.
[0092] S506: The switch re-uses the credit packet according to the AFT to schedule the data packets in the transmission flow that has not ended through the credit packet. The re-use of the credit packet includes:
[0093] a) Determine the updated flow identification information from the AFT according to the path maximum coverage rule and the random determination rule, which may include: preferentially matching the entries in the AFT whose source IP address and destination IP address match the source IP address 1 and destination IP address 1 of the first transmission flow. If there is no matching entry, then match the entry in the AFT whose source IP address matches the source IP address 1 of the first transmission flow or match the entry in the AFT whose destination IP address matches the destination IP address 1 of the first transmission flow. If there is no matching entry, then randomly and evenly match the entries in the AFT, and determine the flow identification information corresponding to the matched entry in the AFT as the updated flow identification information. For fairness considerations, when there are multiple matched entries, determine the flow identification information corresponding to the multiple matched entries as the updated flow identification information.
[0094] b) The switch updates the flow identification information corresponding to the credit packet to the updated flow identification information matched from the AFT, and according to the updated flow identification information, forwards the credit packet through the source port identified by the updated flow identification information to the corresponding source sender, so as to schedule the data packets in the transmission flow identified by the updated flow identification information through the credit packet, and reuse this part of the originally wasted credit packets.
[0095] Refer to Figure 6 , which is another flowchart of the method for reusing credit packets provided by the embodiments of the present disclosure. In this embodiment, the intermediate device executing the method of the present disclosure is a switch (which can be understood as a local switch). The ports of the switch include local ports (LPort) and remote ports (RPort). The switch storage area maintains two data structures regarding transmission flow information: AFT and CFT. The AFT includes the flow identification information of the transmission flows that have not ended transmission (source sender IP address, destination receiver IP address, source sender port, destination receiver port). The CFT includes the flow identification information of the transmission flows that have ended transmission and the corresponding timer with a duration of RTT (source sender IP address, destination receiver IP address, source sender port, destination receiver port, timer with a duration of RTT). The AFT and CFT stored in the switch only contain the flow identification information of the transmission flows whose source sender is the local data center. The switch adopts symmetric hashing for ECMP forwarding.
[0096] Such as Figure 6As shown in the figure, the switch is connected to four source transmitters, namely S1, S2, S3, and S4, and is connected to a remote switch and a destination receiver through a long-distance link. The destination receivers include R1, R2, R3, and R4. The source transmitter S1 sends the transport stream F1 to the destination receiver R1 through the switch, and sends the transport stream F2 to the destination receiver R2 through the switch. The source transmitter S2 sends the transport stream F3 to the destination receiver R2 through the switch. The source transmitter S3 sends the transport stream F4 to the destination receiver R3 through the switch. The source transmitter S4 sends the transport stream F5 to the destination receiver R4 through the switch. The following will be described in conjunction with Figure 6 three parts: AFT maintenance, CFT maintenance, and credit packet reuse.
[0097] (1) AFT maintenance process
[0098] The switch maintains the AFT data structure shown in Table 1 according to the request packets or simulation packets received through the Lport. This data structure includes the flow identification information of the transport stream, the source transmitter IP address occupies 32 bits, the destination receiver IP address occupies 32 bits, the source transmitter port occupies 16 bits, and the destination receiver port occupies 16 bits.
[0099] Source sending end IP address Destination receiving end IP address Source sending end port Destination receiving end port 32 bits 32 bits 16 bits 16 bits
[0100] Table 1 AFT data structure
[0101] The following will be described in conjunction with Figure 6 the process of establishing AFT for this data structure. The switch receives request packets or simulation packets (corresponding to the transport streams F1 - F5 respectively) through the Lport, and obtains the flow identification information of the transport streams F1 - F5 corresponding to these request packets or simulation packets. Assume that the flow identification information of F1 is (S1IP, R1IP, S1 port 1, R1 port), the flow identification information of F2 is (S1IP, R2IP, S1 port 2, R2 port), the flow identification information of F3 is (S2IP, R2IP, S2 port, R2 port), the flow identification information of F4 is (S3IP, R3IP, S3 port, R3 port), and the flow identification information of F5 is (S4IP, R4IP, S4 port, R4 port). Use the Bloom filter to query whether there is a corresponding entry in the AFT. If not, establish the AFT entry shown in Table 2 according to the obtained flow identification information.
[0102] Source sending end IP address Destination receiving end IP address Source sending end port Destination receiving end port S1 IP R1 IP S1 Port 1 R1 Port S1 IP R2 IP S1 Port 2 R2 Port S2 IP R2 IP S2 Port R2 Port S3 IP R3 IP S3 Port R3 Port S4 IP R4 IP S4 Port R4 Port
[0103] Table 2 AFT list
[0104] (2) CFT maintenance process
[0105] Receive a data packet from the source sender through the Lport. The data packet includes flow end identification information. The switch maintains the CFT data structure as shown in Table 3 according to the received data packet. This data structure includes the flow identification information of the transmission flow and the corresponding timer. The source sender IP address occupies 32 bits, the destination receiver IP address occupies 32 bits, the source sender port occupies 16 bits, the destination receiver port occupies 16 bits, and the timer occupies 16 bits. In this embodiment, the flow end identification information is implemented through ECN. Refer to Figure 7 , a schematic diagram of an IP packet header format provided by an embodiment of the present disclosure. The seventh and eighth bits of the 8-bit Type of Service (TOS) field in the IP packet header are used as ECN flags in the data center network. Data center switches now widely support the ECN function. And since actively transmitted data packets do not use the ECN function, this embodiment can use the bits of ECN to implement the flow end identification information. ECN = 00 indicates that the transmission of the data packet corresponding to the transmission flow has ended, and ECN ≠ 00 indicates that the transmission of the data packet corresponding to the transmission flow has not ended.
[0106] Source sending end IP address Destination receiving end IP address Source sending end port Destination receiving end port Timer 32 bits 32 bits 16 bits 16 bits 16 bits
[0107] Table 3 CFT data structure
[0108] After the switch receives a data packet from the source sender through the Lport, it obtains the flow identification information of the transmission flow corresponding to the data packet, checks the flow end identification information in the data packet header. When the transmission flow F1 from the local data center ends, the ECN in the header of the last data packet corresponding to F1 is 00. When the switch monitors that the ECN of the data packet is 00, it queries the AFT shown in Table 2, deletes the flow identification information (S1IP, R1IP, S1 port 1, R1 port) of F1 in the AFT to obtain the AFT list shown in Table 4, and adds the flow identification information of F1 and the corresponding timer with a duration of RTT to the CFT table shown in Table 3 to obtain the CFT list shown in Table 5. When the timer times out, the entry in the CFT is deleted.
[0109] Source sending end IP address Destination receiving end IP address Source sending end port Destination receiving end port S1 IP R2 IP S1 Port 2 R2 Port S2 IP R2 IP S2 Port R2 Port S3 IP R3 IP S3 Port R3 Port S4 IP R4 IP S4 Port R4 Port
[0110] Table 4 AFT list
[0111] Source sending end IP address Destination receiving end IP address Source sending end port Destination receiving end port Timer S1 IP R1 IP S1 Port 1 R1 Port RTT
[0112] Table 5 CFT list
[0113] (3) Credit packet reuse process
[0114] The switch receives, via the RPort, a credit packet corresponding to F1 from the destination receiving end, obtains the flow identification information (S1IP, R1IP, S1 port 1, R1 port) of F1 corresponding to the credit packet, queries the CFT, and determines that the flow identification information of F1 is included in the CFT. It can be understood that the flow identification information of F1 matches an entry in the non-expired CFT, and then the credit packet is reused according to the AFT. Reusing the credit packet according to the AFT may include, preferentially determining updated flow identification information matching the flow identification information of F1 from the AFT shown in Table 4 according to the path maximum coverage rule. At this time, it can be seen that there is no entry in the AFT whose source sending end IP address and destination receiving end IP address are exactly the same as those of F1, but there is an entry whose source sending end IP address is the same as that of F1, and the flow identification information of the transmission flow F2 corresponds to this entry. Therefore, the flow identification information of F2 is determined as the updated flow identification information. Further, the flow identification information of F1 corresponding to the credit packet is updated to the flow identification information of F2, and the credit packet is forwarded according to the flow identification information of F2 to schedule the data packets in F2 through the credit packet.
[0115] In a second aspect, referring to Figure 8 , the embodiments of the present disclosure provide a credit packet reuse device, which includes:
[0116] One or more processors 801;
[0117] A memory 802, on which one or more programs are stored. When the one or more programs are executed by the one or more processors 801, the one or more processors 801 implement the above-mentioned first aspect and any possible embodiment in the first aspect;
[0118] One or more I / O interfaces 803, connected between the processor 801 and the memory 802, configured to implement information interaction between the processor 801 and the memory 802.
[0119] Among them, the processor 801 is a device with data processing capabilities, which includes but is not limited to a central processing unit (CPU), etc.; the memory 802 is a device with data storage capabilities, which includes but is not limited to a random access memory (RAM, more specifically such as SDRAM, DDR, etc.), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory (FLASH); the I / O interface (read / write interface) 803 is connected between the processor 801 and the memory 802 and can implement information interaction between the processor 801 and the memory 802, which includes but is not limited to a data bus (Bus), etc.
[0120] In some embodiments, the processor 801, the memory 802, and the I / O interface 803 are interconnected via a bus 804 and are further connected to other components of the computing device.
[0121] In a third aspect, with reference to Figure 9 , embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, it implements the above-mentioned first aspect and any possible embodiments in the first aspect.
[0122] Those of ordinary skill in the art can understand that all or some of the steps, systems, and functional modules / units in the devices disclosed above can be implemented as software, firmware, hardware, and their appropriate combinations.
[0123] In a hardware implementation, the division between the functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component can have multiple functions, or a function or step can be executed by several physical components in cooperation.
[0124] Some or all physical components can be implemented as software executed by a processor, such as a central processing unit (CPU), a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH), or other magnetic disk memories; compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical disc memories; magnetic cassettes, tapes, magnetic disk storage, or other magnetic memories; and any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, a communication medium typically contains computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.
[0125] The present disclosure has disclosed example embodiments, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A method for reusing a credit package, characterized in that Applied to an intermediate device, the method includes: Receiving a credit packet from a destination receiving end, the credit packet being used to schedule data packets in a first transmission flow corresponding to the credit packet; Obtaining flow identification information of the first transmission flow corresponding to the credit packet; Obtaining an active flow table and an ended flow table, wherein the active flow table includes flow identification information of transmission flows that have not ended transmission, and the ended flow table includes flow identification information of transmission flows that have ended transmission; In the case where it is determined that the flow identification information of the first transmission flow is included in the ended flow table, reusing the credit packet according to the active flow table to schedule data packets in the transmission flow that has not ended transmission through the credit packet.
2. The method according to claim 1, characterized in that, The ended flow table further includes expiration time information, and the expiration time information is used to determine the expiration time of the flow identification information of the corresponding ended transmission flow; The method further includes: Determining the expiration time according to the expiration time information; After reaching the expiration time, deleting the flow identification information of the ended transmission flow corresponding to the expiration time information in the ended flow table.
3. The method according to claim 2, characterized in that The expiration time information includes a timer with a preset duration or an expiration timestamp.
4. The method according to claim 1, characterized in that The reusing the credit packet according to the active flow table includes: Determining updated flow identification information from the active flow table according to a preset rule; Updating the flow identification information of the first transmission flow corresponding to the credit packet to the updated flow identification information; Forwarding the credit packet according to the updated flow identification information to schedule data packets in the transmission flow identified by the updated flow identification information through the credit packet.
5. The method according to claim 4, wherein The flow identification information includes the source Internet Protocol (IP) address of the source sending end of the transmission flow and the destination IP address of the destination receiving end, and the preset rule includes a path maximum coverage rule, and the path maximum coverage rule includes being the same as the first source IP address and / or the first destination IP address included in the flow identification information of the first transmission flow; The determining updated flow identification information from the active flow table according to the preset rule includes: Comparing the first source IP address and / or the first destination IP address with the source IP address and / or the destination IP address included in the flow identification information of the transmission flows that have not ended transmission included in the active flow table; Determining the flow identification information of the transmission flow that has not ended transmission and satisfies the path maximum coverage rule in the active flow table as the updated flow identification information.
6. The method according to claim 1, characterized in that, Before obtaining the active flow table and the ended flow table, the method further includes: Receiving a credit scheduling packet from a source sending end, the credit scheduling packet being used to schedule credit packets; Obtaining flow identification information of the transmission flow corresponding to the credit scheduling packet, wherein the credit scheduling packet corresponds to the same transmission flow as the credit packet it schedules; Adding the flow identification information of the transmission flow corresponding to the credit scheduling packet to the active flow table to generate or update the active flow table.
7. The method according to claim 1, characterized in that Before obtaining the active flow table and the ended flow table, the method further includes: Receive a data packet from a source sender, where the data packet includes stream end identification information for determining whether the transmission of the transmission stream corresponding to the data packet has ended; Obtain the stream identification information of the transmission stream corresponding to the data packet; When it is determined according to the stream end identification information that the transmission of the transmission stream corresponding to the data packet has ended, delete the stream identification information of the transmission stream corresponding to the data packet included in the active flow table to update the active flow table, and add the stream identification information of the transmission stream corresponding to the data packet to the ended flow table to generate or update the ended flow table.
8. The method according to claim 7, wherein The stream end identification information is at least one bit in the IP packet header of the data packet.
9. The method according to claim 8, characterized in that, The stream end identification information is the ECN bit in the IP packet header.
10. A credit package reuse device, characterized in that, Comprising: One or more processors; A memory storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method according to any one of claims 1 to 9; One or more I / O interfaces connected between the processor and the memory and configured to enable information interaction between the processor and the memory.
11. A computer-readable medium having stored thereon a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 9.