Datagram processing method and device, electronic equipment and readable storage medium

By parsing and encapsulating VXLAN packets in the data plane of a programmable switch and processing them using a DPU, the problem of high CPU utilization in existing technologies is solved, and the processing efficiency of data packets is improved.

CN116436876BActive Publication Date: 2026-05-05PENG CHENG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PENG CHENG LAB
Filing Date
2023-04-20
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In existing technologies, when VXLAN packet processing is implemented using software logic, the CPU utilization rate is high, resulting in low data packet processing efficiency.

Method used

The programmable switch parses the data packets to be processed through its data plane, determines whether to use Virtual Extended Local Area Network (VXLAN) for processing, encapsulates the packet header, and uses the built-in DPU for processing, thereby reducing CPU load.

Benefits of technology

This improves the efficiency of data packet processing, reduces the CPU's data processing load, and ensures high processing performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116436876B_ABST
    Figure CN116436876B_ABST
Patent Text Reader

Abstract

This application discloses a data packet processing method, apparatus, electronic device, and readable storage medium, applied in the field of communication technology. The data packet processing method includes: acquiring a data packet to be processed, and parsing the data packet to be processed through a data plane to obtain packet information; determining, based on the packet information, whether to use a Virtual Extended Local Area Network (VXLAN) to process the data packet to be processed; if so, encapsulating the data packet to be processed with a packet header to obtain a VXLAN packet, and processing the VXLAN packet. This application solves the technical problem of low data packet processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a data message processing method, apparatus, electronic device, and readable storage medium. Background Technology

[0002] With the rapid development of technology, the demand for communication interconnection is also increasing. In order to meet the high demand for communication interconnection, VXLAN (Virtual eXtensible Local Area Network) is used as a communication forwarding tunnel to realize the interconnection of multiple target ranges with massive data packets. Currently, when using software logic to implement VXLAN packet processing, multiple ports need to be built, and the number of packets to be processed is large, which leads to a large CPU processing traffic and a high CPU utilization. Therefore, it is necessary to reduce the amount of packets processed at one time, resulting in low data packet processing efficiency. Summary of the Invention

[0003] The main objective of this application is to provide a data packet processing method, apparatus, electronic device, and readable storage medium, aiming to solve the technical problem of low data packet processing efficiency in the prior art.

[0004] To achieve the above objectives, this application provides a data packet processing method applied to a programmable switch, wherein the programmable switch includes a data plane, and the data packet processing method includes:

[0005] The data message to be processed is acquired, and the data message to be processed is parsed through the data plane to obtain the message information;

[0006] The data plane determines whether to use Virtual Extended Local Area Network (VXLAN) to process the data packet based on the message information.

[0007] If so, the data packet to be processed is encapsulated with a header to obtain a VXLAN packet, and the VXLAN packet is then processed.

[0008] Optionally, the programmable switch further includes a control plane, and the step of determining whether to use a Virtual Extended Local Area Network (VXLAN) to process the data packet based on the packet information through the data plane includes:

[0009] Obtain the VXLAN flow table configured by the control plane, wherein the VXLAN flow table includes a VXLAN identifier;

[0010] The data plane is used to determine whether the message information matches the VXLAN identifier;

[0011] If a match is found, it is determined that VXLAN will be used to process the data packet to be processed.

[0012] Optionally, the programmable switch further includes a control plane, and the step of encapsulating the data packet to be processed with a packet header to obtain a VXLAN packet includes:

[0013] Obtain the VXLAN flow table configured by the control plane, wherein the VXLAN flow table includes the correspondence between VXLAN identifiers and VXLAN tunnel endpoints;

[0014] The target VXLAN identifier matching the message information is obtained by querying the VXLAN flow table based on the message information in the data plane;

[0015] The header of the data packet to be processed is encapsulated using the target tunnel endpoint corresponding to the target VXLAN identifier in the VXLAN flow table.

[0016] Optionally, the message information further includes a routing address, which may be an internal routing address or an external routing address, and the steps for processing the VXLAN message include:

[0017] The source port of the data packet to be processed is identified by the data plane to obtain the port identification result;

[0018] If the port identification result includes an ingress port, then the VXLAN packet is forwarded to the internal routing address through the target tunnel endpoint;

[0019] If the port identification result includes an outgoing port, then the VXLAN message is forwarded to the external routing address through the outgoing port.

[0020] Optionally, the message information includes a message identifier, and after the step of determining whether the message information matches the VXLAN identifier, the method further includes:

[0021] If they do not match, the data plane is used to determine whether the message identifier belongs to the VXLAN identifier type.

[0022] If it falls under this category, then VXLAN will be used to process the data packet to be processed.

[0023] Optionally, the message information further includes a routing address, and after the step of determining that VXLAN should be used to process the data packet if it belongs to the routing address, the method further includes:

[0024] The data plane generates the tunnel endpoint corresponding to the packet identifier based on the routing address, and generates a set of updated flow table information based on the packet identifier and the tunnel endpoint corresponding to the packet identifier.

[0025] The control plane updates the VXLAN flow table based on the updated flow table information.

[0026] Optionally, prior to the step of obtaining the VXLAN flow table configured by the control plane, the method further includes:

[0027] Obtain multiple sets of preset flow table information, wherein each set of flow table information includes a correspondence between a VXLAN identifier and a VXLAN tunnel endpoint, and different flow table information corresponds to different VXLAN identifiers;

[0028] The VXLAN flow table is configured through the control plane based on the multiple sets of flow table information.

[0029] To achieve the above objectives, this application also provides a data packet processing apparatus applied to a programmable switch, the programmable switch including a data plane, and the data packet processing apparatus including:

[0030] The acquisition module is used to acquire the data message to be processed and parse the data message to be processed through the data plane to obtain the message information;

[0031] The judgment module is used to determine, based on the message information, whether to use Virtual Extended Local Area Network (VXLAN) to process the data message to be processed;

[0032] The processing module is configured to, if so, encapsulate the data packet to be processed with a header to obtain a VXLAN packet, and process the VXLAN packet.

[0033] Optionally, the programmable switch further includes a control plane, and the determination module is further configured to:

[0034] Obtain the VXLAN flow table configured by the control plane, wherein the VXLAN flow table includes a VXLAN identifier;

[0035] The data plane is used to determine whether the message information matches the VXLAN identifier;

[0036] If a match is found, it is determined that VXLAN will be used to process the data packet to be processed.

[0037] Optionally, the programmable switch further includes a control plane, and the processing module is further configured to:

[0038] Obtain the VXLAN flow table configured by the control plane, wherein the VXLAN flow table includes the correspondence between VXLAN identifiers and VXLAN tunnel endpoints;

[0039] The target VXLAN identifier matching the message information is obtained by querying the VXLAN flow table based on the message information in the data plane;

[0040] The header of the data packet to be processed is encapsulated using the target tunnel endpoint corresponding to the target VXLAN identifier in the VXLAN flow table.

[0041] Optionally, the message information further includes a routing address, which may be an internal routing address or an external routing address, and the processing module is further configured to:

[0042] The source port of the data packet to be processed is identified by the data plane to obtain the port identification result;

[0043] If the port identification result includes an ingress port, then the VXLAN flow table configured by the control plane is obtained, wherein the VXLAN flow table includes the correspondence between VXLAN identifiers and VXLAN tunnel endpoints. The target VXLAN identifier matching the message information is obtained by querying the VXLAN flow table according to the message information. The VXLAN message is forwarded to the internal routing address through the target tunnel endpoint corresponding to the target VXLAN identifier in the VXLAN flow table.

[0044] If the port identification result includes an outgoing port, then the VXLAN message is forwarded to the external routing address through the outgoing port.

[0045] Optionally, the message information includes a message identifier, and after the step of determining whether the message information matches the VXLAN identifier, the data packet processing device is further configured to:

[0046] If they do not match, the data plane is used to determine whether the message identifier belongs to the VXLAN identifier type.

[0047] If it falls under this category, then VXLAN will be used to process the data packet to be processed.

[0048] Optionally, the message information further includes a routing address. After the step of determining that VXLAN should be used to process the data packet if it belongs to the routing address, the data packet processing device is further configured to:

[0049] The data plane generates the tunnel endpoint corresponding to the packet identifier based on the routing address, and generates a set of updated flow table information based on the packet identifier and the tunnel endpoint corresponding to the packet identifier.

[0050] The control plane updates the VXLAN flow table based on the updated flow table information.

[0051] Optionally, prior to the step of obtaining the VXLAN flow table configured by the control plane, the data packet processing apparatus is further configured to:

[0052] Obtain multiple sets of preset flow table information, wherein each set of flow table information includes a correspondence between a VXLAN identifier and a VXLAN tunnel endpoint, and different flow table information corresponds to different VXLAN identifiers;

[0053] The VXLAN flow table is configured through the control plane based on the multiple sets of flow table information.

[0054] This application also provides an electronic device, the electronic device comprising: a memory, a processor, and a program of the data packet processing method stored in the memory and executable on the processor, wherein when the program of the data packet processing method is executed by the processor, it can implement the steps of the data packet processing method as described above.

[0055] This application also provides a computer-readable storage medium storing a program implementing a data packet processing method, wherein when the program is executed by a processor, it implements the steps of the data packet processing method as described above.

[0056] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the data packet processing method described above.

[0057] This application provides a data packet processing method, apparatus, electronic device, and readable storage medium. Compared to methods that use software logic to implement VXLAN packet processing, this application is applied to a programmable switch. The programmable switch includes a data plane. It acquires a data packet to be processed and parses the data packet to obtain packet information. The data plane determines whether to use Virtual Extended Local Area Network (VXLAN) to process the data packet based on the packet information. If so, it encapsulates the data packet with a header to obtain a VXLAN packet and processes the VXLAN packet. Since the data plane has a built-in DPU (Data Processing Unit), it can process massive amounts of data, thereby reducing the CPU's data processing load and CPU usage. Therefore, it improves the processing efficiency of data packets while ensuring high processing performance. Attached Figure Description

[0058] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0059] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0060] Figure 1 This is a flowchart illustrating the first embodiment of the data packet processing method of this application;

[0061] Figure 2 This is an example diagram illustrating the processing flow of a data packet when the port identification result of the data packet to be processed includes the ingress port, as described in this application embodiment.

[0062] Figure 3 This is an example diagram illustrating the processing flow of a data packet when the port identification result of the data packet to be processed includes an outgoing port, as described in this application embodiment.

[0063] Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the data packet processing method in the embodiments of this application.

[0064] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0065] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0066] Example 1

[0067] This application provides a data packet processing method. In a first embodiment of this data packet processing method, it is applied to a programmable switch, the programmable switch including a data plane, as shown below. Figure 1 The data packet processing method includes:

[0068] Step S10: Obtain the data message to be processed, and parse the data message to be processed through the data plane to obtain message information;

[0069] In this embodiment, it should be noted that the number of data packets to be processed can be a single packet or multiple packets, and the data packets to be processed can be VXLAN packets or ordinary packets other than VXLAN packets.

[0070] For example, the data message to be processed is obtained through the data plane, and the data message to be processed is parsed through the data plane to obtain message information.

[0071] As an example, the five-tuple information of the data packet to be processed is parsed and extracted by the data plane, and the five-tuple information is used as the packet information. The five-tuple information includes at least one of the following: source address, destination address, source port, destination port, and protocol type.

[0072] Step S20: The data plane determines whether to use Virtual Extended Local Area Network (VXLAN) to process the data packet based on the message information.

[0073] For example, the data plane determines whether to use VXLAN to process the data packet based on the five-tuple information in the message information.

[0074] As an example, it is determined whether to use VXLAN to process the data packet to be processed based on the source address, the destination address, the source port, the destination port and / or the protocol type.

[0075] In step S20, the programmable switch further includes a control plane, and the step of determining whether to use a Virtual Extended Local Area Network (VXLAN) to process the data packet based on the packet information through the data plane includes:

[0076] Step S21: Obtain the VXLAN flow table configured by the control plane, wherein the VXLAN flow table includes a VXLAN identifier;

[0077] In this embodiment, it should be noted that the VXLAN flow table is a flow table pre-configured in the control plane.

[0078] For example, the VXLAN flow table configured by the control plane is obtained through the data plane.

[0079] Step S22: Determine whether the message information matches the VXLAN identifier;

[0080] Step S23: If a match is found, it is determined that VXLAN will be used to process the data packet to be processed.

[0081] For example, it is determined whether the message information matches any of the VXLAN identifiers; if the message information matches any of the VXLAN identifiers, it is determined that VXLAN will be used to process the data message to be processed.

[0082] As an example, the process involves traversing each VXLAN identifier in the VXLAN flow table based on the message information to determine whether the message information matches the VXLAN identifier.

[0083] In step S22, the message information includes a message identifier. After the step of determining whether the message information matches the VXLAN identifier, the method further includes:

[0084] Step S221: If there is no match, determine whether the packet identifier belongs to the VXLAN identifier type through the data plane;

[0085] Step S222: If it belongs to the category, then determine that VXLAN will be used to process the data packet to be processed.

[0086] For example, if the message information does not match the VXLAN identifier, the message identifier is identified through the data plane to determine whether the message identifier belongs to the VXLAN identifier type; if the message identifier belongs to the VXLAN identifier type, it is determined that VXLAN will be used to process the data message to be processed; if the message identifier does not belong to the VXLAN identifier type, it is determined that VXLAN will not be used to forward the data message to be processed.

[0087] It is understandable that, since the VXLAN flow table configured in the control plane may not include all VXLAN packet information, there may be cases where the data packet to be processed is actually a VXLAN packet, but because there is no VXLAN identifier in the VXLAN flow table configured in the control plane that matches the packet information of the data packet to be processed, the data packet to be processed is misjudged. This leads to the data packet to be processed using the normal packet processing method, which is required to be processed by VXLAN, resulting in the data packet being unable to be processed or the data packet processing efficiency being low.

[0088] By identifying the packet identifier of the data packet to be processed through the data plane when the packet information of the data packet to be processed does not match the VXLAN identifier in the VXLAN flow table configured in the control plane, the data packet to be processed is processed using VXLAN. This avoids the technical defect of misjudging the data packet to be processed and using ordinary packet processing method for the data packet that needs to be processed using VXLAN, resulting in the data packet being unable to be processed or the data packet processing efficiency being low. This improves the processing efficiency of the data packet.

[0089] Step S30: If yes, then the data packet to be processed is encapsulated with a header to obtain a VXLAN packet, and the VXLAN packet is processed.

[0090] For example, if VXLAN is used to forward the data packet to be processed, the data packet to be processed is encapsulated with a header to obtain a VXLAN packet, and the VXLAN packet is processed; if VXLAN is not used to forward the data packet to be processed, the data packet to be processed is processed directly.

[0091] In step S30, the programmable switch further includes a control plane, and the step of encapsulating the data packet to be processed with a header to obtain a VXLAN packet includes:

[0092] Step S31: Obtain the VXLAN flow table configured by the control plane, wherein the VXLAN flow table includes the correspondence between VXLAN identifiers and VXLAN tunnel endpoints;

[0093] As an example, the VXLAN tunnel endpoints include a first tunnel endpoint and a second tunnel endpoint.

[0094] Step S32: The target VXLAN identifier matching the message information is obtained by querying the VXLAN flow table through the data plane based on the message information;

[0095] Step S33: Encapsulate the header of the data packet to be processed by using the target tunnel endpoint corresponding to the target VXLAN identifier in the VXLAN flow table.

[0096] As an example, the header of the data packet to be processed is encapsulated using the target first tunnel endpoint corresponding to the target VXLAN identifier in the VXLAN flow table.

[0097] In step S30, the message information further includes a routing address, which may be an internal routing address or an external routing address. The step of processing the VXLAN message includes:

[0098] Step S311: Identify the source port of the data packet to be processed through the data plane to obtain the port identification result;

[0099] As an example, the data plane identifies the source port of the data packet to be processed based on the five-tuple information in the message information, and obtains the port identification result.

[0100] Step S312: If the port identification result includes an ingress port, then the VXLAN packet is forwarded to the internal routing address through the target tunnel endpoint;

[0101] As an example, if the port identification result includes an ingress port, the VXLAN packet is forwarded to the routing address through the target second tunnel endpoint corresponding to the target VXLAN identifier.

[0102] As an example, refer to Figure 2 , Figure 2 This is an example diagram illustrating the processing flow of a data packet when the port identification result of the data packet to be processed includes the ingress port, as described in this application embodiment. Figure 3This includes: the data plane (shown in the diagram), the control plane (shown in the diagram), the data packets to be processed (shown in the diagram), the packet header (shown in the diagram as the VXLAN packet header), and the internal routing address (shown in the diagram as routing information). The data plane parses the data packets to be processed, identifying the source port. The control plane receives configuration commands, configures the VXLAN flow table, and matches the data packets to be processed against the VXLAN flow table. If a match is found, the data packet is encapsulated with a packet header; otherwise, it is not processed. Finally, the data packets to be processed are sent based on their internal routing addresses.

[0103] Step S313: If the port identification result includes an outgoing port, then the VXLAN packet is forwarded to the external routing address through the outgoing port.

[0104] As an example, refer to Figure 3 , Figure 3 This is an example diagram illustrating the processing flow of a data packet when the port identification result of the data packet to be processed includes an outgoing port, as described in this application embodiment. Figure 3 This includes: the data plane (shown in the diagram), the control plane (shown in the diagram), the data packets to be processed (shown in the diagram), the packet header (shown in the diagram's VXLAN packet header), and the internal routing address (shown in the diagram's routing information). The data plane parses the data packets to be processed, identifying the source port. The control plane receives configuration commands, configures the VXLAN flow table, and matches the data packets to be processed against the VXLAN flow table. If a match is found, VXLAN parsing is performed on the data packets; otherwise, no processing is performed. Based on the internal routing address of the data packet to be processed, the data packet is then sent.

[0105] By identifying the source port of the data to be processed, the data packets to be processed can be accurately forwarded or received.

[0106] This application provides a data packet processing method. Compared to methods that use software logic to implement VXLAN packet processing, this application applies to a programmable switch. The programmable switch includes a data plane. It acquires a data packet to be processed and parses the data packet to obtain packet information. The data plane determines whether to use Virtual Extended Local Area Network (VXLAN) to process the data packet based on the packet information. If so, it encapsulates the data packet with a header to obtain a VXLAN packet and processes the VXLAN packet. Since the data plane also has a built-in DPU (Data Processing Unit), it can process massive amounts of data, thereby reducing the CPU's data processing load and CPU usage. Therefore, it improves the processing efficiency of data packets while ensuring high processing performance.

[0107] Example 2

[0108] Furthermore, referring to Figure 2 Based on the first embodiment of this application, in another embodiment of this application, the same or similar content as in the first embodiment can be referred to the above description, and will not be repeated hereafter. In addition, in step S222, the message information further includes a routing address. After the step of determining that VXLAN is used to process the data message to be processed if it belongs to the routing address, the method further includes:

[0109] Step A10: The data plane generates the tunnel endpoint corresponding to the packet identifier based on the routing address, and generates a set of updated flow table information based on the packet identifier and the tunnel endpoint corresponding to the packet identifier;

[0110] For example, the data plane generates a tunnel endpoint corresponding to the packet identifier based on the routing address and the packet information, and generates a set of updated flow table information based on the packet identifier and the tunnel endpoint corresponding to the packet identifier.

[0111] Step A20: The control plane updates the VXLAN flow table according to the updated flow table information.

[0112] For example, the updated flow table information is sent to the control plane through the data plane, and the updated flow table information is added to the VXLAN flow table through the control plane to update the VXLAN flow table.

[0113] Specifically, in step S31, prior to the step of obtaining the VXLAN flow table configured by the control plane, the method further includes:

[0114] Step S311: Obtain multiple sets of preset flow table information, wherein each set of flow table information includes a correspondence between a VXLAN identifier and a VXLAN tunnel endpoint, and different flow table information corresponds to different VXLAN identifiers;

[0115] In this embodiment, it should be noted that the multiple sets of flow table information can be set by the user or by experience.

[0116] Step S312: VXLAN flow tables are configured through the control plane based on the multiple sets of flow table information.

[0117] For example, a VXLAN flow table is obtained by constructing flow tables based on the multiple sets of flow table information through the control plane.

[0118] This application provides a data packet processing method. Compared to methods that use software logic to implement VXLAN packet processing, this application applies to a programmable switch. The programmable switch includes a data plane. It acquires a data packet to be processed and parses the data packet to obtain packet information. The data plane determines whether to use Virtual Extended Local Area Network (VXLAN) to process the data packet based on the packet information. If so, it encapsulates the data packet with a header to obtain a VXLAN packet and processes the VXLAN packet. Since the data plane also has a built-in DPU (Data Processing Unit), it can process massive amounts of data, thereby reducing the CPU's data processing load and CPU usage. Therefore, it improves the processing efficiency of data packets while ensuring high processing performance.

[0119] Example 3

[0120] This application embodiment also provides a data packet processing apparatus applied to a programmable switch, wherein the programmable switch includes a data plane, and the data packet processing apparatus includes:

[0121] The acquisition module is used to acquire the data message to be processed and parse the data message to be processed through the data plane to obtain the message information;

[0122] The judgment module is used to determine, based on the message information, whether to use Virtual Extended Local Area Network (VXLAN) to process the data message to be processed;

[0123] The processing module is configured to, if so, encapsulate the data packet to be processed with a header to obtain a VXLAN packet, and process the VXLAN packet.

[0124] Optionally, the programmable switch further includes a control plane, and the determination module is further configured to:

[0125] Obtain the VXLAN flow table configured by the control plane, wherein the VXLAN flow table includes a VXLAN identifier;

[0126] The data plane is used to determine whether the message information matches the VXLAN identifier;

[0127] If a match is found, it is determined that VXLAN will be used to process the data packet to be processed.

[0128] Optionally, the programmable switch further includes a control plane, and the processing module is further configured to:

[0129] Obtain the VXLAN flow table configured by the control plane, wherein the VXLAN flow table includes the correspondence between VXLAN identifiers and VXLAN tunnel endpoints;

[0130] The target VXLAN identifier matching the message information is obtained by querying the VXLAN flow table based on the message information in the data plane;

[0131] The header of the data packet to be processed is encapsulated using the target tunnel endpoint corresponding to the target VXLAN identifier in the VXLAN flow table.

[0132] Optionally, the message information further includes a routing address, which may be an internal routing address or an external routing address, and the processing module is further configured to:

[0133] The source port of the data packet to be processed is identified by the data plane to obtain the port identification result;

[0134] If the port identification result includes an ingress port, then the VXLAN flow table configured by the control plane is obtained, wherein the VXLAN flow table includes the correspondence between VXLAN identifiers and VXLAN tunnel endpoints. The target VXLAN identifier matching the message information is obtained by querying the VXLAN flow table according to the message information. The VXLAN message is forwarded to the internal routing address through the target tunnel endpoint corresponding to the target VXLAN identifier in the VXLAN flow table.

[0135] If the port identification result includes an outgoing port, then the VXLAN message is forwarded to the external routing address through the outgoing port.

[0136] Optionally, the message information includes a message identifier, and after the step of determining whether the message information matches the VXLAN identifier, the data packet processing device is further configured to:

[0137] If they do not match, the data plane is used to determine whether the message identifier belongs to the VXLAN identifier type.

[0138] If it falls under this category, then VXLAN will be used to process the data packet to be processed.

[0139] Optionally, the message information further includes a routing address. After the step of determining that VXLAN should be used to process the data packet if it belongs to the routing address, the data packet processing device is further configured to:

[0140] The data plane generates the tunnel endpoint corresponding to the packet identifier based on the routing address, and generates a set of updated flow table information based on the packet identifier and the tunnel endpoint corresponding to the packet identifier.

[0141] The control plane updates the VXLAN flow table based on the updated flow table information.

[0142] Optionally, prior to the step of obtaining the VXLAN flow table configured by the control plane, the data packet processing apparatus is further configured to:

[0143] Obtain multiple sets of preset flow table information, wherein each set of flow table information includes a correspondence between a VXLAN identifier and a VXLAN tunnel endpoint, and different flow table information corresponds to different VXLAN identifiers;

[0144] The VXLAN flow table is configured through the control plane based on the multiple sets of flow table information.

[0145] The data packet processing apparatus provided in this application employs the data packet processing method described in the above embodiments, thereby solving the technical problem of low data packet processing efficiency. Compared with the prior art, the beneficial effects of the data packet processing apparatus provided in this application are the same as those of the data packet processing method described in the above embodiments, and other technical features in this data packet processing apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0146] Example 4

[0147] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the data packet processing method described above.

[0148] The following is for reference. Figure 4 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers (PDAs), tablet computers, portable media players (PMPs), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0149] like Figure 4 As shown, an electronic device may include a processing unit (such as a central processing unit, graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in ROM (Read-Only Memory) or programs loaded from storage devices into RAM (Random Access Memory). RAM also stores various programs and data required for the operation of the electronic device. The processing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0150] Typically, the following systems can be connected to the I / O interface: input devices including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices including, for example, magnetic tapes, hard disks, etc.; and communication devices. Communication devices allow electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although electronic devices with various systems are shown in the figures, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.

[0151] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined above in the methods of embodiments of this disclosure.

[0152] The electronic device provided in this application, employing the data packet processing method described in the above embodiments, solves the technical problem of low data packet processing efficiency. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the data packet processing method described in the above embodiments, and other technical features of the electronic device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0153] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.

[0154] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0155] Example 5

[0156] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, which are used to execute the data packet processing method described in the above embodiment.

[0157] The computer-readable storage medium provided in this application embodiment may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Erasable Programmable Read Only Memory) or flash memory, optical fiber, CD-ROM (compact disc read-only memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0158] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.

[0159] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by an electronic device, the electronic device causes the electronic device to: acquire a data packet to be processed, and parse the data packet to be processed through the data plane to obtain packet information; determine, through the data plane, whether to use a Virtual Extended Local Area Network (VXLAN) to process the data packet to be processed based on the packet information; if so, encapsulate the data packet to be processed with a packet header to obtain a VXLAN packet, and process the VXLAN packet.

[0160] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a LAN (Local Area Network) or a WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0161] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0162] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0163] The computer-readable storage medium provided in this application stores computer-readable program instructions for executing the above-described data packet processing method, thus solving the technical problem of low data packet processing efficiency. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the data packet processing method provided in the above-described embodiments, and will not be repeated here.

[0164] Example 6

[0165] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the data packet processing method described above.

[0166] The computer program product provided in this application solves the technical problem of low processing efficiency of data packets. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of this application are the same as the beneficial effects of the data packet processing method provided in the above embodiments, and will not be repeated here.

[0167] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.

Claims

1. A data packet processing method, characterized in that, Applied to a programmable switch, the programmable switch including a data plane and a control plane, the data packet processing method includes: The system acquires data packets to be processed and parses the data packets to obtain packet information through the data plane, which has a built-in data processor. The data plane determines whether to use Virtual Extended Local Area Network (VXLAN) to process the data packet based on the message information. If so, the data packet to be processed is encapsulated with a header to obtain a VXLAN packet, and the VXLAN packet is then processed. The step of determining whether to use Virtual Extended Local Area Network (VXLAN) to process the data packet based on the packet information through the data plane includes: Obtain the VXLAN flow table configured by the control plane, wherein the VXLAN flow table includes a VXLAN identifier; The data plane determines whether the message information matches the VXLAN identifier, and the message information includes the message identifier and the routing address; If a match is found, it is determined that VXLAN will be used to process the data packet to be processed. If they do not match, the data plane is used to determine whether the message identifier belongs to the VXLAN identifier type. If it is, then VXLAN will be used to process the data packet to be processed. The data plane generates the tunnel endpoint corresponding to the packet identifier based on the routing address, and generates a set of updated flow table information based on the packet identifier and the tunnel endpoint corresponding to the packet identifier. The control plane updates the VXLAN flow table based on the updated flow table information.

2. The data packet processing method as described in claim 1, characterized in that, The programmable switch further includes a control plane, and the step of encapsulating the data packet to be processed with a header to obtain a VXLAN packet includes: Obtain the VXLAN flow table configured by the control plane, wherein the VXLAN flow table includes the correspondence between VXLAN identifiers and VXLAN tunnel endpoints; The target VXLAN identifier matching the message information is obtained by querying the VXLAN flow table based on the message information in the data plane; The header of the data packet to be processed is encapsulated using the target tunnel endpoint corresponding to the target VXLAN identifier in the VXLAN flow table.

3. The data packet processing method as described in claim 2, characterized in that, The message information also includes a routing address, which may be an internal routing address or an external routing address. The steps for processing the VXLAN message include: The source port of the data packet to be processed is identified by the data plane to obtain the port identification result; If the port identification result includes an ingress port, then the VXLAN packet is forwarded to the internal routing address through the target tunnel endpoint; If the port identification result includes an outgoing port, then the VXLAN packet is forwarded to the external routing address through the outgoing port.

4. The data packet processing method as described in claim 2, characterized in that, Prior to the step of obtaining the VXLAN flow table configured by the control plane, the method further includes: Obtain multiple sets of preset flow table information, wherein each set of flow table information includes a correspondence between a VXLAN identifier and a VXLAN tunnel endpoint, and different flow table information corresponds to different VXLAN identifiers; The VXLAN flow table is configured through the control plane based on the multiple sets of flow table information.

5. A data message processing apparatus, characterized in that, Applied to a programmable switch, the programmable switch including a data plane and a control plane, the data packet processing device includes: The acquisition module is used to acquire the data message to be processed and parse the data message to be processed through the data plane to obtain the message information. The data plane has a built-in data processor. The judgment module is used to determine, through the data plane, whether to use Virtual Extended Local Area Network (VXLAN) to process the data packet to be processed based on the packet information. Specifically, the judgment module is used to obtain the VXLAN flow table configured by the control plane, wherein the VXLAN flow table includes a VXLAN identifier, and to determine through the data plane whether the packet information matches the VXLAN identifier. The packet information includes a packet identifier and a routing address; if they match, it is determined that VXLAN should be used to process the data packet to be processed. The processing module is configured to, if so, encapsulate the data packet to be processed with a header to obtain a VXLAN packet, and process the VXLAN packet. The data packet processing device further includes, if there is a mismatch, determining whether the packet identifier belongs to the VXLAN identifier type through the data plane; if it does, determining that VXLAN should be used to process the data packet to be processed; generating a tunnel endpoint corresponding to the packet identifier through the data plane based on the routing address, and generating a set of updated flow table information based on the packet identifier and the tunnel endpoint corresponding to the packet identifier; and updating the VXLAN flow table through the control plane based on the updated flow table information.

6. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the steps of the data packet processing method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that implements a data packet processing method, the program being executed by a processor to implement the steps of the data packet processing method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Extensible virtual local area network message transmission method, device and system

    CN103888386A

  • Message transmission method and device

    CN110581792A