CN114726788B - Message transmission method applied to DPU and related device - Google Patents
Message transmission method applied to DPU and related device Download PDFInfo
- Publication number
- CN114726788B CN114726788B CN202210484748.8A CN202210484748A CN114726788B CN 114726788 B CN114726788 B CN 114726788B CN 202210484748 A CN202210484748 A CN 202210484748A CN 114726788 B CN114726788 B CN 114726788B
- Authority
- CN
- China
- Prior art keywords
- flow table
- data message
- matching field
- data
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 51
- 238000000034 method Methods 0.000 title claims abstract description 48
- 230000009471 action Effects 0.000 claims description 119
- 238000000926 separation method Methods 0.000 claims description 74
- 238000004590 computer program Methods 0.000 claims description 9
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 230000000875 corresponding effect Effects 0.000 description 86
- 238000013461 design Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 9
- 238000012545 processing Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 239000002699 waste material Substances 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/38—Flow based routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/54—Organization of routing tables
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides a message transmission method and a related device applied to a DPU, wherein the message transmission method comprises the following steps: receiving a first data message through a hardware module, and determining the service type of the first data message; if the stream table stored by the hardware module is determined to not have the stream table item matched with the first data message, the first data message and the service type of the first data message are sent to the software module; acquiring a flow table of a first format corresponding to a first data message through a software module, and determining an effective matching field of the first data message according to the service type of the first data message; converting the flow table of the first format into the flow table of the second format by the software module according to the effective matching field of the first data message; transmitting a flow table in a second format corresponding to the first data message to a hardware module through a software module; and transmitting the data stream to which the first data message belongs through the hardware module according to the stream table of the second format corresponding to the first data message. By implementing the method and the device, the hardware storage space can be saved.
Description
Technical Field
The present disclosure relates to the field of computer networks, and in particular, to a packet transmission method and related device applied to a DPU.
Background
The software defined network (Software Defined Network, SDN) is a novel network innovation architecture, and related OpenFlow technology can convert a data packet forwarding process originally controlled by a Switch/router into independent processes respectively completed by an OpenFlow Switch (OpenFlow Switch) and a control server (Controller), so that flexible control of network traffic is realized.
The OpenFlow switch stores forwarding rules of the packet using a Flow Table (Flow Table). The flow table includes a match field (key field for matching the packet) and an action field (action instruction for indicating an operation on the packet). At present, an intelligent network card (such as a DPU (Data Processing Unit, data processing unit)) can realize unloading of a flow table, namely, a hardware flow table unloaded into the intelligent network card is utilized to quickly search and forward subsequent flow, so that the efficiency of data forwarding is improved. The hardware flow table stored in the intelligent network card can comprise a multi-stage flow table formed by connecting a plurality of flow tables in series, each table in the multi-stage flow table is provided with a serial number, and the data packet is matched among the plurality of flow tables according to the increasing direction of the serial numbers of the flow tables through a jump instruction.
The matching field of each flow table in the existing multi-level flow table is fixed, so that the storage space allocated to the matching field of the flow table is also fixed, but sometimes the actually valid fields in the matching field of the flow table do not occupy all the storage space, and memory holes can be generated, so that precious hardware storage space is wasted.
Disclosure of Invention
In order to solve the above problems, the embodiments of the present application disclose a packet transmission method and related device applied to a DPU, which can save hardware storage space after unloading a flow table.
In a first aspect, the present application provides a packet transmission method applied to a DPU, where the method includes:
receiving a first data message through a hardware module, and determining the service type of the first data message;
under the condition that the stream table stored by the hardware module does not have the stream table item matched with the first data message, the first data message and the service type of the first data message are sent to a software module through the hardware module;
acquiring a first-format flow table corresponding to the first data message through the software module, and determining an effective matching field of the first data message according to the service type of the first data message, wherein the size of a space occupied by a first matching field of the first-format flow table is a preset value;
Converting, by the software module, the flow table of the first format into a flow table of a second format according to the valid matching field of the first data packet, where a second matching field of the flow table of the second format includes a service type of the first data packet and the valid matching field of the first data packet, and a space occupied by the second matching field is smaller than a space occupied by the first matching field;
transmitting a flow table in a second format corresponding to the first data message to the hardware module through the software module;
and transmitting the data stream to which the first data message belongs through the hardware module according to a stream table of a second format corresponding to the first data message.
In one possible implementation manner, the receiving, by a hardware module, a first data packet, and determining a service type of the first data packet includes:
acquiring the identification information of the first data message, wherein the identification information of the first data message comprises an effective matching field of the first data message;
and determining the service type of the first data message according to the identification information.
In a possible implementation manner, the transmitting, by the hardware module, the data stream to which the first data packet belongs according to the flow table in the second format corresponding to the first data packet includes:
Under the condition that a second data message is received, determining the service type of the second data message through the hardware module, wherein the data flow of the second data message is the same as the data flow of the first data message;
searching a flow table stored in the hardware module according to the service type of the second data message, wherein the flow table stored in the hardware module comprises a flow table in the second format corresponding to the first data message;
and executing corresponding operation on the second data message according to the flow table of the second format corresponding to the first data message.
In one possible embodiment, the method further comprises:
under the condition that the flow table of the second format corresponding to the first data message and the flow table corresponding to the third data message in the software module are determined to meet the flow table merging condition, merging the flow table of the second format corresponding to the first data message and the flow table corresponding to the third data message through the software module to obtain a target flow table; wherein the flow table merging conditions include: the matching fields of the two flow tables are provided with repeated fields, and the space occupied by the combined flow table is smaller than the space occupied by a preset single flow table;
The transmitting, by the software module, the flow table in the second format corresponding to the first data packet to the hardware module includes:
transmitting the target flow table to the hardware module through the software module;
the transmitting, by the hardware module, the data stream to which the first data packet belongs according to the stream table in the second format corresponding to the first data packet includes:
and transmitting the data stream to which the first data message or the third data message belongs according to the target stream table through the hardware module.
In a possible implementation manner, the action field of the target flow table includes a separation flag, and the transmitting, by the hardware module, the data flow to which the first data packet or the third data packet belongs according to the target flow table includes:
under the condition that a fourth data message is received, determining, by the hardware module, a service type of the fourth data message and an effective matching field of the fourth data message, wherein a data stream to which the fourth data message belongs is the same as a data stream to which the first data message belongs or a data stream to which the third data message belongs;
Searching a flow table stored in the hardware module according to the service type of the fourth data message, wherein the flow table stored in the hardware module comprises the target flow table;
determining the target flow table as a flow table matched with the fourth data message;
under the condition that the effective matching field of the fourth data message is completely the same as the matching field included in the matching field in the target flow table, executing corresponding operation on the fourth data message according to the action field in the target flow table;
and under the condition that the effective matching field of the fourth data message is partially the same as the matching field included in the matching field in the target flow table, determining a target action from the action field of the target flow table according to the effective matching field of the fourth data message, the matching field of the target flow table and the separation mark, and executing an operation corresponding to the target action on the fourth data message, wherein the separation mark is used for distinguishing the actions respectively corresponding to the first data message and the third data message.
In one possible implementation manner, the matching field and the action field of the target flow table each include two separation flags, and the determining, according to the valid matching field of the fourth data packet, the matching field of the target flow table, and the separation flag, the target action from the action field of the target flow table includes:
If the valid matching field of the fourth data packet includes the first matching field and the second matching field in the matching field of the target flow table, but does not include the third matching field, determining an action before the second separation mark in the action field of the target flow table as the target action; wherein the first matching field comprises a field before a first separation flag of the matching field, the second matching field comprises a field after the first separation flag and before a second separation flag of the matching field, and the third matching field comprises a field after the second separation flag of the matching field;
and if the valid matching field of the fourth data packet includes the first matching field and the third matching field in the matching field of the target flow table, but does not include the second matching field, determining an action before the first separation mark and an action after the second separation mark in the action field of the target flow table as the target action.
In a second aspect, the present application provides a packet transmission device, including:
the receiving unit is used for receiving the first data message through the hardware module;
A first determining unit, configured to determine a service type of the first data packet;
a sending unit, configured to send, by the hardware module, the first data packet and a service type of the first data packet to a software module when it is determined that a flow table item that matches the first data packet does not exist in a flow table stored by the hardware module;
the acquisition unit is used for acquiring a flow table in a first format corresponding to the first data message through the software module;
a second determining unit, configured to determine, according to a service type of the first data packet, an effective matching field of the first data packet, where a size of a space occupied by a first matching field of the flow table in the first format is a preset value;
the conversion unit is used for converting the flow table of the first format into a flow table of a second format according to the effective matching field of the first data message through the software module, wherein a second matching field of the flow table of the second format comprises the service type of the first data message and the effective matching field of the first data message, and the space occupied by the second matching field is smaller than the space occupied by the first matching field;
The transmission unit is used for transmitting the flow table in the second format corresponding to the first data message to the hardware module through the software module;
and the message transmission unit is used for transmitting the data stream to which the first data message belongs through the hardware module according to the stream table of the second format corresponding to the first data message.
In one possible design, the first determining unit is specifically configured to:
acquiring the identification information of the first data message, wherein the identification information of the first data message comprises an effective matching field of the first data message;
and determining the service type of the first data message according to the identification information.
In one possible design, the message transmission unit is specifically configured to:
under the condition that a second data message is received, determining the service type of the second data message through the hardware module, wherein the data flow of the second data message is the same as the data flow of the first data message;
searching a flow table stored in the hardware module according to the service type of the second data message, wherein the flow table stored in the hardware module comprises a flow table in the second format corresponding to the first data message;
And executing corresponding operation on the second data message according to the flow table of the second format corresponding to the first data message.
In one possible design, the apparatus further comprises:
the merging unit is used for merging the flow table of the second format corresponding to the first data message with the flow table corresponding to the third data message through the software module to obtain a target flow table under the condition that the flow table of the second format corresponding to the first data message and the flow table corresponding to the third data message in the software module are determined to meet the flow table merging condition; wherein the flow table merging conditions include: the matching fields of the two flow tables are provided with repeated fields, and the space occupied by the combined flow table is smaller than the space occupied by a preset single flow table;
the transmission unit is specifically configured to:
transmitting the target flow table to the hardware module through the software module;
the message transmission unit is specifically configured to:
and transmitting the data stream to which the first data message or the third data message belongs according to the target stream table through the hardware module.
In one possible design, the action field of the target flow table includes a separation flag, and the message transmission unit is specifically configured to:
Under the condition that a fourth data message is received, determining, by the hardware module, a service type of the fourth data message and an effective matching field of the fourth data message, wherein a data stream to which the fourth data message belongs is the same as a data stream to which the first data message belongs or a data stream to which the third data message belongs;
searching a flow table stored in the hardware module according to the service type of the fourth data message, wherein the flow table stored in the hardware module comprises the target flow table;
determining the target flow table as a flow table matched with the fourth data message;
under the condition that the effective matching field of the fourth data message is completely the same as the matching field included in the matching field in the target flow table, executing corresponding operation on the fourth data message according to the action field in the target flow table;
and under the condition that the effective matching field of the fourth data message is partially the same as the matching field included in the matching field in the target flow table, determining a target action from the action field of the target flow table according to the effective matching field of the fourth data message, the matching field of the target flow table and the separation mark, and executing an operation corresponding to the target action on the fourth data message, wherein the separation mark is used for distinguishing the actions respectively corresponding to the first data message and the third data message.
In one possible design, the matching field and the action field of the target flow table each include two separation marks, and the message transmission unit is specifically configured to:
if the valid matching field of the fourth data packet includes the first matching field and the second matching field in the matching field of the target flow table, but does not include the third matching field, determining an action before the second separation mark in the action field of the target flow table as the target action; wherein the first matching field comprises a field before a first separation flag of the matching field, the second matching field comprises a field after the first separation flag and before a second separation flag of the matching field, and the third matching field comprises a field after the second separation flag of the matching field;
and if the valid matching field of the fourth data packet includes the first matching field and the third matching field in the matching field of the target flow table, but does not include the second matching field, determining an action before the first separation mark and an action after the second separation mark in the action field of the target flow table as the target action.
In a third aspect, the present application provides an electronic device, comprising: a memory, a processor, and a network interface, wherein the memory, the processor, and the network interface are communicatively connected to each other; wherein the memory stores program instructions; the program instructions, when executed by the processor, cause the processor to perform the method as described in the first aspect and any possible implementation manner of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored therein; the computer program, when run on one or more processors, performs the method as described in the first aspect and any possible implementation of the first aspect.
In the embodiment of the application, a hardware module acquires a service type of a first data message (namely, a data stream first packet) and sends the service type to a software module; after the flow table of the first format corresponding to the first data message is obtained, the flow table of the first format is converted into the flow table of the second format according to the effective matching field corresponding to the service type, so that the space occupied by the second matching field of the flow table of the second format is smaller than the space occupied by the first matching field of the flow table of the first format; and transmitting a flow table in a second format corresponding to the first data message to the hardware module to realize the subsequent transmission of the data flow. By converting the format of the flow table, the dynamic compression of the flow table can be realized, the space waste caused by the general field or the memory cavity is reduced, and the hardware storage space is saved after the flow table is unloaded.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described below.
Fig. 1 is a system structure diagram of a packet transmission method applied to a DPU according to an embodiment of the present application;
fig. 2 is a flow chart of a message transmission method applied to a DPU according to an embodiment of the present disclosure;
fig. 3a is a schematic structural diagram of a matching domain of a flow table according to an embodiment of the present application;
FIG. 3b is a schematic diagram of a matching field of a flow table according to the prior art;
FIG. 3c is a schematic diagram of a matching field of another flow table in the prior art;
fig. 4 is a flowchart of another packet transmission method applied to a DPU according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a message transmission device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the present invention is described in further detail below with reference to the accompanying drawings.
The terms "first" and "second" and the like in the description, claims and drawings of the present application are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprising," "including," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion. Such as a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to the list of steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of the above-identified phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments.
In the present application, "at least one (item)" means one or more, "a plurality" means two or more, and "at least two (items)" means two or three or more, and/or "for describing an association relationship of an association object, three kinds of relationships may exist, for example," a and/or B "may represent: only a, only B and both a and B are present, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of (a) or a similar expression thereof means any combination of these items. For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c".
The present invention will be described in detail with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a system configuration diagram of a packet transmission method applied to a DPU according to an embodiment of the present application. As shown in fig. 1, the message transmission method may be applied to a message transmission device/apparatus, where the message transmission device includes a software module and a hardware module, where the software module may implement a flow table management function of the message transmission device, and the hardware module may implement a data fast transfer function of the message transmission device. The hardware modules may include, but are not limited to, field programmable gate arrays (Field Programmable Gate Array, FPGA) or application specific integrated circuits (Application Specific Integrated Circuit, ASIC), etc., and the software modules may include, but are not limited to, embedded CPUs (ECPU), etc. It is understood that the message transmission device may be a DPU (Data Processing Unit ) with standard network card functions and software definition capabilities, and the DPU may be regarded as a Smart network card, so that the Smart network card referred to in the present application is not limited to a narrow general Smart network card (Smart NIC).
Referring to fig. 2, fig. 2 is a flow chart of a packet transmission method applied to a DPU according to an embodiment of the present application, as shown in fig. 2, the method includes the following steps 201 to 206:
Step 201, a first data message is received through a hardware module, and a service type of the first data message is determined.
In general, a data packet enters the hardware module through a network interface of the packet transmission device, and the hardware module searches a hardware flow table stored in the hardware module to determine whether a flow table item matched with the data packet exists, and then determines the next operation of the data packet according to a search result. In the embodiment of the present application, in order to facilitate the flow table lookup, after receiving the first data packet, the service type of the first data packet is determined. The traffic type may be used to indicate specific traffic handling logic for the data packet, and may include, by way of example, but not limitation, two-layer forwarding traffic, three-layer forwarding traffic, and the like. The service types of the data messages are different, and the matching fields (effective matching fields of the data messages for short) concerned when the data messages are subjected to flow table matching are different, that is, the service types of the data messages and the effective matching fields of the data messages have a corresponding relationship, and the corresponding relationship can be predetermined and stored in a hardware module and a software module of the message transmission device.
In one embodiment, the method for receiving the first data message through the hardware module and determining the service type of the first data message may include the following steps: acquiring the identification information of the first data message, wherein the identification information of the first data message comprises an effective matching field of the first data message; and determining the service type of the first data message according to the identification information.
Specifically, the identification information of the first data packet includes the input port of the first data packet and information of the first data packet itself (i.e., information included in the header, such as source MAC, destination MAC, source IP, destination IP, protocol type, etc.). According to the identification information of the first data message, which service type of the first data message is specific can be determined. It can be understood that the identification information of the first data packet includes the valid matching field, that is, includes a matching field that needs to be paid attention to when the flow table matches.
Step 202, when it is determined that the flow table stored by the hardware module does not have the flow table item matched with the first data packet, sending the first data packet and the service type of the first data packet to a software module through the hardware module.
In this embodiment of the present application, it may be determined that the first data packet is a data flow header packet when it is determined that a flow table item that matches the first data packet does not exist in a flow table stored in the hardware module, and at this time, the hardware module of the packet transmission device may send the first data packet to obtain a flow table corresponding to the first data packet. Specifically, the software module sends the first data message and the service type thereof to the software module, so that the software module obtains a flow table corresponding to the first data message according to a flow table rule stored by the software module or a flow table rule issued by the OpenFlow controller.
Step 203, obtaining, by the software module, a flow table in a first format corresponding to the first data packet, and determining an effective matching field of the first data packet according to a service type of the first data packet.
The size of the space occupied by the first matching field of the flow table in the first format is a preset value.
In this embodiment of the present application, the software module obtains, according to a flow table rule stored in the software module or a flow table rule issued by the OpenFlow controller, a flow table in a first format corresponding to the first data packet, where a space occupied by a first matching field of the flow table in the first format is a preset fixed value, and the fixed value is pre-allocated to the flow table matching field and may be 80 bytes, 40 bytes, and so on. It can be appreciated that when the number of fields included in the valid matching field of the first data packet is smaller, the space occupied by the first matching field of the flow table in the first format is not fully utilized, and there may be a memory hole or occupied by the wild-card field, and then unloading the flow table in the first format to the hardware module may cause space waste in the hardware module.
And 204, converting the flow table in the first format into a flow table in a second format by the software module according to the valid matching field of the first data message.
The second matching field of the flow table in the second format comprises the service type of the first data message and an effective matching field of the first data message, and the space occupied by the second matching field is smaller than that occupied by the first matching field.
In this embodiment, when the number of fields included in the valid matching field of the first data packet is smaller, the flow table in the first format may be converted into the flow table in the second format, where both the flow tables in the two formats are used to indicate a forwarding rule for the data flow to which the first data packet belongs, but the second matching field of the flow table in the second format occupies a smaller space than the first matching field of the flow table in the first format. As shown in fig. 3a, the second matching field of the flow table in the second format includes the service type of the first data packet and the valid matching field of the first data packet, while the first matching field of the flow table in the first format includes the valid matching field of the first data packet, possibly further wildcard fields (as in fig. 3 b), or there is a memory hole in the memory occupied by the first matching field (as in fig. 3 c).
And step 205, transmitting, by the software module, a flow table in a second format corresponding to the first data packet to the hardware module.
In this embodiment of the present application, after the flow table in the second format of the first data packet is obtained, the flow table may be transmitted to the hardware module, that is, the flow table is unloaded onto hardware, so that the data flow to which the first data packet belongs is quickly transferred by hardware, thereby improving the forwarding efficiency.
And 206, transmitting the data stream to which the first data message belongs through the hardware module according to the stream table of the second format corresponding to the first data message.
In this embodiment of the present application, if a subsequent hardware module receives other data messages in a data stream to which a first data message belongs, a corresponding forwarding operation is performed on the data messages by using a flow table in a second format corresponding to the first data message stored in the hardware module.
Specifically, the transmitting, by the hardware module, the data stream to which the first data packet belongs according to the flow table in the second format corresponding to the first data packet may include the following steps:
under the condition that a second data message is received, determining the service type of the second data message through the hardware module, wherein the data flow of the second data message is the same as the data flow of the first data message;
Searching a flow table stored in the hardware module according to the service type of the second data message, wherein the flow table stored in the hardware module comprises a flow table in the second format corresponding to the first data message;
and executing corresponding operation on the second data message according to the flow table of the second format corresponding to the first data message.
It can be understood that the second data packet is the same as the data stream to which the first data packet belongs, that is, the second data packet is other data packets in the data stream to which the first data packet belongs, so that when the second data packet is received, the service type of the second data packet is determined first, and then the flow table lookup is performed according to the service type. Since the second data message and the first data message belong to the same data stream, the service types of the second data message and the first data message are the same. And determining that the flow table matched with the second data message in the hardware module is the flow table in the second format corresponding to the first data message through flow table searching. And executing corresponding operation indicated by the action included in the action domain on the second data message according to the action domain included in the flow table of the second format corresponding to the first data message. Specifically, the operations include, but are not limited to, forwarding to ports, forwarding to queues, dropping, modifying message information, and the like.
In the embodiment of the application, a hardware module acquires a service type of a first data message (namely, a data stream first packet) and sends the service type to a software module; after the flow table of the first format corresponding to the first data message is obtained, the flow table of the first format is converted into the flow table of the second format according to the effective matching field corresponding to the service type, so that the space occupied by the second matching field of the flow table of the second format is smaller than the space occupied by the first matching field of the flow table of the first format; and transmitting a flow table in a second format corresponding to the first data message to the hardware module to realize the subsequent transmission of the data flow. By converting the format of the flow table, the dynamic compression of the flow table can be realized, the space waste caused by the general field or the memory cavity is reduced, and the hardware storage space is saved after the flow table is unloaded.
The embodiment of the present application further provides another packet transmission method applied to a DPU, where the packet transmission method may be performed after the steps 201 to 204, and includes the following steps 401 to 403, as shown in fig. 4, and the method includes:
step 401, when it is determined that the flow table in the second format corresponding to the first data packet and the flow table corresponding to the third data packet in the software module meet the flow table merging condition, merging, by the software module, the flow table in the second format corresponding to the first data packet and the flow table corresponding to the third data packet to obtain a target flow table.
Wherein the flow table merging conditions include: the matching fields of the two flow tables are provided with repeated fields, and the space occupied by the combined flow table is smaller than the space occupied by a preset single flow table.
In this embodiment, when the software module obtains the flow table in the second format corresponding to the first data packet, it is further determined whether other flow tables stored in the software module and the flow table in the second format corresponding to the first data packet meet the flow table merging condition, if it is determined that the flow table merging condition is met, the step 205 to the step 206 are not executed, that is, the flow table in the second format corresponding to the first data packet is not directly transmitted to the hardware module, but steps 401 to 403 are executed, the flow table is merged, and then the flow table is transmitted to the hardware module after the target flow table is obtained, so as to further save the storage resources in the hardware module. It can be understood that, generally, the two flow tables are combined only when they are shorter and the space can be saved after the two flow tables are combined, so that it is necessary to determine whether the above-mentioned flow table combining conditions are satisfied before the combination, thereby ensuring that the flow tables (i.e. the target flow tables) obtained after the combination occupy less space than the two flow tables before the combination.
In addition, since the second matching field of the flow table in the second format corresponding to the first data packet includes the service type, and the matching field of the flow table corresponding to the third data packet also includes the service type, the target flow table obtained after merging also includes the service type. The service types of the target flow table can be a set of service types of the two flow tables before combination, so that the target flow table can be hit when the flow table searching is carried out according to the service type of the data message when the data flow to which the first data message belongs or the data flow to which the third data message belongs is received subsequently; the service type of the target flow table may be a new service type different from the service types of the two flow tables before merging, but the service types of the target flow table and the service types of the two flow tables before merging satisfy the matching relationship, and the matching relationship is stored in the hardware module and the software module in advance, so that the target flow table can be hit when the flow table lookup is performed according to the service type of the data message when the data flow to which the first data message belongs or the data flow to which the third data message belongs is subsequently received.
Step 402, transmitting, by the software module, the target flow table to the hardware module.
In this embodiment of the present application, after the flow table merging is performed, a target flow table is obtained, and the target flow table may be transmitted to a hardware module, so that corresponding operations may be performed on other data packets of the same data flow according to the target flow table.
Step 403, transmitting, by the hardware module, a data stream to which the first data packet or the third data packet belongs according to the target stream table.
In this embodiment of the present application, after the hardware flow table obtains the target flow table, the data flow to which the first data packet or the third data packet belongs may be transmitted according to the target flow table.
In one embodiment, the action field of the target flow table includes a separation flag, and the transmitting, by the hardware module, the data flow to which the first data packet or the third data packet belongs according to the target flow table includes the following steps:
under the condition that a fourth data message is received, determining, by the hardware module, a service type of the fourth data message and an effective matching field of the fourth data message, wherein a data stream to which the fourth data message belongs is the same as a data stream to which the first data message belongs or a data stream to which the third data message belongs;
Searching a flow table stored in the hardware module according to the service type of the fourth data message, wherein the flow table stored in the hardware module comprises the target flow table;
determining the target flow table as a flow table matched with the fourth data message;
under the condition that the effective matching field of the fourth data message is completely the same as the matching field included in the matching field in the target flow table, executing corresponding operation on the fourth data message according to the action field in the target flow table;
and under the condition that the effective matching field of the fourth data message is partially the same as the matching field included in the matching field in the target flow table, determining a target action from the action field in the target flow table according to the effective matching field of the fourth data message, the matching field of the target flow table and the separation mark, and executing an operation corresponding to the target action on the fourth data message, wherein the separation mark is used for distinguishing the actions respectively corresponding to the first data message and the third data message.
Specifically, the target flow table is a merged flow table, and the two flow tables before merging can be divided into the following cases: (1) All matching fields in the matching field of one flow table (where the matching field does not include a traffic type) are contained in the matching field of another flow table; (2) The matching fields of the two flow tables have repeated matching fields, and also each have other different matching fields. Then, case (1) matches the field included in the matching field of the corresponding target flow table=matches the field included in the matching field of one of the flow tables before merging (the flow table matches the field included in the matching field of the other flow table), case (2) matches the field included in the matching field of the corresponding target flow table=the sum of the matching fields included in the matching fields of the two flow tables before merging (each matching field in the target flow table is not repeated). Thus, the valid matching field of the fourth data packet may be identical to the matching field included in the matching field in the target flow table, or the valid matching field of the fourth data packet may be partially identical to the matching field included in the matching field in the target flow table.
In exactly the same case, actions included in the action field of the target flow table may be performed directly.
And under the condition of partial same, determining which actions in the action fields of the target flow table are target actions, and executing corresponding operations according to the target actions. It can be understood that the above-mentioned target actions are related to the separation flag in the action domain of the target flow table, that is, the target flow table distinguishes the actions included in the action domain by setting the separation flag, so that the fourth data packet can find the corresponding actions in the action domain in the target flow table according to the data flow to which the fourth data packet belongs.
In one embodiment, the matching field and the action field of the target flow table each include two separation flags, and the determining the target action from the action field of the target flow table according to the valid matching field of the fourth data packet, the matching field of the target flow table, and the separation flag includes the following procedures:
if the valid matching field of the fourth data packet includes the first matching field and the second matching field in the matching field of the target flow table, but does not include the third matching field, determining an action before the second separation mark in the action field of the target flow table as the target action; wherein the first matching field comprises a field before a first separation flag of the matching field, the second matching field comprises a field after the first separation flag and before a second separation flag of the matching field, and the third matching field comprises a field after the second separation flag of the matching field;
And if the valid matching field of the fourth data packet includes the first matching field and the third matching field in the matching field of the target flow table, but does not include the second matching field, determining an action before the first separation mark and an action after the second separation mark in the action field of the target flow table as the target action.
Specifically, the separation flag included in the matching field and the action field of the target flow table may be a special flag that occupies less space (e.g., 1 bit). The two separation marks included in the matching field of the target flow table may be marks with the same expression form, but different positions. By identifying the location of the separation flag in the matching field of the target flow table, it can be determined to which data flow (e.g., the data flow to which the first data packet or the third data packet belongs) the matching field corresponds. It can be understood that the first matching field in the matching field of the target flow table may correspond to a repeated matching field included in the matching field of the two flow tables before the merging; and the second matching field corresponds to other matching fields except repeated matching fields included in the matching field of a certain flow table (called A flow table for short) before combination; and a third matching field, corresponding to other matching fields than the repeated matching field included in the matching field of another flow table (abbreviated as B flow table herein) before merging. Two separation marks are respectively positioned between the first matching field and the second matching field, and between the second matching field and the third matching field. In this way, the separation of the first, second and third matching fields is achieved using two separation flags in the target flow table. It can be understood that if the matching fields included in the matching field of a certain flow table before merging are included in the matching field of another flow table, then the second matching field or the third matching field may not include any matching field, and at this time, two separation marks still exist.
Correspondingly, the two separation marks in the action field of the target flow table may correspond to the two separation marks in the matching field, that is, the action before the first separation mark corresponds to the repeated action included in the action fields of the two flow tables that are not combined; the actions before the second separation mark after the first separation mark correspond to the unique actions included in the action field of one of the flow tables (A flow table) except the repeated actions; and the action following the second separation flag corresponds to a unique action included in the action field of another flow table (B flow table) except for the above repeated actions. Therefore, the target action can be determined from the action domain of the target flow table according to the matching relationship between the effective matching field of the fourth data message and the matching field included in the matching domain of the target flow table, so that the fourth data message is correspondingly operated according to the hit combined flow table, and the effects of realizing the searching and forwarding functions of the flow table and saving the hardware storage space are achieved.
In one embodiment, the matching field of the target flow table may further include first location information and second location information, and the action field of the target flow table may further include third location information and fourth location information, wherein the four location information indicates lengths of the matching fields and actions included in the two flow tables before the merging, respectively, the first location information and the third location information are related to one of the flow tables before the merging (a flow table), and the second location information and the fourth location information are related to the other flow table before the merging (B flow table). For example, the first position information, the second position information, the third position information, and the fourth position information may be offset values.
In this embodiment, the matching fields and actions of the two flow tables before merging are distinguished by using the separation marks in the matching fields and the action fields of the target flow table, and the positions of the matching fields and actions are quickly determined by combining the first position information, the second position information, the third position information and the fourth position information, so that the target action corresponding to the first data message or the third data message can be conveniently found, and further, the corresponding forwarding operation can be performed on the fourth data message according to the target flow table, thereby ensuring the searching accuracy and the searching efficiency of the flow table under the condition of realizing the flow table merging and saving the hardware storage space.
It is to be understood that the steps 401 to 403 may be performed separately, that is, in the case that the flow table in the software module satisfies the flow table merging condition, that is, the flow table merging is performed, so that the purpose of saving the storage space may be achieved.
In the embodiment of the present application, for the flow table in the second format corresponding to the first data packet after the dynamic compression is completed, if it is determined that the flow table and other flow tables in the software module further meet the flow table merging condition, the two flow tables are merged and then sent to the hardware module, so that the hardware storage space can be saved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a message transmission device according to an embodiment of the present application, and as shown in fig. 5, the message transmission device includes:
a receiving unit 501, configured to receive a first data packet through a hardware module;
a first determining unit 502, configured to determine a service type of the first data packet;
a sending unit 503, configured to send, by the hardware module, the first data packet and a service type of the first data packet to a software module when it is determined that a flow table item that matches the first data packet does not exist in a flow table stored by the hardware module;
an obtaining unit 504, configured to obtain, by using the software module, a flow table in a first format corresponding to the first data packet;
a second determining unit 505, configured to determine, according to a service type of the first data packet, an effective matching field of the first data packet, where a size of a space occupied by a first matching field of the flow table in the first format is a preset value;
a conversion unit 506, configured to convert, by using the software module, the flow table in the first format into a flow table in a second format according to the valid matching field of the first data packet, where a second matching field of the flow table in the second format includes a service type of the first data packet and the valid matching field of the first data packet, and a space occupied by the second matching field is smaller than a space occupied by the first matching field;
A transmitting unit 507, configured to transmit, to the hardware module, a flow table in a second format corresponding to the first data packet through the software module;
and the message transmission unit 508 is configured to transmit, by using the hardware module, a data stream to which the first data message belongs according to a stream table in a second format corresponding to the first data message.
In one possible design, the first determining unit 502 is specifically configured to:
acquiring the identification information of the first data message, wherein the identification information of the first data message comprises an effective matching field of the first data message;
and determining the service type of the first data message according to the identification information.
In one possible design, the message transmission unit 508 is specifically configured to:
under the condition that a second data message is received, determining the service type of the second data message through the hardware module, wherein the data flow of the second data message is the same as the data flow of the first data message;
searching a flow table stored in the hardware module according to the service type of the second data message, wherein the flow table stored in the hardware module comprises a flow table in the second format corresponding to the first data message;
And executing corresponding operation on the second data message according to the flow table of the second format corresponding to the first data message.
In one possible design, the apparatus further comprises:
the merging unit is used for merging the flow table of the second format corresponding to the first data message with the flow table corresponding to the third data message through the software module to obtain a target flow table under the condition that the flow table of the second format corresponding to the first data message and the flow table corresponding to the third data message in the software module are determined to meet the flow table merging condition; wherein the flow table merging conditions include: the matching fields of the two flow tables are provided with repeated fields, and the space occupied by the combined flow table is smaller than the space occupied by a preset single flow table;
the transmission unit 507 is specifically configured to:
transmitting the target flow table to the hardware module through the software module;
the message transmission unit 508 is specifically configured to:
and transmitting the data stream to which the first data message or the third data message belongs according to the target stream table through the hardware module.
In one possible design, the action field of the target flow table includes a separation flag, and the message transmission unit 508 is specifically configured to:
Under the condition that a fourth data message is received, determining, by the hardware module, a service type of the fourth data message and an effective matching field of the fourth data message, wherein a data stream to which the fourth data message belongs is the same as a data stream to which the first data message belongs or a data stream to which the third data message belongs;
searching a flow table stored in the hardware module according to the service type of the fourth data message, wherein the flow table stored in the hardware module comprises the target flow table;
determining the target flow table as a flow table matched with the fourth data message;
under the condition that the effective matching field of the fourth data message is completely the same as the matching field included in the matching field in the target flow table, executing corresponding operation on the fourth data message according to the action field in the target flow table;
and under the condition that the effective matching field of the fourth data message is partially the same as the matching field included in the matching field in the target flow table, determining a target action from the action field of the target flow table according to the effective matching field of the fourth data message, the matching field of the target flow table and the separation mark, and executing an operation corresponding to the target action on the fourth data message, wherein the separation mark is used for distinguishing the actions respectively corresponding to the first data message and the third data message.
In one possible design, the matching field and the action field of the target flow table each include two separation flags, and the message transmission unit 508 is specifically configured to:
if the valid matching field of the fourth data packet includes the first matching field and the second matching field in the matching field of the target flow table, but does not include the third matching field, determining an action before the second separation mark in the action field of the target flow table as the target action; wherein the first matching field comprises a field before a first separation flag of the matching field, the second matching field comprises a field after the first separation flag and before a second separation flag of the matching field, and the third matching field comprises a field after the second separation flag of the matching field;
and if the valid matching field of the fourth data packet includes the first matching field and the third matching field in the matching field of the target flow table, but does not include the second matching field, determining an action before the first separation mark and an action after the second separation mark in the action field of the target flow table as the target action.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 6, the above-described electronic device includes a memory 601, a processor 602, and a network interface 603. Wherein the memory 601, the processor 602 and the network interface 603 are communicatively connected to each other via a bus. The electronic device may be the message transmission apparatus in fig. 1.
The memory 601 is used to provide a storage space, and data such as an operating system and a computer program may be stored in the storage space. The memory 601 includes, but is not limited to, a random access memory (random access memory, RAM), a read-only memory (ROM), an erasable programmable read-only memory (erasable programmable read only memory, EPROM), or a portable read-only memory (compact disc read-only memory, CD-ROM). The memory 601 is used to store applications and data.
The processor 602 is a module for performing arithmetic operations and logical operations, and may be one or a combination of processing modules such as a central processing unit (central processing unit, CPU), a graphics card processor (graphics processing unit, GPU), an embedded processor, or a microprocessor (microprocessor unit, MPU).
The memory 601 stores a computer program, and the processor 602 calls the computer program stored in the memory 601 to enable the electronic device to implement the message transmission method according to the above embodiments of the present application.
The present application also provides a computer readable storage medium, in which a computer program is stored, which when executed on one or more processors, can implement the method shown in the above method embodiments.
It should be understood that, in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed method, apparatus, and system may be implemented in other manners. For example, the device embodiments described above are merely illustrative; for example, the division of the units is only one logic function division, and other division modes can be adopted in actual implementation; for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may be physically included separately, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
Those of ordinary skill in the art will appreciate that implementing all or part of the process of the method of this embodiment may be accomplished by a computer program to instruct related hardware, the program may be stored on a computer readable storage medium, and the program, when executed, may include the process of the method embodiments as described herein. And the aforementioned storage medium includes: ROM or random access memory RAM, magnetic or optical disk, etc.
Claims (7)
1. A message transmission method applied to a DPU, the method comprising:
receiving a first data message through a hardware module, and determining the service type of the first data message;
under the condition that the stream table stored by the hardware module does not have the stream table item matched with the first data message, the first data message and the service type of the first data message are sent to a software module through the hardware module;
acquiring a first-format flow table corresponding to the first data message through the software module, and determining an effective matching field of the first data message according to the service type of the first data message, wherein the size of a space occupied by a first matching field of the first-format flow table is a preset value;
converting, by the software module, the flow table of the first format into a flow table of a second format according to the valid matching field of the first data packet, where a second matching field of the flow table of the second format includes a service type of the first data packet and the valid matching field of the first data packet, and a space occupied by the second matching field is smaller than a space occupied by the first matching field;
Under the condition that a flow table of a second format corresponding to the first data message and a flow table corresponding to a third data message in the software module meet the flow table merging condition, merging the flow table of the second format corresponding to the first data message and the flow table corresponding to the third data message through the software module to obtain a target flow table; wherein the flow table merging conditions include: the matching fields of the two flow tables are provided with repeated fields, and the space occupied by the combined flow table is smaller than the space occupied by a preset single flow table; the action domain of the target flow table comprises a separation mark;
transmitting the target flow table to the hardware module through the software module;
under the condition that a fourth data message is received, determining, by the hardware module, a service type of the fourth data message and an effective matching field of the fourth data message, wherein a data stream to which the fourth data message belongs is the same as a data stream to which the first data message belongs or a data stream to which the third data message belongs;
searching a flow table stored in the hardware module according to the service type of the fourth data message, wherein the flow table stored in the hardware module comprises the target flow table;
Determining the target flow table as a flow table matched with the fourth data message;
under the condition that the effective matching field of the fourth data message is completely the same as the matching field included in the matching field in the target flow table, executing corresponding operation on the fourth data message according to the action field in the target flow table;
determining a target action from an action domain of the target flow table according to the valid matching field of the fourth data message, the matching domain of the target flow table and the separation mark under the condition that the valid matching field of the fourth data message is partially the same as the matching field included in the matching domain of the target flow table, and executing an operation corresponding to the target action on the fourth data message, wherein the separation mark is used for distinguishing actions corresponding to the first data message and the third data message respectively;
transmitting the flow table of the second format corresponding to the first data message to the hardware module through the software module under the condition that the flow table of the second format corresponding to the first data message and the flow tables corresponding to other data messages in the software module do not meet the flow table merging condition; and transmitting the data stream of the first data message through the hardware module according to a stream table of a second format corresponding to the first data message.
2. The method of claim 1, wherein the receiving, by the hardware module, the first data message, determining the traffic type of the first data message, comprises:
acquiring the identification information of the first data message, wherein the identification information of the first data message comprises an effective matching field of the first data message;
and determining the service type of the first data message according to the identification information.
3. The method according to claim 1 or 2, wherein the transmitting, by the hardware module, the data stream to which the first data packet belongs according to the flow table in the second format corresponding to the first data packet includes:
under the condition that a second data message is received, determining the service type of the second data message through the hardware module, wherein the data flow of the second data message is the same as the data flow of the first data message;
searching a flow table stored in the hardware module according to the service type of the second data message, wherein the flow table stored in the hardware module comprises a flow table in the second format corresponding to the first data message;
and executing corresponding operation on the second data message according to the flow table of the second format corresponding to the first data message.
4. The method of claim 1 or 2, wherein the matching field and the action field of the target flow table each include two separate flags, and wherein determining the target action from the action field of the target flow table based on the valid matching field of the fourth data packet, the matching field of the target flow table, and the separate flags comprises:
if the valid matching field of the fourth data packet includes the first matching field and the second matching field in the matching field of the target flow table, but does not include the third matching field, determining an action before the second separation mark in the action field of the target flow table as the target action; wherein the first matching field comprises a field before a first separation flag of the matching field, the second matching field comprises a field after the first separation flag and before a second separation flag of the matching field, and the third matching field comprises a field after the second separation flag of the matching field;
and if the valid matching field of the fourth data packet includes the first matching field and the third matching field in the matching field of the target flow table, but does not include the second matching field, determining an action before the first separation mark and an action after the second separation mark in the action field of the target flow table as the target action.
5. A message transmission apparatus, comprising:
the receiving unit is used for receiving the first data message through the hardware module;
a first determining unit, configured to determine a service type of the first data packet;
a sending unit, configured to send, by the hardware module, the first data packet and a service type of the first data packet to a software module when it is determined that a flow table item that matches the first data packet does not exist in a flow table stored by the hardware module;
the acquisition unit is used for acquiring a flow table in a first format corresponding to the first data message through the software module;
a second determining unit, configured to determine, according to a service type of the first data packet, an effective matching field of the first data packet, where a size of a space occupied by a first matching field of the flow table in the first format is a preset value;
the conversion unit is used for converting the flow table of the first format into a flow table of a second format according to the effective matching field of the first data message through the software module, wherein a second matching field of the flow table of the second format comprises the service type of the first data message and the effective matching field of the first data message, and the space occupied by the second matching field is smaller than the space occupied by the first matching field;
The merging unit is used for merging the flow table of the second format corresponding to the first data message with the flow table corresponding to the third data message through the software module to obtain a target flow table when the flow table of the second format corresponding to the first data message and the flow table corresponding to the third data message in the software module meet the flow table merging condition; wherein the flow table merging conditions include: the matching fields of the two flow tables are provided with repeated fields, and the space occupied by the combined flow table is smaller than the space occupied by a preset single flow table;
the transmission unit is used for transmitting the target flow table to the hardware module through the software module when the flow table in the second format corresponding to the first data message and the flow table corresponding to the third data message in the software module meet the flow table merging condition;
the message transmission unit is used for determining the service type of the fourth data message and the effective matching field of the fourth data message through the hardware module under the condition of receiving the fourth data message, wherein the data stream of the fourth data message is the same as the data stream of the first data message or the data stream of the third data message; searching a flow table stored in the hardware module according to the service type of the fourth data message, wherein the flow table stored in the hardware module comprises the target flow table; determining the target flow table as a flow table matched with the fourth data message;
The message transmission unit is further configured to perform a corresponding operation on the fourth data message according to the action field in the target flow table when the valid matching field of the fourth data message is identical to the matching field included in the matching field in the target flow table; determining a target action from the action domain of the target flow table according to the valid matching field of the fourth data message, the matching domain of the target flow table and a separation mark in the action domain of the target flow table under the condition that the valid matching field of the fourth data message is partially the same as the matching field included in the matching domain of the target flow table, and executing an operation corresponding to the target action on the fourth data message, wherein the separation mark is used for distinguishing the actions respectively corresponding to the first data message and the third data message;
the transmission unit is further configured to transmit, by the software module, the flow table in the second format corresponding to the first data packet to the hardware module when neither the flow table in the second format corresponding to the first data packet nor the flow tables corresponding to other data packets in the software module meet the flow table merging condition;
And the message transmission unit is further configured to transmit, by using the hardware module, a data stream to which the first data message belongs according to the flow table of the second format corresponding to the first data message, if it is determined that neither the flow table of the second format corresponding to the first data message nor the flow tables corresponding to other data messages in the software module meet the merging condition of the flow tables.
6. An electronic device, comprising: a memory, a processor, and a network interface, wherein the memory, the processor, and the network interface are communicatively connected to each other; wherein the memory stores program instructions; the program instructions, when executed by the processor, cause the processor to perform the steps of the method of any of claims 1-4.
7. A computer-readable storage medium, wherein the computer-readable storage medium has a computer program stored therein; the steps of the method of any of claims 1-4 are performed when the computer program is run on one or more processors.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210484748.8A CN114726788B (en) | 2022-05-06 | 2022-05-06 | Message transmission method applied to DPU and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210484748.8A CN114726788B (en) | 2022-05-06 | 2022-05-06 | Message transmission method applied to DPU and related device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114726788A CN114726788A (en) | 2022-07-08 |
CN114726788B true CN114726788B (en) | 2024-02-02 |
Family
ID=82230629
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210484748.8A Active CN114726788B (en) | 2022-05-06 | 2022-05-06 | Message transmission method applied to DPU and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114726788B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115460145A (en) * | 2022-08-15 | 2022-12-09 | 阿里云计算有限公司 | Forwarding rule issuing method, intelligent network card and storage medium |
CN115099978B (en) * | 2022-08-25 | 2022-11-18 | 深圳星云智联科技有限公司 | Data processing method and device |
CN115150203B (en) * | 2022-09-02 | 2022-11-15 | 珠海星云智联科技有限公司 | Data processing method and device, computer equipment and storage medium |
CN117812159A (en) * | 2023-12-08 | 2024-04-02 | 中科驭数(北京)科技有限公司 | Message transmission method, device, equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104702509A (en) * | 2015-03-31 | 2015-06-10 | 杭州华三通信技术有限公司 | Method and device for isolating SDN protocol message from data message |
CN105515965A (en) * | 2014-09-25 | 2016-04-20 | 杭州华为数字技术有限公司 | Data flow transmission method and transmission device |
CN109962832A (en) * | 2017-12-26 | 2019-07-02 | 华为技术有限公司 | The method and apparatus of Message processing |
CN111510329A (en) * | 2020-04-10 | 2020-08-07 | 全球能源互联网研究院有限公司 | Method for processing message in electric SDN controller and flow table matching module |
CN111740909A (en) * | 2020-06-19 | 2020-10-02 | 联想(北京)有限公司 | Message processing method and device, network transmission equipment and message processing system |
CN112866111A (en) * | 2019-11-28 | 2021-05-28 | 北京京东尚科信息技术有限公司 | Flow table management method and device |
CN113542125A (en) * | 2018-03-31 | 2021-10-22 | 华为技术有限公司 | Method and device for forwarding message based on integrated flow table |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6490205B2 (en) * | 2014-06-30 | 2019-03-27 | 華為技術有限公司Huawei Technologies Co.,Ltd. | Method, apparatus and system for flow entry configuration |
-
2022
- 2022-05-06 CN CN202210484748.8A patent/CN114726788B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105515965A (en) * | 2014-09-25 | 2016-04-20 | 杭州华为数字技术有限公司 | Data flow transmission method and transmission device |
CN104702509A (en) * | 2015-03-31 | 2015-06-10 | 杭州华三通信技术有限公司 | Method and device for isolating SDN protocol message from data message |
CN109962832A (en) * | 2017-12-26 | 2019-07-02 | 华为技术有限公司 | The method and apparatus of Message processing |
CN113542125A (en) * | 2018-03-31 | 2021-10-22 | 华为技术有限公司 | Method and device for forwarding message based on integrated flow table |
CN112866111A (en) * | 2019-11-28 | 2021-05-28 | 北京京东尚科信息技术有限公司 | Flow table management method and device |
CN111510329A (en) * | 2020-04-10 | 2020-08-07 | 全球能源互联网研究院有限公司 | Method for processing message in electric SDN controller and flow table matching module |
CN111740909A (en) * | 2020-06-19 | 2020-10-02 | 联想(北京)有限公司 | Message processing method and device, network transmission equipment and message processing system |
Also Published As
Publication number | Publication date |
---|---|
CN114726788A (en) | 2022-07-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114726788B (en) | Message transmission method applied to DPU and related device | |
CN102104541B (en) | Header processing engine | |
US9276854B2 (en) | Scaling egress network traffic | |
CN112243046B (en) | Communication method and network card | |
CN113709047B (en) | Data forwarding system and method for automobile domain controller | |
US20160218975A1 (en) | Information processing system, information processing apparatus and control method of information processing system | |
CN101019385A (en) | Port aggregation across stack of devices | |
CN113746749A (en) | Network connection device | |
EP3744066B1 (en) | Method and device for improving bandwidth utilization in a communication network | |
CN112437028A (en) | Method and system for expanding multiple network ports of embedded system | |
CN114885045B (en) | Method and device for saving DMA channel resources in high-speed intelligent network card/DPU | |
US7616662B2 (en) | Parser for parsing data packets | |
EP4203395A1 (en) | Packet forwarding method and apparatus, and computer-readable storage medium | |
CN114363256B (en) | Message parsing method based on network card and related device | |
US9330054B2 (en) | System and method for assigning a message | |
CN117014390A (en) | Data transmission method, device, electronic equipment and storage medium | |
JP4209186B2 (en) | A processor configured to reduce memory requirements for fast routing and switching of packets | |
KR20060131758A (en) | Network message processing using pattern matching | |
CN115278395A (en) | Network switching equipment, data stream processing control method and related equipment | |
CN111865801B (en) | Virtio port-based data transmission method and system | |
CN115460145A (en) | Forwarding rule issuing method, intelligent network card and storage medium | |
CN115002808A (en) | Information forwarding method, device, equipment and storage medium | |
CN113259271A (en) | Message switching method and message switching system | |
CN116137606A (en) | Method for forwarding message and related equipment | |
CN108712242B (en) | System and method for improving signaling processing capacity in packet equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |