Traffic forwarding method and device based on DPU, traffic forwarding and management system

By executing the DPU-based traffic forwarding method in the protocol stack of the data processor DPU, generating and managing traffic mirror data, the problem that the application-level agent cannot perform traffic management during the data forwarding process is solved, and efficient traffic forwarding and management is achieved.

CN119109934BActive Publication Date: 2025-04-04YUSUR TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411236469.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2025-04-04
Estimated Expiration
2044-09-04

AI Technical Summary

Technical Problem

When the prior art reduces the performance overhead problem introduced by the application layer agent, it cannot solve the problem that the application layer agent cannot perform traffic management after the data forwarding process is offloaded to the protocol stack.

Method used

By executing the DPU-based traffic forwarding method in the protocol stack of the data processor DPU, the traffic mirror data and attribute information are generated, and sent to the data cache layer and the application layer agent, the application layer agent manages the fast forwarding traffic, and sends a notification message to the data cache layer after the target traffic data forwarding is completed to determine whether to delete the traffic mirror data.

Benefits of technology

On the basis of improving traffic forwarding efficiency, the application-level agent's comprehensive and reliable management of fast forwarding traffic is realized, avoiding data redundancy and storage resource occupation caused by traffic mirroring data, and further improving the reliability and effectiveness of traffic data forwarding and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119109934B_ABST
    Figure CN119109934B_ABST
Patent Text Reader

Abstract

The present application provides a traffic forwarding method and device based on DPU, a traffic forwarding and management system, the method includes: generating traffic mirror data corresponding to the target traffic data that is currently intercepted and has a fast forwarding path enabled, and sending it to the data cache layer and the application layer proxy respectively, forwarding the target traffic data and sending a notification message to the data cache layer after forwarding, so that the application layer proxy performs traffic management on the traffic mirror data and sends the data control command to the data cache layer, and the data cache layer determines whether to delete the traffic mirror data based on the notification message and the data control command. When the present application unloads the traffic forwarding process to the protocol stack, it can also realize the management of this part of the fast forwarding traffic by the application layer proxy, thereby effectively improving the comprehensiveness and reliability of the traffic management performed by the application layer proxy on the basis of improving the traffic forwarding efficiency, and can effectively avoid data redundancy and large-scale occupation of storage resources caused by traffic mirror data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of traffic forwarding technology, and in particular to a traffic forwarding method and device based on DPU, and a traffic forwarding and management system. Background Art

[0002] The data plane of a service mesh refers to the part of the actual network data traffic managed by the service mesh. The data plane is usually composed of application layer proxies, and common application layer proxies include Envoy, Linkerd, etc. Application layer proxies can perform various functions according to the policies and configurations of the service mesh, such as traffic forwarding, load balancing, fault detection and recovery, traffic encryption, and traffic rate limiting. The essence of the application layer proxy to improve the controllability of the system is that it parses the data at the application layer, thereby obtaining more information to achieve more targeted control. At the same time, this process also increases the burden of data processing, and the direct result is that the communication delay of the traffic data processing process increases, which usually reduces the speed of responding to requests and increases the occupation of device resources.

[0003] At present, in order to reduce the performance overhead caused by the introduction of application layer proxy, the common optimization method is to reduce the forwarding path of network messages and the number of copies, and cooperate with high-performance hardware to accelerate the transmission and processing capabilities of messages, such as: method (1) to accelerate the processing of protocol stacks and drivers, such as using user-mode protocol stacks, protocol function DPU acceleration processing, etc.; method (2) to optimize the application layer proxy processing process, unload the data forwarding process of the application layer proxy to the protocol stack, and the protocol stack performs transparent transmission. However, the focus of method (1) is mainly on the data transmission process of the transport layer, which is a process that is not aware of the application load. Although it can improve the processing capacity within the protocol stack, it cannot solve the overhead and performance degradation caused by the application layer proxy processing data, because in fact most of the delay is consumed in the processing of the application layer proxy. And method (2) is only applicable to specific scenarios, because its data forwarding process is unloaded to the protocol stack, so that the application layer proxy cannot perceive its data, which means that it is impossible to manage and control this part of the traffic, such as it is impossible to implement the speed limit operation for the request.

[0004] Therefore, there is an urgent need to design a traffic forwarding method that can not only solve the problems of overhead and performance degradation caused by application layer proxy processing and forwarding data, but also solve the problem that the application layer proxy cannot perform traffic management after the data forwarding process is offloaded to the protocol stack. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a DPU-based traffic forwarding method and device, and a traffic forwarding and management system to eliminate or improve one or more defects existing in the prior art.

[0006] One aspect of the present application provides a DPU-based traffic forwarding method, which is executed in a protocol stack of a data processor DPU, and includes:

[0007] Generate traffic mirror data and attribute information corresponding to the target traffic data that is currently intercepted and has a fast forwarding path enabled;

[0008] Sending the traffic mirror data and the attribute information to a preset data cache layer for storage; and sending the traffic mirror data to an application layer agent so that the application layer agent performs traffic management on the traffic mirror data and generates a data control command for the traffic mirror data so that the application layer agent sends the data control command to the data cache layer;

[0009] and forwarding the target traffic data to a corresponding destination;

[0010] After the target traffic data is forwarded, a corresponding notification message is sent to the data cache layer, so that the data cache layer determines whether to delete the traffic mirror data locally according to the notification message and the data control command.

[0011] In some embodiments of the present application, before generating the traffic mirror data and attribute information corresponding to the target traffic data that is currently intercepted and has a fast forwarding path enabled, the method further includes:

[0012] Receive flow data and an originating end identifier and a destination end identifier corresponding to the flow data;

[0013] In a state table pre-stored locally and used to store the correspondence between each connection pair and the fast forwarding state, find out whether the connection pair composed of the initiator identifier and the destination identifier of the traffic data is currently in the fast forwarding path open state; if so, determine the traffic data as the target traffic data that is currently intercepted and has the fast forwarding path opened, wherein the connection pair is used to store the correspondence between an initiator identifier and a destination identifier that are currently connected to the application layer proxy respectively.

[0014] In some embodiments of the present application, if the application layer proxy intercepts traffic data sent by an initiator for the first time and establishes a connection with the initiator, a connection is also established with the destination of the traffic data, and then a control policy unit in the application layer proxy generates a connection pair consisting of an initiator identifier corresponding to the initiator and a destination identifier corresponding to the destination, and the control policy unit sends first configuration information containing a correspondence between the connection pair and the fast forwarding path opening state to the protocol stack, and the application layer proxy sends the traffic data to the destination;

[0015] Correspondingly, the DPU-based traffic fast forwarding method further includes:

[0016] Receiving first configuration information sent by the control policy unit in the application layer agent;

[0017] The correspondence between the connection pair in the first configuration information and the fast forwarding path enable state is stored in a local state table.

[0018] In some embodiments of the present application, if the application layer proxy receives a fast forwarding path closing request for any connection pair, second configuration information including a correspondence between the connection pair and the fast forwarding path freezing state is sent to the protocol stack via the control policy unit;

[0019] Correspondingly, the DPU-based traffic fast forwarding method further includes:

[0020] Receiving second configuration information sent by the control policy unit in the application layer agent;

[0021] The state table is updated according to the correspondence between the connection pair in the second configuration information and the fast forwarding path freeze state.

[0022] In some embodiments of the present application, the sending the traffic mirror data to an application layer proxy so that the application layer proxy performs traffic management on the traffic mirror data and generates a data control command for the traffic mirror data so that the application layer proxy sends the data control command to the data cache layer, including:

[0023] The traffic mirror data is sent to a traffic processing unit in an application layer proxy, so that the traffic processing unit performs data processing on the traffic mirror data based on a preset traffic management rule; if the traffic processing unit confirms that the data processing has been completed or detects that at least one of an initiator and a destination corresponding to the traffic mirror data has been disconnected from the application layer proxy, the traffic processing unit generates a first data control command for instructing to discard the traffic mirror data, and sends the first data control command to the data cache layer; if the traffic processing unit confirms that the data processing is not completed, a second data control command for instructing to resend the traffic mirror data is generated, and the second data control command is sent to the data cache layer.

[0024] In some embodiments of the present application, if the data cache layer receives the first data control command, it is determined whether the notification message sent from the protocol stack is currently received, and if the data cache layer has received the notification message, the traffic mirror data is deleted locally; if the notification message is not received, after waiting for a preset unit time, a resending request for the traffic mirror data is sent to the protocol stack;

[0025] If the data cache layer receives the second data control command, resending a request for the traffic mirroring data to the protocol stack;

[0026] Correspondingly, the DPU-based traffic fast forwarding method further includes:

[0027] If a resending request for the traffic mirror data sent by the data cache layer is received, the traffic mirror data is resent to the application layer proxy, so that the application layer proxy re-manages the traffic mirror data.

[0028] Another aspect of the present application provides a DPU-based traffic forwarding device, which is arranged in a protocol stack of a data processor DPU, and comprises: a data routing unit and a data processing unit which are communicatively connected, and the data routing unit and the data processing unit are communicatively connected to a data cache layer and an application layer agent respectively;

[0029] The data routing unit is used to generate traffic mirror data and attribute information corresponding to the target traffic data that is currently intercepted and has a fast forwarding path enabled;

[0030] The data routing unit is further used to send the traffic mirror data and the attribute information to a preset data cache layer for storage; and send the traffic mirror data to an application layer agent so that the application layer agent performs traffic management on the traffic mirror data and generates a data control command for the traffic mirror data so that the application layer agent sends the data control command to the data cache layer;

[0031] The data processing unit is used to forward the target flow data to the corresponding destination end;

[0032] The data processing unit is further configured to send a corresponding notification message to the data cache layer after the target traffic data is forwarded, so that the data cache layer determines whether to delete the traffic mirror data locally according to the notification message and the data control command.

[0033] A third aspect of the present application provides a DPU-based traffic forwarding and management system, comprising: a traffic forwarding device, a data cache layer, and an application layer proxy, which are respectively arranged in the DPU and are communicatively connected to each other;

[0034] The traffic forwarding device is arranged in the protocol stack of the DPU, and the traffic forwarding device is used to execute the traffic forwarding method based on the DPU;

[0035] The traffic forwarding device comprises: a data routing unit and a data processing unit which are communicatively connected, and the data routing unit and the data processing unit are communicatively connected to the data cache layer and the application layer proxy respectively;

[0036] The data routing unit is used to generate traffic mirror data and attribute information corresponding to the target traffic data that is currently intercepted and has a fast forwarding path enabled;

[0037] The data routing unit is further used to send the traffic mirror data and the attribute information to a preset data cache layer for storage; and send the traffic mirror data to an application layer agent so that the application layer agent performs traffic management on the traffic mirror data and generates a data control command for the traffic mirror data so that the application layer agent sends the data control command to the data cache layer;

[0038] The data processing unit is used to forward the target flow data to the corresponding destination end;

[0039] The data processing unit is further configured to send a corresponding notification message to the data cache layer after the target traffic data is forwarded, so that the data cache layer determines whether to delete the traffic mirror data locally according to the notification message and the data control command.

[0040] In some embodiments of the present application, in the DPU-based traffic forwarding and management system, the application layer agent includes: a traffic processing unit and a control strategy unit that are communicatively connected to each other, and the traffic processing unit is communicatively connected to the data cache layer and the data routing unit in the traffic forwarding device respectively; the control strategy unit is communicatively connected to the data processing unit in the traffic forwarding device;

[0041] The traffic processing unit is used to perform data processing on the traffic mirror data sent by the data routing unit in the traffic forwarding device based on a preset traffic management rule. If the traffic processing unit confirms that the data processing has been completed or detects that at least one of the initiator and the destination corresponding to the traffic mirror data has been disconnected from the application layer proxy, the traffic processing unit generates a first data control command for instructing to discard the traffic mirror data, and sends the first data control command to the data cache layer; if the traffic processing unit confirms that the data processing is not completed, it generates a second data control command for instructing to resend the traffic mirror data, and sends the second data control command to the data cache layer;

[0042] The traffic processing unit is also used to establish a connection with the destination end of the traffic data if the traffic data sent by an initiating end is intercepted for the first time and a connection is established with the initiating end;

[0043] The control strategy unit generates a connection pair consisting of an originating end identifier corresponding to an originating end of the flow data and a destination end identifier corresponding to a destination end of the flow data, and sends first configuration information including a correspondence between the connection pair and an opening state of the fast forwarding path to the data processing unit in the protocol stack, and the flow processing unit is used to send the flow data to the destination end;

[0044] The traffic processing unit is also used to send a fast forwarding path closing request to the control policy unit if it receives a fast forwarding path closing request for any connection pair, so that the control policy unit is also used to send a second configuration information containing a corresponding relationship between the connection pair and the fast forwarding path freezing state to the protocol stack.

[0045] In some embodiments of the present application, in the DPU-based traffic forwarding and management system, the data cache layer is used to store the traffic mirror data sent by the traffic forwarding device, and to receive a data control command for the traffic mirror data sent by the traffic processing unit in the application layer agent, wherein the data control command includes the first data control command and the second data control command;

[0046] If the data cache layer receives the first data control command, the data cache layer is further used to determine whether the notification message sent by the data processing unit is currently received, and if the notification message sent from the data processing unit has been received, the traffic mirror data is deleted locally; if the notification message is not received, a resending request for the traffic mirror data is sent to the data processing unit after waiting for a preset unit time;

[0047] If the data cache layer receives the second data control command, the data cache layer is further configured to send a resending request for the traffic mirroring data to the data processing unit.

[0048] The DPU-based traffic forwarding method provided in the present application is executed in the protocol stack of the data processor DPU, by generating traffic mirror data and attribute information corresponding to the target traffic data that is currently intercepted and has a fast forwarding path enabled; sending the traffic mirror data and the attribute information to a preset data cache layer for storage; and sending the traffic mirror data to an application layer agent so that the application layer agent performs traffic management on the traffic mirror data and generates a data control command for the traffic mirror data, so that the application layer agent sends the data control command to the data cache layer; and forwarding the target traffic data to the corresponding destination; sending a corresponding notification message to the data cache layer after the target traffic data is forwarded, so that the data cache layer determines whether to delete the traffic mirror data locally based on the notification message and the data control command, and generates and sends traffic through the protocol stack. The mirror data is given to the application layer agent and the protocol stack directly forwards the target traffic data to the corresponding destination end. When the traffic forwarding process is unloaded to the protocol stack, the application layer agent can also manage this part of the fast forwarding traffic, thereby effectively improving the comprehensiveness and reliability of the traffic management performed by the application layer agent on the basis of improving the traffic forwarding efficiency. At the same time, the protocol stack sends a corresponding notification message to the data cache layer after the target traffic data is forwarded, and the data cache layer determines whether to delete the setting of the traffic mirror data locally based on the notification message and the data control command. It can also improve the traffic forwarding efficiency while realizing the management of this part of the fast forwarding traffic by the application layer agent, and effectively avoid data redundancy and a large amount of storage resources occupied by the traffic mirror data, thereby further improving the reliability and effectiveness of traffic data forwarding and management.

[0049] Additional advantages, purposes, and features of the present application will be partially described in the following description, and will become partially apparent to those skilled in the art after studying the following, or may be learned from the practice of the present application. The purposes and other advantages of the present application can be achieved and obtained by the structures specifically pointed out in the specification and the drawings.

[0050] Those skilled in the art will understand that the purposes and advantages that can be achieved by the present application are not limited to the above specific description, and the above and other purposes that can be achieved by the present application will be more clearly understood based on the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The drawings described herein are used to provide a further understanding of the present application, constitute a part of the present application, and do not constitute a limitation of the present application. The components in the drawings are not drawn to scale, but are only for the purpose of illustrating the principles of the present application. In order to facilitate the illustration and description of some parts of the present application, the corresponding parts in the drawings may be enlarged, that is, they may become larger relative to other components in the exemplary device actually manufactured according to the present application. In the drawings:

[0052] Figure 1 The following is a schematic diagram showing an example of application layer proxy application.

[0053] Figure 2 This is a first flow chart of a DPU-based traffic forwarding method in an embodiment of the present application.

[0054] Figure 3 A schematic diagram of the execution framework of a DPU-based traffic forwarding method in one embodiment of the present application.

[0055] Figure 4 A schematic diagram of the setting relationship between a DPU-based traffic forwarding device and a DPU in one embodiment of the present application.

[0056] Figure 5 This is a second flow chart of a DPU-based traffic forwarding method in an embodiment of the present application.

[0057] Figure 6 It is a structural diagram of a DPU-based traffic forwarding device in one embodiment of the present application.

[0058] Figure 7 This is a schematic diagram of the data processing architecture of a DPU-based traffic forwarding device in an example of the present application.

[0059] Figure 8 This is a structural diagram of a DPU-based traffic forwarding and management system in one embodiment of the present application.

[0060] Fig. 9 This is a schematic diagram of the data processing architecture of an application layer proxy in an example of the present application.

[0061] Fig.10 This is a schematic diagram of the data processing architecture of the data cache layer in an example of the present application.

[0062] Fig.11 A schematic diagram of the data processing architecture of an asynchronous flow control method of an application layer proxy in an application example of the present application. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the implementation modes and the accompanying drawings. Here, the illustrative implementation modes and descriptions of the present application are used to explain the present application, but are not intended to limit the present application.

[0064] It should also be noted here that in order to avoid obscuring the present application due to unnecessary details, only the structures and / or processing steps closely related to the scheme according to the present application are shown in the accompanying drawings, while other details that are not very relevant to the present application are omitted.

[0065] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.

[0066] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.

[0067] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0068] The data plane of the service mesh includes functions such as communication, traffic routing, load balancing, and fault recovery between microservices managed by the service mesh. The service mesh uses the data plane to control and manage the communication between microservices to ensure the security, reliability, and efficiency of network communication. The data plane is usually composed of application layer proxies. Common application layer proxies include Envoy and Linkerd. Envoy is an open source edge and service proxy for cloud native applications. Linkerd is an open source project that provides elastic cloud native application service mesh (service mesh). These application layer proxies are often deployed on the host where the microservices are located to intercept and process all network traffic in and out of the microservices. The proxy can perform various functions according to the policy and configuration of the service mesh, such as traffic forwarding, load balancing, fault detection and recovery, traffic encryption, and traffic rate limiting.

[0069] In order to reduce the resource usage of the host, a service grid based on the data processor DPU has emerged. Figure 1 The DPU-based service grid is centralized. All services under a node share the same data plane and do not occupy host resources. At the same time, the DPU transfers the protocol stack from kernel state to user state through kernel bypass. The overhead caused by memory copy and message forwarding path can improve the data plane forwarding efficiency and reduce forwarding delay.

[0070] However, traditional proxy acceleration solutions cannot take into account latency, cost, and application-layer traffic management. Since the message is directly transmitted at the bottom layer, the application-layer proxy program does not actually receive the business message, and cannot parse the accelerated business message for data statistics, traffic management, and other functions. In many scenarios, especially in service grid scenarios, the application-layer proxy program needs to parse the business message to complete routing control, load balancing, speed limit fuse, log information collection, and other functions.

[0071] In other words, application layer proxy is an important technology for building large-scale cloud computing applications. It realizes the management and control of application traffic to ensure the stable operation of the system. Currently, when using application layer proxy, all request messages need to complete the process of protocol parsing, traffic control, and protocol encapsulation when passing through the proxy. This process leads to a decrease in data transmission performance and increases the consumption of host resources.

[0072] Although existing solutions have proposed solutions to offload the traffic forwarding process to the protocol stack, such solutions cannot implement the management of this part of fast forwarding traffic by the application layer proxy and can only be used in specific application scenarios.

[0073] Based on this, in order to solve the problems of overhead and performance degradation caused by the application layer proxy processing and forwarding data, and to solve the problem that the application layer proxy cannot perform traffic management after the data forwarding process is offloaded to the protocol stack, the embodiments of the present application respectively provide a DPU-based traffic forwarding method, a DPU-based traffic forwarding device for executing the DPU-based traffic forwarding method, and a DPU-based traffic forwarding and management system, which can ensure that after the data forwarding is unloaded, the application layer proxy can still manage this part of the traffic and shorten the production cycle time.

[0074] The details are described in detail through the following examples.

[0075] Based on this, the embodiment of the present application provides a DPU-based traffic forwarding method that can be implemented by a DPU-based traffic forwarding device in the protocol stack of the data processor DPU, see Figure 2 and Figure 3 The DPU-based traffic forwarding method specifically includes the following contents:

[0076] Step 100: Generate traffic mirror data and attribute information corresponding to the target traffic data that is currently intercepted and has a fast forwarding path enabled.

[0077] It is understandable that a data processing unit (DPU) is a dedicated processor designed to handle data traffic and network functions in a data center, thereby reducing the load on the host CPU and optimizing overall performance. The DPU integrates multiple high-performance cores, a network interface controller (NIC), a memory controller, and hardware accelerators, and is able to efficiently process network packets, store data, encryption and decryption operations, and other data plane tasks.

[0078] In one or more embodiments of the present application, the traffic data refers to a data processing request with forwarding requirements, such as a GET request for HTTP (Hypertext Transfer Protocol), which can be in the form of a message. That is, an initiator wants to send a data processing request to a destination. The DPU protocol stack in the DPU-based traffic fast forwarding method provided in the embodiment of the present application directly intercepts the data processing request, and then determines whether the connection pair composed of the initiator and the destination specified by the data processing request currently has a fast forwarding path enabled. If so, the data processing request is determined as the current target traffic data and step 100 is executed; if not, the data processing request is sent as the original traffic data to the application layer proxy for non-accelerated normal forwarding processing.

[0079] That is to say, in the traffic data forwarding method provided in the present application, it is actually an asynchronous traffic forwarding control method, in which a part of the traffic data without the fast forwarding path is used as the original traffic data to be normally forwarded by the service layer proxy, and another part of the traffic data with the fast forwarding path turned on is used as the target traffic data to be directly forwarded by the protocol stack to achieve acceleration. It can be understood that if the connection pairs corresponding to all the traffic data in a certain time period have the fast forwarding path turned on, then these traffic data are all used as the target traffic data to be directly forwarded by the protocol stack to achieve acceleration.

[0080] The message corresponding to the data processing request can read the initiator identifier of the initiator and the destination identifier of the destination corresponding to the data processing request, such as an IP address, etc. In one example, the initiator may be a client device, and the destination may be a server.

[0081] It can be understood that the attribute information is used to represent some attributes of the target traffic data. In one example, the attribute information may include information segments consisting of header information of each layer of the parsed message, application layer data length, and protocol status.

[0082] Step 200: Send the traffic mirror data and the attribute information to a preset data cache layer for storage; and send the traffic mirror data to an application layer agent so that the application layer agent performs traffic management on the traffic mirror data and generates a data control command for the traffic mirror data, so that the application layer agent sends the data control command to the data cache layer.

[0083] It can be understood that the data control command sent by the application layer proxy to the data buffer layer can be a command for instructing the data buffer layer to discard the traffic mirror data, or a command instructing the data buffer layer to resend the traffic mirror data. Therefore, in the subsequent step 400, one of the determining factors for whether the data cache layer locally deletes the traffic mirror data is the content indicated by the data control command it receives.

[0084] Step 300: Forward the target traffic data to the corresponding destination.

[0085] Step 400: After the target traffic data is forwarded, a corresponding notification message is sent to the data cache layer, so that the data cache layer determines whether to delete the traffic mirror data locally according to the notification message and the data control command.

[0086] In step 100 and step 200, by generating and sending the traffic mirror data to the application layer proxy, and by directly forwarding the target traffic data to the corresponding destination end by the protocol stack in step 300, when the traffic forwarding process is unloaded to the protocol stack, the application layer proxy can also manage this part of the fast forwarding traffic, thereby improving the traffic forwarding efficiency and effectively improving the comprehensiveness and reliability of the traffic management performed by the application layer proxy; at the same time, by sending the corresponding notification message to the data cache layer after the forwarding of the target traffic data is completed through the protocol stack in step 400, and the data cache layer determines whether to delete the setting of the traffic mirror data locally according to the notification message and the data control command, it is possible to improve the traffic forwarding efficiency while realizing the management of this part of the fast forwarding traffic by the application layer proxy, effectively avoiding data redundancy and a large amount of storage resources caused by the traffic mirror data, thereby further improving the reliability and effectiveness of traffic data forwarding and management.

[0087] In one or more embodiments of the present application, the DPU-based fast traffic forwarding method is executed in the protocol stack of the data processor DPU, and can be specifically implemented by a traffic forwarding device provided in the protocol stack, which plays the role of a data forwarding module in the present application. The protocol stack specifically refers to a user-mode protocol stack.

[0088] For the corresponding Figure 4 , the application layer proxy and the data cache layer are respectively connected to the traffic forwarding device in communication, and the application layer proxy and the data cache layer are also connected in communication, the traffic forwarding device is set in the protocol stack of the DPU, and the DPU can also be provided with a network processor, so that the traffic forwarding device in the protocol stack intercepts the original traffic data from the network processor and forwards the target traffic data to the corresponding destination; the DPU is a dedicated processor with data as the center, which is connected to the host (server) through the PCIe interface. The user's business service is deployed on the host, and the application layer proxy (i.e., the data plane (agent program)) and the protocol stack run on the DPU. The traffic forwarding device in this article is implemented in the protocol stack, and the data cache layer therein can also be in the protocol stack process. .

[0089] In one or more embodiments of the present application, the role of the application layer proxy is a control module, which can be referred to as a proxy; the data cache layer can be implemented using a socket layer. Figure 3 After the acceleration function is turned on, the execution framework of the DPU-based traffic forwarding method is an asynchronous proxy traffic control architecture, in which the application layer proxy acts as a control layer to perform traffic control, information statistics and other functions through the mirrored request information. The traffic control of the application layer proxy is essentially achieved by issuing various control commands to the data cache layer and the data forwarding layer. The data caching function implemented in the data cache layer is to temporarily store the data that has not been processed by the application layer proxy but has been sent through the data forwarding layer, and then process the cached data according to the control commands of the application layer proxy. The data forwarding layer implemented in the protocol stack is responsible for forwarding data according to various control information issued by the proxy, and at the same time, it needs to mirror all traffic directly forwarded by itself to the proxy and data cache.

[0090] From the above description, it can be seen that the DPU-based traffic forwarding method provided in the embodiment of the present application generates and sends traffic mirror data to the application layer proxy through the protocol stack, and the protocol stack directly forwards the target traffic data to the corresponding destination. When the traffic forwarding process is unloaded to the protocol stack, the application layer proxy can also manage this part of the fast forwarding traffic, thereby improving the traffic forwarding efficiency and effectively improving the comprehensiveness and reliability of the traffic management performed by the application layer proxy; at the same time, the protocol stack sends a corresponding notification message to the data cache layer after the target traffic data is forwarded, and the data cache layer determines whether to delete the setting of the traffic mirror data locally according to the notification message and the data control command. It can also improve the traffic forwarding efficiency while realizing the management of this part of the fast forwarding traffic by the application layer proxy. On the basis of this, it can effectively avoid data redundancy and a large amount of storage resources caused by traffic mirror data, thereby further improving the reliability and effectiveness of traffic data forwarding and management.

[0091] In order to determine whether the fast forwarding path is enabled according to the state table, so as to further improve the effectiveness and reliability of DPU-based traffic forwarding, in a DPU-based traffic forwarding method provided in an embodiment of the present application, see Figure 5 , the DPU-based traffic forwarding method further includes the following contents before step 100:

[0092] Step 010: receiving original traffic data and an originating end identifier and a destination end identifier corresponding to the original traffic data;

[0093] Step 020: From a state table pre-stored locally and used to store the correspondence between each connection pair and the fast forwarding state, search whether the connection pair consisting of the initiator identifier and the destination identifier of the original traffic data is currently in the fast forwarding path open state; if so, determine the original traffic data as the target traffic data that is currently intercepted and has the fast forwarding path opened, wherein the connection pair is used to store the correspondence between an initiator identifier and a destination identifier that are currently connected to the application layer proxy respectively.

[0094] It is understandable that if the DPU-based traffic forwarding device in the protocol stack does not find the connection pair consisting of the initiator identifier and the destination identifier of the original traffic data in the state table in the protocol stack, or although the connection pair consisting of the initiator identifier and the destination identifier of the original traffic data is found, but the fast forwarding state corresponding to the connection pair is a non-open state such as a fast forwarding path frozen state, then the protocol stack does not forward the original traffic data, but sends it to the application layer agent for normal forwarding processing. Among them, the fast forwarding path frozen state refers to: usually the control layer and the data forwarding layer need to synchronize the state of data processing information. At this time, the fast path cannot forward data, which may cause some requests to not be fully forwarded through the fast path.

[0095] In order to store the correspondence between the connection pair and the fast forwarding path opening state in a local state table to further improve the effectiveness and reliability of DPU-based traffic forwarding, in a DPU-based traffic forwarding method provided in an embodiment of the present application, if the application layer agent intercepts original traffic data sent by an initiator for the first time and establishes a connection with the initiator, a connection is also established with the destination of the original traffic data, and then a connection pair consisting of an initiator identifier corresponding to the initiator and a destination identifier corresponding to the destination is generated via a control policy unit in the application layer agent, and the control policy unit sends first configuration information containing the correspondence between the connection pair and the fast forwarding path opening state to the protocol stack, and the application layer agent sends the original traffic data to the destination;

[0096] For the corresponding Figure 5 , before step 100 or before and after other steps in the DPU-based traffic forwarding method, the following contents may be specifically included:

[0097] Step 001: Receive first configuration information sent by the control policy unit in the application layer agent.

[0098] Step 002: Store the correspondence between the connection pair in the first configuration information and the fast forwarding path enable state in a local state table.

[0099] In order to further improve the flexibility, effectiveness and reliability of DPU-based traffic forwarding, in a DPU-based traffic forwarding method provided in an embodiment of the present application, if the application layer proxy receives a fast forwarding path closing request for any connection pair, the control policy unit sends second configuration information including a correspondence between the connection pair and the fast forwarding path freezing state to the protocol stack;

[0100] For the corresponding Figure 5 , before step 100 or before and after other steps in the DPU-based traffic forwarding method, the following contents may be specifically included:

[0101] Step 003: Receive second configuration information sent by the control policy unit in the application layer agent.

[0102] Step 004: Update the state table according to the correspondence between the connection pair in the second configuration information and the fast forwarding path freeze state.

[0103] In order to further improve the effectiveness and reliability of the application layer proxy in managing the traffic mirror data, in a DPU-based traffic forwarding method provided in an embodiment of the present application, see Figure 5 , step 200 in the DPU-based traffic forwarding method specifically includes the following contents:

[0104] Step 210: Send the traffic mirror data to the traffic processing unit in the application layer proxy, so that the traffic processing unit processes the traffic mirror data based on the preset traffic management rules. If the traffic processing unit confirms that the data processing has been completed or detects that at least one of the initiator and the destination corresponding to the traffic mirror data has been disconnected from the application layer proxy, the traffic processing unit generates a first data control command for instructing to discard the traffic mirror data, and sends the first data control command to the data cache layer; if the traffic processing unit confirms that the data processing is not completed, it generates a second data control command for instructing to resend the traffic mirror data, and sends the second data control command to the data cache layer.

[0105] In order to further improve the effectiveness and reliability of the application layer proxy in performing traffic management on the traffic mirror data, in a DPU-based traffic forwarding method provided in an embodiment of the present application, if the data cache layer receives the first data control command, it is determined whether the notification message sent from the protocol stack is currently received, and if the data cache layer has received the notification message, the traffic mirror data is deleted locally; if the notification message is not received, a resending request for the traffic mirror data is sent to the protocol stack after waiting for a preset unit time; if the data cache layer receives the second data control command, a resending request for the traffic mirror data is sent to the protocol stack;

[0106] For the corresponding Figure 5 , the DPU-based traffic forwarding method further specifically includes the following contents after step 400:

[0107] Step 500: If a resending request for the traffic mirror data is received from the data cache layer, the traffic mirror data is resent to the application layer proxy so that the application layer proxy re-manages the traffic mirror data.

[0108] The present application also provides a DPU-based traffic forwarding device for executing all or part of the DPU-based traffic forwarding method, see Figure 6 The traffic forwarding device is arranged in the protocol stack of the data processor DPU, and the traffic forwarding device comprises: a data routing unit 10 and a data processing unit 20 which are communicatively connected, and the data routing unit and the data processing unit are communicatively connected with the data cache layer and the application layer agent respectively; the traffic forwarding device based on the DPU specifically comprises the following contents:

[0109] The data routing unit 10 is used to generate traffic mirror data and attribute information corresponding to the target traffic data that is currently intercepted and has a fast forwarding path enabled;

[0110] The data routing unit 10 is also used to send the traffic mirror data and the attribute information to a preset data cache layer for storage; and send the traffic mirror data to an application layer agent so that the application layer agent performs traffic management on the traffic mirror data and generates a data control command for the traffic mirror data so that the application layer agent sends the data control command to the data cache layer;

[0111] The data processing unit 20 is used to forward the target flow data to the corresponding destination end;

[0112] The data processing unit 20 is further configured to send a corresponding notification message to the data cache layer after the target traffic data is forwarded, so that the data cache layer determines whether to delete the traffic mirror data locally according to the notification message and the data control command.

[0113] The embodiment of the DPU-based traffic forwarding device provided in the present application can be specifically used to execute the processing flow of the embodiment of the DPU-based traffic forwarding method in the above-mentioned embodiment. Its functions are not repeated here. The detailed description of the above-mentioned DPU-based traffic forwarding method embodiment can be referred to. Specifically, the data routing unit 10 is used to execute the aforementioned steps 100, 200, 010, 020, 210 and 500, respectively, to resend the traffic mirror data to the application layer agent so that the application layer agent re-manages the traffic mirror data; the data processing unit 20 is used to execute the aforementioned steps 300, 400, 001, 002, 003, 004 and 500, respectively, to receive the content of the resending request for the traffic mirror data sent by the data cache layer.

[0114] From the above description, it can be seen that the DPU-based traffic forwarding device provided in the embodiment of the present application generates and sends traffic mirror data to the application layer proxy through the protocol stack, and the protocol stack directly forwards the target traffic data to the corresponding destination end. When the traffic forwarding process is unloaded to the protocol stack, the application layer proxy can also manage this part of the fast forwarding traffic, thereby improving the traffic forwarding efficiency and effectively improving the comprehensiveness and reliability of the traffic management performed by the application layer proxy; at the same time, the protocol stack sends a corresponding notification message to the data cache layer after the target traffic data is forwarded, and the data cache layer determines whether to delete the setting of the traffic mirror data locally according to the notification message and the data control command. It can also improve the traffic forwarding efficiency while realizing the management of this part of the fast forwarding traffic by the application layer proxy. On the basis of this, it can effectively avoid data redundancy and a large amount of storage resources caused by traffic mirror data, thereby further improving the reliability and effectiveness of traffic data forwarding and management.

[0115] In an example of the DPU-based traffic forwarding device, see Figure 7 The DPU-based traffic forwarding device acts as a data forwarding layer, which forwards and processes data according to the state table composed of connection information. First, all data is received by the data routing unit, and then there are three types of processing according to the connection status information:

[0116] (1) If the state table is configured to enable the fast forwarding function for the upstream connection and the downstream connection (hereinafter referred to as the connection pair), the current traffic data is directly transmitted to the data processing unit through the data routing unit, and the data packet is modified and sent to the upstream node (such as the server). At the same time, all the fast forwarded traffic is mirrored and the traffic mirror data is sent to the application layer proxy for control processing.

[0117] (2) If the connection pair in the state table is in a frozen state, the data processing unit of the protocol stack will notify the data cache layer to release the memory of the corresponding traffic after sending, and send the newly received data information containing the offset information of the data packet to the data cache layer to notify that this part of the data has not been sent. For example, if you want to close the fast path, the connection pair will first enter the frozen state. At this time, the data processing unit of the protocol stack will not forward the traffic. The traffic is mirrored to the upper application layer proxy and will still exist in the cache. When the application layer proxy has processed this critical point traffic, it will still not forward it to the backend, but will notify the data cache layer to send the cached traffic after entering the frozen state to the backend. Only then will the connection pair / fast path be actually closed. All subsequent traffic will be proxied to the backend by the application layer proxy application layer.

[0118] (3) If the connection pair in the state table is in a closed state or does not exist, that is, the connection pair currently corresponds to a frozen fast forwarding path, the traffic mirroring data is directly sent to the application layer proxy for normal forwarding processing.

[0119] Based on the DPU-based traffic forwarding method and / or DPU-based traffic forwarding device provided in the above embodiments, the present application also provides an embodiment of a DPU-based traffic forwarding and management system, see Figure 8 The DPU-based traffic forwarding and management system specifically includes the following contents:

[0120] The traffic forwarding device, data cache layer and application layer proxy are respectively arranged in the DPU and are communicatively connected with each other.

[0121] The traffic forwarding device is arranged in the protocol stack of the DPU, and the traffic forwarding device is used to execute the DPU-based traffic forwarding method provided in the aforementioned embodiment.

[0122] The traffic forwarding device includes: a data routing unit 10 and a data processing unit 20 which are communicatively connected, and the data routing unit 10 and the data processing unit 20 are communicatively connected to the data cache layer and the application layer proxy respectively.

[0123] The data routing unit 10 is used to generate traffic mirror data and attribute information corresponding to the target traffic data that is currently intercepted and has a fast forwarding path enabled.

[0124] The data routing unit 10 is also used to send the traffic mirror data and the attribute information to a preset data cache layer for storage; and send the traffic mirror data to an application layer agent so that the application layer agent performs traffic management on the traffic mirror data and generates a data control command for the traffic mirror data, so that the application layer agent sends the data control command to the data cache layer.

[0125] The data processing unit 20 is used to forward the target traffic data to a corresponding destination.

[0126] The data processing unit 20 is further configured to send a corresponding notification message to the data cache layer after the target traffic data is forwarded, so that the data cache layer determines whether to delete the traffic mirror data locally according to the notification message and the data control command.

[0127] In one embodiment of a DPU-based traffic forwarding and management system, see Figure 8 The application layer proxy in the DPU-based traffic forwarding and management system specifically includes the following contents:

[0128] A traffic processing unit 30 and a control strategy unit 40 are communicatively connected to each other, and the traffic processing unit 30 is communicatively connected to the data cache layer and the data routing unit 10 in the traffic forwarding device respectively; the control strategy unit 40 is communicatively connected to the data processing unit 20 in the traffic forwarding device;

[0129] The traffic processing unit 30 is used to perform data processing on the traffic mirror data sent by the data routing unit 10 in the traffic forwarding device based on a preset traffic management rule. If the traffic processing unit 30 confirms that the data processing has been completed or detects that at least one of the initiator and the destination corresponding to the traffic mirror data has been disconnected from the application layer proxy, the traffic processing unit 30 generates a first data control command for instructing to discard the traffic mirror data, and sends the first data control command to the data cache layer; if the traffic processing unit 30 confirms that the data processing is not completed, it generates a second data control command for instructing to resend the traffic mirror data, and sends the second data control command to the data cache layer;

[0130] The traffic processing unit 30 is also used to establish a connection with the destination end of the original traffic data if the original traffic data sent by an initiating end is intercepted for the first time and a connection is established with the initiating end;

[0131] The control strategy unit 40 generates a connection pair consisting of an originating end identifier corresponding to the originating end of the original traffic data and a destination end identifier corresponding to the destination end of the original traffic data, and sends first configuration information including a correspondence between the connection pair and the fast forwarding path opening state to the data processing unit 20 in the protocol stack, and the traffic processing unit 30 is used to send the original traffic data to the destination end;

[0132] The traffic processing unit 30 is also used to send a fast forwarding path closing request to the control policy unit 40 if it receives a fast forwarding path closing request for any connection pair, so that the control policy unit 40 is also used to send a second configuration information containing a correspondence between the connection pair and the fast forwarding path freezing state to the protocol stack.

[0133] In one example of the application layer proxy, see Fig. 9 , the application layer proxy acts as a control layer, and processes the request after the downstream establishes a connection with the application layer proxy. The application layer proxy includes two core units, a traffic processing unit and a control policy unit. Among them, the traffic processing unit parses and processes the received mirror request, including protocol parsing, traffic statistics and other functions; then sends control information to the data cache layer based on the parsing result of the request and the current connection status between itself and the front and back ends. If the application layer proxy believes that the request is processed normally or has been disconnected from either party of the request, it sends a command to the data cache layer to discard the data. If the application layer proxy believes that the request needs to be resent, it sends a resending control command to the data cache layer.

[0134] The control policy unit mainly performs flow control, and sends configuration information to the data forwarding layer to control the switch of the fast path. If it is the first time to receive the request, the application layer proxy establishes a connection with the upstream and sends the connection-related information to the forwarding plane to enable the fast forwarding function; if the upstream and downstream connections have been established, the control policy unit performs flow control based on the flow information. Flow control combined with specific control strategies requires sending corresponding control information and control instructions to the data forwarding layer for processing.

[0135] In one embodiment of a DPU-based traffic forwarding and management system, see Figure 8 , the data cache layer in the DPU-based traffic forwarding and management system is used to store the traffic mirror data sent by the traffic forwarding device, and to receive a data control command for the traffic mirror data sent by the traffic processing unit 30 in the application layer agent, wherein the data control command includes the first data control command and the second data control command;

[0136] If the data cache layer receives the first data control command, the data cache layer is further used to determine whether the notification message sent by the data processing unit 20 is currently received, and if the notification message sent from the data processing unit 20 has been received, the traffic mirror data is deleted locally; if the notification message is not received, after waiting for a preset unit time, a resending request for the traffic mirror data is sent to the data processing unit 20;

[0137] If the data cache layer receives the second data control command, the data cache layer is further configured to send a resending request for the traffic mirroring data to the data processing unit 20 .

[0138] In one example of the data cache layer, see Fig.10 The core capability of the data cache layer is to cache all data that has been sent through the data forwarding layer but not processed by the application layer proxy. When the data processing unit determines that the current traffic is on a fast forwarding path, the data routing unit in the protocol stack generates traffic mirror data for the traffic data and sends it to the data cache layer and the application layer proxy. The unit copies all mirrored traffic to the specified cache area. The cached data is processed according to the commands issued by the application layer proxy and the data information of the data forwarding layer. The specific processing involves three different operations:

[0139] (1) If the application layer proxy issues a command to discard the request and the data forwarding layer has forwarded the data (the data processing unit notifies the cache layer whether the traffic has been sent), then clear the cached data;

[0140] (2) If the data forwarding layer does not send out the request information completely, the cached traffic mirror data will be resent after the application layer proxy processes the traffic mirror;

[0141] (3) If the application layer proxy changes the upstream connection object, the request message that has been forwarded through the data plane needs to be resent using the cached data.

[0142] In order to further illustrate the above embodiment, the present application also provides a specific application example of an asynchronous flow control method for an application layer proxy using a DPU-based flow forwarding and management system, see Fig.11 In this application example, suppose the client needs to access a certain service, and the traffic is obtained by the application layer proxy. The client actually establishes a connection with the application layer proxy, which is called connect1. The client continues to send the requested data, such as a get (GET) request for HTTP; the application layer proxy receives and parses the request data, performs backend routing, and establishes a connection with the actual server, which is called connect2. After connect2 is successfully established, the application layer proxy sends the connection pair information (connect1, connect2) to the protocol stack, and sends the first request to the server normally. Subsequent new requests sent by the client and responses from the server will go through the following process:

[0143] (1) New traffic data arrives at the data routing unit of the protocol stack; the unit mirrors a copy of the same traffic data, namely, traffic mirror data.

[0144] (2) The connection pair information in the state table is queried to determine whether the fast path has been enabled, and the traffic mirror data is forwarded to the data processing unit. The protocol stack directly transparently transmits the request message to the client or server.

[0145] (3) The traffic mirror data and the corresponding data information are cached in the data cache layer; at the same time, the data cache layer records whether the part of the original traffic data has been sent by the data processing unit according to the notification message of whether the data sending is successful sent by the data processing unit, wherein the attribute information may include: information segments composed of the header information of each layer of the parsed message, the application layer data length, the protocol status, etc.

[0146] (4) After receiving the traffic mirror data, the application layer proxy performs data processing, including application layer data parsing, rate limiting and fuse breaking, log information collection, etc. After the data processing is completed, a control command is sent to the data cache layer to release the cached traffic mirror data.

[0147] (5) The application layer proxy sends configuration information based on the parsed data information (i.e., the information of the seven-layer service parsed by the application layer proxy or the data plane, such as the information in the body of the http message) and the control policy to change the switch of the fast path.

[0148] (6) The data cache unit processes the cached traffic mirror data according to the recorded traffic mirror data, data information and control commands issued by the application layer proxy; if the application layer proxy issues a resending instruction or the data information shows that the original traffic data is not forwarded through the fast path, the data cache unit resends the cached request to the data processing unit in the protocol stack.

[0149] That is to say, the application instance provided by this application ensures that the application layer proxy can manage this part of the traffic while keeping the application layer proxy data forwarding process unloaded. This application instance mirrors the unloaded accelerated traffic to the application layer proxy. In order to solve the performance bottleneck problem caused by large-scale mirrored traffic, this application instance proposes a diversion mechanism. Based on the layered processing architecture, the application layer proxy adds and deletes rules to the protocol stack through control instructions, and only sends the specific traffic mirroring that needs to be processed to the application layer proxy. In the process of traffic mirroring, data loss or delay may occur, resulting in incomplete or incorrect data processed by the application layer proxy; this application instance proposes a data caching mechanism. These cached data are retransmitted according to the commands issued by the application layer proxy and the forwarding status of the protocol stack, as well as life cycle management, so as to ensure the consistency of the mirrored traffic.

[0150] To summarize, the DPU-based traffic forwarding method, DPU-based traffic forwarding device, DPU-based traffic forwarding and management system, and asynchronous traffic control method of application layer agent provided in the present application provide a set of transparent transmission mechanisms within the protocol stack, which can transparently transmit messages in the forward direction as well as messages in the reverse direction, thereby reducing the latency of the application layer agent process; providing a data caching mechanism to ensure the integrity and correctness of asynchronous traffic management data transmission; while transparently transmitting messages in the protocol stack, introducing a traffic mirroring mechanism to ensure that the traffic being accelerated can also be perceived and managed by the application layer agent.

[0151] That is to say, the DPU-based traffic forwarding method, DPU-based traffic forwarding device, DPU-based traffic forwarding and management system, and application layer proxy asynchronous traffic control method provided by the present application realize traffic control of the application layer proxy through asynchronous processing while realizing data accelerated forwarding. The core solutions solved by this design include mirrored traffic and traffic cache. The former sends the traffic mirror after fast forwarding to the application layer proxy to ensure that the application layer proxy can control the traffic after fast forwarding. The latter is based on the mirroring technology by temporarily retaining the forwarded data, thereby solving the problem of the integrity and correctness of the request transmission of the application layer proxy when the asynchronous state of traffic control and traffic forwarding is inconsistent. The design of this application is a set of asynchronous interaction mechanisms, and there are not too many restrictions on the forwarding method for data traffic. In theory, it can be implemented at any layer of the network protocol stack, and it can also be implemented in hardware. According to the design of this application, traffic can realize traffic management without entering the application layer proxy to realize forwarding. Traffic is sent to the application layer proxy in a mirrored manner, which can make up for the disadvantage that the accelerated traffic cannot be controlled by the application layer proxy. Finally, through the cache mechanism, the correctness and reliability of asynchronous traffic management can be guaranteed.

[0152] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is specifically performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.

[0153] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0154] In the present application, features described and / or illustrated for one embodiment may be used in the same manner or in a similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.

[0155] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the embodiments of the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A traffic forwarding method based on DPU, characterized in that: The method is executed in a protocol stack of a data processor DPU, and the method comprises: Generate traffic mirror data and attribute information corresponding to the target traffic data that is currently intercepted and has a fast forwarding path enabled; Sending the traffic mirror data and the attribute information to a preset data cache layer for storage; and sending the traffic mirror data to an application layer agent so that the application layer agent performs traffic management on the traffic mirror data and generates a data control command for the traffic mirror data so that the application layer agent sends the data control command to the data cache layer; and forwarding the target traffic data to a corresponding destination; After the target traffic data is forwarded, a corresponding notification message is sent to the data cache layer, so that the data cache layer determines whether to delete the traffic mirror data locally according to the notification message and the data control command.

2. The DPU-based traffic forwarding method according to claim 1, characterized in that: Before generating the traffic mirror data and attribute information corresponding to the target traffic data currently intercepted and with the fast forwarding path enabled, the method further includes: Receive flow data and an originating end identifier and a destination end identifier corresponding to the flow data; In a state table pre-stored locally and used to store the correspondence between each connection pair and the fast forwarding state, find out whether the connection pair composed of the initiator identifier and the destination identifier of the traffic data is currently in the fast forwarding path open state; if so, determine the traffic data as the target traffic data that is currently intercepted and has the fast forwarding path opened, wherein the connection pair is used to store the correspondence between an initiator identifier and a destination identifier that are currently connected to the application layer proxy respectively.

3. The DPU-based traffic forwarding method according to claim 2, characterized in that: If the application layer proxy intercepts traffic data sent by an initiator for the first time and establishes a connection with the initiator, a connection is also established with the destination of the traffic data, and then a connection pair consisting of an initiator identifier corresponding to the initiator and a destination identifier corresponding to the destination is generated by the control policy unit in the application layer proxy, and the control policy unit sends first configuration information containing a correspondence between the connection pair and the fast forwarding path opening state to the protocol stack, and the application layer proxy sends the traffic data to the destination; Correspondingly, the DPU-based traffic fast forwarding method further includes: Receiving first configuration information sent by the control policy unit in the application layer agent; The correspondence between the connection pair in the first configuration information and the fast forwarding path enable state is stored in a local state table.

4. The DPU-based traffic forwarding method according to claim 3, characterized in that: If the application layer proxy receives a fast forwarding path closing request for any connection pair, the second configuration information including the corresponding relationship between the connection pair and the fast forwarding path freezing state is sent to the protocol stack via the control policy unit; Correspondingly, the DPU-based traffic fast forwarding method further includes: Receiving second configuration information sent by the control policy unit in the application layer agent; The state table is updated according to the correspondence between the connection pair in the second configuration information and the fast forwarding path freeze state.

5. The DPU-based traffic forwarding method according to claim 1, characterized in that: The sending of the traffic mirror data to an application layer proxy so that the application layer proxy performs traffic management on the traffic mirror data and generates a data control command for the traffic mirror data so that the application layer proxy sends the data control command to the data cache layer, including: The traffic mirror data is sent to a traffic processing unit in an application layer proxy, so that the traffic processing unit performs data processing on the traffic mirror data based on a preset traffic management rule; if the traffic processing unit confirms that the data processing has been completed or detects that at least one of an initiator and a destination corresponding to the traffic mirror data has been disconnected from the application layer proxy, the traffic processing unit generates a first data control command for instructing to discard the traffic mirror data, and sends the first data control command to the data cache layer; if the traffic processing unit confirms that the data processing is not completed, a second data control command for instructing to resend the traffic mirror data is generated, and the second data control command is sent to the data cache layer.

6. The DPU-based traffic forwarding method according to claim 5, characterized in that: If the data cache layer receives the first data control command, determining whether the notification message sent from the protocol stack is currently received, and if the data cache layer has received the notification message, deleting the traffic mirror data locally; If the notification message is not received, after waiting for a preset unit time, a resending request for the traffic mirror data is sent to the protocol stack; If the data cache layer receives the second data control command, resending a request for the traffic mirroring data to the protocol stack; Correspondingly, the DPU-based traffic fast forwarding method further includes: If a resending request for the traffic mirror data sent by the data cache layer is received, the traffic mirror data is resent to the application layer proxy, so that the application layer proxy re-manages the traffic mirror data.

7. A traffic forwarding device based on DPU, characterized in that: The traffic forwarding device is arranged in the protocol stack of the data processor DPU, and the traffic forwarding device comprises: a data routing unit and a data processing unit which are communicatively connected, and the data routing unit and the data processing unit are communicatively connected with the data cache layer and the application layer agent respectively; The data routing unit is used to generate traffic mirror data and attribute information corresponding to the target traffic data that is currently intercepted and has a fast forwarding path enabled; The data routing unit is further used to send the traffic mirror data and the attribute information to a preset data cache layer for storage; and send the traffic mirror data to an application layer agent so that the application layer agent performs traffic management on the traffic mirror data and generates a data control command for the traffic mirror data so that the application layer agent sends the data control command to the data cache layer; The data processing unit is used to forward the target flow data to the corresponding destination end; The data processing unit is further configured to send a corresponding notification message to the data cache layer after the target traffic data is forwarded, so that the data cache layer determines whether to delete the traffic mirror data locally according to the notification message and the data control command.

8. A traffic forwarding and management system based on DPU, characterized in that: include: Traffic forwarding devices, data cache layers, and application layer agents are respectively arranged in the DPU and are communicatively connected to each other; The traffic forwarding device is arranged in the protocol stack of the DPU, and the traffic forwarding device is used to execute the traffic forwarding method based on the DPU according to any one of claims 1 to 6; The traffic forwarding device comprises: a data routing unit and a data processing unit which are communicatively connected, and the data routing unit and the data processing unit are communicatively connected to the data cache layer and the application layer proxy respectively; The data routing unit is used to generate traffic mirror data and attribute information corresponding to the target traffic data that is currently intercepted and has a fast forwarding path enabled; The data routing unit is further used to send the traffic mirror data and the attribute information to a preset data cache layer for storage; and send the traffic mirror data to an application layer agent so that the application layer agent performs traffic management on the traffic mirror data and generates a data control command for the traffic mirror data so that the application layer agent sends the data control command to the data cache layer; The data processing unit is used to forward the target flow data to the corresponding destination end; The data processing unit is further configured to send a corresponding notification message to the data cache layer after the target traffic data is forwarded, so that the data cache layer determines whether to delete the traffic mirror data locally according to the notification message and the data control command.

9. The DPU-based traffic forwarding and management system according to claim 8, characterized in that: The application layer proxy includes: a traffic processing unit and a control strategy unit that are communicatively connected to each other, and the traffic processing unit is communicatively connected to the data cache layer and the data routing unit in the traffic forwarding device respectively; the control strategy unit is communicatively connected to the data processing unit in the traffic forwarding device; The traffic processing unit is used to perform data processing on the traffic mirror data sent by the data routing unit in the traffic forwarding device based on a preset traffic management rule. If the traffic processing unit confirms that the data processing has been completed or detects that at least one of the initiator and the destination corresponding to the traffic mirror data has been disconnected from the application layer proxy, the traffic processing unit generates a first data control command for instructing to discard the traffic mirror data, and sends the first data control command to the data cache layer; if the traffic processing unit confirms that the data processing is not completed, it generates a second data control command for instructing to resend the traffic mirror data, and sends the second data control command to the data cache layer; The traffic processing unit is also used to establish a connection with the destination end of the traffic data if the traffic data sent by an initiating end is intercepted for the first time and a connection is established with the initiating end; The control strategy unit generates a connection pair consisting of an originating end identifier corresponding to an originating end of the flow data and a destination end identifier corresponding to a destination end of the flow data, and sends first configuration information including a correspondence between the connection pair and an opening state of the fast forwarding path to the data processing unit in the protocol stack, and the flow processing unit is used to send the flow data to the destination end; The traffic processing unit is also used to send a fast forwarding path closing request to the control policy unit if it receives a fast forwarding path closing request for any connection pair, so that the control policy unit is also used to send a second configuration information containing a corresponding relationship between the connection pair and the fast forwarding path freezing state to the protocol stack.

10. The DPU-based traffic forwarding and management system according to claim 9, characterized in that: The data cache layer is used to store the traffic mirror data sent by the traffic forwarding device, and to receive a data control command for the traffic mirror data sent by the traffic processing unit in the application layer proxy, wherein the data control command includes the first data control command and the second data control command; If the data cache layer receives the first data control command, the data cache layer is further used to determine whether the notification message sent by the data processing unit is currently received, and if the notification message sent from the data processing unit has been received, the traffic mirror data is deleted locally; if the notification message is not received, a resending request for the traffic mirror data is sent to the data processing unit after waiting for a preset unit time; If the data cache layer receives the second data control command, the data cache layer is further configured to send a resending request for the traffic mirroring data to the data processing unit.

Citation Information

Patent Citations

  • Method and device for unloading service network according to service

    CN117176819A

  • Methods, systems, and computer readable media for exposing data processing unit (DPU) traffic in a smartswitch

    US11853254B1