A method and system for high-speed network packet transmission based on DPDK
By loading DPDK and creating MBUF objects through the PMD driver, and combining this with the acceleration node to handle unreceived data packets, the interruption performance bottleneck in high-speed network data packet transmission is resolved, enabling fast and stable data packet transmission and retransmission, and improving network data transmission rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG SHOUHAN INFORMATION TECH CO LTD
- Filing Date
- 2022-07-27
- Publication Date
- 2026-04-28
AI Technical Summary
In high-speed network data packet transmission, existing technologies are prone to performance bottlenecks, leading to data packet loss and slow transmission rates. DPDK cannot effectively improve network data transmission rates, resulting in unstable transmission.
The DPDK is loaded by the PMD driver, data packets are received and forwarded using the API, MBUF objects are created and stored in an efficient buffer, unreceived data packets are processed by the acceleration node, zero-copy and non-interrupted transmission are achieved, and the CPU processor is used for in-depth processing.
It enables fast data packet transmission, avoids interruptions and memory copying, improves network data transmission rate and stability, and ensures timely processing and retransmission of data packets.
Smart Images

Figure CN117527778B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data transmission technology, specifically to a method and system for high-speed network data packet transmission based on DPDK. Background Technology
[0002] The volume of communication that the Internet and other Internet networks must carry is constantly growing and changing. Network and packet protocols need to be upgraded, such as application processing, control processing, packet processing, and signal processing. DPDK uses polling instead of interrupts to process data packets. When a data packet is received, the network card driver overloaded by DPDK does not notify the CPU through an interrupt. Instead, it directly stores the data packet in memory and delivers it to the application layer software for direct processing through the interface provided by DPDK. This saves a lot of CPU interrupt time and memory copy time, enabling fast data packet transmission and quality control.
[0003] Currently, high-speed network data packet transmission is prone to interruption performance bottlenecks, resulting in data packet loss and other impacts. Furthermore, during transmission, DPDK cannot improve the data packet processing speed, leading to slow processing when data is not received, which prevents the improvement of network data transmission rate and makes the overall transmission channel unstable. Summary of the Invention
[0004] (a) Technical problems to be solved
[0005] To address the shortcomings of existing technologies, this invention provides a method and system for high-speed network data packet transmission based on DPDK. It has advantages such as timely processing by acceleration nodes when data transmission fails and fast network data transmission rate, and solves the problem that DPDK cannot be used to improve data packet transmission and avoid interruption.
[0006] (II) Technical Solution
[0007] To achieve the above objectives, the present invention provides the following technical solution: a method for high-speed network data packet transmission based on DPDK, comprising the following steps:
[0008] Step 101: Load DPDK through PDM driver, extract output data packets through PDM driver API, and sender processes and forwards the received data packets.
[0009] Step 102: Transmit network data packets to the network device, which then identifies and forwards the network data packets, performing a large amount of network data transmission and reception in an instant, followed by in-depth processing by the CPU processor.
[0010] Step 103: After receiving the network data packet, the receiving end determines whether it has received the packet data sent by the sending end. Different processing will be carried out if it is received or not.
[0011] Step 104: After confirming that the packet data has been received from the sender, the DPDK network card driver stores the packet in a high-efficiency buffer and creates an MBUF object in the MBUF cache to connect with the actual network packet. The analysis and processing of the network packet will be based on this MBUF.
[0012] Step 105: If no packet data is received from the sender, the data packet from the receiver is sent to the acceleration node, which then retransmits the information. At the same time, the receiver reassembles and retransmits the data.
[0013] Step 106: Based on the buffer, the receive queue in the receiving end is allocated to the CPU processor. The data received by this queue is handed over to the DPDK thread on the core for processing, and then the data packet is sent to the receiving end to complete the data packet transmission.
[0014] Preferably, the network device includes, but is not limited to, one or more of routers, switches, media gateways, SBCs, and PS gateways.
[0015] Preferably, the acceleration node sends a response message to the sender according to the content of the data packet and a predetermined protocol.
[0016] Based on the aforementioned method for high-speed network packet transmission using DPDK, a system for high-speed network packet transmission using DPDK is proposed, comprising the following modules:
[0017] The data receiving unit uses the PMD driver to receive and extract network data packets via API.
[0018] The PMD driver module is driven by a polling mode, using a non-interrupt and zero-copy mechanism for data frames entering and leaving the application buffer memory.
[0019] The transmission module identifies and forwards network data packets sent to the receiving end through network devices;
[0020] The proxy receiving module is used to re-receive data packets from the receiving end and send them to the acceleration node;
[0021] Buffer module: Used to allocate memory to create buffers, and encapsulate actual data frames by creating MBUF objects for use by applications;
[0022] The receiving module is used by the receiving end to drive the high-speed data channel to receive network data packets sent by the receiving end through the DPDK network card;
[0023] Storage module: Used to store control data packets to be updated in local permanent storage, as well as backup network data packets during transmission.
[0024] Preferably, the receiving module can be configured to perform precise matching based on certain information in the data packet and allocate it to a designated queue and CPU processor.
[0025] Preferably, in the buffer module, after a network data packet is received by a network device, the DPDK network card driver stores it in an efficient buffer, and only accesses the actual network packet in the buffer when necessary.
[0026] (III) Beneficial Effects
[0027] Compared with existing technologies, this invention provides a method and system for high-speed network data packet transmission based on DPDK, which has the following advantages:
[0028] 1. The method and system for high-speed network data packet transmission based on DPDK loads DPDK through the PDM driver, extracts output data packets through the API of the PDM driver, and forwards the received data packets at the sending end. After receiving the packet data from the sending end, the DPDK network card driver encapsulates the packet and stores it in an efficient buffer, and creates an MBUF object in the MBUF cache and associates it with the actual network packet. The analysis and processing of network packets are based on this MBUF, thereby eliminating interrupts, avoiding kernel-mode and user-mode memory copying, and reducing system overhead.
[0029] 2. The method and system for high-speed network data packet transmission based on DPDK determines whether the receiving end has received the packet data sent by the sending end during the data packet transmission process. Different processing is performed when the packet data is received or not. If the packet data is not received, the receiving end sends the data packet to the acceleration node, which retransmits the information. At the same time, the receiving end reassembles and retransmits the data. Thus, the acceleration node is used in the data packet transmission process, which effectively ensures the network data transmission rate. Attached Figure Description
[0030] Figure 1 This is a schematic diagram of the overall data packet transmission method structure of the present invention;
[0031] Figure 2 This is a schematic diagram of the system structure for data packet transmission according to the present invention; Detailed Implementation
[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0033] Example 1: A method for high-speed network data packet transmission based on DPDK, comprising the following steps:
[0034] Step 101: Load DPDK through PDM driver, extract output data packets through PDM driver API, and sender processes and forwards the received data packets.
[0035] Step 102: Transmit network data packets to the network device, which then identifies and forwards the network data packets, performing a large amount of network data transmission and reception in an instant, followed by in-depth processing by the CPU processor.
[0036] Step 103: After receiving the network data packet, the receiving end determines whether it has received the packet data sent by the sending end. Different processing will be carried out if it is received or not.
[0037] Step 104: After confirming that the packet data has been received from the sender, the DPDK network card driver stores the packet in a high-efficiency buffer and creates an MBUF object in the MBUF cache to connect with the actual network packet. The analysis and processing of the network packet will be based on this MBUF.
[0038] Step 106: Based on the buffer, the receive queue in the receiving end is allocated to the CPU processor. The data received by this queue is handed over to the DPDK thread on the core for processing, and then the data packet is sent to the receiving end to complete the data packet transmission.
[0039] Network devices include, but are not limited to, one or more of routers, switches, media gateways, SBCs, and PS gateways.
[0040] Example 2: A method for high-speed network data packet transmission based on DPDK, comprising the following steps:
[0041] Step 101: Load DPDK through PDM driver, extract output data packets through PDM driver API, and sender processes and forwards the received data packets.
[0042] Step 102: Transmit network data packets to the network device, which then identifies and forwards the network data packets, performing a large amount of network data transmission and reception in an instant, followed by in-depth processing by the CPU processor.
[0043] Step 103: After receiving the network data packet, the receiving end determines whether it has received the packet data sent by the sending end. Different processing will be carried out if it is received or not.
[0044] Step 105: If no packet data is received from the sender, the data packet from the receiver is sent to the acceleration node, which then retransmits the information. At the same time, the receiver reassembles and retransmits the data.
[0045] Network devices include, but are not limited to, one or more of routers, switches, media gateways, SBCs, and PS gateways.
[0046] The acceleration node sends a response message to the sender according to the content of the data packet and the predetermined protocol.
[0047] Please see Figure 2 Based on the aforementioned method for high-speed network data packet transmission using DPDK, a system for high-speed network data packet transmission using DPDK is proposed, comprising the following modules:
[0048] The data receiving unit uses the PMD driver to receive and extract network data packets via API.
[0049] The PMD driver module is driven by a polling mode, using a non-interrupt and zero-copy mechanism for data frames entering and leaving the application buffer memory.
[0050] The transmission module identifies and forwards network data packets sent to the receiving end through network devices;
[0051] The proxy receiving module is used to re-receive data packets from the receiving end and send them to the acceleration node;
[0052] Buffer module: Used to allocate memory to create buffers, and encapsulate actual data frames by creating MBUF objects for use by applications;
[0053] The receiving module is used by the receiving end to drive the high-speed data channel to receive network data packets sent by the receiving end through the DPDK network card;
[0054] Storage module: Used to store control data packets to be updated in local permanent storage, as well as backup network data packets during transmission.
[0055] The receiving module can be configured to perform precise matching based on certain information in the data packet and allocate it to a specified queue and CPU processor.
[0056] In the buffer module, after a network data packet is received by a network device, the DPDK network card driver stores it in an efficient buffer, and only accesses the actual network packet in the buffer when necessary.
[0057] In use, DPDK is first loaded via the PDM driver. The PDM driver uses the API to extract output data packets. The sending end processes the received data packets and forwards them, transmitting the network data packets to the network device. The network device identifies the forwarded network data packets, handling a large volume of network data transmission and reception in an instant. The CPU then performs in-depth processing. Upon receiving the network data packet, the receiving end checks whether it has received the packet data sent by the sending end. Different processing occurs depending on whether it has been received. If the packet data from the sending end is not received, the receiving end sends the data packet to the acceleration node, which retransmits the information. Simultaneously, the receiving end reassembles and retransmits the data. After confirming receipt of the packet data from the sending end, the DPDK network card driver stores the packet in a high-efficiency buffer and creates an MBUF object in the MBUF cache, which is associated with the actual network packet. Analysis and processing of network packets are based on this MBUF. Based on the buffer, the receiving queue in the receiving end is allocated to the CPU. Data received in this queue is processed by the DPDK thread on that core before being sent back to the receiving end, completing the data packet transmission.
[0058] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for high-speed network data packet transmission based on DPDK, characterized in that: Includes the following steps: Step 101: Load DPDK through the PMD driver, use the PMD driver to receive and extract output data packets via API, and process and forward the received data packets at the sending end. Step 102: Transmit network data packets to the network device, which then identifies and forwards the network data packets, performing a large amount of network data transmission and reception in an instant, followed by in-depth processing by the CPU processor. Step 103: After receiving the network data packet, the receiving end determines whether it has received the packet data sent by the sending end. Different processing will be carried out if it is received or not. Step 104: After confirming that the packet data has been received from the sender, the DPDK network card driver stores the packet in a high-efficiency buffer and creates an MBUF object in the MBUF cache to connect with the actual network packet. The analysis and processing of the network packet will be based on this MBUF. Step 105: If no packet data is received from the sender, the data packet from the receiver is sent to the acceleration node, which then retransmits the information. At the same time, the receiver reassembles and retransmits the data. Step 106: Based on the buffer, the receive queue in the receiving end is allocated to the CPU processor. The data received by this queue is handed over to the DPDK thread on the core for processing, and then the data packet is sent to the receiving end to complete the data packet transmission.
2. The method and system for high-speed network data packet transmission based on DPDK according to claim 1, characterized in that: The network devices include, but are not limited to, one or more of routers, switches, media gateways, SBCs, and PS gateways.
3. The method and system for high-speed network data packet transmission based on DPDK according to claim 1, characterized in that: The acceleration node sends a response message to the sender according to the content of the data packet and the predetermined protocol.
4. The method for high-speed network data packet transmission based on DPDK according to claim 1 is hereby proposed as a system for high-speed network data packet transmission based on DPDK, characterized in that: Includes the following modules: The data receiving unit uses the PMD driver to receive and extract network data packets via API. The PMD driver module is driven by a polling mode, using a non-interrupt and zero-copy mechanism for data frames entering and leaving the application buffer memory. The transmission module identifies and forwards network data packets sent to the receiving end through network devices; The proxy receiving module is used to re-receive data packets from the receiving end and send them to the acceleration node; Buffer module: Used to allocate memory to create buffers, and encapsulate actual data frames by creating MBUF objects for use by applications; The receiving module is used by the receiving end to drive the high-speed data channel to receive network data packets sent by the receiving end through the DPDK network card; Storage module: Used to store control data packets to be updated in local permanent storage, as well as backup network data packets during transmission.
5. The method and system for high-speed network data packet transmission based on DPDK according to claim 1, characterized in that: The receiving module can be configured to perform precise matching based on certain information in the data packet and allocate it to a designated queue and CPU processor.
6. The method and system for high-speed network data packet transmission based on DPDK according to claim 1, characterized in that: In the buffer module, after a network data packet is received by a network device, the DPDK network card driver stores it in an efficient buffer, and only accesses the actual network packet in the buffer when necessary.
Citation Information
Patent Citations
Retransmission control method, communication interface and electronic equipment
CN110677221A
DPDK driving system based on FPGA accelerator card
CN113419780A