Method and system for tcp connection aggregation based on hardware programmable switch

By designing a hardware programmable switch with a separate control plane and data plane architecture, and combining it with end-system collaborative design, TCP connection aggregation was achieved. This solved the problems of slow speed and high overhead in existing TCP connection aggregation technologies, and improved system performance and reliability.

CN116708318BActive Publication Date: 2026-01-20INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310483691.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2026-01-20
Estimated Expiration
2043-04-28

AI Technical Summary

Technical Problem

Existing technologies suffer from slow processing speed, insufficient concurrency, and excessive overhead when handling TCP connections. In particular, they cannot effectively aggregate TCP connections on hardware programmable switches, leading to a decline in system performance.

Method used

TCP connection aggregation is achieved by using a hardware programmable switch. By designing an architecture that separates the control plane and data plane in the hardware programmable switch, and using pipelined chips to complete connection mapping and data packet modification, combined with the collaborative design of the end system, efficient forwarding of data packets and retransmission of lost packets can be realized.

Benefits of technology

It effectively reduced the number of TCP connections, improved the communication efficiency of the PS-lite system, reduced latency while maintaining high-reliability transmission, and enhanced the overall performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116708318B_ABST
    Figure CN116708318B_ABST
Patent Text Reader

Abstract

The application provides a TCP connection aggregation method and system based on a hardware programmable switch, which comprises a client, a hardware programmable switch and a server; when the client or the server serves as a sending end and sends a data packet to the server or the client serving as a receiving end, the sending end sends the data packet to the hardware programmable switch through a TCP connection; the hardware programmable switch maps the data packet from a first connection space of the sending end to the hardware programmable switch to a second connection space of the hardware programmable switch to the receiving end by modifying the packet header of the data packet; and the hardware programmable switch sends the data packet with the modified packet header to the receiving end through a TCP connection. The application ensures that the connection reduction based on the hardware switch does not affect the overall transmission performance of the network system while the number of connections is small, and the communication between the server and the client still maintains the high reliability transmission of the connection-oriented transmission.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of hardware programmable switch and distributed machine learning, and particularly relates to a TCP connection aggregation method and system based on hardware programmable switch. BACKGROUND

[0002] TCP connection is a common way in computer network communication, but if the number of connections is too large, it will cause the system performance to decline. Each TCP connection needs to allocate certain resources in system memory and CPU resources, including TCP cache and TCP state, etc. When the number of connections increases, the system needs to allocate more resources to maintain these connections, which increases the system burden and reduces the system performance. In the PS-lite distributed machine learning framework, all hosts are divided into two types: client (worker) and server (PS server), and each client must establish TCP connection with all servers. That is, in a PS-lite system composed of m clients and n servers, the number of TCP connections can be as high as m*n. In order to ensure the stable performance of PS-lite system, it is necessary to control the number of TCP connections to avoid excessive connections affecting the system performance.

[0003] The commonly used solution is the "TCP connection aggregation server method" (as shown in Figure 1 ). This method sets a TCP connection aggregation server between the client server and the server server, which is composed of three parts: connection management module, retransmission control module and data packet forwarding module. As shown in Figure 1 , the TCP connection aggregation server establishes three TCP connections (referred to as "TCP connection 1", "TCP connection 2" and "TCP connection 3") with three clients respectively, and also establishes a new TCP connection with the server, that is, "TCP connection 4". When the data packet arrives at the TCP connection aggregation server from any one client, it first needs to find the target TCP connection (in the figure, "TCP connection 4") in the connection management module. Then it is judged in the retransmission control module whether the data packet has been transmitted, if yes, it is discarded. Finally, in the data packet forwarding module, the source port, destination port and other fields of the data packet header are changed according to the configuration of the target TCP connection, and then the data packet is forwarded to the target server.

[0004] The prior art deploys TCP aggregation tasks on commercial servers. According to Table 1, compared with a hardware programmable switch (hereinafter referred to as a hardware switch), the commercial server has disadvantages in bandwidth and cost. The bandwidth of the commercial server is 40 Gbps, while the bandwidth of the hardware programmable switch is as high as 3.3 Tbps. The device unit price of the commercial server is $4400, that is, the unit price of the processing capacity per Gbps is $110; while the device unit price of the hardware switch is $10500, that is, the unit price of the processing capacity per Gbps is $3. In terms of energy consumption, the power of the commercial server is 600 Watts, that is, the power consumption per Gbps of processing capacity is 15 Watts; while the power of the hardware switch is 450 Watts, that is, the power consumption per Gbps of processing capacity is only 0.1 Watts. However, the memory of the hardware switch is only 20MB, so the storage resource is quite limited. This makes it difficult to deploy the retransmission control module to the switch. Moreover, the storage register of the hardware switch can only be read and written once in a stage in the processing of a single data packet. This brings challenges to the design of the data packet forwarding module. In addition, the hardware switch cannot process floating-point numbers and cannot complete common operations such as indefinite length shift, so the computing capacity is limited.

[0005] The main problem of the prior art is slow processing speed, insufficient concurrency, and high overhead. Since a single data packet needs to be processed by the network card, the kernel protocol stack, and the TCP connection aggregation software program, the processing speed is relatively slow. The bandwidth of the network card of the commercial server is only 40 Gbps, so the number of concurrent clients that can be supported is also limited. At the same time, the energy and device overhead of the commercial server to process each Gbps of data is also higher.

[0006] Table 1 comparison of software and hardware bandwidth and overhead [2]

[0007] SUMMARY

[0008] The present application improves the overall efficiency of the PS-lite system communication by reducing the number of TCP connections managed by the server. The present application mainly relies on the hardware switch to reduce the number of connections. The present application ensures that the reduction of connections based on the hardware switch does not affect the overall transmission performance of the network system, and the communication between the server and the client still maintains the high reliability of connection-oriented transmission.

[0009] Specifically, the present application proposes a TCP connection aggregation method based on a hardware programmable switch, which includes:

[0010] Step 1, the PS-lite system comprises a client, a hardware programmable switch and a server; when the client or the server as a sending end sends a data packet to the server or the client as a receiving end, the sending end sends the data packet to the hardware programmable switch through a TCP connection.

[0011] Step 2, the hardware programmable switch maps the data packet from the first connection space of the sending end to the hardware programmable switch to the second connection space of the hardware programmable switch to the receiving end by modifying the packet header of the data packet; the hardware programmable switch sends the data packet with the modified packet header to the receiving end through a TCP connection.

[0012] The hardware programmable switch-based TCP connection aggregation method, wherein the hardware programmable switch comprises a control plane and a data plane, the control plane is composed of a CPU of the hardware programmable switch, the CPU is used for processing control messages, and the data plane is composed of a pipeline chip of the hardware programmable switch, and connection mapping, data packet modification and forwarding operations of data messages are completed on the pipeline chip.

[0013] The hardware programmable switch-based TCP connection aggregation method, wherein the pipeline chip of the hardware programmable switch changes the TCP connection identifier carried by the data packet in the form of issuing a flow table, so as to realize the mapping of the data packet from the first connection space to the second connection space.

[0014] The hardware programmable switch-based TCP connection aggregation method, wherein the hardware programmable switch allocates a register for each TCP connection, which is used for storing the connection sequence number of the TCP connection from the sending end to the receiving end; the hardware programmable switch reads the connection sequence number of the hardware programmable switch to the receiving end in the register, fills the sequence number of the data packet with the connection sequence number, and updates the value of the register.

[0015] If the data packet is lost between the sending end and the hardware programmable switch, the sending end performs packet loss retransmission; if the data packet is lost between the hardware programmable switch and the receiving end, the hardware programmable switch performs packet loss retransmission, and analyzes the retransmitted data packet to fill the sequence number allocated by the original lost data packet between the hardware programmable switch and the receiving end.

[0016] A mapping table is established in the CPU memory of the hardware programmable switch to support the lookup of corresponding sequence numbers, and an aging mechanism is used to optimize the size of the mapping table.

[0017] The application further provides a TCP connection aggregation system based on a hardware programmable switch, which comprises a client, a hardware programmable switch and a server; when the client or the server serves as a sending end and sends a data packet to the server or the client serving as a receiving end, the sending end sends the data packet to the hardware programmable switch through a TCP connection;

[0018] The hardware programmable switch is used for mapping the data packet from the first connection space of the sending end to the hardware programmable switch to the second connection space of the hardware programmable switch to the receiving end by modifying the packet header of the data packet, and sending the data packet with the modified packet header to the receiving end through the TCP connection.

[0019] The TCP connection aggregation system based on the hardware programmable switch, wherein the hardware programmable switch comprises a control plane and a data plane, the control plane is composed of a CPU of the hardware programmable switch, and the CPU is used for processing control messages; the data plane is composed of a pipeline chip of the hardware programmable switch, and data messages complete connection mapping, data packet modification and forwarding operations on the pipeline chip.

[0020] The TCP connection aggregation system based on the hardware programmable switch, wherein the pipeline chip of the hardware programmable switch changes a TCP connection identifier carried by the data packet in a manner of issuing a flow table, so as to realize the mapping of the data packet from the first connection space to the second connection space.

[0021] The TCP connection aggregation system based on the hardware programmable switch, wherein the hardware programmable switch allocates a register for each TCP connection, and the register is used for storing a connection sequence number of the TCP connection from the sending end to the receiving end; the hardware programmable switch reads the connection sequence number of the hardware programmable switch to the receiving end in the register, fills the sequence number of the data packet with the connection sequence number, and updates the value of the register;

[0022] If the data packet is lost between the sending end and the hardware programmable switch, the sending end performs packet loss retransmission; if the data packet is lost between the hardware programmable switch and the receiving end, the hardware programmable switch performs packet loss retransmission, and analyzes the retransmitted data packet to fill the sequence number allocated by the original lost data packet between the hardware programmable switch and the receiving end;

[0023] A mapping table is established in the CPU memory of the hardware programmable switch to support the lookup of the corresponding sequence number, and an aging mechanism is used to optimize the size of the mapping table.

[0024] The application further provides a storage medium used for storing a program for executing any one of the TCP connection aggregation methods based on the hardware programmable switch.

[0025] The application further provides a client for any hardware programmable switch-based TCP connection aggregation system.

[0026] From the above scheme, the application has the following advantages:

[0027] The experimental environment includes 20 virtual machines and one Barefoot Tofino switch (3.2T / s). Each virtual machine is equipped with 8GB memory and a gigabit network card, and the operating system is Ubuntu 16.04. The virtual machine is directly connected with the Intel Tofino switch.

[0028] Table 2 experimental results

[0029] Number of workers Number of servers Original connections Current connections Original latency Current latency 10 10 100 20 79.7 68.8

[0030] Table 2 shows the experimental results after taking the average of five tests. In a small-scale test scenario (5 workers, 2 servers), the total number of connections is reduced by 30%, the number of connections on the PS server is reduced by 80%, and the total delay is reduced by 13.7%. According to the theoretical derivation, in a slightly larger scenario (10 workers, 10 servers), the number of connections can be reduced from 100 (10*10) to 20 (10+10), thereby reducing the total number of connections by 80%. BRIEF DESCRIPTION OF DRAWINGS

[0031] Figure 1 It is a block diagram of the aggregation server method of the prior art;

[0032] Figure 2 It is a logical architecture diagram of the application;

[0033] Figure 3 It is a numerical control separation architecture diagram of the application;

[0034] Figure 4 It is a connection mapping diagram of the application;

[0035] Figure 5 It is a sequence space mapping diagram of the application;

[0036] Figure 6 It is a packet receiving process diagram of the end system of the application;

[0037] Figure 7 It is a packet loss retransmission mechanism diagram based on end-to-network cooperation of the application. DETAILED DESCRIPTION

[0038] In order to give full play to the advantages of hardware switches in bandwidth and overhead, and overcome the technical problems that the prior art hardware switches cannot perform TCP connection aggregation, the application designs a system for performing TCP connection aggregation by using a hardware switch. Like the "TCP connection aggregation server method" mentioned above, the system needs to implement three modules of "connection management", "retransmission control" and "packet forwarding" in the hardware switch. The TCP three-way handshake to establish a connection and the four-way handshake to disconnect a connection will cause the transition of the TCP connection state, and the connection management module is responsible for maintaining the state of the TCP connection. The difficulty of implementing the connection management module in the hardware switch lies in the complex TCP connection state transition, which needs to go through multiple steps to complete. The retransmission control module is responsible for maintaining a mapping table recording the sequence numbers of the transmitted data packets, which requires GB unit memory. The packet forwarding module needs to complete the modification of IP, MAC, sequence number and ACK number. This part needs to record the state of the sequence number and ACK number in the hardware switch to allocate new sequence numbers and ACK numbers. The main challenge is the limited hardware resources and insufficient computing power of the hardware switch. The hardware resources of the hardware switch are divided into 12 stages, each stage has approximately equal TCAM, SRAM and register resources. Operations with dependencies cannot be placed in the same stage, so the algorithm design on the hardware switch should not be too complex. This makes it difficult to directly deploy the connection management module on the hardware switch. Unless otherwise specified, the switches mentioned below are hardware programmable switches.

[0039] In order to achieve the above technical effects, the application includes the following key technical points:

[0040] Key point 1, a system architecture and training method of the TCP connection aggregation method based on the hardware programmable switch are proposed.

[0041] Key point 2, a scheme using a digital control separation architecture is proposed to implement the TCP connection aggregation function on the hardware programmable switch. This scheme places high-frequency simple operations in the data plane and low-frequency complex operations in the control plane. Through this design, the application successfully implements the high-throughput and low-latency TCP connection aggregation function.

[0042] Key point 3, the mapping of the connection identifier is completed on the hardware programmable switch, and the five-tuple of the data packet is modified to the five-tuple required by the corresponding TCP connection.

[0043] Key point 4, the connection state mapping is completed on the hardware programmable switch. By storing the sequence number and acknowledgement number state in the storage register of the switch and appropriately allocating it, the application successfully implements the connection state mapping.

[0044] Key point 5: The packet header was expanded on the end system, and fields such as the IDs of the specified worker and PS server were added.

[0045] Key point 6: A packet loss retransmission mechanism is implemented on the end system, enabling the sending end to retransmit lost data packets. Furthermore, this invention replaces the cumulative ACK mechanism with a packet-by-packet ACK mechanism.

[0046] Key point 7: An end-to-end collaborative design is adopted to complete the serial number lookup mechanism. By storing the mapping table on the switch's CPU and designing an aging mechanism, the serial number lookup is supported with the minimum possible memory.

[0047] To make the above features and effects of the present invention clearer and easier to understand, specific embodiments are described below, and detailed descriptions are provided in conjunction with the accompanying drawings.

[0048] System Architecture. The logical architecture of this invention is as follows: Figure 2 As shown, this mainly involves two parts: a programmable switch and an end system (including workers and PS servers). The programmable switch primarily handles connection state mapping, while the end system ensures transmission reliability. Through their interaction, they jointly accomplish the task of connection aggregation while simultaneously guaranteeing high performance and high reliability of data transmission.

[0049] Specifically, for a single PS server system, the workflow is as follows:

[0050] (1) Before training begins, all workers, their corresponding PS servers, and the CPU of the switch are connected.

[0051] (2) At the start of training, the worker communicates with the PS server:

[0052] a) When a single worker sends data to the PS server, it directly uses the connection established between the worker and the switch.

[0053] (b) In the aggregation system of this invention, the destination of the data packets actually received by the switch is the switch itself; however, the correct destination of this data packet should be the target server. Therefore, the destination address needs to be corrected on the switch from the switch to the target server. If not corrected, the data packet will not be able to continue forwarding because the destination address of the data packet is the switch.

[0054] When the switch receives data from the worker, it modifies the packet header and maps it from the worker–switch connection space to the switch–PS server connection space.

[0055] c) The switch sends the modified data packet directly to the PS server;

[0056] d) Data packet loss, retransmission by the sender worker; the method of determining whether the data packet is lost may be, for example, that there is a timer on the sender, and the data packet that exceeds the time of the timer without receiving an acknowledgement. Will be considered by the sender to have been discarded.

[0057] e) The PS server sends data to the worker Referring to the above process;

[0058] (3) At the end of the training, the worker and the PS server are disconnected with the switch CPU. Among them, because the present application is based on the PS architecture and the PS-lite system, it belongs to a distributed machine learning system. Therefore, the present application is optimized for this distributed machine learning system. The training refers to the neural network model running in this distributed machine learning system. The PS-lite system is a very general framework, which can run all neural network models such as resnet, vgg, etc.

[0059] Specifically, the programmable switch is mainly divided into control plane and data plane, wherein the control plane is mainly composed of the CPU of the switch, and the data plane is composed of the pipeline chip of the switch.

[0060] As shown in Figure 3 In order to reduce the participation of the switch CPU and guarantee the overall forwarding performance of the network, the present application adopts a number control separation design scheme. The control message (such as connection establishment, closing, etc., small amount) is given to the CPU of the switch for processing, and the data message (such as gradient update message, large amount) is directly connected to the pipeline chip of the switch. Mapping, data packet modification and forwarding operations are completed.

[0061] Among them, the control message is sent by the client, and the control message refers to the message used to establish a connection with TCP and retransmit. The data message refers to the message other than the control message. Since such messages generally carry parameter data of a machine learning model, they are called "data messages". Specifically, in the present application, the sender can use the 6-bit reserved field of the TCP header to distinguish between control messages and data messages. Among them, the data message is 0x4, and the control message is 0x6.

[0062] Connection management is performed in the programmable switch pipeline chip, which mainly needs to complete the following two parts, as shown in Figure 4

[0063] ​The first part is the mapping of connection identifier. Connection identifier is the unique mark of a connection, which can be represented by a quintuple. When a packet is sent from one connection (e.g. worker->switch) to another connection (e.g. switch->PS server) in a programmable switch, the connection identifier carried by the packet needs to be changed first. For the mapping of connection identifier, the present application uses the way of issuing flow table to achieve, i.e. the packet matching the corresponding quintuple will execute the action associated with the flow table, thus completing the modification of the quintuple in the packet header.

[0064] Wherein the quintuple refers to IP source address, IP destination address, TCP source port number, TCP destination port number and transport layer protocol number. For a packet sent from a client (worker) to a server (PS), when the sending end (herein the example is the client) sends the packet, the IP source address is the IP of the client, the IP destination address is the IP of the switch, the TCP source port number is the port number of the client, the TCP destination port number is the port number of the switch and the transport layer protocol number is 6. The switch modifies the IP source address to be the IP of the switch, the IP destination address to be the IP of the server, the TCP source port number to be the port number of the switch, the TCP destination port number to be the port number of the server and the transport layer protocol number to be 6. The transport layer protocol number is not modified and is always 6.

[0065] There is a mapping table on the switch, the key ID number of which is the table entry. After the table entry is matched, the value obtained is the IP and port number which need to be modified. In the specific embodiment of the present application, the destination ID in the packet is used to look up the table. The result obtained by looking up the table is the IP and TCP port number of the server, and the quintuple of the packet is modified according to the result of looking up the table according to the above example.

[0066] The other part is the mapping of connection identifier. In connection-oriented reliable transmission, the packet needs to carry part of the state to indicate its position in the entire connection and other information, including sequence number (SEQ) and acknowledgement number (ACK). Therefore, in the connection mapping process, the state of a packet in a certain connection needs to be mapped to its state in another connection, and the state of the connection refers to the current sequence number and acknowledgement number of the TCP connection of the connection, which are constantly accumulated in the network field, so they will become larger over time. Therefore, the present application allocates a 32-bit register for each connection on the programmable switch, which is used to store the current TCP connection sequence number of the connection sent from the switch to the opposite end, to replace the original sequence number in the packet, such as Figure 5If a worker (e.g., worker A) needs to send data to a PS server (e.g., PS X), the switch will read the value of the register (e.g., Seq_spx) that stores the sequence number of the TCP connection from the switch to the PS, and fill the sequence number of the data packet with the value. Then, the switch will update the value of the register to the next available sequence number. Specifically, the TCP connection sequence number stored in the register is updated every time a data packet is sent. The sequence number is the total number of bytes of data sent, so the length of the data packet should be added every time a data packet is sent.

[0067] A data packet sent from the client to the server actually passes through two TCP connections, one from the client to the switch and the other from the switch to the server. Therefore, the sequence number and acknowledgement number of the data packet sent by the client are actually the numbers of the TCP connection from the client to the switch. The present application modifies them to the numbers of the TCP connection from the switch to the server.

[0068] For the end system, whether it is a worker or a PS server, its main task is to send data packets and ensure reliable transmission (i.e., packet loss retransmission). Due to connection aggregation, the PS server logically has only one connection with the switch, so it cannot determine which peer (i.e., worker) needs to be sent when sending data packets. In addition, the traditional packet loss retransmission mechanism is difficult to apply to the existing connection aggregation scenario.

[0069] To this end, the present application customizes the protocol functions based on the LWIP user mode protocol stack, mainly in the following two aspects:

[0070] (1) Extension of the data packet header

[0071] In order to support point-to-point data transmission, it is necessary to specify the specific worker or PS server to be sent in the data packet. Therefore, the present application extends the protocol and reserves a specific bit length in the data packet to specify the ID of the transmission peer.

[0072] (2) Packet loss retransmission

[0073] For the packet loss retransmission mechanism, the present application uses the data sending end to perform packet loss retransmission, and replaces the traditional cumulative ACK mechanism with a packet-by-packet ACK mechanism.

[0074] Specifically, when the end system receives a data packet with TCP packet, it will immediately return an empty ack, then look up the table to determine whether the current received data packet is a duplicate packet, if so, it will be discarded, otherwise, according to the source ID and sequence number of the data packet, it will be reordered, if the current order is correct, the continuous data packet content will be uploaded to the upper layer application. When the end system needs to send a data packet, the protocol stack will read the currently available sequence number and fill it, and fill the source and destination ID according to the transmission target. In the TCP protocol stack, a structure is maintained to record which data packet has received an acknowledgement packet (ack). The order refers to "setting the data packet corresponding to the ack packet to the state of being confirmed".

[0075] Determine whether the current received data packet is a duplicate packet, if so, it will be discarded, otherwise, according to the source ID and sequence number of the data packet, it will be reordered, if the current order is correct, the continuous data packet content will be uploaded to the upper layer application, i.e. distributed machine learning model, or PS architecture application. When the end system needs to send a data packet, the protocol stack will read the currently available sequence number and fill it, and fill the source and destination ID according to the transmission target. The ack packet confirms a certain data packet, confirming that the packet has been received. The order refers to if the current data packet sequence number is less than the confirmed data packet, the current data packet must have been confirmed.

[0076] End-to-end coordination. Because the packet loss process is complex, different packet loss points may cause differences in the processing process, so programmable switches need to be coordinated with end systems. For example Figure 7As shown, when the worker sends data to the PS server, the packet loss point can exist between the worker and the switch or between the switch and the PS server. If the data packet is lost between the worker and the switch, the worker will directly perform packet loss retransmission. If the data packet is lost between the switch and the PS server, the switch needs to analyze the retransmitted data packet, and the local CPU of the switch is responsible for performing packet loss retransmission. At this time, the data packet no longer consumes the connection sequence number between the switch and the PS server, but fills the sequence number between the switch and the PS server allocated to the original lost data packet. Therefore, the application establishes a mapping table in the programmable switch to support the lookup of the corresponding sequence number. Since the number of packet losses in the data center network is small, and in order to save the on-chip storage space of the programmable switch, the application stores the mapping table in the CPU memory of the switch, and designs an aging mechanism, for example, discards the table entries existing in the mapping table for more than a certain time, to optimize the size of the mapping table. The mapping table is not the mapping relationship between the sequence number and the TCP connection. It is a mapping table of the TCP sequence number and the TCP packet. That is, using the TCP sequence number to search, the content of the corresponding TCP packet can be obtained. If it cannot be searched, it means that the packet has not reached the switch.

[0077] The following is a system embodiment corresponding to the above-mentioned method embodiment. The present embodiment can be implemented in cooperation with the above-mentioned embodiments. The related technical details mentioned in the above-mentioned embodiments are still valid in the present embodiment. In order to reduce repetition, they will not be described here. Correspondingly, the related technical details mentioned in the present embodiment can also be applied in the above-mentioned embodiments.

[0078] The application further provides a TCP connection aggregation system based on a hardware programmable switch, which comprises a client, a hardware programmable switch and a server; when the client or the server serves as a sending end and sends a data packet to the server or the client serving as a receiving end, the sending end sends the data packet to the hardware programmable switch through a TCP connection;

[0079] The hardware programmable switch is used for mapping the data packet from the first connection space of the sending end to the hardware programmable switch to the second connection space of the hardware programmable switch to the receiving end by modifying the packet header of the data packet; and the hardware programmable switch sends the data packet with the modified packet header to the receiving end through the TCP connection.

[0080] The hardware programmable switch-based TCP connection aggregation system, wherein the hardware programmable switch comprises a control plane and a data plane, the control plane is composed of a CPU of the hardware programmable switch, and the CPU is used for processing control messages; the data plane is composed of a pipeline chip of the hardware programmable switch, and connection mapping, data packet modification and forwarding operations of data messages are completed on the pipeline chip.

[0081] The hardware programmable switch-based TCP connection aggregation system, wherein the pipeline chip of the hardware programmable switch changes a TCP connection identifier carried by the data packet by means of issuing a flow table, so as to realize mapping of the data packet from the first connection space to the second connection space.

[0082] The hardware programmable switch-based TCP connection aggregation system, wherein the hardware programmable switch allocates a register for each TCP connection, and the register is used for storing a connection sequence number from a sending end to a receiving end of the TCP connection; the hardware programmable switch reads the connection sequence number from the hardware programmable switch to the receiving end in the register, and fills a sequence number of the data packet according to the connection sequence number, and updates a value of the register.

[0083] If the data packet is lost between the sending end and the hardware programmable switch, the sending end performs packet loss retransmission; if the data packet is lost between the hardware programmable switch and the receiving end, the hardware programmable switch performs packet loss retransmission, and analyzes the retransmitted data packet, and fills a sequence number between the hardware programmable switch and the receiving end which is allocated to the original lost data packet.

[0084] A mapping table is established in a CPU memory of the hardware programmable switch, so as to support searching of a corresponding sequence number, and an aging mechanism is used to optimize a size of the mapping table.

[0085] The application further provides a storage medium for storing a program for executing any one of the hardware programmable switch-based TCP connection aggregation methods.

[0086] The application further provides a client for any one of the hardware programmable switch-based TCP connection aggregation systems.

Claims

1. A hardware programmable switch based TCP connection aggregation method, characterized in that, The application relates to a PS-lite system. Step 1: the PS-lite system comprises a client, a hardware programmable switch and a server; when the client or the server serves as a sending terminal and sends a data packet to the server or the client serving as a receiving terminal, the sending terminal sends the data packet to the hardware programmable switch through a TCP connection; Step 2: the hardware programmable switch maps the data packet from a first connection space of the sending terminal to the hardware programmable switch to a second connection space of the hardware programmable switch to the receiving terminal by modifying the packet header of the data packet; and the hardware programmable switch sends the data packet with the modified packet header to the receiving terminal through the TCP connection.

2. The hardware-based programmable switch based TCP connection aggregation method of claim 1, wherein, The hardware programmable switch comprises a control plane and a data plane; the control plane is composed of a CPU of the hardware programmable switch and is used for processing control messages; and the data plane is composed of a pipeline chip of the hardware programmable switch and is used for completing connection mapping, data packet modification and forwarding operations of data messages on the pipeline chip.

3. The hardware-based programmable switch based TCP connection aggregation method of claim 1, wherein, The pipeline chip of the hardware programmable switch changes a TCP connection identifier carried by the data packet in a manner of issuing a flow table to realize the mapping of the data packet from the first connection space to the second connection space.

4. The hardware-based programmable switch based TCP connection aggregation method of claim 1, wherein, The hardware programmable switch allocates a register for each TCP connection to store a connection sequence number of the TCP connection from the sending terminal to the receiving terminal; the hardware programmable switch reads the connection sequence number of the hardware programmable switch to the receiving terminal in the register and fills the sequence number of the data packet according to the connection sequence number and updates the value of the register; If the data packet is lost between the sending terminal and the hardware programmable switch, the sending terminal performs packet loss retransmission; If the data packet is lost between the hardware programmable switch and the receiving terminal, the hardware programmable switch performs packet loss retransmission and analyzes the retransmitted data packet to fill the sequence number allocated by the original lost data packet between the hardware programmable switch and the receiving terminal; A mapping table is established in the CPU memory of the hardware programmable switch to support the searching of corresponding sequence numbers and an aging mechanism is adopted to optimize the size of the mapping table.

5. A hardware programmable switch based TCP connection aggregation system, characterized in that, The application relates to a PS-lite system. The application relates to a PS-lite system.

6. The hardware-based programmable switch-based TCP connection aggregation system of claim 5, wherein, The application relates to a PS-lite system. The application relates to a PS-lite system.

7. The hardware-based programmable switch-based TCP connection aggregation system of claim 5, wherein, The pipeline chip in the hardware programmable switch uses the way of issuing flow table to change the TCP connection identifier carried by the data packet, so as to realize the mapping of the data packet from the first connection space to the second connection space.

8. The hardware-based programmable switch-based TCP connection aggregation system of claim 5, wherein, The hardware programmable switch allocates a register for each TCP connection to store the connection sequence number from the sending end to the receiving end of the TCP connection; the hardware programmable switch reads the connection sequence number from the hardware programmable switch to the receiving end in the register, and fills the sequence number of the data packet with the connection sequence number, and updates the value of the register; If the data packet is lost between the sending end and the hardware programmable switch, the sending end performs packet retransmission; If the data packet is lost between the hardware programmable switch and the receiving end, the hardware programmable switch performs packet retransmission, and analyzes the retransmitted data packet to fill the sequence number allocated by the original lost data packet between the hardware programmable switch and the receiving end; A mapping table is established in the CPU memory of the hardware programmable switch to support the lookup of the corresponding sequence number, and an aging mechanism is used to optimize the size of the mapping table. 9.A storage medium for storing the program of the hardware programmable switch based TCP connection aggregation method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Gradient scheduling method and device based on programmable switch under PS architecture

    CN114900482A

  • Management of non-volatile memory fast nodes

    CN115023930A