DPU-based cross-NIC forwarding method, system, medium, CPU processor and smart NIC
By parsing the message header in the DPU controller and querying the cross-network card flow table, encapsulating metadata and forwarding directly, the problem of cross-network card forwarding consumes too much CPU computing power, improving forwarding performance and reducing delay.
Patent Information
- Application Number
- CN202211399720.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-09
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-11-09
AI Technical Summary
The prior art consumes too much CPU computing power when forwarding across network cards, resulting in low forwarding performance.
By parsing the message header in the DPU controller and querying the cross-network card flow table, if the stream table is hit, metadata is encapsulated in the message, including the message receiving network card and its output port information, which is directly forwarded to the destination network card by the network card driver.
It reduces the CPU's overhead of packet resolution and table lookup, shortens the message forwarding path, significantly improves forwarding performance and reduces delay.
Smart Images

Figure CN115941630B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cross-NIC forwarding technology, and in particular to a DPU-based cross-NIC forwarding method, system, medium, CPU processor, and smart NIC. Background Art
[0002] The full name of DPU is Data Processing Unit. DPU will become one of the three pillars of future computing. The standard configuration of future data centers is "CPU+DPU+GPU"; CPU is used for general computing, GPU is used for accelerated computing, and DPU is used for data processing. With the development of network bandwidth from 10G and 25G to 100G, 200G and even higher bandwidth, and the evolution of cloud networks, the requirements for computing power of the entire network are increasing. As a chip unit dedicated to processing data, DPU can offload key network, storage, security and other services from the CPU, greatly releasing the CPU computing power, and will play an important role in the future development of networks.
[0003] An important function of the DPU is to perform hardware offload of the capabilities of the virtual switch on the cloud computing host, thereby reducing the CPU computing power consumed by the host on the network.
[0004] The existing commonly used network offloading implementation process is as follows: Figure 1 As shown in the figure, traffic offloading requires the participation of multiple components. The CPU control plane software generally contains at least two layers: the upper application processing unit, which is responsible for running the protocol and application layer functions and generating flow tables; the network card driver is responsible for managing the network card and the communication between the application processing unit and the network card. The network card forwarding plane DPU is implemented based on the flow table and forwards the message according to the egress port specified by the flow table.
[0005] The traffic forwarding process inside the network card includes:
[0006] ① The application processing unit sends the flow table to the DPU of network card NIC1;
[0007] ②The message is input from the message input port if1 of the DPU;
[0008] ③DPU extracts the key from the packet header to query the flow table;
[0009] ④ If the hit flow table is found, the message output port if2 is specified according to the result corresponding to the key;
[0010] ⑤Send the message to the message output port if2;
[0011] ⑥End.
[0012] Since the DPU of NIC1 can only forward traffic to the port of the same NIC, the traffic across NICs is forwarded according to Figure 2 The method shown is used for forwarding: the current CPU control plane does not send the flow table, the message does not hit the flow table in the network card DPU, and is sent to the application processing unit, which is soft-transferred to the destination network card by the application processing unit, and then goes out from the destination network card port. The specific steps are as follows:
[0013] ①The message is input from the message input port if1 of the network card NIC1;
[0014] ②DPU extracts the key from the packet header to query the flow table;
[0015] ③ If the flow table is not hit, the data is sent to the CPU;
[0016] ④The network card driver receives the message and sends it to the application processing unit;
[0017] ⑤The application processing unit receives the message, parses the message and extracts the key from the message header;
[0018] ⑥ Use key to query the CPU flow table;
[0019] ⑦ If the flow table is hit, the message output port if2 is specified according to the result corresponding to the key.
[0020] ⑧The application processing unit sends the message to the network card driver.
[0021] ⑨The network card driver sends the DPU to the network card NIC2.
[0022] ⑩DPU sends the message to the message output port if2 according to the exit specified by the CPU.
[0023] The message is sent and the process ends.
[0024] However, from a system perspective, in the application processing unit, the CPU parses the packet header to extract the key and checks the CPU flow table, which consumes a lot of CPU computing power and results in very low forwarding performance. Summary of the invention
[0025] In view of the shortcomings of the prior art described above, the purpose of the present application is to provide a DPU-based cross-NIC forwarding method, system, medium, CPU processor and smart NIC to solve the technical problem that the existing cross-NIC forwarding consumes too much CPU computing power.
[0026] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present application provides a DPU-based cross-network card forwarding method, including: the application processing unit of the CPU processor sends a cross-network card flow table to the first DPU controller of the message sending network card; the network card driver of the CPU processor receives the message to be forwarded with metadata added from the first DPU controller; the metadata encapsulates the output port information of the message receiving network card and its second DPU controller; the network card driver of the CPU processor sends the message to be forwarded received from the message sending network card to the message receiving network card according to the output port information of the message receiving network card and its second DPU controller, and the message receiving network card sends it out from its output port.
[0027] In some embodiments of the first aspect of the present application, the metadata further encapsulates a cross-network card identifier; the value of the cross-network card identifier is used to indicate whether to perform cross-network card forwarding processing on the message currently to be forwarded.
[0028] In some embodiments of the first aspect of the present application, the message to be forwarded with the added metadata is obtained by parsing the message header and querying the flow table by the first DPU controller.
[0029] In some embodiments of the first aspect of the present application, the process of the first DPU controller parsing the packet header and querying the flow table includes: after receiving the packet to be forwarded, the first DPU controller parses the packet header and extracts the packet header parameter column information key; queries the cross-network card flow table according to the packet header parameter column information key; if the flow table is hit, searches for the key result result corresponding to the packet header parameter column information key; the key result result is used to specify the packet receiving network card and its output port.
[0030] To achieve the above-mentioned purpose and other related purposes, the second aspect of the present application provides a DPU-based cross-network card forwarding system, including: a CPU processor, including an application processing unit and a network card driver; a message sending network card, including a first DPU controller; a message receiving network card, including a second DPU controller; wherein the application processing unit of the CPU processor sends a cross-network card flow table to the first DPU controller of the message sending network card; the network card driver of the CPU processor receives a message to be forwarded with metadata added from the first DPU controller; the metadata encapsulates the output port information of the message receiving network card and its second DPU controller; the network card driver of the CPU processor sends the message to be forwarded received from the message sending network card to the message receiving network card according to the output port information of the message receiving network card and its second DPU controller, and the message receiving network card sends it out from its output port.
[0031] In some embodiments of the second aspect of the present application, the metadata further encapsulates a cross-network card identifier; the value of the cross-network card identifier is used to indicate whether to perform cross-network card forwarding processing on the message currently to be forwarded.
[0032] In some embodiments of the second aspect of the present application, the message to be forwarded with the added metadata is obtained by parsing the message header and querying the flow table by the first DPU controller.
[0033] In some embodiments of the second aspect of the present application, the process of the first DPU controller parsing the message header and querying the flow table includes: after receiving the message to be forwarded, the first DPU controller parses the message header and extracts the message header parameter column information key; queries the cross-network card flow table according to the message header parameter column information key; if the flow table is hit, searches for the key result result corresponding to the message header parameter column information key; the key result result is used to specify the message receiving network card and its output port.
[0034] To achieve the above-mentioned purpose and other related purposes, the third aspect of the present application provides an intelligent network card, including a DPU controller; the DPU controller receives a cross-network card flow table from an application processing unit of a CPU processor; the DPU controller also receives a message to be forwarded, and obtains metadata encapsulating the output port information of a message receiving network card and its second DPU controller after parsing the message to be forwarded; the DPU controller uploads the message to be forwarded carrying the metadata to the network card driver of the CPU processor, so that the network card driver forwards the message to be forwarded to the corresponding message receiving network card, so that the output port of the designated message receiving network card can send the message to be forwarded out.
[0035] To achieve the above-mentioned purpose and other related purposes, the fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the DPU-based cross-network card forwarding method is implemented.
[0036] To achieve the above-mentioned purpose and other related purposes, the fifth aspect of the present application provides a CPU processor, including: an application processing unit and a network card driver; the application processing unit sends a cross-network card flow table to the first DPU controller of the message sending network card; the network card driver receives a message to be forwarded with metadata added from the first DPU controller; the metadata encapsulates the output port information of the message receiving network card and its second DPU controller; and, according to the output port information of the message receiving network card and its second DPU controller, the message to be forwarded received from the message sending network card is sent to the message receiving network card, and the message receiving network card sends it out from its output port.
[0037] As described above, the DPU-based cross-NIC forwarding method, system, medium, CPU processor and smart NIC of the present application have the following beneficial effects: the message in the present invention does not need to be sent to the application processing unit, there is no CPU message parsing and table lookup overhead, and at the same time the message forwarding path within the system becomes shorter, thereby greatly improving the forwarding performance and reducing the forwarding delay. It can be seen that the present invention utilizes the effective cooperation of the two units of the network card DPU system's data processing and the network card driver to efficiently realize the function of cross-NIC message forwarding, and does not need to send the message to the application processing unit for processing as in the traditional implementation, giving full play to the unloading capability of the DPU and saving the CPU's computing power resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 The diagram shows a commonly used existing network offloading implementation process.
[0039] Figure 2 The figure shows a flowchart of the commonly used cross-network card forwarding process.
[0040] Figure 3 Shown is a flow chart of a DPU-based cross-NIC forwarding method in an embodiment of the present invention.
[0041] Figure 4 Shown is a structural diagram of a DPU-based cross-NIC forwarding system in an embodiment of the present invention.
[0042] Figure 5 Shown is a structural diagram of a DPU-based cross-NIC forwarding system in an embodiment of the present invention.
[0043] Figure 6 Shown is a schematic diagram of the structure of a smart network card in an embodiment of the present invention.
[0044] Figure 7 Shown is a schematic diagram of the structure of a CPU processor in an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0046] It should be noted that in the following description, with reference to the accompanying drawings, several embodiments of the present application are described in the accompanying drawings. It should be understood that other embodiments may also be used, and mechanical composition, structure, electrical and operational changes may be made without departing from the spirit and scope of the present application. The following detailed description should not be considered restrictive, and the scope of the embodiments of the present application is limited only by the claims of the published patents. The terms used here are only for describing specific embodiments and are not intended to limit the present application. Spatially related terms, such as "upper", "lower", "left", "right", "below", "below", "lower", "above", "upper", etc., may be used in the text to facilitate the description of the relationship between an element or feature shown in the figure and another element or feature.
[0047] In this application, unless otherwise clearly specified and limited, the terms "install", "connect", "connect", "fix", "hold" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0048] Furthermore, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless there is an indication to the contrary in the context. It should be further understood that the terms "comprise", "include" indicate the presence of the described features, operations, elements, components, items, kinds, and / or groups, but do not exclude 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" used herein are interpreted as inclusive, or mean any one or any combination. Therefore, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C". Exceptions to this definition will only occur when the combination of elements, functions or operations is inherently mutually exclusive in some way.
[0049] In order to solve the problems in the above-mentioned background technology, the present invention provides a cross-network card forwarding method based on DPU, aiming to give full play to the flexible and editable characteristics of DPU chip and greatly improve the forwarding performance of cross-network card messages.
[0050] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the technical solution in the embodiments of the present invention is further described in detail through the following embodiments and in combination with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the invention.
[0051] Before further describing the present invention in detail, the nouns and terms involved in the embodiments of the present invention are explained. The nouns and terms involved in the embodiments of the present invention are applicable to the following interpretations:
[0052] DPU (Data Processing Unit): A distributed processing unit is a newly developed category of special-purpose processors. It is another important computing chip in data center scenarios after CPU and GPU, providing a computing engine for high-bandwidth, low-latency, and data-intensive computing scenarios.
[0053] NIC (Network Interface Card): Network interface card is responsible for the electrical connection between the computer and the network medium, the transmission of bit data stream and the confirmation of network address. Its main technical parameters are bandwidth speed, bus mode and electrical interface mode.
[0054] Message: A unit of data exchanged and transmitted in a network, i.e., a block of data to be sent by a station at one time. A message contains the complete data information to be sent, and its length is not constant, and its length is unlimited and variable.
[0055] The embodiment of the present invention provides a DPU-based cross-network card forwarding method, a DPU-based cross-network card forwarding method system, and a storage medium storing an executable program for implementing the DPU-based cross-network card forwarding method. As for the implementation of the DPU-based cross-network card forwarding method, the embodiment of the present invention will illustrate an exemplary implementation scenario of the DPU-based cross-network card forwarding.
[0056] like Figure 3 As shown, a flow chart of a DPU-based cross-NIC forwarding method in an embodiment of the present invention is shown. The DPU-based cross-NIC forwarding method in this embodiment is applied to a CPU processor and mainly includes the following steps:
[0057] Step S31: the application processing unit of the CPU processor sends a cross-network card flow table to the first DPU controller of the message sending network card.
[0058] The application processing unit is used to execute various computer applications to complete one or more specific tasks.
[0059] Cross-NIC flow table refers to OpenFlow flow table, which usually abstracts data with some common characteristics or attributes passing through the same network at the same time as a flow, such as treating data accessing the same destination address as a flow. It is an abstraction of the data forwarding function of network devices. The flow table items of OpenFLow flow table integrate network configuration information at all levels in the network, so that more abundant rules can be used when forwarding data. Each flow table item in the OpenFlow flow table is a packet header field for packet matching, a counter for counting the number of matching packets, and an action table for showing how matching packets are processed.
[0060] The network cards in this embodiment mainly include smart network cards (SmartNICs), which are used to support various virtualization functions at a much lower cost than ordinary CPUs. Introducing smart network cards on the server side can offload high-performance data processing functions in the network, storage, and operating system that are not suitable for CPU processing to hardware execution, improve data processing capabilities, and release CPU computing power. Smart network cards are equipped with computing power, allowing them to offload all network functions, security functions, and storage functions from the host server, thereby freeing up valuable processing power.
[0061] Step S32: the network card driver of the CPU processor receives the message to be forwarded with metadata added from the first DPU controller; the metadata encapsulates the output port information of the message receiving network card and its second DPU controller.
[0062] In this embodiment, after receiving the message to be forwarded, the first DPU controller parses the message header and extracts the key information, and uses the key information to query the cross-network card flow table; if a hit flow table is found, cross-network card forwarding processing is performed according to the result (result) corresponding to the key information; and metadata (metadata) is added to the message to be forwarded, the output port information of the message receiving network card and its second DPU controller is encapsulated in the metadata (metadata), and then the message to be forwarded is sent to the CPU processor together with the metadata.
[0063] It should be understood that metadata, also known as intermediary data or relay data, is data about data, mainly information describing data properties, used to support functions such as indicating storage location, historical data, resource search, file records, etc. Metadata is a kind of electronic catalog. In order to achieve the purpose of cataloging, it is necessary to describe and collect the content or characteristics of the data, thereby achieving the purpose of assisting data retrieval.
[0064] In one implementation of this embodiment, the metadata also encapsulates a cross-NIC identifier; the value of the cross-NIC identifier is used to indicate whether to perform cross-NIC forwarding processing on the message to be forwarded. For example, the cross-NIC identifier is set to cross_nic_flag in the register, and when cross_nic_flag=1, it indicates that the message to be forwarded needs to be forwarded across the NIC, and when cross_nic_flag=0, it indicates that the message to be forwarded does not need to be forwarded across the NIC.
[0065] Step S33: The network card driver of the CPU processor sends the message to be forwarded received from the message sending network card to the message receiving network card according to the output port information of the message receiving network card and its second DPU controller, and the message receiving network card sends it out from its output port.
[0066] It should be understood that the network card driver is a program that the CPU processor uses to control and use the network card, which is equivalent to the hardware interface. The operating system controls the operation of the hardware device through this interface.
[0067] In this embodiment, the to-be-forwarded message with added metadata is obtained by parsing the message header and querying the flow table by the first DPU controller.
[0068] Furthermore, the process of the first DPU controller parsing the message header and querying the flow table includes: after receiving the message to be forwarded, the first DPU controller parses the message header and extracts the message header parameter column information key; queries the cross-NIC flow table according to the message header parameter column information key; if the flow table is hit, then searches for the key result result corresponding to the message header parameter column information key; the key result result is used to specify the message receiving NIC and its output port. Then it is sent to the NIC driver, which forwards it to the destination NIC according to the metadata, and then forwards it to the destination port.
[0069] That is to say, in the technical solution of this embodiment, the message does not need to be sent to the application processing unit, and there is no CPU message parsing and table lookup overhead. At the same time, the message forwarding path within the system becomes shorter, thereby greatly improving the forwarding performance and reducing the forwarding delay. It can be seen that the present invention utilizes the effective cooperation of the two units of the network card DPU system's data processing and the network card driver to efficiently realize the function of cross-network card message forwarding. It is not necessary to send the message to the application processing unit for processing as in the traditional implementation, giving full play to the unloading capability of the DPU and saving the CPU's computing resources.
[0070] like Figure 4As shown, a schematic diagram of the structure of a DPU-based cross-NIC forwarding system in an embodiment of the present invention is shown. In this embodiment, the DPU-based cross-NIC forwarding system includes: a CPU processor, a first smart NIC NIC1 and a second smart NIC NIC2; the CPU processor includes an application processing unit and a NIC driver; the first smart NIC NIC1 includes a first DPU controller; the second smart NIC NIC2 includes a second DPU controller.
[0071] The process of forwarding messages in the DPU-based cross-NIC forwarding system includes:
[0072] First, ①, the application processing unit sends the cross-NIC flow table to the first DPU controller.
[0073] Secondly, after receiving the message, the first DPU controller parses the message header and extracts the key information, and queries the cross-NIC flow table based on the parsed key information; if the cross-NIC flow table is hit, the cross-NIC forwarding process is performed based on the result of the cross-NIC flow table. Metadata is added to the message to be forwarded, the destination NIC and port are encapsulated in the metadata, and then the message is sent to the NIC driver in the CPU processor.
[0074] Then ③, after receiving the message, the network card driver in the CPU processor sends the message to the second intelligent network card NIC2 according to the metadata carried by the message.
[0075] Finally, step ④, the second intelligent network card NIC2 sends the message from the message output port of the second DPU controller, and the process ends.
[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0077] like Figure 5 As shown in:
[0078] Step 1①: The CPU application processing unit sends the cross-NIC flow table to the first DPU controller;
[0079] Step 2②: The message is transmitted from the message input port if1 of the network card NIC1;
[0080] Step 3 (3): The first DPU controller parses the message header, extracts the key information, and searches the flow table based on the key information.
[0081] Step 4④, the flow table hits, the result corresponding to the key information specifies the egress network card and port<NIC2,if2> That is to say, after extracting the key information from the message header of the received message, the result information corresponding to the key information is searched in the cross-NIC flow table, and the result information specifies which NIC and port the message is output by. For example, in this embodiment, the message is output by the message output port if2 of the NIC NIC2.
[0082] Step 5. Add metadata to the message. The content includes the cross-NIC flag cross_nic_flag. A value of 1 indicates that cross-NIC forwarding is required. It also includes egress information.<NIC2,if2> ;
[0083] Step 6⑥, the message is sent to the network card driver of the CPU processor;
[0084] Step 7 (7), the NIC driver parses the metadata and finds that the cross-NIC flag cross_nic_flag is 1, and recognizes that cross-NIC forwarding is required;
[0085] Step 8⑧: The network card driver exports according to the metadata<NIC2,if2> Send the message to the destination network card NIC2;
[0086] Step 9⑨, the network card NIC2 sends the message to the message output port if2 according to the exit specified by the CPU;
[0087] Step 10⑩, the message is sent out from the message output port if2;
[0088] Step 11 Finish.
[0089] like Figure 6 As shown, a schematic diagram of the structure of a smart network card in an embodiment of the present invention is shown. In this embodiment, the smart network card at least includes a DPU controller, and the DPU controller receives a cross-network card flow table from an application processing unit of a CPU processor; the DPU controller also receives a message to be forwarded, and obtains metadata encapsulating the output port information of the message receiving network card and its second DPU controller after parsing the message to be forwarded; the DPU controller uploads the message to be forwarded carrying the metadata to the network card driver of the CPU processor, so that the network card driver forwards the message to be forwarded to the corresponding message receiving network card, so that the output port of the designated message receiving network card can send the message to be forwarded out.
[0090] It should be noted that the implementation method of the smart network card in this embodiment is similar to the DPU-based inter-network card forwarding method or DPU-based inter-network card forwarding system mentioned above, so it will not be repeated here.
[0091] like Figure 7 As shown, an embodiment of the present invention further provides a CPU processor, including an application processing unit and a network card driver. The application processing unit sends a cross-network card flow table to the first DPU controller of the message sending network card; the network card driver receives the message to be forwarded with metadata added from the first DPU controller; the metadata encapsulates the output port information of the message receiving network card and its second DPU controller; and according to the output port information of the message receiving network card and its second DPU controller, the message to be forwarded received from the message sending network card is sent to the message receiving network card, and the message receiving network card sends it out from its output port.
[0092] It should be noted that the CPU processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the accessory optimization method provided in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0093] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0094] In the embodiments provided in the present application, the computer readable and writable storage medium may include a read-only memory, a random access memory, an EEPROM, a CD-ROM or other optical disk storage device, a disk storage device or other magnetic storage device, a flash memory, a USB flash drive, a mobile hard disk, or any other medium that can be used to store a desired program code in the form of an instruction or data structure and can be accessed by a computer. In addition, any connection can be appropriately referred to as a computer-readable medium. For example, if the instruction is sent from a website, a server or other remote source using a coaxial cable, an optical fiber cable, a twisted pair, a digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, the coaxial cable, optical fiber cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of the medium. However, it should be understood that computer readable and writable storage media and data storage media do not include connections, carriers, signals, or other temporary media, but are intended to be non-temporary, tangible storage media. Disk and disc, as used in this application, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.
[0095] In summary, the present application provides a DPU-based cross-NIC forwarding method, system, medium, CPU processor and smart NIC, and the present invention provides a method for improving the efficiency of DPU-based cross-NIC forwarding. Therefore, the present application effectively overcomes various shortcomings in the prior art and has a high industrial utilization value.
[0096] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A DPU-based cross-network card forwarding method, characterized in that: include: The application processing unit of the CPU processor sends a cross-NIC flow table to the first DPU controller of the message sending NIC; The network card driver of the CPU processor receives the message to be forwarded with metadata added from the first DPU controller; The metadata encapsulates the output port information of the message receiving network card and its second DPU controller; The network card driver of the CPU processor sends the message to be forwarded received from the message sending network card to the message receiving network card according to the output port information of the message receiving network card and its second DPU controller, and the message receiving network card sends it out from its output port.
2. The DPU-based cross-NIC forwarding method according to claim 1, characterized in that: The metadata also encapsulates a cross-network card identifier; the value of the cross-network card identifier is used to indicate whether to perform cross-network card forwarding processing on the message to be forwarded currently.
3. The DPU-based cross-NIC forwarding method according to claim 1, characterized in that: The message to be forwarded with added metadata is obtained by the first DPU controller parsing the message header and querying the flow table.
4. The DPU-based cross-NIC forwarding method according to claim 3, characterized in that: The process of the first DPU controller parsing the message header and querying the flow table includes: after receiving the message to be forwarded, the first DPU controller parses the message header and extracts the message header parameter column information key; queries the cross-network card flow table according to the message header parameter column information key; if the flow table is hit, searches for the key result result corresponding to the message header parameter column information key; the key result result is used to specify the message receiving network card and its output port.
5. A DPU-based cross-NIC forwarding system, characterized in that: include: CPU processor, including application processing unit and network card driver; A message sending network card, including a first DPU controller; A message receiving network card, including a second DPU controller; Among them, the application processing unit of the CPU processor sends a cross-network card flow table to the first DPU controller of the message sending network card; the network card driver of the CPU processor receives the message to be forwarded with metadata added from the first DPU controller; the metadata encapsulates the output port information of the message receiving network card and its second DPU controller; the network card driver of the CPU processor sends the message to be forwarded received from the message sending network card to the message receiving network card according to the output port information of the message receiving network card and its second DPU controller, and the message receiving network card sends it out from its output port.
6. The DPU-based cross-NIC forwarding system according to claim 5, characterized in that: The metadata also encapsulates a cross-network card identifier; the value of the cross-network card identifier is used to indicate whether to perform cross-network card forwarding processing on the message to be forwarded currently.
7. The DPU-based cross-NIC forwarding system according to claim 5, characterized in that: The message to be forwarded with added metadata is obtained by the first DPU controller parsing the message header and querying the flow table.
8. The DPU-based cross-NIC forwarding system according to claim 7, characterized in that: The process of the first DPU controller parsing the message header and querying the flow table includes: after receiving the message to be forwarded, the first DPU controller parses the message header and extracts the message header parameter column information key; queries the cross-network card flow table according to the message header parameter column information key; if the flow table is hit, searches for the key result result corresponding to the message header parameter column information key; the key result result is used to specify the message receiving network card and its output port.
9. A smart network card, characterized in that: It includes a DPU controller; the DPU controller receives a cross-network card flow table from an application processing unit of a CPU processor; the DPU controller also receives a message to be forwarded, and obtains metadata encapsulating output port information of a message receiving network card and its second DPU controller after parsing the message to be forwarded; the DPU controller uploads the message to be forwarded carrying the metadata to a network card driver of the CPU processor, so that the network card driver forwards the message to be forwarded to the corresponding message receiving network card, so that the message to be forwarded is sent out by the output port of the designated message receiving network card.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the DPU-based cross-network card forwarding method described in any one of claims 1 to 4 is implemented.
11. A CPU processor, characterized in that: include: Application processing unit and network card driver; The application processing unit sends a cross-network card flow table to the first DPU controller of the message sending network card; The network card driver receives a message to be forwarded with metadata added thereto from the first DPU controller; The metadata encapsulates the output port information of the message receiving network card and its second DPU controller; And, according to the output port information of the message receiving network card and its second DPU controller, the message to be forwarded received from the message sending network card is sent to the message receiving network card, and the message receiving network card sends it out from its output port.
Citation Information
Patent Citations
Message processing method and device
CN114422367A
Method and device for saving DMA channel resources in high-speed intelligent network card / DPU
CN114885045A