CN113765785B - DPDK-based multipath transmission method - Google Patents

DPDK-based multipath transmission method Download PDF

Info

Publication number
CN113765785B
CN113765785B CN202110955171.XA CN202110955171A CN113765785B CN 113765785 B CN113765785 B CN 113765785B CN 202110955171 A CN202110955171 A CN 202110955171A CN 113765785 B CN113765785 B CN 113765785B
Authority
CN
China
Prior art keywords
packet
node
dpdk
sending
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110955171.XA
Other languages
Chinese (zh)
Other versions
CN113765785A (en
Inventor
李福亮
纪茗涵
杨昱昕
赵宁宁
王晓东
郑乃公
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northeastern University China
Original Assignee
Northeastern University China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northeastern University China filed Critical Northeastern University China
Priority to CN202110955171.XA priority Critical patent/CN113765785B/en
Publication of CN113765785A publication Critical patent/CN113765785A/en
Application granted granted Critical
Publication of CN113765785B publication Critical patent/CN113765785B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/70Routing based on monitoring results
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/15Flow control; Congestion control in relation to multipoint traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/82Miscellaneous aspects
    • H04L47/822Collecting or measuring resource availability data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention belongs to the field of network transmission, and relates to a DPDK-based multipath transmission method, which mainly comprises the following steps: 1) configuring a DPDK environment for each node; 2) starting each node, carrying out initialization operation on each node, and carrying out tasks distributed to each core on each node in a self-circulation manner; 3) constructing a detection packet by a source node, putting the detection packet into a sending cache, and executing sending operation; 4) the intermediate node forwards the packet sent by the previous node to the next node; 5) after the destination node receives the detection packet and updates the next hop address, the destination node immediately returns the packet to the source node; 6) the source node constructs and sends a data packet when receiving a detection packet returned by a destination node; 7) and when the node detects the exit identifier, ending the program operation. The data packet is processed with high performance and high speed by using the characteristics of polling of DPDK, user state driving and reduction of access and storage overhead.

Description

DPDK-based multipath transmission method
Technical Field
The invention belongs to the field of network transmission, and relates to a DPDK-based multipath transmission method.
Background
The network load balancing is a strategy for achieving relative balancing of loads among servers by redistributing system loads, so that the response time of tasks is shortened, the utilization rate of system resources is improved, and the performance of a system is improved. With the proliferation of cloud-based applications, load balancing becomes a very important performance optimization technique for data centers. However, during the design process, two major technical challenges are faced: one is the problem of packet misordering caused by the load balancing strategy, and the other is that although the global congestion-aware scheduling mechanism based on global load information is superior to the local congestion-aware scheduling mechanism and the congestion-neglect scheduling mechanism in performance, the scalability of the global congestion-aware mechanism is limited by long-time control circulation. Researches prove that the method of multi-path transmission (SPLB) with balanced packet-by-packet Load can solve the two problems.
The SPLB employs a dual channel architecture, logically dividing the physical link into a control channel and a data channel. The SPLB realizes an unordered packet-by-packet load balancing solution based on a preview detection result in the control channel. The traditional architecture adopts a direct detection method, while the dual-channel architecture in the SPLB adopts an indirect detection method: detection is separate from transmission. The data packet is no longer used for environment detection. Instead, a special small byte probe packet is used to detect the path condition, and we call this special packet a probe packet.
Experimental results show that the SPLB method realized based on the traditional Socket has the problem of packet loss on one hand, and on the other hand, the occupancy rate of the user mode is close to 100% in terms of the occupation condition of the CPU, and when the packet sending interval is 10-40 us, the SPLB method occupies about 10-30% of the kernel mode.
Disclosure of Invention
In the present invention, in order to optimize the performance of the SPLB, a method is proposed in which a DPDK (Data Plane Development Kit) technique is fused with the original SPLB. The high-performance SPLB method is realized by using PMD drive of a DPDK user mode, avoiding kernel mode and user mode memory copy, reducing system overhead, and by using the characteristics of reducing TLB Miss through a larger memory page, performing high-performance and high-speed processing on a data packet and the like.
To achieve the above object, the present invention provides the following method:
a DPDK-based multipath transmission method comprises the following steps:
step 1: a DPDK environment is configured for each node.
Step 2: starting each node, carrying out initialization operation on each node, and carrying out tasks distributed to each core on each node in a self-circulation manner;
and step 3: constructing a detection packet by a source node, putting the detection packet into a sending cache, and executing sending operation;
and 4, step 4: the intermediate node forwards the packet sent by the previous node to the next node;
and 5: after the destination node receives the detection packet and updates the next hop address, the destination node immediately returns the packet to the source node;
step 6: the source node constructs and sends a data packet when receiving a detection packet returned by a destination node;
and 7: and when the node detects the exit identifier, ending the program operation.
Further, the step 1 specifically includes the following steps:
step 1.1: downloading dpdk-18.11.0 source codes in each node;
step 1.2: carrying out DPDK environment configuration by using setup.sh, compiling a DPDK source code, inserting into an inner core module IGB _ UIO, and setting a large-page cache HugePage;
step 1.3: binding the DPDK on a specified network card (on the premise that the model of the network card supports the DPDK);
step 1.4: the running example program detects whether the DPDK environment configuration is successful.
Further, the step 2 specifically includes the following steps:
step 2.1: each node receives the starting signal, analyzes the command line parameter, judges whether the command line parameter is legal or not, and analyzes the information such as the number of distributed cores, the number of ports distributed on each core, the number of transceiving queues, a destination address and the like;
step 2.2: creating a memory pool and setting the size of the memory pool;
step 2.3: according to the command line parameters analyzed in the step 2.1, allocating each port to a corresponding logic core, recording the MAC address corresponding to each port, allocating a sending queue and a receiving queue to each port, initializing the queues, and operating the ports after configuration is finished;
step 2.4: and binding a specific task function to each allocated kernel, and running all the kernels simultaneously and self-circulating the task function bound with the kernels.
Further, the step 3 specifically includes the following steps:
step 3.1: distributing three kernels to the source node, wherein the three kernels are respectively used for executing tasks of constructing a detection packet, receiving a return detection packet, constructing a data packet and executing sending operation on the packet in the cache;
step 3.2: a source node reads a local configuration file, obtains current local topology information according to adjacent node identification in the configuration file and the attribute of a corresponding MAC address, and generates a next hop address array;
step 3.3: the source node constructs a probe packet on a core responsible for constructing the probe packet. The information recorded in the payload field of each probe packet is: and 2.3, the analyzed target address (the MAC address of the receiving end) + the packet sequence number of the detection packet + the packet marked with the current structure is the type identification of the detection packet. And (3) according to a Hash algorithm, taking the number of the adjacent nodes obtained in the step (3.2) as a key word, mapping the sequence number value of each detection packet to the next hop address array in the step (3.2), and determining the MAC address of the next hop. Then, the encapsulated detection packet is put into a detection packet sending queue;
step 3.4: taking out a packet from a detection packet queue to be sent every certain time, calling a buffer packet function in a DPDK function library to place the detection packet into a sending buffer area for later sending operation;
step 3.5: and the source node circularly calls a sending function in the DPDK function library on the kernel for executing the sending task, and sends the packet in the sending cache.
Further, step 4 specifically includes the following steps:
step 4.1: distributing a kernel for the intermediate node, wherein the kernel is used for executing the tasks of receiving the packet sent by the previous node, updating the next hop address in the packet header and forwarding the packet;
step 4.2: reading a local configuration file, obtaining current local topology information according to the adjacent node identification in the configuration file and the attribute of the corresponding MAC address, and generating a next hop address array;
step 4.3: the intermediate node calls a packet receiving function in a DPDK function library on a kernel in charge of packet receiving, puts the received packet into a receiving cache, analyzes the attribute of the packet type identified in a payload field of the currently received packet, judges whether the packet is an interference packet randomly received in a link, if so, judges that the currently received packet is an invalid packet and directly discards the invalid packet, and if not, judges that the currently received packet is an valid packet and stores the valid packet for executing the next forwarding operation;
step 4.4: the intermediate node further resolves the payload field of the valid packet received in step 4.3 to obtain the destination address and sequence number value. According to a Hash algorithm, the number of adjacent nodes in the step 4.2 is used as a keyword, the analyzed sequence number value is mapped to the next hop array generated in the step 4.2, the MAC address of the next hop is determined, and the original next hop address in the packet header is updated to the determined next hop MAC address;
step 4.5: and calling a buffering packet function in the DPDK function library to push the updated detection packet into a sending cache, and then calling a packet sending function in the DPDK function library to execute sending operation.
Further, step 5 specifically includes the following steps:
step 5.1: two kernels are distributed for the destination node and are respectively used for executing tasks of receiving return addresses of packets and updating the packets and executing sending operation on the detection packets in the sending cache;
step 5.2: reading a local configuration file, obtaining current local topology information according to the adjacent node identification in the configuration file and the attribute of the corresponding MAC address, and generating a next hop address array;
step 5.3: the target node circularly calls a receiving function in a DPDK function library on a kernel executing a receiving task, puts a received packet into a receiving cache, analyzes the packet class attribute in a payload field of the currently received packet, judges whether the packet is an interference packet existing in a link, judges whether the currently received packet is an invalid packet and directly discards the invalid packet if the packet is the interference packet, and judges whether the currently received packet is an effective packet and stores the effective packet for executing the next operation if the currently received packet is not the interference packet;
step 5.4: further analyzing the payload field of the valid packet received in step 5.3, judging whether the valid packet is a detection packet or a data packet, if the valid packet is the data packet, receiving the data packet for subsequent use, and if the valid packet is the detection packet, acquiring the packet sequence number of the detection packet, exchanging the source MAC address and the destination MAC address thereof, and then executing a return operation;
step 5.5: and according to a Hash algorithm, taking the number of adjacent nodes in the step 5.2 as a keyword, mapping the sequence number value analyzed in the step 5.4 to the next hop address array in the step 5.2, and determining the MAC address of the next hop. Calling a buffer packet function in a DPDK function library to put the updated detection packet into a sending buffer for later execution of sending operation;
step 5.6: and the destination node circularly calls the sending function in the DPDK function library in the function bound with the kernel for executing the sending task, and sends the detection packet to be returned in the sending cache.
Further, the step 6 specifically includes the following steps:
step 6.1: a source node circularly calls a receiving function in a DPDK function library on a kernel executing a receiving task, when a packet is received, the receiving function is placed in a receiving cache, the packet class attribute in a payload field of the currently received packet is analyzed, whether the packet is an interference packet existing in a link or not is judged, if yes, the current packet is judged to be an invalid packet and is directly discarded, and if not, the current packet is judged to be a returned detection packet and is stored for executing the next operation;
step 6.2: the payload field of the returned probe packet received in step 6.1 is further analyzed to obtain the packet sequence number of the returned probe packet. Constructing data packets, wherein the payload part of each data packet records information as follows: the destination address (the address of the receiving end) analyzed in step 2.3, the sequence number of the returned detection packet analyzed in step 6.2 and the mark of the currently constructed packet are the data packet identifier. And (3) according to a Hash algorithm, taking the number of adjacent nodes in the step (3.2) as a key word, mapping the sequence number value analyzed in the step (6.2) to the next hop array in the step (3.2), and determining the MAC address of the next hop. Then, a buffer function in a DPDK function library is called to place the packaged data packet into a sending buffer;
step 6.3: and the source node circularly calls the sending function in the DPDK function library in the function bound with the kernel for executing the sending task, and sends the packet in the sending cache.
Further, the step 7 specifically includes: and when each node receives the exit identifier, finishing all processes and terminating the program.
The invention has the beneficial effects that: the data packet is processed with high performance and high speed by using the characteristics of polling of DPDK, user state driving and reduction of access and storage overhead. The method can realize better control of packet sending intervals, solve the packet loss problem in a multi-path method realized based on the socket, and realize higher packet sending rate and better performance.
Drawings
Fig. 1 is an experimental topology in the present invention.
Fig. 2 is a diagram of the overall transmission channel structure in the present invention.
Fig. 3 is a flow chart of the transmitting end operation in the present invention.
Fig. 4 is a flow chart of the receiving end in the present invention.
Detailed Description
The invention will be further elucidated with reference to the drawings and examples, without however being limited thereto.
The DPDK-based multipath transmission method comprises the following steps:
step 1: configuring DPDK environment for nodes in a topology
Step 1.1: downloading an installation package of dpdk-18.11.0 to a folder named dpdk under each node;
step 1.2: configuring a DPDK environment by using a self-contained setup.sh tool in an installation package, compiling a source code, selecting an insertion kernel module IGB _ UIO, and setting a large-page memory HugePage 2048;
step 1.3: binding the DPDK to the network card ens 34;
step 1.4: and (4) operating the self-contained HelloWord program in the installation package, and testing that the DPDK environment is successfully configured.
Step 2: and starting each node, carrying out initialization operation on each node, and carrying out tasks distributed to each core on the node in a self-circulation manner.
Step 2.1: sending a starting signal to each node, starting the equipment after the node receives the signal, analyzing the command line parameters, judging the legality of the command line parameter input, and then acquiring information such as the number of cores allocated to the node, the number of ports allocated to each core, the number of transceiving queues, a destination address dst _ addr and the like through analysis;
step 2.2: and creating a DPDK memory pool for storing the message directly sent from the network card later. In the creating process, the name of the memory pool, the number of mbufs used for receiving messages stored in the memory pool, the size of the mbuf and the information of the cache size of the memory pool are set;
step 2.3: allocating each port to a corresponding logic core according to the command line parameters analyzed in the step 2.1, recording an MAC address corresponding to a local port by using an object array ports _ eth _ addr [ ] with the type of ether _ addr, initializing configuration information of the port, allocating 1 sending queue and 1 receiving queue for each port, initializing the queues, and operating the port after the configuration is finished;
step 2.4: and binding a specific task function to each allocated kernel, and operating all kernels simultaneously to self-circulate the task function bound with the kernels.
And step 3: and constructing a detection packet by the source node, putting the detection packet into a sending cache, and executing sending operation.
Step 3.1: distributing three cores for a source node Client, wherein the Core1 is used for constructing a probe packet, the Core2 is used for receiving a return probe packet and constructing data, and the Core3 is used for executing sending operation on a message in a sending Buffer;
step 3.2: the Client end reads a local configuration file clientTopo.xml, acquires current local topology information according to the adjacent node identification sign in the configuration file and the attribute of the corresponding MAC address, and generates a next hop address array nexthops [ ] with the type of ether _ addr;
step 3.3: the Client node creates a probe packet on kernel 1. The information recorded in the payiod field of each probe packet is: step 2.3, the destination address dst _ addr (namely the MAC address where the receiving end is located) + the packet sequence number seqnum of the currently constructed packet + which is obtained by resolving the destination address dst _ addr and marks the currently constructed packet as the flag mark of the detection packet. And (3) according to a hash algorithm, taking the number count of the adjacent nodes obtained in the step (3.2) as a key word, mapping the sequence number value of each detection packet to a next hop address array nexthops in the step (3.2), and determining the MAC address of the next hop. Then, the encapsulated detection packet is placed into a detection packet sending queue StandinQueue;
step 3.4: every 40us of intervals, taking out a detection packet from a detection packet queue StandinQueue to be sent, calling a Buffer packet function rte _ eth _ tx _ Buffer () in a DPDK function library to push the detection packet into a sending Buffer for later sending operation;
step 3.5: the Client node circularly calls a sending function in the DPDK function library on the kernel 3
rte _ eth _ tx _ Buffer _ flush () performs a send operation on the packet in the send Buffer.
And 4, step 4: the intermediate node forwards the packet sent by the previous node to the next node.
Step 4.1: a Core is distributed for the intermediate node Relay, and the Core1 is used for receiving the packet sent by the previous node, updating the next hop address in the packet header, and executing the forwarding operation;
step 4.2: the Relay node reads a local configuration file, Relay Topo.xml, acquires current local topology information according to the adjacent node identification sign in the configuration file and the attribute of the corresponding MAC address, and generates a next hop address array nexthops [ ] with the type of ether _ addr;
step 4.3: the Relay node circularly calls a packet receiving function rte _ eth _ rx _ burst () in a DPDK function library on the Core1, puts a received message into a rte _ mbuf type receiving cache pkts _ burst array, analyzes an identification packet type attribute flag in a payload field of the currently received message, judges whether the currently received packet is an interference packet randomly received in a link, judges that the current packet is an invalid packet and directly discards the invalid packet if the current packet is the interference packet, and judges that the current packet is an effective packet and stores the effective packet for the next forwarding operation if the current packet is not the interference packet randomly received in the link;
step 4.4: the Relay node further parses the payload field of the valid packet received in step 4.3 to obtain the destination address dst _ addr and the sequence number value seqnum. According to a hash algorithm, the number count of the adjacent nodes in the step 4.2 is used as a keyword, the analyzed sequence number value seqnum is mapped into the next hop number group nexthops generated in the step 4.2, the MAC address of the next hop is determined, and the original next hop address in the packet header is updated to the determined MAC address of the next hop.
And 5: and after the destination node receives the detection packet and updates the next hop address, the destination node immediately returns the packet to the source node.
Step 5.1: two cores are distributed for the destination node Server, the Core1 is used for receiving packets and updating return addresses of the packets, and the Core2 executes sending operation on the detection packets in the sending cache;
step 5.2: the method comprises the steps that a Server is read to obtain a local configuration file clientTopo.xml, current local topology information is obtained according to adjacent node identification sign in the configuration file and the attribute of a corresponding MAC address, and a next hop address array nexthops [ ] with the type of ether _ addr is generated;
step 5.3: the Server circularly calls a receiving function rte _ eth _ rx _ burst () in a DPDK function library on a kernel executing a receiving task, puts the received message into a rte _ mbuf type receiving cache pkts _ burst array, analyzes an identification packet type attribute flag in a payload field of the currently received message, judges whether the currently received packet is an interference packet randomly received in a link, judges that the current packet is an invalid packet and directly discards the invalid packet if the current packet is the interference packet, and judges that the current packet is an effective packet and stores the effective packet for further forwarding operation if the current packet is not the interference packet;
step 5.4: further analyzing the flag attribute of the payload field of the currently received packet, judging whether the packet is a detection packet or a data packet, if the packet is a data packet, receiving the data packet for subsequent use, if the packet is a detection packet, acquiring the packet sequence number seqnum of the detection packet, and exchanging the source address src _ addr and the destination address dst _ addr therein for later return operation;
step 5.5: and according to a hash algorithm, taking the count of the adjacent nodes in the step 5.2 as a keyword, mapping the sequence number value seqnum analyzed in the step 5.4 to the next hop group nexthops in the step 5.2, and determining the MAC address of the next hop. Calling a Buffer packet function rte _ eth _ tx _ Buffer () in the DPDK function library to put the updated detection packet into a sending Buffer for later sending operation;
step 5.6: the Server node circularly calls the sending function in the DPDK function library on the kernel 2
rte _ eth _ tx _ Buffer _ flush () performs a send operation on the packet in the send Buffer.
Step 6: and the source node constructs and transmits a data packet every time the source node receives a detection packet returned by a destination node.
Step 6.1: a source node Client circularly calls a receiving function in a DPDK function library on a kernel for executing a receiving task, rte _ eth _ rx _ burst (), puts a received message into a rte _ mbuf type receiving cache pkts _ burst array, analyzes an identification packet type attribute flag in a payload field of a currently received packet, judges whether the currently received packet is an interference packet randomly received in a link, judges whether the currently received packet is an invalid packet and directly discards the invalid packet if the currently received packet is the interference packet, and judges whether the currently received packet is a returned detection packet and stores the returned detection packet for executing next forwarding operation if the currently received packet is not the invalid packet;
step 6.2: the payload field of the returned probe packet in step 6.1 is further parsed to obtain the packet sequence number seqnum of the returned probe packet. Constructing data packets, wherein the payload part of each data packet records information as follows: the target address dst _ addr (the address of the receiving end) analyzed in step 2.3 plus the sequence number seqnum of the returned detection packet analyzed in step 6.2 plus the flag marking of the currently constructed packet as the data packet flag. And according to a Hash algorithm, taking the number of adjacent nodes in the step 3.2 as a keyword, mapping the sequence number value seqnum analyzed in the step 6.2 to a next hop address array nexthops in the step 3.2, and determining the MAC address of the next hop. Then, calling a buffer packet function rte _ eth _ tx _ buffer () in the DPDK function library to put the packaged data packet into a sending buffer;
step 6.3: the Client node circularly calls a sending function rte _ eth _ tx _ Buffer _ flush () in the DPDK function library in a function bound with a kernel executing a sending task to execute a sending operation on a packet in a sending Buffer.
And 7: and when the node detects the exit identifier, ending the program operation.
Step 7.1: and after receiving the exit identifier ctrl + c or kill identifier, each node ends all processes and terminates the program.
Results of the experiment
According to the result obtained by the specific implementation mode, the performance of the DPDK-based multipath transmission method is better than that of the conventional Socket-based multipath transmission method. Firstly, from the perspective of interval control and sending rate, in the same packet sending interval, the DPDK method can better control the packet sending interval, the number of the sent packets is more stable, and the sent packets are closer to the ideal number of the sent packets; from the packet loss situation, the DPDK can basically realize zero packet loss; from the CPU occupation situation, the user states of the DPDK and the Socket reach approximately 100%, but from the kernel state, when the packet sending interval is between 10 and 40us, the kernel occupation rate of the Socket reaches about 10 to 30%, but the occupation of the DPDK is basically 0. In conclusion, the method of DPDK is superior to the traditional Socket method.
Table 1: experimental test comparative results
Figure GDA0003618968340000101

Claims (4)

1. A DPDK-based multipath transmission method is characterized in that the DPDK-based multipath transmission method comprises the following steps:
step 1: configuring a DPDK environment for each node;
step 2: starting each node, carrying out initialization operation on each node, and carrying out tasks distributed to each core on each node in a self-circulation manner;
step 2.1: each node receives the starting signal, analyzes the command line parameters, judges whether the command line parameters are legal or not, and analyzes to obtain the number of distributed kernels, the number of ports distributed on each kernel, the number of transceiving queues and a destination address;
step 2.2: creating a memory pool and setting the size of the memory pool;
step 2.3: according to the command line parameters analyzed in the step 2.1, allocating each port to a corresponding logic core, recording the MAC address corresponding to each port, allocating a sending queue and a receiving queue to each port, initializing the queues, and operating the ports after configuration is finished;
step 2.4: binding a specific task function to each allocated kernel, and enabling all kernels to run concurrently and to self-circulate the task function bound with the kernels;
and step 3: constructing a detection packet by a source node, putting the detection packet into a sending cache, and executing sending operation;
step 3.1: distributing three kernels to the source node, wherein the three kernels are respectively used for executing tasks of constructing a detection packet, receiving a return detection packet, constructing a data packet and executing sending operation on the packet in the cache;
step 3.2: a source node reads a local configuration file, obtains current local topology information according to adjacent node identification in the configuration file and the attribute of a corresponding MAC address, and generates a next hop address array;
step 3.3: a source node constructs a detection packet on a kernel responsible for constructing the detection packet; the information recorded in the payload field of each probe packet is: step 2.1, the analyzed destination address, the packet sequence number of the detection packet and the class identifier for marking the currently constructed packet as the detection packet; according to a Hash algorithm, taking the number of adjacent nodes obtained in the step 3.2 as a keyword, mapping the sequence number value of each detection packet to the next hop address array in the step 3.2, and determining the MAC address of the next hop; then, the encapsulated detection packet is put into a detection packet sending queue;
step 3.4: taking out a packet from a detection packet queue to be sent every certain time, calling a buffer packet function in a DPDK function library to place the detection packet into a sending buffer area for later sending operation;
step 3.5: the source node circularly calls a sending function in a DPDK function library on a kernel which executes a sending task, and sends a packet in a sending cache;
and 4, step 4: the intermediate node forwards the packet sent by the previous node to the next node;
and 5: after the destination node receives the detection packet and updates the next hop address, the destination node immediately returns the packet to the source node;
step 5.1: two kernels are distributed for the destination node and are respectively used for executing tasks of receiving return addresses of packets and updating the packets and executing sending operation on the detection packets in the sending cache;
and step 5.2: reading a local configuration file, obtaining current local topology information according to the adjacent node identification in the configuration file and the attribute of the corresponding MAC address, and generating a next hop address array;
step 5.3: the target node circularly calls a receiving function in a DPDK function library on a kernel executing a receiving task, puts a received packet into a receiving cache, analyzes the packet class attribute in a payload field of the currently received packet, judges whether the packet is an interference packet existing in a link, judges whether the currently received packet is an invalid packet and directly discards the invalid packet if the packet is the interference packet, and judges whether the currently received packet is an effective packet and stores the effective packet for executing the next operation if the currently received packet is not the interference packet;
step 5.4: further analyzing the payload field of the valid packet received in step 5.3, and determining whether the valid packet is a probe packet or a data packet, if the valid packet is a data packet, receiving the data packet for subsequent use, and if the valid packet is a probe packet, acquiring the packet sequence number of the probe packet, exchanging the source MAC address and the destination MAC address thereof, and then executing a return operation;
step 5.5: according to a Hash algorithm, the number of adjacent nodes in the step 5.2 is used as a keyword, the sequence number value analyzed in the step 5.4 is mapped to the next hop address array in the step 5.2, and the MAC address of the next hop is determined; calling a buffer packet function in a DPDK function library to put the updated detection packet into a sending buffer for later execution of sending operation;
step 5.6: the destination node circularly calls a sending function in the DPDK function library in a function bound with a kernel for executing a sending task, and sends the detection packet to be returned in the sending cache;
step 6: when a source node receives a detection packet returned by a destination node, a data packet is constructed and sent;
step 6.1: a source node circularly calls a receiving function in a DPDK function library on a kernel executing a receiving task, when a packet is received, the receiving function is placed in a receiving cache, the packet class attribute in a payload field of the currently received packet is analyzed, whether the packet is an interference packet existing in a link or not is judged, if yes, the current packet is judged to be an invalid packet and is directly discarded, and if not, the current packet is judged to be a returned detection packet and is stored for executing the next operation;
step 6.2: further analyzing the payload field of the returned detection packet received in the step 6.1 to obtain the packet sequence number of the returned detection packet; constructing data packets, wherein the payload part of each data packet records information as follows: the destination address analyzed in the step 2.1, the sequence number of the returned detection packet analyzed in the step 6.2 and the mark of the currently constructed packet are the data packet identifier; according to a Hash algorithm, the number of adjacent nodes in the step 3.2 is used as a keyword, the sequence number value analyzed in the step 6.2 is mapped to the next hop array in the step 3.2, and the MAC address of the next hop is determined; then, calling a buffer packet function in a DPDK function library to place the packaged data packet into a sending buffer;
step 6.3: the source node circularly calls a sending function in a DPDK function library in a function bound with a kernel for executing a sending task, and sends a packet in a sending cache;
and 7: and when the node detects the exit identifier, ending the program operation.
2. The DPDK-based multipath transmission method of claim 1, wherein the step 1 specifically includes the steps of:
step 1.1: downloading dpdk-18.11.0 source codes in each node;
step 1.2: carrying out DPDK environment configuration by using setup.sh, compiling a DPDK source code, inserting into an inner core module IGB _ UIO, and setting a large-page cache HugePage;
step 1.3: binding the DPDK on a specified network card;
step 1.4: the running example program detects whether the DPDK environment configuration is successful.
3. The DPDK-based multi-path transmission method according to claim 1, wherein the step 4 includes the following steps:
step 4.1: distributing a kernel for the intermediate node, wherein the kernel is used for executing the tasks of receiving the packet sent by the previous node, updating the next hop address in the packet header and forwarding the packet;
step 4.2: reading a local configuration file, obtaining current local topology information according to the adjacent node identification in the configuration file and the attribute of the corresponding MAC address, and generating a next hop address array;
step 4.3: the intermediate node calls a receiving function in a DPDK function library on a kernel in charge of receiving the packet, the received packet is placed in a receiving cache, the attribute of the packet type identified in a payload field of the currently received packet is analyzed, whether the packet is an interference packet randomly received in a link is judged, if yes, the currently received packet is judged to be an invalid packet and is directly discarded, and if not, the currently received packet is judged to be an valid packet and is stored for executing the next forwarding operation;
step 4.4: the intermediate node further resolves the payload field of the valid packet received in step 4.3 to obtain a destination address and a sequence number value; according to a hash algorithm, the number of adjacent nodes in the step 4.2 is used as a keyword, the analyzed sequence number value is mapped to the next hop address array generated in the step 4.2, the MAC address of the next hop is determined, and the original next hop address in the packet header is updated to the determined next hop MAC address;
step 4.5: and calling a buffer packet function in the DPDK function library to push the updated detection packet into a sending buffer, and then calling a sending function in the DPDK function library to execute sending operation.
4. The DPDK-based multipath transmission method of claim 1, wherein the step 7 specifically includes: and when each node receives the exit identifier, finishing all processes and terminating the program.
CN202110955171.XA 2021-08-19 2021-08-19 DPDK-based multipath transmission method Active CN113765785B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110955171.XA CN113765785B (en) 2021-08-19 2021-08-19 DPDK-based multipath transmission method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110955171.XA CN113765785B (en) 2021-08-19 2021-08-19 DPDK-based multipath transmission method

Publications (2)

Publication Number Publication Date
CN113765785A CN113765785A (en) 2021-12-07
CN113765785B true CN113765785B (en) 2022-07-05

Family

ID=78790490

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110955171.XA Active CN113765785B (en) 2021-08-19 2021-08-19 DPDK-based multipath transmission method

Country Status (1)

Country Link
CN (1) CN113765785B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102821434A (en) * 2012-07-24 2012-12-12 南京邮电大学 Multipath routing method based on wireless multi-media sensor network
CN107135278A (en) * 2017-07-06 2017-09-05 深圳市视维科技股份有限公司 A kind of efficient load equalizer and SiteServer LBS
CN107181738A (en) * 2017-04-25 2017-09-19 中国科学院信息工程研究所 A kind of software implementation intruding detection system and method
CN107623632A (en) * 2017-08-10 2018-01-23 赛尔网络有限公司 The connection method of procotol based on DPDK and system
CN108632166A (en) * 2018-04-25 2018-10-09 湖北锐世数字医学影像科技有限公司 A kind of packet receiving L2 cache method and system based on DPDK
CN108628684A (en) * 2017-03-20 2018-10-09 华为技术有限公司 A kind of message processing method and computer equipment based on DPDK
CN108882333A (en) * 2018-04-27 2018-11-23 上海海事大学 A kind of collection method based on the adaptivity routing information for sending detection packet
CN108900327A (en) * 2018-06-20 2018-11-27 昆明理工大学 A kind of chronometer data acquisition and real-time processing method based on DPDK
CN109309626A (en) * 2018-09-10 2019-02-05 南京知常容信息技术有限公司 A kind of high-speed network data packet capturing shunting and caching method based on DPDK
CN110224929A (en) * 2019-04-17 2019-09-10 西安交大捷普网络科技有限公司 The data packet forwarding method of link aggregation interface based on DPDK
CN112152921A (en) * 2015-12-30 2020-12-29 华为技术有限公司 Method for establishing routing table, electronic equipment and network
CN112333099A (en) * 2021-01-04 2021-02-05 北京太一星晨信息技术有限公司 Routing method, device and storage medium of local multipath message

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101958847A (en) * 2010-11-03 2011-01-26 南京邮电大学 Selection method of distributed QOS (Quality of Service) routes
CN103607352A (en) * 2013-11-22 2014-02-26 上海电机学院 Multicast routing method based on network topology
CN105634836B (en) * 2014-10-27 2020-03-17 香港理工大学 Information processing method and device
CN105072043B (en) * 2015-08-10 2018-07-06 尚一民 Client announcement procedure optimization method in MESH network Routing Protocol
AU2015101806A4 (en) * 2015-12-02 2016-01-28 Macau University Of Science And Technology A High-Efficient Packet I/O Engine for Commodity PC
CN107959551A (en) * 2017-12-29 2018-04-24 河海大学常州校区 A kind of reliable data transport in wireless sensor networks method based on network code
GB2576323B (en) * 2018-08-13 2021-01-06 Metaswitch Networks Ltd Programmable packet data processing system
CN110995583B (en) * 2019-09-12 2021-04-20 华为技术有限公司 Path detection method, path detection device and computer storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102821434A (en) * 2012-07-24 2012-12-12 南京邮电大学 Multipath routing method based on wireless multi-media sensor network
CN112152921A (en) * 2015-12-30 2020-12-29 华为技术有限公司 Method for establishing routing table, electronic equipment and network
CN108628684A (en) * 2017-03-20 2018-10-09 华为技术有限公司 A kind of message processing method and computer equipment based on DPDK
CN107181738A (en) * 2017-04-25 2017-09-19 中国科学院信息工程研究所 A kind of software implementation intruding detection system and method
CN107135278A (en) * 2017-07-06 2017-09-05 深圳市视维科技股份有限公司 A kind of efficient load equalizer and SiteServer LBS
CN107623632A (en) * 2017-08-10 2018-01-23 赛尔网络有限公司 The connection method of procotol based on DPDK and system
CN108632166A (en) * 2018-04-25 2018-10-09 湖北锐世数字医学影像科技有限公司 A kind of packet receiving L2 cache method and system based on DPDK
CN108882333A (en) * 2018-04-27 2018-11-23 上海海事大学 A kind of collection method based on the adaptivity routing information for sending detection packet
CN108900327A (en) * 2018-06-20 2018-11-27 昆明理工大学 A kind of chronometer data acquisition and real-time processing method based on DPDK
CN109309626A (en) * 2018-09-10 2019-02-05 南京知常容信息技术有限公司 A kind of high-speed network data packet capturing shunting and caching method based on DPDK
CN110224929A (en) * 2019-04-17 2019-09-10 西安交大捷普网络科技有限公司 The data packet forwarding method of link aggregation interface based on DPDK
CN112333099A (en) * 2021-01-04 2021-02-05 北京太一星晨信息技术有限公司 Routing method, device and storage medium of local multipath message

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HPSRouter: A high performance software router based on DPDK;Zongyao Li;《2018 20th International Conference on Advanced Communication Technology (ICACT)》;20180214;全文 *
基于DPDK的流量动态负载均衡技术研究;李凯;《中国优秀硕士学位论文全文数据库》;20190215;全文 *

Also Published As

Publication number Publication date
CN113765785A (en) 2021-12-07

Similar Documents

Publication Publication Date Title
CN111371779B (en) Firewall based on DPDK virtualization management system and implementation method thereof
CN107515775B (en) Data transmission method and device
JP5726316B2 (en) Lockless, zero-copy messaging scheme for telecommunications network applications
KR101072078B1 (en) System and method for multicore communication processing
US7813342B2 (en) Method and apparatus for writing network packets into computer memory
WO2017000593A1 (en) Packet processing method and device
CN108270676B (en) Network data processing method and device based on Intel DPDK
WO2019185051A1 (en) Integrated flow table-based packet forwarding method and device
US11616738B2 (en) Packet processing method and related device
US9304939B2 (en) Method and multi-core communication processor for replacing data in system cache
CN113891396B (en) Data packet processing method and device, computer equipment and storage medium
CN116860488B (en) Process communication method and related device
US9906443B1 (en) Forwarding table updates during live packet stream processing
CN114138707B (en) Data transmission system based on FPGA
CN117440053B (en) Multistage cross die access method and system
Fu et al. FAS: Using FPGA to accelerate and secure SDN software switches
CN117997833A (en) Data forwarding system and control method thereof
CN113765785B (en) DPDK-based multipath transmission method
WO2020187124A1 (en) Data processing method and device
CN106790162B (en) Virtual network optimization method and system
CN108063737B (en) FCoE storage area network read request processing method and system
US7525962B2 (en) Reducing memory access bandwidth consumption in a hierarchical packet scheduler
CN114257560A (en) KNI-based switch network data caching implementation method
CN111865794B (en) Logical port association method, system, equipment and data transmission system
CN111865801B (en) Virtio port-based data transmission method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant