A packet slicing forwarding method, device, equipment, medium and program product
By slicing and encapsulating packets and modifying the source port number using a multipath feature list, single-stream multipath forwarding is achieved, solving the link load imbalance problem caused by ECMP and improving the overall performance of the intelligent computing center network.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE COMM LTD RES INST
- Filing Date
- 2024-03-22
- Publication Date
- 2026-07-10
AI Technical Summary
The existing flow-based load balancing model ECMP is prone to causing severe uneven load distribution on links, which cannot effectively improve network performance.
By slicing and encapsulating the application packets to be forwarded, and modifying the source port number of the sliced packets using a multi-path feature list, the packets are forwarded through different links. By combining this with probe packets to dynamically obtain multi-path information across the entire network, available source port numbers are selected and a multi-path feature list is constructed, thus achieving single-stream multi-path forwarding.
It solves the problem of unbalanced link load, improves the average utilization of the entire network links, supports single-stream multi-path forwarding, and improves network performance.
Smart Images

Figure CN118802742B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a method, apparatus, device, medium, and program product for slice forwarding of messages. Background Technology
[0002] As the infrastructure carrying intelligent computing power, intelligent computing centers are characterized by large data flows and long durations. To achieve low latency, zero packet loss, and high throughput in this scenario, the first step is to solve the congestion problem caused by uneven network traffic scheduling. Currently, the flow-based load balancing mode ECMP (Equal-Cost Multi-Path routing) is prone to causing severe uneven link load.
[0003] Flow-based load balancing is a single-flow, single-path traffic scheduling method that distributes packets belonging to the same flow to the same link. While this scheduling method is simple in principle, it lacks consideration of whether the path itself is congested. In actual business applications, although the flow hash is uniform, it can easily lead to a severe uneven distribution of load on each equivalent link, resulting in the inability to improve the overall network performance. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, device, medium, and program product for packet slicing and forwarding. By using packet slicing encapsulation and multi-link forwarding mechanisms, it avoids the situation where single-path forwarding of packets in a single flow can easily cause partial link congestion, and improves the average utilization efficiency of the entire network links.
[0005] To achieve the above objectives, embodiments of the present invention provide a packet slicing and forwarding method applied to a source network interface card (NIC), the method comprising:
[0006] The application messages to be forwarded are sliced and encapsulated to obtain several segmented messages;
[0007] Based on a pre-built multi-path feature list, the source port number of each segmented packet is modified to forward the segmented packet to the destination network interface card via different links; wherein, the multi-path feature list records the correspondence between different source port numbers and links.
[0008] As an improvement to the above scheme, the multi-path feature list is constructed through the following steps:
[0009] When an application message to be forwarded is received, a corresponding virtual message is constructed for each application message.
[0010] By changing the source port number of the virtual message, simulation training is performed to filter out the source port numbers that can be hashed to different links, which are then used as available source port numbers.
[0011] The multipath feature list is constructed based on the available source port numbers and corresponding links.
[0012] As an improvement to the above scheme, the step of constructing the multipath feature list based on the available source port number and the corresponding link includes:
[0013] Based on the pre-acquired multi-path information of the entire network, determine whether the link corresponding to the available source port number is a faulty link;
[0014] When a link is faulty, the faulty link and its corresponding available source port number are deleted.
[0015] The multipath feature list is constructed based on the reserved available source port numbers and corresponding links.
[0016] As an improvement to the above solution, the network-wide multi-path information is obtained through the following steps:
[0017] Periodically construct probe messages;
[0018] The probe message is sent to the directly connected switch so that the switch performs a probe message update operation and forwards the updated probe message to other switches for probe message update operations, until all switches in the entire network have been traversed; wherein, the probe message update operation includes: the switch putting its own device information and current link load information into the probe message.
[0019] Based on the device information and link load information of all switches in the network carried in the probe message, the network-wide multipath information is generated.
[0020] As an improvement to the above solution, the network-wide multi-path information is obtained through the following steps:
[0021] The device information and link load information of all switches in the entire network sent by the source switch are obtained to generate the network-wide multipath information; wherein, the switches communicate their device information and current link load information to each other, and the source switch records and saves the information and sends it to the source network card.
[0022] As an improvement to the above scheme, the application message to be forwarded is sliced and encapsulated to obtain several segmented messages, including:
[0023] The application message to be forwarded is sliced to obtain several sub-messages;
[0024] A segmentation identification bit is set in the extended header of each sub-message; wherein the segmentation identification bit is used to indicate that the sub-message is a segmented message;
[0025] A segmentation order bit is set in the extended header of each sub-message; wherein the segmentation order bit is used to indicate the order of the segmented messages in the application messages;
[0026] The same flow identifier information is added to the extended header of the sub-messages obtained from the same application message slice; wherein, the flow identifier information is used to indicate the application message to which the sub-message belongs;
[0027] The sub-messages with segmentation identification bits, segmentation order bits, and added flow identification information are encapsulated to form segmented messages, thus obtaining several segmented messages.
[0028] As an improvement to the above scheme, the step of modifying the source port number of each segmented packet according to a pre-built multi-path feature list to forward the segmented packet to the destination network interface card via different links includes:
[0029] Send an authorization request to the target network interface card (NIC) and receive first guidance information returned by the target NIC in response to the authorization request; wherein, the first guidance information includes the cache status of the target NIC;
[0030] The data transmission rate is determined based on the cache status.
[0031] Based on the pre-built multi-path feature list, the source port number of each segmented packet is modified, and each segmented packet is sent to the corresponding link according to the data transmission rate, and forwarded to the destination network card by the switches along the path.
[0032] As an improvement to the above solution, when the switch determines that the next connected switch is experiencing network congestion, it can determine another link based on the current link load information and send the split packet to the other link by changing the source port number of the split packet.
[0033] As an improvement to the above scheme, the step of modifying the source port number of each segmented packet according to a pre-constructed multi-path feature list to forward the segmented packets to the destination network interface card via different links further includes:
[0034] When congestion flow information is received from the source switch, the current data transmission rate is adjusted; wherein, the congestion flow information is generated by the source switch when it detects that it is experiencing congestion, and the congestion flow information is sent to the source network card through extended PFC.
[0035] As an improvement to the above scheme, the step of modifying the source port number of each segmented packet according to a pre-constructed multi-path feature list to forward the segmented packets to the destination network interface card via different links further includes:
[0036] When the second guidance information of the destination network card is received, the current data transmission rate is adjusted according to the second guidance information; wherein, the second guidance information is generated by the destination network card when it receives congestion flow information sent by the non-source switch, the congestion flow information is generated by the non-source switch when it detects that it is experiencing congestion, and the second guidance information includes the congestion flow information and the buffer status of the destination network card.
[0037] This invention also provides a packet slicing and forwarding method applied to a destination network interface card (NIC), the method comprising:
[0038] Receive and buffer packet data forwarded on different links;
[0039] When the cached packet data is a segmented packet, the segmented packet is reassembled to generate the original application packet. The segmented packet is formed by the source network card slicing and encapsulating the application packet. The source network card modifies the source port number of the segmented packet according to a pre-built multi-path feature list so that it can be forwarded through different links.
[0040] As an improvement to the above scheme, when the cached message data is a segmented message, the segmented message is reassembled to generate the original application message, including:
[0041] Identify the extended header of the cached message data;
[0042] When the extended header includes a segmentation identification bit, the message data is determined to be a segmented message;
[0043] Based on the flow identifier information in the extended header of each segmented message, all segmented messages obtained from the same application message slice are identified as segmented messages to be reassembled.
[0044] The order of the segments to be reassembled in the application message is determined based on the segmentation sequence bit in the extended header of each segmented segmented message to be reassembled.
[0045] Each segmented message to be reassembled is reassembled according to the order described above to generate the original application message.
[0046] As an improvement to the above scheme, before receiving and buffering the packet data forwarded on different links, the method further includes:
[0047] When an authorization request is received from the source network card, the current cache status is sent to the source network card so that the source network card can determine the data transmission rate based on the cache status.
[0048] This invention also provides a packet slicing and forwarding device, applied to a source network interface card (NIC), the device comprising:
[0049] The message slicing module is used to slice and encapsulate the application messages to be forwarded, resulting in several segmented messages;
[0050] The packet forwarding module is used to modify the source port number of each segmented packet according to a pre-built multi-path feature list, so as to forward the segmented packet to the destination network card through different links; wherein, the multi-path feature list records the correspondence between different source port numbers and links.
[0051] This invention also provides a packet slicing and forwarding device, applied to a destination network interface card (NIC), the device comprising:
[0052] The message receiving module is used to receive and buffer message data forwarded on different links;
[0053] The message reassembly module is used to reassemble the segmented message when the cached message data is a segmented message, so as to generate the original application message.
[0054] This invention also provides a packet slicing forwarding device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the packet slicing forwarding method as described in any of the above embodiments.
[0055] This invention also provides a computer-readable storage medium, which includes a stored computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to execute the packet slicing and forwarding method as described in any of the above embodiments.
[0056] This invention also provides a computer program product, which includes a computer program or computer instructions. When the computer program or computer instructions are executed by a processor, they implement the packet slicing and forwarding method as described in any of the above embodiments.
[0057] Compared with existing technologies, the packet slicing and forwarding method, apparatus, device, medium, and program products disclosed in this invention pre-construct a multi-link list to record the correspondence between different source port numbers and links. When an application packet is to be forwarded, the application packet to be forwarded is sliced to obtain several segmented packets. The source port number of each segmented packet is modified according to the pre-constructed multi-path feature list so that the segmented packets are forwarded to the destination network card through different links. The packet slicing, encapsulation, and forwarding mechanism based on port numbers in this invention solves the problem of severely uneven link load balancing caused by the network traffic characteristics of intelligent computing centers, supports single-stream multi-path forwarding, and improves the average link utilization rate of the entire network. Attached Figure Description
[0058] Figure 1 This is a flowchart illustrating a packet slicing and forwarding method provided in an embodiment of the present invention;
[0059] Figure 2 This is a flowchart illustrating a preferred method for slice forwarding of packets according to an embodiment of the present invention;
[0060] Figure 3 This is a flowchart illustrating another method for slice forwarding of messages provided in an embodiment of the invention;
[0061] Figure 4 This is a schematic diagram of the structure of a message slicing and forwarding device provided in an embodiment of the present invention;
[0062] Figure 5 This is a schematic diagram of another message slicing and forwarding device provided in an embodiment of the present invention;
[0063] Figure 6 This is a schematic diagram of the structure of a message slicing and forwarding device provided in an embodiment of the present invention. Detailed Implementation
[0064] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0065] In the description of this application, it should be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0066] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0067] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0068] See Figure 1 This is a flowchart illustrating a packet slicing and forwarding method provided in an embodiment of the present invention. The embodiment of the present invention provides a packet slicing and forwarding method applied to a source network interface card (NIC), the method comprising steps S11 to S12:
[0069] S11. Slice and encapsulate the application message to be forwarded to obtain several segmented messages;
[0070] S12. Based on the pre-constructed multi-path feature list, modify the source port number of each segmented packet to forward the segmented packet to the destination network card through different links; wherein, the multi-path feature list records the correspondence between different source port numbers and links.
[0071] In this embodiment of the invention, in order to improve the average utilization efficiency of the link, a packet-based message slicing encapsulation and forwarding mechanism based on port number is introduced in the intelligent computing center. By performing fine-grained segmentation of data packets at the sending end and changing the five-tuple method of the segmented messages, load balancing is performed in a more granular manner, and the segmented messages are hashed and forwarded through multiple links.
[0072] Specifically, the source network interface card (NIC) receives application packets to be forwarded from the application client. Before sending the application packets, it constructs and saves a multi-path feature list by filtering the correspondence between different source port numbers and links. The naming method is uniquely determined by the original five-tuple of the original application packet before segmentation. It should be noted that the five-tuple includes the source IP address, source port, destination IP address, destination port, and transport layer protocol.
[0073] When sending application packets, the original 5-tuple information is used to uniquely identify and retrieve the corresponding multipath feature list. Simultaneously, the application packet to be forwarded is segmented and encapsulated into several segmented packets. Each segmented packet modifies its source port number according to the multipath feature list, enabling the segmented packets to select different links for forwarding, thus achieving even load distribution across each link. When the destination network interface card (NIC) receives the segmented packets, it buffers them. The next step is for the destination NIC to retrieve the segmented packets from the buffer and reassemble them to form the original application packet.
[0074] By employing the technical means of this invention, a multi-link list is pre-constructed to record the correspondence between different source port numbers and links. When an application packet is to be forwarded, the application packet is sliced to obtain several segmented packets. The source port number of each segmented packet is modified according to the pre-constructed multi-path feature list so that the segmented packets are forwarded to the destination network card through different links. This invention's packet slicing, encapsulation, and forwarding mechanism based on port numbers solves the problem of severely uneven link load balancing caused by the network traffic characteristics of intelligent computing centers, supports single-stream multi-path forwarding, and improves the average link utilization rate of the entire network.
[0075] As a preferred embodiment, the present invention is further implemented based on the above embodiments, see [link to previous embodiments]. Figure 2 This is a flowchart illustrating a preferred method for slice forwarding of packets in an embodiment of the present invention. The multi-path feature list is constructed through the following steps:
[0076] When an application message to be forwarded is received, a corresponding virtual message is constructed for each application message.
[0077] By changing the source port number of the virtual message, simulation training is performed to filter out the source port numbers that can be hashed to different links, which are then used as available source port numbers.
[0078] The multipath feature list is constructed based on the available source port numbers and corresponding links.
[0079] In this embodiment of the invention, load balancing is based on 5-tuple hashing. The difference from flow-based load balancing is that this embodiment segments packets, changing the 5-tuple of smaller packets. This allows segmented packets from the same flow to follow different paths, achieving fine-grained load balancing and more even traffic distribution. Implementing this scheme requires simulation at the source network interface card (NIC) side to construct a multi-path feature list.
[0080] Specifically, before the application sends application packets, the source network interface card (NIC) constructs a virtual packet for each flow. The source IP address, destination IP address, destination port, and transport layer protocol of the virtual packet are the same as the real packet to be sent. By changing the source port number of the virtual packet, simulation training is performed to simulate different source port numbers that hash to different links. The simulation results are recorded and saved, and source port numbers that can hash to different links are selected. The selected source port numbers and their corresponding links are stored in a list in the source port number database. The naming method is uniquely determined by the original 5-tuple of the packet before segmentation. When an application packet needs to be sent, the original 5-tuple information is used to uniquely determine and retrieve the corresponding list. The source NIC then segments and distributes packets of the same flow to different links according to the current network status.
[0081] Preferably, constructing the multipath feature list based on the available source port number and the corresponding link includes:
[0082] Based on the pre-acquired multi-path information of the entire network, determine whether the link corresponding to the available source port number is a faulty link;
[0083] When a link is faulty, the faulty link and its corresponding available source port number are deleted.
[0084] The multipath feature list is constructed based on the reserved available source port numbers and corresponding links.
[0085] In this embodiment of the invention, after the source port numbers that can be hashed to different links are selected through simulation, it is also necessary to remove the faulty links based on the multi-path information of the entire network obtained from the source network card, and then construct the multi-path feature list based on the retained source port numbers and corresponding links.
[0086] Preferably, the embodiments of the present invention further optimize the means by which the source network card obtains the multi-path information of the entire network.
[0087] As a preferred embodiment, see [link to previous document]. Figure 2 The network-wide multi-path information is obtained through the following steps:
[0088] Periodically construct probe messages;
[0089] The probe message is sent to the directly connected switch so that the switch performs a probe message update operation and forwards the updated probe message to other switches for probe message update operations, until all switches in the entire network have been traversed; wherein, the probe message update operation includes: the switch putting its own device information and current link load information into the probe message.
[0090] Based on the device information and link load information of all switches in the network carried in the probe message, the network-wide multipath information is generated.
[0091] Specifically, special probe packets are periodically constructed on the source network interface card (NIC) side and sent to directly connected switches. The directly connected switches include their device ID or IP address and current link load information, including link capacity, queue information, and transmission rate, in the probe packets. Multiple copies of the probe packets are also made and sent out from ports other than the port that receives the probe packets. Switches along the path perform the same operation, including their device ID or IP address and current link load information in the probe packets for further forwarding, until all devices in the network have been traversed. Finally, the probe packets, carrying all the network information, return to the source NIC. The source NIC obtains the network device information and link load information from the received probe packets and generates the network-wide multipath information.
[0092] As another preferred implementation, the network-wide multi-path information is obtained through the following steps:
[0093] The device information and link load information of all switches in the entire network sent by the source switch are obtained to generate the network-wide multipath information; wherein, the switches communicate their device information and current link load information to each other, and the source switch records and saves the information and sends it to the source network card.
[0094] Specifically, the switching devices communicate with each other about their device IDs or IP addresses, as well as current link load information, including link capacity, queue information, and transmission rate. The source switch records and saves the network information received from the switch and sends it to the source network card.
[0095] The technical means of this invention first dynamically acquires and maintains multipath information to the destination network interface card (NIC) by means of probe packet replication or device announcement. At the same time, a multipath simulation experiment based on the source port number is performed on the NIC side, and the source port list hashed to each link is recorded. Faulty links are eliminated by combining the acquired multipath information, thereby constructing a multipath feature list. This allows the segmented packets to be scattered to different links for packet forwarding during application according to the multipath feature list, supporting multipath forwarding of single-stream packets, solving the problem of severe uneven link load balancing, and improving the average link utilization of the entire network.
[0096] As a preferred embodiment, the present invention further implements any of the above embodiments, step S11, namely, slicing and encapsulating the application message to be forwarded to obtain several segmented messages, including:
[0097] S111. Slice the application message to be forwarded into several sub-messages;
[0098] S112. Set a segmentation identification bit in the extended header of each sub-message; wherein the segmentation identification bit is used to indicate that the sub-message is a segmented message;
[0099] S113. Set a segmentation order bit in the extended header of each sub-message; wherein the segmentation order bit is used to indicate the order of the segmented messages in the application message;
[0100] S114. Add the same flow identifier information to the extended header of the sub-message obtained from the same application message slice; wherein, the flow identifier information is used to indicate the application message to which the sub-message belongs;
[0101] S115. Encapsulate the sub-message with the segmentation identification bit, segmentation order bit and added flow identification information to form a segmented message, thereby obtaining several segmented messages.
[0102] In this embodiment of the invention, the source network interface card (NIC) divides the original application packet into several sub-packets, and encapsulates the segmented packets by setting a segmentation identification bit, a segmentation sequence bit, and flow identification information in the extended header, so that the destination NIC can identify and reassemble the segmented packets.
[0103] Optionally, see Figure 2In this embodiment of the invention, the IPv6 packet extension header is used as a crucial part for segmented packet identification and reassembly. Specifically, a certain bit in the IPv6 extension header serves as a segmentation identification bit, used to determine that the packet belongs to a segmented packet; several bits in the IPv6 extension header serve as segmentation sequence bits, used to indicate the order of the segmented packet within the original packet. Furthermore, in order to perform flow identification and packet reassembly at the destination network interface card (NIC), flow identification information (flow ID) needs to be defined. The flow ID is globally unique, and each flow has a globally unique flow ID used to uniquely identify a flow. The flow ID is placed in the IPv6 extension header to enable flow identification and packet reassembly of segmented packets at the destination NIC.
[0104] Furthermore, upon receiving the segmented packet, the destination network interface card (NIC) first buffers the received segmented packet, placing it in the NIC's cache for further processing. Next, the destination NIC retrieves the segmented packet from the cache, identifies the IPv6 extension header information, and determines whether it is a segmented packet based on a specific segmentation identification bit in the IPv6 extension header. It then determines the packet's order within the original application packet based on several segmentation sequence bits in the IPv6 extension header. Simultaneously, it extracts the flow ID from the extension header, using this flow ID as flow identification to identify all segmented packets derived from the same application packet slice, thus reassembling the segmented packets to form the original application packet.
[0105] It should be noted that if out-of-order reassembly is detected, there are two solutions: one is to place the out-of-order reassembly task on the destination network card side, and the other is to hand over the out-of-order reassembly task to the application. If packet loss occurs, selective retransmission can be used to retrieve the lost data.
[0106] As a preferred embodiment, the present invention further implements the above embodiments. Step S12, namely, modifying the source port number of each segmented packet according to the pre-constructed multi-path feature list to forward the segmented packet to the destination network card through different links, includes:
[0107] S121. Send an authorization request to the target network interface card (NIC) and receive first guidance information returned by the target NIC in response to the authorization request; the first guidance information includes the cache status of the target NIC;
[0108] S122. Determine the data transmission rate based on the buffer status;
[0109] S123. Based on the pre-built multi-path feature list, modify the source port number of each segmented packet, and send each segmented packet to the corresponding link according to the data transmission rate, and forward it to the destination network card through the switches along the path.
[0110] Specifically, before sending application packets, the source NIC sends an authorization request to the destination NIC. The destination NIC authorizes the data based on its current cache. At the same time, the source NIC needs to consider the network information it obtains, such as device queue information and link capacity, and adjust the amount of data that can be sent into the network based on the current network status in a timely manner to try to avoid network congestion.
[0111] After receiving the application packet sent by the application terminal, the source network card calls the corresponding table in the database based on the original 5-tuple information. It uniquely identifies and calls the source port number list in the database based on the original 5-tuple information, and modifies the source port number of each segmented packet according to the list, so that the segmented packets can select different links. Furthermore, the switches along the path perform multi-path selection and forwarding according to the network status, so that each segmented packet is forwarded to the destination network card.
[0112] Preferably, when the switch determines that the next connected switch is experiencing network congestion, it can determine another link based on the current link load information and send the split packet to the other link by changing the source port number of the split packet.
[0113] Preferably, the step of modifying the source port number of each segmented packet according to a pre-constructed multi-path feature list to forward the segmented packet to the destination network interface card via different links further includes step S124:
[0114] S124. When receiving congestion flow information from the source switch, adjust the current data transmission rate; wherein, the congestion flow information is generated by the source switch when it detects congestion, and the congestion flow information is sent to the source network card through extended PFC.
[0115] Preferably, the step of modifying the source port number of each segmented packet according to a pre-built multi-path feature list to forward the segmented packet to the destination network interface card via different links further includes step S125:
[0116] S125. When the second guidance information of the destination network card is received, the current data transmission rate is adjusted according to the second guidance information; wherein, the second guidance information is generated by the destination network card when it receives congestion flow information sent by the non-source switch, the congestion flow information is generated by the non-source switch when it detects that it is congested, and the second guidance information includes the congestion flow information and the buffer status of the destination network card.
[0117] In this embodiment of the invention, the switch uses two schemes based on congestion to implement multipath selection and forwarding of segmented packets.
[0118] In one scenario, when the network is not congested, the switch forwards the segmented packets according to the multipath selection scheme used on the source network interface card (NIC). It performs hash calculations based on the five sets of information in the segmented packets, distributing the packets across different links. As the packets pass through switches along the path, they are further distributed more evenly.
[0119] In another scenario, when network congestion occurs, and the congestion point is located at the source switch: the source switch will use extended PFC to feed back the congestion point information to the source network interface card (NIC). By modifying the original PFC mechanism, precise information about the congestion point, including congestion flow information, is incorporated into the backpressure frame. Based on the congestion point information, the source NIC adjusts the data transmission rate of the corresponding flow, rather than stopping all traffic on the entire NIC interface.
[0120] For situations where the congestion point is not on the source switch side: The current switch will use the link capacity, queue information, and transmission rate of directly connected network devices as the basis for routing when forwarding packets. When it detects network congestion at the next switch, it will change the source port number information again and select another link for data forwarding. For example, if the current switch detects that the queue of a certain port is full, it will modify the five-tuple information and select a less loaded link from another port of this switch.
[0121] Meanwhile, when congestion occurs on the intermediate switch side, it can cut off the Data part of the congested packet and put the congestion information into the IP header, and transmit it directly to the destination network card side through the network. The destination network card side integrates the received congestion information and local conditions and feeds it back to the source network card side to guide the source network card to retransmit and adjust the data transmission rate.
[0122] Using the technical means of this invention, the network interface card (NIC) acquires the entire network topology and link load information. Before sending application packets at the application end, a multi-path feature list is obtained through simulation on the NIC side. Simulation is performed based on the source port to construct the multi-path feature list. Packets are sliced on the NIC side, and the source port number of each sliced packet is modified according to the multi-path feature list to scatter it onto different links. Simultaneously, the source NIC controls the data transmission rate in a timely manner based on the destination NIC's buffer and network information to reduce congestion. When the packet arrives at the switch, the switch selectively modifies the source port number of the packet according to the network conditions, selecting links with lighter loads to further distribute the sliced packets onto more paths, making the packet distribution more uniform. Finally, when the segmented packets arrive at the destination network interface card (NIC), the segmented packets are buffered. The packet segmentation identification bit in the IPv6 packet extension header is extracted to determine whether the packet is a segmented packet. The segmentation order bit in the IPv6 packet extension header is extracted to determine the order of the segmented packets in the original packet. At the same time, the flow identification information in the IPv6 packet extension header is extracted for flow identification of the packet, realizing the reassembly of the segmented packets to form the original application packet. This embodiment of the invention effectively solves the problem of severely uneven link load balancing caused by the characteristics of intelligent computing center network traffic, supports single-flow multi-path forwarding, and improves the average link utilization of the entire network.
[0123] See Figure 3 This is a flowchart illustrating another packet slice forwarding method provided in an embodiment of the invention. The embodiment of the invention provides another packet slice forwarding method applied to a destination network interface card (NIC). The method includes steps S21 to S22:
[0124] S21. Receive and buffer message data forwarded on different links;
[0125] S22. When the cached message data is a segmented message, the segmented message is reassembled to generate the original application message; wherein, the segmented message is formed by the source network card slicing and encapsulating the application message, and the source port number of the segmented message is modified by the source network card according to a pre-built multi-path feature list so as to forward it through different links.
[0126] In this embodiment of the invention, a packet-based message slicing encapsulation and forwarding mechanism based on port number is introduced into the intelligent computing center. By finely segmenting data packets at the source network card end and changing the five-tuple method of the segmented messages, load balancing is performed in a more granular manner, and the segmented messages are forwarded to the destination network card through multiple link hashing.
[0127] Specifically, the source network interface card (NIC) receives application packets to be forwarded from the application client. Before sending the application packets, it constructs and saves a multi-path feature list by filtering the correspondence between different source port numbers and links. The naming method is uniquely determined by the original five-tuple of the original application packet before segmentation. It should be noted that the five-tuple includes the source IP address, source port, destination IP address, destination port, and transport layer protocol.
[0128] When sending application packets, the original 5-tuple information is used to uniquely identify and retrieve the corresponding multipath feature list. At the same time, the application packet to be forwarded is segmented and encapsulated to obtain several segmented packets. Each segmented packet modifies its source port number according to the multipath feature list, so that the segmented packets can select different links for forwarding, thereby achieving a uniform load distribution on each link.
[0129] When the destination network interface card (NIC) receives the sliced packet, it will cache the received sliced packet. The next step is for the destination NIC to retrieve the sliced packet to be processed from the cache and reassemble the packet to form the original application packet.
[0130] Preferably, before step S21, i.e., before receiving and buffering the packet data forwarded on different links, the method further includes:
[0131] When an authorization request is received from the source network card, the current cache status is sent to the source network card so that the source network card can determine the data transmission rate based on the cache status.
[0132] In this embodiment of the invention, before sending application packets, the source network card sends an authorization request to the destination network card. The destination network card authorizes the data based on the current cache. At the same time, the source network card needs to consider the network information it has acquired, such as device queue information and link capacity, and adjust the amount of data that can be sent to the network based on the current network status in a timely manner to try to avoid network congestion.
[0133] After receiving the application packet sent by the application terminal, the source network card calls the corresponding table in the database based on the original 5-tuple information. It uniquely identifies and calls the source port number list in the database based on the original 5-tuple information, and modifies the source port number of each segmented packet according to the list, so that the segmented packets can select different links. Furthermore, the switches along the path perform multi-path selection and forwarding according to the network status, so that each segmented packet is forwarded to the destination network card.
[0134] Preferably, step S22, that is, when the cached message data is a segmented message, reassembling the segmented message to generate the original application message, includes:
[0135] S221. Identify the extended header of the cached message data;
[0136] S222. When the extended header includes a segmentation identification bit, the message data is determined to be a segmented message;
[0137] S223. Based on the flow identifier information in the extended header of each segmented message, determine all segmented messages obtained from the same application message slice as segmented messages to be reassembled;
[0138] S224. Determine the order of the segments to be reassembled in the application message based on the segmentation sequence bit in the extended header of each segmented segmented message to be reassembled;
[0139] S225. Reassemble each of the segmented packets to be reassembled according to the order to generate the original application packets.
[0140] In this embodiment of the invention, the source network interface card (NIC) divides the original application packet into several sub-packets, and encapsulates the segmented packets by setting a segmentation identification bit, a segmentation sequence bit, and flow identification information in the extended header, so that the destination NIC can identify and reassemble the segmented packets.
[0141] Optionally, in this embodiment of the invention, the IPv6 packet extension header is used as an important part of the segmented packet identification and reassembly. Specifically, a certain bit in the IPv6 extension header is used as a segmentation identification bit to determine that the packet belongs to a segmented packet; several bits in the IPv6 extension header are used as segmentation sequence bits to indicate the order of the segmented packet in the original packet. Furthermore, in order to perform flow identification and packet reassembly at the destination network interface card (NIC), flow identification information (flow id) needs to be defined. The flow id is globally unique, and each flow has a globally unique flow id to uniquely identify a flow. The flow id is placed in the IPv6 extension header so that flow identification and packet reassembly of the segmented packets can be performed at the destination NIC.
[0142] Furthermore, upon receiving the segmented packet, the destination network interface card (NIC) first buffers the received segmented packet, placing it in the NIC's cache for further processing. Next, the destination NIC retrieves the segmented packet from the cache, identifies the IPv6 extension header information, and determines whether it is a segmented packet based on a specific segmentation identification bit in the IPv6 extension header. It then determines the packet's order within the original application packet based on several segmentation sequence bits in the IPv6 extension header. Simultaneously, it extracts the flow ID from the extension header, using this flow ID as flow identification to identify all segmented packets derived from the same application packet slice, thus reassembling the segmented packets to form the original application packet.
[0143] It should be noted that if out-of-order reassembly is detected, there are two solutions: one is to place the out-of-order reassembly task on the destination network card side, and the other is to hand over the out-of-order reassembly task to the application. If packet loss occurs, selective retransmission can be used to retrieve the lost data.
[0144] It should be noted that the packet slicing and forwarding method executed by the destination network card in this embodiment of the invention corresponds to all the steps of the packet slicing and forwarding method executed by the source network card in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0145] See Figure 4 This is a schematic diagram of a packet slicing and forwarding device provided in an embodiment of the present invention. The embodiment of the present invention provides a packet slicing and forwarding device 30, applied to a source network interface card (NIC). The device 30 includes:
[0146] The message slicing module 31 is used to slice and encapsulate the application message to be forwarded to obtain several segmented messages;
[0147] The packet forwarding module 32 is used to modify the source port number of each segmented packet according to a pre-built multi-path feature list, so as to forward the segmented packet to the destination network card through different links; wherein, the multi-path feature list records the correspondence between different source port numbers and links.
[0148] It should be noted that the packet slicing and forwarding device for a source network card provided in this embodiment of the invention is used to execute all the process steps of the packet slicing and forwarding method for a source network card in the above embodiment. The working principle and beneficial effect of the two are one-to-one, so they will not be described again.
[0149] See Figure 5 This is a schematic diagram of another packet slicing forwarding device provided in an embodiment of the present invention. The embodiment of the present invention provides another packet slicing forwarding device 40, applied to a destination network interface card (NIC). The device 40 includes:
[0150] The message receiving module 41 is used to receive and buffer message data forwarded on different links;
[0151] The message reassembly module 42 is used to reassemble the segmented message when the cached message data is a segmented message, so as to generate the original application message.
[0152] It should be noted that the packet slicing and forwarding device for a destination network card provided in this embodiment of the invention is used to execute all the process steps of the packet slicing and forwarding method for a destination network card in the above embodiment. The working principle and beneficial effect of the two are one-to-one, so they will not be described again.
[0153] See Figure 5 This is a schematic diagram of the structure of a packet slicing forwarding device provided in an embodiment of the present invention. The embodiment of the present invention provides a packet slicing forwarding device 50, including a processor 51, a memory 52, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the packet slicing forwarding method as described in any of the above embodiments.
[0154] It should be noted that the packet slicing and forwarding device provided in this embodiment of the invention is used to execute all the process steps of the packet slicing and forwarding method in any of the above embodiments. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0155] This invention also provides a computer-readable storage medium, which includes a stored computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to execute the packet slicing and forwarding method as described in any of the above embodiments.
[0156] This invention also provides a computer program product, which includes a computer program or computer instructions. When the computer program or computer instructions are executed by a processor, they implement the packet slicing and forwarding method as described in any of the above embodiments.
[0157] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0158] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for slice-forwarding messages, characterized in that, Applied to the source network interface card, the method includes: The application messages to be forwarded are sliced and encapsulated to obtain several segmented messages; Based on a pre-built multi-path feature list, the source port number of each segmented packet is modified to forward the segmented packet to the destination network interface card through different links; wherein, the multi-path feature list records the correspondence between different source port numbers and links; The multi-path feature list is constructed through the following steps: When an application message to be forwarded is received, a corresponding virtual message is constructed for each application message. By changing the source port number of the virtual message, simulation training is performed to filter out the source port numbers that can be hashed to different links, which are then used as available source port numbers. The multipath feature list is constructed based on the available source port numbers and corresponding links.
2. The message slicing forwarding method as described in claim 1, characterized in that, The step of constructing the multipath feature list based on the available source port number and the corresponding link includes: Based on the pre-acquired multi-path information of the entire network, determine whether the link corresponding to the available source port number is a faulty link; When a link is faulty, the faulty link and its corresponding available source port number are deleted. The multipath feature list is constructed based on the reserved available source port numbers and corresponding links.
3. The message slicing and forwarding method as described in claim 2, characterized in that, The network-wide multi-path information is obtained through the following steps: Periodically construct probe messages; The probe message is sent to the directly connected switch so that the switch performs a probe message update operation and forwards the updated probe message to other switches for probe message update operations, until all switches in the entire network have been traversed; wherein, the probe message update operation includes: the switch putting its own device information and current link load information into the probe message. Based on the device information and link load information of all switches in the network carried in the probe message, the network-wide multipath information is generated.
4. The message slicing and forwarding method as described in claim 2, characterized in that, The network-wide multi-path information is obtained through the following steps: The device information and link load information of all switches in the entire network sent by the source switch are obtained to generate the network-wide multipath information; wherein, the switches communicate their device information and current link load information to each other, and the source switch records and saves the information and sends it to the source network card.
5. The message slice forwarding method as described in claim 1, characterized in that, The application message to be forwarded is sliced and encapsulated to obtain several segmented messages, including: The application message to be forwarded is sliced to obtain several sub-messages; A segmentation identification bit is set in the extended header of each sub-message; wherein the segmentation identification bit is used to indicate that the sub-message is a segmented message; A segmentation order bit is set in the extended header of each sub-message; wherein the segmentation order bit is used to indicate the order of the segmented messages in the application messages; The same flow identifier information is added to the extended header of the sub-messages obtained from the same application message slice; wherein, the flow identifier information is used to indicate the application message to which the sub-message belongs; The sub-messages with segmentation identification bits, segmentation order bits, and added flow identification information are encapsulated to form segmented messages, thus obtaining several segmented messages.
6. The message slicing forwarding method as described in claim 1, characterized in that, The step of modifying the source port number of each segmented packet according to a pre-built multi-path feature list to forward the segmented packet to the destination network interface card via different links includes: Send an authorization request to the target network interface card (NIC) and receive first guidance information returned by the target NIC in response to the authorization request; wherein, the first guidance information includes the cache status of the target NIC; The data transmission rate is determined based on the cache status. Based on the pre-built multi-path feature list, the source port number of each segmented packet is modified, and each segmented packet is sent to the corresponding link according to the data transmission rate, and forwarded to the destination network card by the switches along the path.
7. The message slice forwarding method as described in claim 6, characterized in that, When the switch determines that the next connected switch is experiencing network congestion, it can identify another link based on the current link load information and send the split packet to the other link by changing the source port number of the split packet.
8. The message slicing forwarding method as described in claim 6, characterized in that, The step of modifying the source port number of each segmented packet according to a pre-built multi-path feature list to forward the segmented packets to the destination network interface card via different links further includes: When congestion flow information is received from the source switch, the current data transmission rate is adjusted; wherein, the congestion flow information is generated by the source switch when it detects that it is experiencing congestion, and the congestion flow information is sent to the source network card through extended PFC.
9. The message slicing forwarding method as described in claim 6, characterized in that, The step of modifying the source port number of each segmented packet according to a pre-built multi-path feature list to forward the segmented packets to the destination network interface card via different links further includes: When the second guidance information of the destination network card is received, the current data transmission rate is adjusted according to the second guidance information; wherein, the second guidance information is generated by the destination network card when it receives congestion flow information sent by the non-source switch, the congestion flow information is generated by the non-source switch when it is congested, and the second guidance information includes the congestion flow information and the buffer status of the destination network card.
10. A method for slice-forwarding messages, characterized in that, Applied to the target network interface card, the method includes: Receive and buffer packet data forwarded on different links; When the cached message data is a segmented message, the segmented message is reassembled to generate the original application message; wherein, the segmented message is formed by the source network card slicing and encapsulating the application message, and the source port number of the segmented message is modified by the source network card according to a pre-built multi-path feature list so as to forward it through different links; The multi-path feature list is constructed through the following steps: When an application message to be forwarded is received, a corresponding virtual message is constructed for each application message. By changing the source port number of the virtual message, simulation training is performed to filter out the source port numbers that can be hashed to different links, which are then used as available source port numbers. The multipath feature list is constructed based on the available source port numbers and corresponding links.
11. The message slicing forwarding method as described in claim 10, characterized in that, When the cached message data is a segmented message, the segmented message is reassembled to generate the original application message, including: Identify the extended header of the cached message data; When the extended header includes a segmentation identification bit, the message data is determined to be a segmented message; Based on the flow identifier information in the extended header of each segmented message, all segmented messages obtained from the same application message slice are identified as segmented messages to be reassembled. The order of the segments to be reassembled in the application message is determined based on the segmentation sequence bit in the extended header of each segmented segmented message to be reassembled. Each segmented message to be reassembled is reassembled according to the order described above to generate the original application message.
12. The message slicing and forwarding method as described in claim 10, characterized in that, Before receiving and buffering the packet data forwarded on different links, the method further includes: When an authorization request is received from the source network card, the current cache status is sent to the source network card so that the source network card can determine the data transmission rate based on the cache status.
13. A message slicing and forwarding device, characterized in that, Applied to the source network interface card, the device includes: The message slicing module is used to slice and encapsulate the application messages to be forwarded, resulting in several segmented messages; The packet forwarding module is used to modify the source port number of each segmented packet according to a pre-built multi-path feature list, so as to forward the segmented packet to the destination network interface card through different links; wherein, the multi-path feature list records the correspondence between different source port numbers and links; The multi-path feature list is constructed through the following steps: When an application message to be forwarded is received, a corresponding virtual message is constructed for each application message. By changing the source port number of the virtual message, simulation training is performed to filter out the source port numbers that can be hashed to different links, which are then used as available source port numbers. The multipath feature list is constructed based on the available source port numbers and corresponding links.
14. A message slicing and forwarding device, characterized in that, Applied to a target network interface card, the device includes: The message receiving module is used to receive and buffer message data forwarded on different links; The packet reassembly module is used to reassemble the segmented packets when the cached packet data is a segmented packet, so as to generate the original application packet. The segmented packet is formed by the source network card slicing and encapsulating the application packet. The source network card modifies the source port number of the segmented packet according to a pre-built multi-path feature list so as to forward it through different links. The multi-path feature list is constructed through the following steps: When an application message to be forwarded is received, a corresponding virtual message is constructed for each application message. By changing the source port number of the virtual message, simulation training is performed to filter out the source port numbers that can be hashed to different links, which are then used as available source port numbers. The multipath feature list is constructed based on the available source port numbers and corresponding links.
15. A message slicing and forwarding device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the packet slice forwarding method as described in any one of claims 1 to 12.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the packet slicing and forwarding method as described in any one of claims 1 to 12.
17. A computer program product, characterized in that, The computer program product includes a computer program or computer instructions, which, when executed by a processor, implement the message slicing and forwarding method as described in any one of claims 1 to 12.