Data packet processing method and system based on OVS-dpdk

By using batch processing mechanism and cache nodes in OVS-DPDK to process CT table entries, the problem of global lock competition in CT modules is solved, the packet processing performance is improved, the hardware network card bandwidth is matched, and the CPU resources are reduced waste.

WO2024244410A1PCT designated stage expired Publication Date: 2024-12-05CHINA TELECOM CLOUD TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/139660
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-01
Filing Date
2023-12-18
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

The CT module in the OVS-DPDK architecture is limited when accessing multiple PMD processes, resulting in global lock competition, performance cannot be improved, processing speed of hardware network card bandwidth cannot be matched, and serial processing leads to wasted CPU resources.

Method used

The batch processing mechanism is used to cache data packets, and when the global lock is failed to acquire, the CT table entry pointer is filled into the cache node, and then inserted it after the data packet is processed, reducing the time to wait for the lock to be released and improving parallel processing efficiency.

Benefits of technology

Reduces serial processing time, improves CPS rate and stream table offload speed, optimizes network performance, and matches hardware bandwidth processing speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023139660_05122024_PF_FP_ABST
    Figure CN2023139660_05122024_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of cloud computing, and relates to a data packet processing method and system based on an OVS-DPDK. The method in the embodiments of the present disclosure comprises: step S01, acquiring PMD data packets from a DPDK, and storing the PMD data packets as a batch; step S02, acquiring the PMD data packets from the batch, and performing a flow table processing process, wherein two operations are performed on a non-existent CT table entry in the flow table processing process: for a situation in which a lock is successfully acquired, inserting a CT table entry into a CT link table, and for a situation in which the acquisition of a lock fails, storing a pointer of a CT table entry into a CT cache node; and step S03, after all the data packets have been fetched, executing a CT table entry insertion process of the CT cache node, which involves: when the lock has been acquired successfully, inserting, into the CT link table, the CT table entry corresponding to the pointer in the CT cache node, and deleting the CT cache node, and after execution is completed, returning to step S01 to process PMD data packets in the next round. The system in the embodiments of the present disclosure is implemented on the basis of the method. The embodiments of the present disclosure reduce the time needed for serial processing during the batch processing of data packets, thereby increasing the CPS rate and the flow table unloading speed.
Need to check novelty before this filing date? Find Prior Art

Description

A data packet processing method and system based on OVS-DPDK Technical Field

[0001] The embodiments of the present disclosure relate to the field of cloud computing technology, and in particular to a data packet processing method and system based on OVS-DPDK. Background Art

[0002] Cloud platform networks rely on the kernel space of OVS (Open vSwitch) to process application packets. The Data Plane Development Kit (DPDK) is a collection of function libraries and drivers for fast packet processing. When combined with OVS, DPDK delivers high performance and facilitates development.

[0003] The CT (Connection Tracking) module in the OVS-DPDK architecture has a global lock that protects the CT tracking link table, and performs data protection when CT flow table tracking entries (hereinafter referred to as CT table entries) are inserted and deleted. Among them, the CT (Connection Tracking) module is used for connection tracking, allowing tracking of all logical network connections or sessions, thereby associating all data packets that may constitute the connection. Most of the work on the DPDK data path is handled by the Poll Mode Driver (PMD) thread, and the PMD also performs tasks such as continuous polling of input ports. Once the PMD receives a data packet and classifies it, it performs processing actions after the classification is completed.

[0004] The current flow table processing process is as follows: A packet is received on the DPDK data path from a network device connected to OVS. A five-tuple of information (source / destination IP, source / destination port, and protocol number) is extracted from the packet. A table lookup is performed based on the hash value generated from this five-tuple. If the index value obtained from the lookup is non-null, no flow table update is required. If the index value obtained from the lookup is null, a global lock is acquired and the created CT table entry is inserted into the CT tracking link table. If the global lock acquisition fails during this process, table lookup and modification operations (including insertions and deletions) must wait until the lock is released.

[0005] It can be seen that when multiple threads are collecting data simultaneously, they must interact with the TCP / IP protocol stack by unlocking and writing locks. To this end, the following problems exist: (1) The current OVS CT module is limited in link building by multiple PMD processes accessing the same CT tracking link table. The global lock during table lookup and insertion cannot be removed, which makes it impossible to improve the CPS (Connection Per Second) performance as the number of PMD processes increases. Due to this, as the hardware network card bandwidth (25Gbps to 100Gbps) further increases, the PMD allocation strategy of OVS-DPDK cannot improve the CPS of OVS by increasing the number of PMDs. In other words, this will cause the data packet processing speed to not match the hardware bandwidth processing speed. (2) When a thread obtains the lock, it executes the related logic code, which takes too long to execute, causing other threads to sleep and wait. The serial processing granularity is too large, resulting in an inability to fully utilize CPU resources.

[0006] Summary of the Invention

[0007] The embodiments of the present disclosure provide a packet processing method and system based on OVS-DPDK, aiming to solve one or more of the above-mentioned problems and other potential problems.

[0008] To achieve the above objectives, the following technical solutions are provided:

[0009] According to a first aspect of the present disclosure, a packet processing method based on OVS-DPDK is provided, comprising:

[0010] Step S01: Get the PMD data packet from the DPDK data path and cache the PMD data packet into a batch. Step S02: Get the PMD data packet from the batch and perform flow table processing.

[0011] When executing the flow table processing flow, the PMD data packets in the batch are looked up in the table. If no CT table entry is found in the CT tracking link table, a CT table entry is created and different operations are performed based on the global lock acquisition status: if the global lock is successfully acquired, the CT table entry is inserted into the CT tracking link table. If the global lock acquisition fails, the pointer to the CT table entry is filled into the CT cache node.

[0012] Step S03: After all the data packets in the batch are retrieved, the CT table entry insertion process of the CT cache node is executed; after the CT table entry insertion process of the CT cache node is completed, the process returns to step S01 to process the next round of PMD data packets;

[0013] When executing the CT table entry insertion process of the CT cache node, when the global lock is successfully acquired, the CT table entry corresponding to the pointer in the CT cache node is inserted into the CT tracking link table and the CT cache node is deleted.

[0014] When a lock acquisition fails during link building, the method of this disclosed embodiment does not wait for the lock to be released. Instead, it uses the time waiting for the lock to be released to perform other operations, namely, inserting the pointer of the CT table entry into the CT cache node. This process eliminates the need to waste time waiting for the lock to be released. After retrieving the data packet, the CT table entry is inserted again using the CT cache node's CT table entry insertion process. This disclosed embodiment reduces the serial processing time when processing batch data packets, improves the CPS rate and flow table offloading speed, and optimizes network performance.

[0015] In some embodiments, the flow table processing process includes:

[0016] Determine whether all the data packets in the batch have been retrieved. If so, the process ends. If not, proceed to the subsequent process.

[0017] querying a CT tracking link table, and when no CT table entry is found, creating a CT table entry and filling the CT table entry based on the data packet;

[0018] Acquire the global lock. When the global lock is acquired successfully, the CT table entry is inserted into the CT tracking link table. When the global lock acquisition fails, the pointer of the CT table entry is filled into the CT cache node.

[0019] Get data packets from the batch one by one and execute the above process until all data packets are obtained.

[0020] In some embodiments, the flow table processing process further includes: when a CT table entry is found, updating the status of the CT table entry, and then obtaining the next data packet from the batch to execute the flow table processing process.

[0021] In some embodiments, the process of filling the CT table entry based on the data packet includes: storing the source IP, destination IP, source port, destination port, protocol number and CT table entry status in the data packet into the CT table entry.

[0022] In some embodiments, step S02 further includes: determining whether the CT cache node is empty; when the CT cache node is empty, obtaining a PMD data packet from a batch and performing a flow table processing process; when the CT cache node is not empty, traversing all CT cache nodes on the thread and executing a CT table entry insertion process of the CT cache node.

[0023] In some embodiments, the CT table entry insertion process of the CT cache node includes:

[0024] Get a CT cache node on the thread;

[0025] Acquire the global lock. When the global lock is acquired successfully, insert the CT table entry corresponding to the pointer in the CT cache node into the CT tracking link table;

[0026] Delete the CT cache node;

[0027] All CT cache nodes on the thread are traversed in sequence until the CT table entries corresponding to the pointers in all cache nodes are inserted into the CT tracking link table and the CT cache nodes are deleted.

[0028] In some embodiments, the CT table entry insertion process of the CT cache node further includes: after the CT table entry insertion process of the CT cache node is completed, continuing with the flow table processing process.

[0029] In some embodiments, the method further includes: after obtaining the PMD data packet in step S01 and before executing step S02 , creating a CT cache node.

[0030] In some embodiments, the number of the CT cache nodes is the maximum value of the PMD data packets obtained from the DPDK data path in step S01.

[0031] According to a second aspect of the present disclosure, there is provided an OVS-DPDK-based packet processing system, comprising:

[0032] The data packet acquisition module is used to obtain PMD data packets from the DPDK data path;

[0033] A batch processing module, used to cache the PMD data packets acquired by the data packet acquisition module;

[0034] The flow table processing module is used to obtain the PMD data packets in the batch module and perform the flow table processing process. When executing the flow table processing process, the PMD data packets in the batch are looked up in the table. When no CT table entry is found in the CT tracking link table, a CT table entry is created and different operations are performed according to the global lock acquisition situation: when the global lock is successfully acquired, the CT table entry is inserted into the CT tracking link table; when the global lock is failed to be acquired, the pointer of the CT table entry is filled into the CT cache node; when the data packets in the batch are acquired, the cache insertion module is triggered to execute the CT table entry insertion process of the CT cache node; when the CT table entry insertion process of the CT cache node is completed, the data packet acquisition module is triggered to process the next round of PMD data packets;

[0035] The cache insertion module is used to insert the CT table entry corresponding to the pointer in the CT cache node into the CT tracking link table and delete the CT cache node when the global lock is successfully acquired during the execution of the CT table entry insertion process of the CT cache node. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The above and other objects, features and advantages of the embodiments of the present disclosure will become readily understood by reading the following detailed description with reference to the accompanying drawings, in which several embodiments of the present disclosure are shown by way of example and not limitation.

[0037] FIG1 shows a flow chart of a data packet processing method based on OVS-DPDK according to an embodiment of the present disclosure;

[0038] FIG2 shows an example flow chart of a packet processing method based on OVS-DPDK according to an embodiment of the present disclosure;

[0039] FIG3 shows a comparison diagram of the effects of packet processing using an OVS-DPDK-based packet processing method according to an embodiment of the present disclosure and an existing method. DETAILED DESCRIPTION

[0040] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0041] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to." Unless otherwise stated, the term "or" means "and / or." The term "based on" means "based, at least in part, on." The terms "one example embodiment" and "an embodiment" mean "at least one example embodiment." The term "another embodiment" means "at least one additional embodiment."

[0042] The existing flow table processing process, when a lock fails to be acquired during link establishment, must wait for the lock to be released before serially updating the CT tracking link table. This process degrades CPS performance as the number of PMD processes increases. Even with increased hardware network card bandwidth, packet processing speed cannot keep up with the hardware's bandwidth processing speed.

[0043] To this end, the disclosed embodiments propose a packet processing method based on OVS-DPDK. This method adds a parallel processing mechanism for CT session tracking to OVS. When the number of PMDs is small and lock contention is not intense, the original serial processing logic is used. When the number of PMDs increases and lock contention becomes intense, after a lock acquisition fails, the system no longer waits for the lock to be released and instead processes other logic, caching the newly added table entries in the CT cache node. This increases the parallel processing time and reduces the waste of CPU computing resources caused by all tasks waiting for lock release.

[0044] FIG1 shows a flow chart of a packet processing method based on OVS-DPDK according to an embodiment of the present disclosure. The method includes:

[0045] Step S01: Get the PMD data packet from the DPDK data path and cache the PMD data packet into a batch. Step S02: Get the PMD data packet from the batch and perform flow table processing.

[0046] When executing the flow table processing flow, the PMD data packets in the batch are looked up in the table. If no CT table entry is found in the CT tracking link table, a CT table entry is created and different operations are performed based on the global lock acquisition status: if the global lock is successfully acquired, the CT table entry is inserted into the CT tracking link table. If the global lock acquisition fails, the pointer to the CT table entry is filled into the CT cache node.

[0047] Step S03: After all the data packets in the batch are retrieved, the CT table entry insertion process of the CT cache node is executed; after the CT table entry insertion process of the CT cache node is completed, the process returns to step S01 to process the next round of PMD data packets;

[0048] When executing the CT table entry insertion process of the CT cache node, when the global lock is successfully acquired, the CT table entry corresponding to the pointer in the CT cache node is inserted into the CT tracking link table and the CT cache node is deleted.

[0049] The method of the embodiment of the present disclosure is applied to the network card side, and the network card obtains the PMD data packet on the DPDK data path and executes the above processing flow.

[0050] In step S01 , each time a data packet is acquired, it is acquired in batch form. For example, 32 data packets are acquired in a batch and the 32 data packets are cached in a batch processing batch.

[0051] The step S02 sequentially executes the flow table processing process for all data packets in the batch until the current batch of data packets is completely retrieved, and then enters the next round of new batch data packet acquisition and the flow table processing process for the new data packets.

[0052] When the embodiment of the present disclosure performs step S02, it first pre-checks the table to determine whether the CT table entry of the current data packet exists in the CT tracking link table. If not, a CT table entry is created and a global lock is acquired to execute the operation of inserting the CT table entry into the CT tracking link table. In this process, when the global lock is acquired successfully, the operation of inserting the CT table entry into the CT tracking link table is executed according to the existing process. When the global lock acquisition fails, it is different from the existing process, that is, it does not wait for the global lock to be released, but inserts the CT table entry into the CT cache node. After the data packet is processed, the CT table entry insertion process of the CT cache node is executed. In this process, the problem of reduced CPS under multiple processes can be solved. By increasing the time for parallel processing, the time for serial processing when processing data packets in batches is reduced, thereby improving the CPS rate.

[0053] Specifically, the flow table processing process includes:

[0054] A1: Determine whether all the data packets in the batch have been retrieved. If so, the process ends. If not, proceed to the subsequent process.

[0055] A2, query the CT tracking link table to check whether there is a CT table entry in the CT tracking link table.

[0056] When querying, a hash value is calculated based on the PMD packet. The source IP address, destination IP address, source port number, destination port number, and protocol number are obtained from the packet and combined into a tuple. A hash value is then calculated based on the tuple to obtain the hash value. This hash value is used as an index to query the CT tracking link table. If the query is successful, a non-null value is returned. Otherwise, a null value is returned.

[0057] When a CT entry is found, the state of the CT entry is updated. CT entry states include the timewait state and the established state. The update includes updating the CT aging time and state transitions. After the state is updated, the data packet is labeled. For example, if a CT entry is found, the data packet is labeled "+est (link established)" based on the CT entry state. If no CT entry is found, the data packet is labeled "+new (link to be established)." After the state is updated, the next data packet is retrieved from the batch and the flow table processing process is executed.

[0058] If no CT entry is found, a CT entry is created and populated based on the packet. Specifically, the source IP address, destination IP address, source port number, destination port number, protocol number, and CT entry status are obtained from the packet, and the newly created CT entry is populated with the five-tuple and the CT entry status.

[0059] A3 acquires the global lock to perform the linked list insertion operation.

[0060] When the global lock is successfully acquired, the CT table entry is inserted into the CT tracking link table. After the insertion, the next data packet is obtained from the batch and the flow table processing process is executed.

[0061] When the global lock acquisition fails, the pointer of the CT table entry is filled into the CT cache node. After filling, the next data packet is obtained from the batch and the flow table processing process is executed.

[0062] Get data packets from the batch one by one and execute the above processes A1 to A3 until all data packets are obtained.

[0063] Specifically, the CT table entry insertion process of the CT cache node includes:

[0064] B1, obtain a CT cache node on the thread;

[0065] B2, acquire the global lock. When the global lock is acquired successfully, the CT table entry corresponding to the pointer in the CT cache node is inserted into the CT tracking link table; when the global lock acquisition fails, it is necessary to continue waiting for the lock to be released until the lock is acquired.

[0066] B3, after the insertion operation of B2 is completed, deletes the CT cache node.

[0067] All CT cache nodes on the thread are traversed in sequence until the CT table entries corresponding to the pointers in all cache nodes are inserted into the CT tracking link table and the CT cache nodes are deleted.

[0068] After all data packets are retrieved, the above steps are performed, and the data packets that fail to obtain the lock during the flow table processing can be inserted into the CT table based on the CT cache node.

[0069] In addition, step S02 of the method of the embodiment of the present disclosure also includes: determining whether the CT cache node is empty. When the CT cache node is empty, obtaining the PMD data packet from the batch batch to perform the flow table processing process; when the CT cache node is not empty, traversing all CT cache nodes on the thread and executing the CT table entry insertion process of the CT cache node.

[0070] Before executing the flow table processing flow, a cache node determination process can also be performed. If the CT cache node is not empty, resources in the cache node can be prioritized. The method of the disclosed embodiment performs the CT table entry insertion process for the CT cache node both before and after executing the flow table processing flow. However, the purposes are different: the former is used to prioritize resources in the cache node, while the latter performs CT table entry insertion based on the CT cache node for entries that do not wait for lock release.

[0071] The CT table entry insertion process of the CT cache node further includes: after the CT table entry insertion process of the CT cache node is completed, entering the flow table processing process. After the CT table entry insertion process is completed, if the data packets have not been completely retrieved, continuing the flow table processing process; after the CT table entry insertion process is completed, if the data packets have been completely retrieved, terminating the current batch processing process and returning to step S01 to execute the next round of data packet acquisition and processing.

[0072] The method of the disclosed embodiment further includes: after obtaining a PMD data packet in step S01 and before executing step S02, creating a CT cache node. Each PMD allocates a cache for use by the cache node. The cache size is sufficient to store the maximum number of CT cache nodes that the PMD can obtain PMD data packets from the DPDK data path at one time.

[0073] FIG2 shows an example flow chart of an implementation of a packet processing method based on OVS-DPDK according to an embodiment of the present disclosure. CT_cache is a cache node. The network card pre-fetches packets and caches them in a batch. First, determine whether ct_cache is empty. If it is empty, execute the flow table processing process on the right; if it is not empty, execute the CT table entry insertion process of the CT cache node below. After all the packets in the batch are taken, process the data cached in ct_cache and traverse the process once. This process is executed according to the CT table entry insertion process of the CT cache node and is not expanded in detail here.

[0074] The present disclosure also provides an OVS-DPDK-based packet processing system, comprising a packet acquisition module, a batch processing module, a flow table processing module, and a cache insertion module. The system is implemented based on the method of the present disclosure.

[0075] The data packet acquisition module is used to obtain PMD data packets from the DPDK data path.

[0076] The batch processing module is used to cache the PMD data packets acquired by the data packet acquisition module.

[0077] The flow table processing module is used to obtain the PMD data packets in the batch module and perform the flow table processing process. When executing the flow table processing process, the PMD data packets in the batch are looked up in the table, and when the CT table entry is found in the CT tracking link table, the status of the CT table entry is updated. When the CT table entry is not found in the CT tracking link table, a CT table entry is created and different operations are performed according to the global lock acquisition situation: when the global lock is successfully acquired, the CT table entry is inserted into the CT tracking link table; when the global lock is failed to be acquired, the pointer of the CT table entry is filled into the CT cache node; when the data packets in the batch are retrieved, the cache insertion module is triggered to execute the CT table entry insertion process of the CT cache node; when the CT table entry insertion process of the CT cache node is completed, the data packet acquisition module is triggered to process the next round of PMD data packets.

[0078] The cache insertion module is configured to, when executing a CT table entry insertion process for a CT cache node, insert the CT table entry corresponding to the pointer in the CT cache node into the CT tracking link table and delete the CT cache node if the global lock is successfully acquired. Furthermore, if global lock acquisition fails, the cache insertion module waits for the lock to be released until the lock is successfully acquired.

[0079] The system of the embodiment of the present disclosure also includes a cache judgment module, which is used to determine whether the CT cache node is empty. When the CT cache node is empty, the system obtains the PMD data packet from the batch processing module and triggers the flow table processing module to perform the flow table processing process. When the CT cache node is not empty, the system traverses all CT cache nodes on the thread and triggers the cache insertion module to execute the CT table entry insertion process of the CT cache node.

[0080] The system of the disclosed embodiment further includes a node creation module configured to create a CT cache node after the packet acquisition module acquires a PMD packet and before the cache determination module executes an action. Each PMD allocates a cache for use by the cache node. The cache is sized to store the maximum number of CT cache nodes that a PMD can acquire from the DPDK data path at a time.

[0081] Figure 3 shows a comparison of the packet processing effects achieved by the existing method and the method of the embodiment of the present invention. The left side shows the processing effect achieved by the existing method. The right side shows the packet processing effect achieved by the method of the embodiment of the present invention. In the example, 96 packets are processed in each batch, and packets from three PMDs are processed (each PMD has 32 packets). The total serial time after processing is lower on the right than on the left. Since the embodiment of the present invention reduces the serial processing time of parallel processing tasks of multiple PMD processes, increases the parallel processing strength of each PMD, reduces the competition between each PMD, greatly improves the CPS performance, and increases the speed of OVS processing packets. When the method and system of the embodiment of the present invention are applied to the network card scenario, as the CPS increases, the flow table unloading speed is also significantly improved.

[0082] Although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of separate embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented in multiple implementations individually or in any suitable subcombination.

[0083] Although the subject matter has been described in language specific to methodological acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

[0084] While various embodiments of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A data packet processing method based on OVS-DPDK, characterized in that: include: Step S01, obtaining a PMD data packet from the DPDK data path and caching the PMD data packet into a batch; Step S02, obtaining a PMD data packet from a batch and performing flow table processing; When executing the flow table processing flow, the PMD data packets in the batch are looked up. When the CT table entry is not found in the CT tracking link table, a CT table entry is created and different operations are performed according to the global lock acquisition situation: when the global lock is successfully acquired, the CT table entry is inserted into the CT tracking link table; when the global lock is failed to be acquired, the pointer of the CT table entry is filled into the CT cache node; Step S03, when all the data packets in the batch are taken, the CT table entry insertion process of the CT cache node is executed; when the CT table entry insertion process of the CT cache node is completed, return to step S01 to process the next round of PMD data packets; When executing the CT table entry insertion process of the CT cache node, when the global lock is acquired successfully, the CT table entry corresponding to the pointer in the CT cache node is inserted into the CT tracking link table and the CT cache node is deleted.

2. According to a data packet processing method based on OVS-DPDK according to claim 1, it is characterized in that: The flow table processing process includes: Determine whether all the data packets in the batch have been retrieved. If so, the process ends. If not, the subsequent process is executed. querying the CT tracking link table, and when a CT table entry cannot be found, creating a CT table entry and filling the CT table entry based on the data packet; Acquire the global lock. When the global lock is acquired successfully, insert the CT table entry into the CT tracking link table; when the global lock acquisition fails, fill the pointer of the CT table entry into the CT cache node; Get data packets from the batch one by one and execute the above process until all data packets are taken.

3. The method for processing data packets based on OVS-DPDK according to claim 2, characterized in that: The flow table processing flow also includes: when a CT table entry is found, updating the state of the CT table entry, and then obtaining the next data packet from the batch to execute the flow table processing flow.

4. The method for processing data packets based on OVS-DPDK according to claim 2, characterized in that: The process of filling the CT table entry based on the data packet includes: storing the source IP, destination IP, source port, destination port, protocol number and the state of the CT table entry in the data packet into the CT table entry.

5. The method for processing data packets based on OVS-DPDK according to claim 1, characterized in that: The step S02 also includes: determining whether the CT cache node is empty, and when the CT cache node is empty, obtaining the PMD data packet from the batch batch to perform the flow table processing process; when the CT cache node is not empty, traversing all CT cache nodes on the thread, and executing the CT table entry insertion process of the CT cache node.

6. A data packet processing method based on OVS-DPDK according to claim 1 or 5, characterized in that: The CT table entry insertion process of the CT cache node includes: Get a CT cache node on the thread; Acquire the global lock. When the global lock is acquired successfully, insert the CT table entry corresponding to the pointer in the CT cache node into the CT tracking link table; Delete the CT cache node; All CT cache nodes on the thread are traversed in sequence until the CT table entries corresponding to the pointers in all cache nodes are inserted into the CT tracking link table and the CT cache nodes are deleted.

7. The method for processing data packets based on OVS-DPDK according to claim 6, characterized in that: The CT table entry insertion process of the CT cache node also includes: after the CT table entry insertion process of the CT cache node is executed, continuing the flow table processing process.

8. The method for processing data packets based on OVS-DPDK according to claim 1, characterized in that: Also includes: After obtaining the PMD data packet in step S01 and before executing step S02, a CT cache node is created.

9. The method for processing data packets based on OVS-DPDK according to claim 8, characterized in that: The number of the CT cache nodes is the maximum value of the PMD data packets obtained from the DPDK data path in step S01.

10. A data packet processing system based on OVS-DPDK, characterized in that: include: The data packet acquisition module is used to obtain PMD data packets from the DPDK data path; A batch processing module, used for caching the PMD data packets acquired by the data packet acquisition module; The flow table processing module is used to obtain the PMD data packets in the batch processing module to perform the flow table processing process. When executing the flow table processing process, the PMD data packets in the batch processing batch are looked up in the table. When the CT table entry is not found in the CT tracking link table, a CT table entry is created and different operations are performed according to the global lock acquisition situation: when the global lock is successfully acquired, the CT table entry is inserted into the CT tracking link table; when the global lock is failed to be acquired, the pointer of the CT table entry is filled into the CT cache node; When all the data packets in the batch are taken, the cache insertion module is triggered to execute the CT table entry insertion process of the CT cache node; when the CT table entry insertion process of the CT cache node is completed, the data packet acquisition module is triggered to process the next round of PMD data packets; The cache insertion module is used to insert the CT table entry corresponding to the pointer in the CT cache node into the CT tracking link table and delete the CT cache node when the global lock is successfully acquired during the execution of the CT table entry insertion process of the CT cache node.

Citation Information

Patent Citations

  • Implementation method of real-time virtual network based on OVS

    CN111211999A

  • Data processing method and system and virtual switch

    CN114268594A

  • Data packet drainage system based on OVS-DPDK and implementation method thereof

    CN115695522A

  • Flow table unloading method and device, electronic equipment and readable storage medium

    CN116192740A

  • Data packet processing method and system based on OVS-DPDK

    CN116366582A