Dpu device and network packet replication system for implementing network packet replication

By using the message lookup and copying module in the DPU device to parse and copy network messages, the problem of CPU computing power loss during message copying is solved, and the effective computing power utilization of the CPU is improved.

CN116708264BActive Publication Date: 2026-05-29CORE YUNSHENG (HANGZHOU) ELECTRONIC TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CORE YUNSHENG (HANGZHOU) ELECTRONIC TECH CO LTD
Filing Date
2023-05-10
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, CPUs consume valuable computing resources when copying and distributing network packets, which affects the performance of actual business processing.

Method used

The message lookup processing module in the DPU device parses the message and determines the replication information according to the rule table. The message replication module performs message replication, and the second message transmission module sends the replicated message to different service processing modules on the CPU or the target host to realize network message replication.

Benefits of technology

This reduces the CPU's computational resource consumption in message copying, improves the effective utilization of CPU computing power, and enhances overall processing performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116708264B_ABST
    Figure CN116708264B_ABST
Patent Text Reader

Abstract

The DPU device and the network message replication system for realizing network message replication of the present application, by first pre-assigning the information needing to be replicated by the control service on the CPU to the DPU device through the control message, the DPU device receives the message from the link or the CPU and performs the analysis processing and the lookup table item, and then judges the number of copies of the message and obtains the exit and the encapsulation information of the replicated message, and further realizes the network message replication. The present application utilizes the DPU device to flexibly process the message, realizes the message replication function, and the CPU does not need to waste the calculation resource for the message replication, and the saved calculation resource can be used for processing the actual service, greatly improves the effective calculation power utilization rate of the CPU.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing, and in particular to a DPU device and a network packet replication system for implementing network packet replication. Background Technology

[0002] A Data Processing Unit (DPU), also known as a data processor, is a hot topic in the current chip industry. It can work in conjunction with CPUs and GPUs, becoming one of the three pillars of data centers. While CPUs handle general-purpose computing tasks and GPUs accelerate data processing, DPUs perform fundamental data processing. As the volume of data and network bandwidth in data centers continue to increase, many basic data processing tasks consume significant CPU computing power. By using DPUs to perform basic processing on incoming data—for example, offloading network, storage, security, and virtualization tasks from the CPU—CPU utilization can be effectively improved, and overall power consumption reduced.

[0003] In some application scenarios, multiple different application layer services on the CPU each require a copy of the original link traffic, or an application layer service needs to send the same message to multiple targets. The traditional approach is to perform message copying and distribution on the application layer services on the CPU. This results in the CPU's effective computing power being lost in the message copying function, weakening the actual business processing capability.

[0004] For example, traditional message duplication methods, such as Figure 1 As shown, the network interface card (NIC) receives packets and sends them to the host CPU for packet replication. The application layer services on the CPU then send multiple copies of the replicated packets to the network interface. The specific process is described as follows: The NIC receives packets from the link, and the packets enter the NIC chip for processing; the NIC chip sends the packets to the CPU through the PCIe interconnect interface; the replication and distribution service module on the CPU receives the packets sent by the NIC, replicates the packets, and then distributes the replicated packets to different service processing software modules; if the application layer service packets on the CPU need to be sent to multiple different target hosts, the application layer service sends the packets to the replication and distribution service module; the replication and distribution module on the CPU receives the packets delivered by the application layer service, replicates the packets, and then sends the replicated packets to the NIC; after receiving the packets sent by the host, the NIC sends the packets out through the network interface.

[0005] In the above process, the network interface card (NIC) is only responsible for forwarding network packets. For multiple different services each requiring a copy of the original link traffic, or for an application layer service needing to send the same packet to multiple targets, packet copying and distribution can only be handled by a software module on the CPU. This packet copying and distribution module on the CPU consumes valuable computing resources, impacting the actual processing performance of the service. Summary of the Invention

[0006] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide a DPU device for implementing network packet replication, so as to solve the above-mentioned technical problems in the prior art.

[0007] To achieve the above and other related objectives, the present invention provides a DPU device for implementing network packet replication, comprising: a first packet transmission module, a packet lookup processing module, a packet replication module, and a second packet transmission module; wherein, the first packet transmission module is connected to both the packet lookup processing module and the packet replication module, the packet lookup processing module is connected to both the packet replication module and the second packet transmission module; the packet replication module is connected to the second packet transmission module; control information from the CPU device is written into a rule table by the packet lookup processing module; packets received from the link by the first packet transmission module are stored, and the packets are parsed by the packet lookup processing module. The message replication information is determined according to the rule table, and a corresponding message replication command is sent to the message replication module. The message replication module performs message replication based on the message replication command, and the replicated message is sent to the CPU device through the second message transmission module for distribution to different service processing modules on the CPU device. The second message transmission module receives the message sent by the CPU device, and the message lookup processing module parses the message, determines the message replication information according to the rule table, and sends a corresponding message replication command to the message replication module. The message replication module performs message replication based on the message replication command, and the replicated message is sent to different target hosts through the second message transmission module.

[0008] In one embodiment of the present invention, the first message transmission module includes: a message receiving and storage unit connected to the message lookup processing module, configured to receive messages from the link, store the message data of the messages in the message storage space of the DPU device, and send the messages to the message lookup processing module; and a message sending unit connected to the message copying module, configured to send the messages copied by the message copying module to different target hosts.

[0009] In one embodiment of the present invention, the message lookup processing module is used to parse the message, look up the multicast forwarding table according to the specified message feature fields in the rule table, determine the number of copies of the message to be copied and the output target according to the lookup results, and send the generated message copying command to the message copying module.

[0010] In one embodiment of the present invention, the method of sending the generated message replication command to the message replication module includes: sending a number of message multicast instructions corresponding to the number of copies to the message replication module; wherein, the message multicast instruction corresponding to copying a portion other than the last copy is a transmit-without-release instruction, used to instruct the message data stored in the message storage space of the DPU device to be read but not to release the corresponding message storage space; the message multicast instruction corresponding to copying the last copy is a transmit-and-release instruction, used to instruct the message data stored in the message storage space of the DPU device to be read and the corresponding message storage space to be released.

[0011] In one embodiment of the present invention, the message replication module is used to, upon receiving a message multicast instruction, initiate a corresponding read-not-release control instruction or read-and-release control instruction to the packet storage engine of the DPU device via a command bus, so that the packet storage engine can find the corresponding message data from the message storage space, send the corresponding message data to the message replication module via a data transmission bus, and, after the packet storage engine transmits the complete message, release or not release the corresponding message storage space according to the read-not-release control instruction or the read-and-release control instruction.

[0012] In one embodiment of the present invention, the message copying module is used to send the corresponding message data to the first message transmission module or the second message transmission module whenever complete message data is obtained from the message storage space.

[0013] In one embodiment of the present invention, the message replication module is used to notify the message lookup processing module to continue transmitting the next message multicast instruction after successfully sending a complete message data through a signal message.

[0014] In one embodiment of the present invention, the second message transmission module includes: a message uploading unit, configured to upload the message copied by the message lookup processing module to different service processing modules of the CPU device; and a message sending unit, configured to receive the message sent by the CPU device and send it to the message lookup processing module.

[0015] In one embodiment of the present invention, the second message transmission module is a PCIe processing unit.

[0016] To achieve the above and other related objectives, this invention provides a network packet replication system based on a DPU, comprising: a CPU device, including a control service module, multiple service processing modules, and an application layer service module; and a DPU device, communicatively connected to the CPU device, including a first packet transmission module, a packet lookup processing module, a packet replication module, and a second packet transmission module; wherein the first packet transmission module is connected to both the packet lookup processing module and the packet replication module, and the packet lookup processing module is connected to both the packet replication module and the second packet transmission module; the packet replication module is connected to the second packet transmission module; the packet lookup processing module writes control information issued by the control service module of the CPU device into a rule table; and the first packet transmission module receives packets from the link and stores them. The system receives corresponding message data and parses the message through the message lookup table processing module. Based on the rule table, it determines message replication information and sends a corresponding message replication command to the message replication module. The message replication module replicates the message based on the replication command and sends the replicated message to the CPU device via the second message transmission module for distribution to different service processing modules on the CPU device. The system also receives messages from application layer service modules of the CPU device via the second message transmission module, parses the message through the message lookup table processing module, determines message replication information based on the rule table, and sends a corresponding message replication command to the message replication module. The message replication module replicates the message based on the replication command and sends the replicated message to different target hosts via the second message transmission module.

[0017] As described above, the DPU device and network packet replication system of the present invention have the following beneficial effects: The present invention first sends the information to be replicated to the DPU device via control messages from the CPU's control services. The DPU device then receives the packets from the link or CPU, performs parsing and table lookup, determines the number of copies to be made, and obtains the output and encapsulation information of the replicated packets, thereby realizing network packet replication. The present invention utilizes the DPU device to flexibly process packets and realize packet replication, and the CPU does not need to waste computing resources on packet replication. The saved computing resources can be used to process actual business, greatly improving the effective utilization rate of CPU computing power. Attached Figure Description

[0018] Figure 1 This is a schematic diagram illustrating a traditional network packet copying method.

[0019] Figure 2 The diagram shows an implementation environment of a DPU device for network packet replication according to an embodiment of the present invention.

[0020] Figure 3 The diagram shows an implementation environment of a DPU device for network packet replication according to an embodiment of the present invention.

[0021] Figure 4 The diagram shown is a structural schematic of a DPU-based network packet replication system according to an embodiment of the present invention.

[0022] Figure 5 The diagram shown is a structural schematic of a DPU-based network packet replication system according to an embodiment of the present invention.

[0023] Figure 6 The diagram shown illustrates the structure of a DPU-based network packet replication system applied in one embodiment of the present invention. Detailed Implementation

[0024] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.

[0025] It should be noted that in the following description, reference is made to the accompanying drawings, which illustrate several embodiments of the invention. It should be understood that other embodiments may also be used, and changes in mechanical composition, structure, electrical system, and operation may be made without departing from the spirit and scope of the invention. The following detailed description should not be considered limiting, and the scope of the embodiments of the invention is defined only by the claims of the published patents. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. Spatially related terms, such as “upper,” “lower,” “left,” “right,” “below,” “below,” “lower part,” “above,” “upper part,” etc., may be used herein to illustrate the relationship between one element or feature shown in the figures and another element or feature.

[0026] Throughout this specification, when it is said that a part is "connected" to another part, this includes not only "direct connection" but also "indirect connection" by placing other elements in between. Furthermore, when it is said that a part "includes" a certain constituent element, unless otherwise stated otherwise, this does not exclude other constituent elements, but rather means that other constituent elements may also be included.

[0027] The terms "first," "second," and "third," etc., used herein are for the purpose of describing various parts, components, regions, layers, and / or segments, but are not limiting. These terms are used only to distinguish one part, component, region, layer, or segment from others. Therefore, the "first part," "component," "region," "layer," or "segment" described below may refer to a "second part," "component," "region," "layer," or "segment" without departing from the scope of this invention.

[0028] Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of the stated feature, operation, element, component, item, kind, and / or group, but do not preclude the presence, occurrence, or addition of one or more other features, operations, elements, components, items, kinds, and / or groups. The terms “or” and “and / or” as used herein are interpreted as inclusive, or mean any one or any combination thereof. Thus, “A, B, or C” or “A, B, and / or C” means “any one of: A; B; C; A and B; A and C; B and C; A, B, and C.” Exceptions to this definition arise only when combinations of elements, functions, or operations are inherently mutually exclusive in some manner.

[0029] The DPU can be used as a dedicated processing chip on the network card, serving as the data entry and exit point for the host's external interactions. It plays a crucial role in offloading and processing packets, and can perform basic data processing for the data input or output by the CPU.

[0030] This invention provides a DPU device for implementing network packet replication. First, the control services on the CPU pre-send the information to be replicated to the DPU device via control messages. The DPU device then receives the packets from the link or CPU, parses and processes them, looks up entries in a table, determines the number of copies needed, and obtains the output and encapsulation information of the replicated packets, thereby achieving network packet replication. This invention utilizes the DPU device to flexibly process packets and implement packet replication, without wasting CPU computing resources on packet replication. The saved computing resources can be used to process actual business operations, greatly improving the effective utilization rate of CPU computing power.

[0031] The present invention will now be described in detail with reference to the accompanying drawings, so that those skilled in the art can readily implement it. The present invention can be embodied in many different forms and is not limited to the embodiments described herein.

[0032] like Figure 2 The diagram illustrates the implementation environment of the DPU device for network packet replication in this embodiment of the invention.

[0033] The DPU device includes:

[0034] The first message transmission module 1, the message lookup processing module 2, the message copying module 3, and the second message transmission module 4;

[0035] The first message transmission module 1 is connected to the message lookup processing module 2 and the message copying module 3 respectively; the message lookup processing module 2 is connected to the message copying module 1 and the second message transmission module 4; and the message copying module 3 is connected to the second message transmission module 4.

[0036] Methods of using DPU devices for network packet replication include:

[0037] The control information from the CPU device is written into the rule table through the message lookup processing module 1; specifically, the control information includes the characteristics of the message to be copied, the number of copies of the message to be copied, and the output target of the copied message. Preferably, the characteristics of the message to be copied, the number of copies of the message to be copied, and the target of the copied message to be forwarded are pre-sent to the DPU through control messages via the control service on the CPU.

[0038] The first message transmission module 1 receives messages from the link and stores the corresponding message data;

[0039] The message is parsed by the message lookup processing module 2, and the message copying information is determined according to the rule table. The corresponding message copying command is then sent to the message copying module 3.

[0040] The message copying module 3 performs message copying based on the message copying command, and the copied message is sent to the CPU device through the second message transmission module 4 for distribution to different service processing modules on the CPU device.

[0041] The second message transmission module 4 receives messages sent by the CPU device.

[0042] The message lookup processing module 2 parses the message, determines the message copying information according to the rule table, and sends the corresponding message copying command to the message copying module 3.

[0043] The message copying module 3 performs message copying based on the message copying command, and the copied message is sent to different target hosts through the second message transmission module 3.

[0044] It should be noted that the first message transmission module and the second message transmission module can be a single device or two separate devices, depending on the requirements.

[0045] In one embodiment, such as Figure 3 As shown, the first message transmission module 1 includes:

[0046] The message receiving and storage unit 101 is connected to the message lookup processing module 2, and is used to receive messages from the link, store the actual message data of the message in the message storage space of the DPU device, and send the message to the message lookup processing module.

[0047] The message sending unit 102 is connected to the message copying module 3 and is used to send the messages copied by the message copying module to different target hosts.

[0048] In one embodiment, the message lookup processing module 2 parses the message, searches the multicast forwarding table according to the specified message feature fields in the rule table, determines the number of copies of the message to be copied and the output target based on the lookup result, and sends the generated message copying command to the message copying module 3. Specifically, the message lookup processing module 2 parses the message, searches the multicast forwarding table according to the specified message feature fields, matches a multicast forwarding table entry, determines whether to execute a multicast forwarding action based on the lookup result, further determines the number of copies of the message to be copied and the output target, and sends the generated message copying command to the message copying module 3.

[0049] Specifically, when the message lookup processing module 2 receives a message from the first message transmission module 1, it parses the message from the link, looks up the multicast forwarding table according to the specified message feature fields in the rule table, determines the number of copies and output target of the message based on the lookup result, and sends the generated message copying command to the message copying module 3.

[0050] When the message lookup processing module 2 receives a message from the second message transmission module 4, it parses the message sent by the CPU device, looks up the multicast forwarding table according to the specified message feature fields in the rule table, determines the number of copies and output target of the message based on the lookup result, and sends the generated message copying command to the message copying module 3.

[0051] In one embodiment, the message lookup processing module 2 sends the generated message copying command to the message copying module 3 in the following manner:

[0052] Send a message multicast command to the message replication module 3 for the number of copies required;

[0053] Among them, the message multicast instruction corresponding to copying the message that is not the last message is a transmission without release instruction, which is used to indicate that the message data stored in the message storage space of the DPU device should be read but the corresponding message storage space should not be released.

[0054] The message multicast instruction corresponding to the last message is a transmit and release instruction, which is used to instruct the reading of message data stored in the message storage space of the DPU device and the release of the corresponding message storage space.

[0055] For example, for a message that requires N multicast forwarding actions, the message lookup processing module 2 sends N multicast commands to the message replication module 3. The first N-1 commands initiate transmission without releasing the command; this command instructs that message data be read but message storage space not be released. The Nth and final command initiates transmission and release, instructing that message data be read and message storage space be released.

[0056] In one embodiment, such as Figure 3 As shown, the message replication module 3, upon receiving a message multicast command, initiates a corresponding read-not-release control command or read-and-release control command to the packet storage engine 5 of the DPU device via the command bus. This allows the packet storage engine 5 to locate the corresponding message data from the message storage space, transmit the corresponding message data to the message replication module 2 via the data transmission bus, and, after the packet storage engine 5 transmits the complete message, release or not release the corresponding message storage space according to the read-not-release control command or the read-and-release control command.

[0057] In one embodiment, each time the message copying module 2 retrieves complete message data from the message storage space, it sends the corresponding message data to the first message transmission module 1 or the second message transmission module 4. Specifically, when the message being processed is a message from a link, the corresponding message data is sent to the second message transmission module 4, and then uploaded to the CPU device; if the message being processed is a message issued by the CPU device, the corresponding message data is sent to the first message transmission module 1, and then sent to multiple different target hosts.

[0058] In one embodiment, the message copying module 3 is used to notify the message lookup processing module 2 to continue transmitting the next message multicast command after successfully sending a complete message data through a signal message.

[0059] In one embodiment, such as Figure 3 As shown, the second message transmission module includes:

[0060] The message uploading unit 401 is used to upload the message copied by the message lookup processing module to different service processing modules of the CPU device.

[0061] The message sending unit 402 is used to receive messages sent by the CPU device and send them to the message lookup processing module 2.

[0062] In one embodiment, the first message transmission module is a network interface.

[0063] In one embodiment, the second message transmission module is a PCIe processing unit.

[0064] like Figure 4 This invention presents a schematic diagram of a network packet replication system based on a DPU according to an embodiment of the present invention.

[0065] The system includes: a CPU device 00 and a DPU device 01 that can implement the functions of the DPU device in the above embodiments;

[0066] CPU device 00 includes: control service module 01, multiple service processing modules 02 and application layer service module 03;

[0067] DPU device 01, communicatively connected to CPU device 00, includes: a first message transmission module 1, a message lookup processing module 2, a message copying module 3, and a second message transmission module 4; wherein, the first message transmission module 1 is connected to both the message lookup processing module 2 and the message copying module 3, the message lookup processing module 2 is connected to both the message copying module 3 and the second message transmission module 4; and the message copying module 2 is connected to the second message transmission module 4.

[0068] The message lookup processing module 2 writes the control information issued by the control service module 01 from the CPU device 00 into the rule table; the first message transmission module 1 receives messages from the link and stores the corresponding message data, and the message lookup processing module 2 parses the messages, determines message replication information according to the rule table, and sends the corresponding message replication command to the message replication module 3; the message replication module 3 performs message replication based on the message replication command, and sends the replicated messages to the CPU device through the second message transmission module 4 for distribution to different service processing modules 02 on the CPU device; the second message transmission module 4 receives messages issued by the application layer service module 03 of the CPU device, and the message lookup processing module 2 parses the messages, determines message replication information according to the rule table, and sends the corresponding message replication command to the message replication module 3; the message replication module 3 performs message replication based on the message replication command, and sends the replicated messages to different target hosts through the second message transmission module 4.

[0069] In one embodiment, the first message transmission module 1 includes: a message receiving and storage unit connected to the message lookup processing module, used to receive messages from the link, store the message data of the messages in the message storage space of the DPU device, and send the messages to the message lookup processing module; and a message sending unit connected to the message copying module, used to send the messages copied by the message copying module to different target hosts.

[0070] In one embodiment, the message lookup processing module 2 is used to parse the message, look up the multicast forwarding table according to the specified message feature fields in the rule table, determine the number of copies of the message to be copied and the output target based on the lookup results, and send the generated message copying command to the message copying module 3.

[0071] In one embodiment, sending the generated message replication command to the message replication module 3 includes: sending a number of message multicast instructions corresponding to the number of copies; wherein, the message multicast instruction corresponding to copying a non-last copy is a transmit-without-release instruction, used to instruct the message data stored in the message storage space of the DPU device to be read but not to release the corresponding message storage space; the message multicast instruction corresponding to copying the last copy is a transmit-and-release instruction, used to instruct the message data stored in the message storage space of the DPU device to be read and the corresponding message storage space to be released.

[0072] In one embodiment, the message replication module 3, upon receiving a message multicast instruction, initiates a corresponding read-not-release control instruction or read-and-release control instruction to the packet storage engine of the DPU device via the command bus. This allows the packet storage engine to locate the corresponding message data from the message storage space, transmit the corresponding message data to the message replication module via the data transmission bus, and, after the packet storage engine transmits the complete message, release or not release the corresponding message storage space according to the read-not-release control instruction or the read-and-release control instruction.

[0073] In one embodiment, the message copying module 3 is used to send the corresponding message data to the first message transmission module 1 or the second message transmission module 4 whenever complete message data is obtained from the message storage space.

[0074] In one embodiment, the message copying module 3 is used to notify the message lookup processing module 2 to continue transmitting the next message multicast command after successfully sending a complete message data through a signal message.

[0075] In one embodiment, the second message transmission module 4 includes: a message uploading unit, used to upload the message copied by the message lookup processing module 2 to different service processing modules 02 of the CPU device; and a message sending unit, used to receive the message sent by the application layer service module 03 of the CPU device and send it to the message lookup processing module 2.

[0076] In one embodiment, the second message transmission module 4 is a PCIe processing unit.

[0077] To better illustrate the DPU-based network packet replication system described above, the present invention provides the following specific embodiments.

[0078] Example 1: A network packet replication system based on DPU. Figure 5 This is a schematic diagram of the structure of a DPU-based network packet replication system.

[0079] The system includes a CPU and a DPU; wherein the DPU includes a message receiving and storage module, a message lookup processing module, a message copying module, a message uploading module, a message downloading module, and a message sending module.

[0080] The DPU-based network packet replication method of the DPU-based network packet replication system includes:

[0081] 1. Control services on the CPU send control messages to the DPU, and the DPU receives the control messages from the CPU and writes them into the rule table in the message lookup processing module;

[0082] 2. The message enters the DPU, and the message receiving and storage module receives the link message and stores it in the memory resources on the DPU;

[0083] 3. The message enters the table lookup processing module on the DPU, which determines the number of copies of the message to be copied and the output destination based on the table lookup results;

[0084] 4. The message enters the message copying module on the DPU, which performs message copying to achieve one copy for storage and multiple copies for output;

[0085] 5. The message enters the message uploading module of the DPU, which uploads the copied message to the CPU;

[0086] 6. The copied messages are distributed to different business processing modules on the CPU;

[0087] 7. Application layer services on the CPU send multicast packets to the network card;

[0088] 8. The message delivery module on the DPU receives messages sent by the CPU and sends the messages to the message lookup processing module. The lookup results determine the number of copies of the message and the output target.

[0089] 9. The message enters the message copying module on the DPU, which performs message copying to achieve one copy for storage and multiple copies for output;

[0090] 10. After copying the message, the message copying module sends it to the message sending module of the DPU;

[0091] 11. The message sending module on the DPU sends messages to multiple different target hosts.

[0092] The method for network packet replication based on DPU in this embodiment fully leverages the DPU's basic data processing capabilities to replicate and forward packets, offloading the CPU's packet replication and forwarding functions to the DPU. This can greatly improve the effective utilization of CPU computing power and reduce overall power consumption.

[0093] Example 2: A network packet copying method based on DPU.

[0094] Applied to a DPU-based network packet replication system; Figure 6 A schematic diagram of the structure of a DPU-based network packet replication system to which this method is applied. The method includes:

[0095] Step 1: The service control software module on the CPU sends the control message for message replication to the DPU, and the DPU receives the message and forms a table entry;

[0096] Step 2: The message enters the DPU from the network interface, and the network interface unit receives the message and stores the actual message data in the message storage space;

[0097] Step 3: The packet processing engine in the DPU parses the packets and searches the multicast forwarding table according to the specified packet characteristic fields. If a multicast forwarding table entry is found, the multicast forwarding action is determined based on the table lookup result.

[0098] Step 4: For a packet requiring N multicast forwarding actions, the packet processing engine sends N multicast commands to the traffic management unit. The first N-1 commands send a transmit-don't-free command, instructing the reader to read the packet data but not release the packet storage space. The Nth and final command sends a transmit-and-free command, instructing the reader to read the packet data and release the packet storage space.

[0099] Step 5: After receiving the packet multicast instruction from the packet processing engine, the traffic management unit sends a "read without release" or "read and release" control command to the packet storage engine in the packet storage space via the command bus.

[0100] Step 6: After receiving the control command from the traffic management unit, the packet storage engine finds the corresponding packet data in the packet buffer and sends the buffer data of the specified packet to the traffic management unit through the data transmission bus. After the packet storage engine has completely transmitted the packet to the traffic management unit, it releases the packet storage space according to the control command.

[0101] Step 7: After the traffic management unit obtains the complete packet data from the packet storage space, it sends the packet to the PCIe processing unit;

[0102] Step 8: After the traffic management unit successfully sends the entire packet data, it notifies the packet processing engine to continue multicasting the next packet through a signal message. For the last packet, the packet processing engine will send a transmission and release control command.

[0103] Step 9: The PCIe processing unit sends the multicast packets to different software services in the CPU, thus ending the packet multicast sending process.

[0104] Step 10: For the CPU multicast delivery process, the PCIe processing unit receives the message delivered from the CPU, and then, as in steps 2 to 8, stores the actual data of the message in the message storage space, enters the packet engine for processing, and then passes through the traffic management module before being sent to the network interface module.

[0105] Step 11: The network interface module sends the message out from the network port.

[0106] In summary, the DPU device and network packet replication system of this invention implement network packet replication by first sending the information to be replicated to the DPU device via control messages from the CPU. The DPU device then receives the packets from the link or CPU, parses and processes them, looks up entries in the table, determines how many copies of the packet need to be replicated, and obtains the output and encapsulation information of the replicated packet, thereby realizing network packet replication. This invention utilizes the DPU device to flexibly process packets and realize packet replication, and the CPU does not need to waste computing resources on packet replication. The saved computing resources can be used to process actual business, greatly improving the effective utilization rate of CPU computing power. Therefore, this invention effectively overcomes the various shortcomings of the prior art and has high industrial application value.

[0107] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A DPU device for implementing network packet replication, characterized in that, include: The system comprises a first message transmission module, a message lookup processing module, a message copying module, and a second message transmission module; The first message transmission module is connected to both the message lookup processing module and the message copying module; the message lookup processing module is connected to both the message copying module and the second message transmission module; and the message copying module is connected to the second message transmission module. The message lookup processing module writes control information from the CPU device into a rule table; the first message transmission module receives messages from the link and stores the corresponding message data, parses the messages through the message lookup processing module, determines message replication information according to the rule table, and sends a corresponding message replication command to the message replication module; the message replication module replicates the messages based on the message replication command, and sends the replicated messages to the CPU device through the second message transmission module for distribution to different service processing modules on the CPU device; the second message transmission module receives messages sent by the CPU device, parses the messages through the message lookup processing module, determines message replication information according to the rule table, and sends a corresponding message replication command to the message replication module. The message copying module performs message copying based on the message copying command, and the copied messages are sent to different target hosts through the second message transmission module.

2. The DPU device for implementing network packet replication according to claim 1, characterized in that, The first message transmission module includes: The message receiving and storage unit is connected to the message lookup processing module. It is used to receive messages from the link, store the message data of the message in the message storage space of the DPU device, and send the message to the message lookup processing module. The message sending unit is connected to the message copying module and is used to send the messages copied by the message copying module to different target hosts.

3. The DPU device for implementing network packet replication according to claim 1, characterized in that, The message lookup processing module is used to parse the message, look up the multicast forwarding table according to the specified message feature fields in the rule table, determine the number of copies of the message to be copied and the output target based on the lookup results, and send the generated message copying command to the message copying module.

4. The DPU device for implementing network packet replication according to claim 3, characterized in that, The ways to send the generated message replication command to the message replication module include: Send a message multicast command to the message replication module for the number of copies required; Among them, the message multicast instruction that copies the message that is not the last one is a transmission without release instruction, which is used to indicate that message data stored in the message storage space of the DPU device should be read but the corresponding message storage space should not be released. The instruction to copy the last corresponding message multicast is a transmit and release instruction, used to instruct the reading of message data stored in the message storage space of the DPU device and the release of the corresponding message storage space.

5. The DPU device for implementing network packet replication according to claim 4, characterized in that, The message replication module, upon receiving a message multicast command, initiates a corresponding read-not-release control command or read-and-release control command to the packet storage engine of the DPU device via the command bus. This allows the packet storage engine to locate the corresponding message data from the message storage space, transmit the corresponding message data to the message replication module via the data transmission bus, and, after the packet storage engine transmits the complete message, release or not release the corresponding message storage space according to the read-not-release control command or the read-and-release control command.

6. The DPU device for implementing network packet replication according to claim 5, characterized in that, The message copying module is used to send the corresponding message data to the first message transmission module or the second message transmission module whenever complete message data is obtained from the message storage space.

7. The DPU device for implementing network packet replication according to claim 5, characterized in that, The message replication module is used to notify the message lookup processing module to continue transmitting the next message multicast command after successfully sending a complete message data.

8. The DPU device for implementing network packet replication according to claim 1, characterized in that, The second message transmission module includes: The message uploading unit is used to upload the message copied by the message lookup processing module to different service processing modules of the CPU device. The message sending unit is used to receive messages sent by the CPU device and send them to the message lookup processing module.

9. The DPU device for implementing network packet replication according to claim 1, characterized in that, The second message transmission module is a PCIe processing unit.

10. A network packet replication system based on a DPU, characterized in that, include: The CPU device includes: a control business module, multiple business processing modules, and an application layer business module; The DPU device, communicatively connected to the CPU device, includes: a first message transmission module, a message lookup processing module, a message copying module, and a second message transmission module; wherein, the first message transmission module is connected to both the message lookup processing module and the message copying module, the message lookup processing module is connected to both the message copying module and the second message transmission module, and the message copying module is connected to the second message transmission module; The message lookup processing module writes control information from the control service module of the CPU device into a rule table; the first message transmission module receives messages from the link and stores the corresponding message data, parses the messages through the message lookup processing module, determines message replication information according to the rule table, and sends a corresponding message replication command to the message replication module; the message replication module performs message replication based on the message replication command, and sends the replicated messages to the CPU device through the second message transmission module for distribution to different service processing modules on the CPU device; the second message transmission module receives messages from the application layer service module of the CPU device, parses the messages through the message lookup processing module, determines message replication information according to the rule table, and sends a corresponding message replication command to the message replication module; the message replication module performs message replication based on the message replication command, and sends the replicated messages to different target hosts through the second message transmission module.