CN108270676A - A kind of network data processing method and device based on IntelDPDK - Google Patents

A kind of network data processing method and device based on IntelDPDK Download PDF

Info

Publication number
CN108270676A
CN108270676A CN201611267423.5A CN201611267423A CN108270676A CN 108270676 A CN108270676 A CN 108270676A CN 201611267423 A CN201611267423 A CN 201611267423A CN 108270676 A CN108270676 A CN 108270676A
Authority
CN
China
Prior art keywords
address
dpdk
message
arp
protocol stack
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.)
Granted
Application number
CN201611267423.5A
Other languages
Chinese (zh)
Other versions
CN108270676B (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.)
Putian Information Technology Co Ltd
Original Assignee
Putian Information Technology Co Ltd
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 Putian Information Technology Co Ltd filed Critical Putian Information Technology Co Ltd
Priority to CN201611267423.5A priority Critical patent/CN108270676B/en
Publication of CN108270676A publication Critical patent/CN108270676A/en
Application granted granted Critical
Publication of CN108270676B publication Critical patent/CN108270676B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses

Abstract

The present invention provides a kind of network data processing method and device based on Intel DPDK, the method includes:Build data surface development kit Intel DPDK running environment;One or more IP address are added, and establish the corresponding route information table of one or more of IP address using DPDK;The message that the IP address receives is transmitted to the corresponding worker thread processing of DPDK, and the message that the IP address is sent out is sent to corresponding destination address in the route information table.The present invention is realized that the p2p of full IP multinodes is accessed, has expanded the data-bag interacting channel of cross-server, can easily be established the big system of distribution of the multiserver low-cost high-efficiency interconnection based on DPDK using the method for increasing IP nodes.

Description

A kind of network data processing method and device based on Intel DPDK
Technical field
The present invention relates to technical field of data processing more particularly to a kind of network data processing sides based on Intel DPDK Method and device.
Background technology
DPDK (Data Plane Development Kit, data surface development kit) is one kind that Intel Company proposes The software development kit of express network data packet, has increased income.Mainly support the system using Intel CPU and network interface card early period, The network interface card of other CPU such as IBM Power, Cavium and the non-Intel in part are supported.DPDK is by bypassing linux system Network protocol stack is directly written and read network interface card, with reference to the binding to kernels different in multi-core CPU, can realize 10Gbit nets Linear speed transmitting-receiving under network parcel flow.
Common DPDK models as shown in Figure 1 are currently typically based on the network packet parallel processing side of Intel DPDK Method is:Data surface and control plane are separated, control plane leaves linux system in itself, and is bundled on individual CPU core, data Application program is given in face, while creates one without thread scheduling for data surface, is called without system, the ring interrupted without network interface card The efficient analysis to data and parallel processing are realized in border.In addition service surface and non-traffic face interaction generally use " memory mapping " Add the mode of " message transmission pointer ".
However, the DPDK that the application method of this DPDK is only suitable for individual server is used, taken when using multiple servers When building big business plane system, it is difficult to expand system scale.Such as the interacting message between multiple servers, cross-server Between DPDK or protocol stack to another server DPDK interacting messages all without suitable interactive mode.And same server Multiple modules between interior operating system protocol stack and DPDK share a channel, and a module, which does not discharge buffering, can influence it Its module.In addition the mode of " message transmission pointer " easilys lead to pointer management confusion, and memory risk increases, so as to cause being Stability of uniting reduces.
Invention content
In view of the above problems, it is proposed that the present invention overcomes the above problem in order to provide one kind or solves at least partly State a kind of network data processing method and device based on Intel DPDK of problem.
In a first aspect, the present invention provides a kind of network data processing method based on Intel DPDK, the method packet It includes:
Build data surface development kit Intel DPDK running environment;
One or more IP address are added, and establish the corresponding routing iinformation of one or more of IP address using DPDK Table;
The message that the IP address receives is transmitted to the corresponding worker thread processing of DPDK, and the IP address is sent out Message be sent to corresponding destination address in the route information table.
Optionally, it is described to add one or more IP address using DPDK, and establish one or more of IP address pair The route information table answered, including:
One or more IP address are added on data path between physical internet ports and operating system IP protocol stack;
Address resolution protocol arp request broadcast messages are sent to the operating system IP protocol stack and the physical internet ports, And the operating system IP protocol stack or the arp request transmissions arp of physical internet ports transmission to IP address reception Response message;
Broadcast message and the arp response messages is asked to establish one or more of IP address and correspond to according to the arp Route information table.
It is noted that not being the increased ip/ of this place DPDK to broadcast arp and destination address when increasing IP nodes in this way The arp messages of MAC, need transparent transmission and cannot end in DPDK, otherwise can influence other ip nodes.
Optionally, it is described to add one or more IP address using DPDK, and establish one or more of IP address pair The route information table answered, including:
When the port parameter come into when calling rte_kni_init () is more than the quantity of physical internet ports, in DPDK and operation One or more IP address are added on data path between system IP protocol stack;(being different from former increases the side of ip nodes Method, increased herein is virtual network port, does not bind actual physics network interface);
Arp request broadcast messages are sent, and to the behaviour of IP address reception to the operating system IP protocol stack The arp requests for making the transmission of system IP protocol stack send arp response messages;
Broadcast message and the arp response messages is asked to establish one or more of IP address and correspond to according to the arp Route information table.
Optionally, the message that the IP address is received is transmitted to the processing of DPDK corresponding worker threads, and by institute It states the message that IP address is sent out and is sent to corresponding destination address in the route information table, including:
Each DPDK modules are interacted by an IP address and the operating system IP protocol stack;
It, will by brct1 bridges mode when using the DPDK modules of the IP address that need to send out data packet from physical internet ports The IP address is connected to physical internet ports, and the data packet is sent out from the physical internet ports.
Optionally, it is described to add one or more IP address using DPDK, and establish one or more of IP address pair Before the route information table answered, the method further includes:
Multiple worker threads are created, carry out the parallel processing of network packet.
Optionally, it is described to create multiple worker threads, the parallel processing of network packet is carried out, including:
The first worker thread for each responsible processing message distributes a RX memory ring, each to be responsible for sending and receiving Second worker thread of message distributes a RX memories ring and a TX memory ring;
When first worker thread sends message, the message is preserved, and data mbuf is referred to by memory buffer mbuf Needle is sent to the TX memory rings of second worker thread, to be sent out the message by second worker thread;
When second worker thread receives message, the message is forwarded to the RX memory rings of the first worker thread.
Second aspect, the present invention provides a kind of network data processing device based on Intel DPDK, described device packets It includes:
Running environment construction unit, for building data surface development kit Intel DPDK running environment;
IP address adding device for adding one or more IP address using DPDK, and is established one or more of The corresponding route information table of IP address;
Message process unit, the message for the IP address to be received are transmitted to the corresponding worker thread processing of DPDK, And the message for sending out the IP address is sent to corresponding destination address in the route information table.
Optionally, the IP address adding device, is specifically used for:
One or more IP address are added on data path between physical internet ports and operating system IP protocol stack;
Address resolution protocol arp request broadcast messages are sent to the operating system IP protocol stack and the physical internet ports, And the operating system IP protocol stack or the arp request transmissions arp of physical internet ports transmission to IP address reception Response message;
Broadcast message and the arp response messages is asked to establish one or more of IP address and correspond to according to the arp Route information table.
Optionally, the IP address adding device, is specifically used for:
When the port parameter come into when calling rte_kni_init () is more than the quantity of physical internet ports, in DPDK and operation One or more IP address are added on data path between system IP protocol stack;
Arp request broadcast messages are sent, and to the behaviour of IP address reception to the operating system IP protocol stack The arp requests for making the transmission of system IP protocol stack send arp response messages;
Broadcast message and the arp response messages is asked to establish one or more of IP address and correspond to according to the arp Route information table.
Optionally, the message process unit, is specifically used for:
Each DPDK modules are interacted by an IP address and the operating system IP protocol stack;
It, will by brct1 bridges mode when using the DPDK modules of the IP address that need to send out data packet from physical internet ports The IP address is connected to physical internet ports, and the data packet is sent out from the physical internet ports.
As shown from the above technical solution, a kind of network data processing method based on Intel DPDK provided by the invention and Device, by building Intel DPDK running environment;Add one or more IP address using DPDK, and establish it is one or The corresponding route information table of multiple IP address;The message that the IP address receives is transmitted at the corresponding worker threads of DPDK Reason, and the message that the IP address is sent out is sent to corresponding destination address in the route information table.In this way, the present invention adopts With the method for increasing IP nodes, realize that the p2p of full IP multinodes is accessed, expanded the data-bag interacting channel of cross-server, it can The big system of distribution of the convenient multiserver low-cost high-efficiency interconnection established based on DPDK;DPDK can be utilized to increase virtual Ip nodes realize that each module possesses alone ip nodes, independently possess mbuf and receive buffering, will not be because of the separator tube of a module Reason problem influences other modules.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention, for those of ordinary skill in the art, without creative efforts, can be with Other attached drawings are obtained according to these figures.
Fig. 1 is the structure diagram of DPDK models of the prior art;
Fig. 2 is that a kind of flow for network data processing method based on Intel DPDK that one embodiment of the invention provides is shown It is intended to;
Fig. 3 is a kind of flow for network data processing method based on Intel DPDK that another embodiment of the present invention provides Schematic diagram;
Fig. 4 is the structure diagram for the full IP DPDK models 1 that another embodiment of the present invention provides;
Fig. 5 is a kind of flow for network data processing method based on Intel DPDK that another embodiment of the present invention provides Schematic diagram;
Fig. 6 is the structure diagram for the full IP DPDK models 2 that another embodiment of the present invention provides;
Fig. 7 is that a kind of structure for network data processing device based on Intel DPDK that one embodiment of the invention provides is shown It is intended to;
Fig. 8 is a kind of structure for network data processing device based on Intel DPDK that another embodiment of the present invention provides Schematic diagram.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work Embodiment shall fall within the protection scope of the present invention.
Fig. 2 is a kind of flow signal of network data processing method based on Intel DPDK in one embodiment of the invention Figure, as shown in Fig. 2, the method includes:
S1:Build data surface development kit Intel DPDK running environment.
Specifically, structure Intel DPDK running environment specifically includes:
Kernel start-up parameter isolcpus=1-n (n is the serial number of the last one CPU core since 0) is set, is made Obtain the processing that these CPU core retained are specifically used to carry out DPDK data surface affairs;The cpu affinity that setting is interrupted are closed The CPU core interruptions of DPDK will be run by closing;Huge page memories are set;Load Intel network interface cards UIO kernel-drivens module and Kni kernel modules;Related physical network interface is bound to drive to Intel UIO;Rte_kni_init () is called to start the network of DPDK Working mechanism.
S2:One or more IP address are added, and establish the corresponding routing of one or more of IP address using DPDK Information table.
Specifically, this step includes two schemes:First, it is added in data path between physical internet ports and protocol stack One or more ip/mac addresses, to increase multiple ip nodes for DPDK in total exchange net, so as to facilitate all sections Point carries out directly point-to-point interacting message;Second is that it is transmitted when calling rte_kni_init () into more than actual physics network interface Number when, one or more IP address are added between DPDK and operating system IP protocol stack, so as to be given birth to for each DPDK modules Operating system protocol stack and the virtual network port of DPDK are connected in this way into one.
S3:The message that the IP address receives is transmitted to the processing of DPDK corresponding worker threads, and by the IP address The message sent out is sent to corresponding destination address in the route information table.
Specifically, DPDK modules can carry out the interaction of message by one or more IP address of addition.
It can be seen that the present embodiment is by building Intel DPDK running environment;Utilize DPDK addition one or more IP Address, and establish the corresponding route information table of one or more of IP address;The message that the IP address receives is transmitted to The corresponding worker thread processing of DPDK, and the message that the IP address is sent out is sent to corresponding mesh in the route information table Address.In this way, the present embodiment is realized that the p2p of full IP multinodes is accessed, has been expanded across service using the method for increasing IP nodes The data-bag interacting channel of device can easily establish the big system of distribution of the multiserver low-cost high-efficiency interconnection based on DPDK System;DPDK can be utilized to increase virtual ip nodes, realize that each module possesses alone ip nodes, independently possessed mbuf and receive buffering, Other modules will not be influenced because of the cache management problem of a module.
In an alternate embodiment of the present invention where, before above-mentioned steps S2, the method further includes following steps:
Multiple worker threads are created, carry out the parallel processing of network packet.
In the present embodiment, multiple worker threads are created, to realize the parallel processing of network packet.Then when increased ip is saved Point can be transmitted to corresponding DPDK worker threads when receiving message and be handled, and when DPDK modules need to send out message from ip, Query routing information table obtains source mac and purpose mac, so as to which message is sent to corresponding purpose mac.It is based further on Multiple ip nodes for DPDK are increased in total exchange net, are handed over so as to which all nodes be facilitated to carry out directly point-to-point message Mutually.
Fig. 3 is that a kind of flow of network data processing method based on Intel DPDK in another embodiment of the present invention is shown It is intended to, as shown in figure 3, the method includes:
S301:Build Intel DPDK running environment.
S302:Multiple worker threads are created, carry out the parallel processing of network packet.
Specifically, this step specifically includes:The first worker thread for each responsible processing message distributes a RX memory Ring, the second worker thread to be each responsible for sending and receiving message distribute a RX memories ring and a TX memory ring;First When worker thread sends message, the message is preserved by memory buffer mbuf, and data mbuf pointers are sent to described The TX memory rings of second worker thread, to be sent out the message by second worker thread;Second worker thread When receiving message, the message is forwarded to the RX memory rings of the first worker thread.It is this to divide the transmitting-receiving of message and processing The method opened is obtaining flexibility that is efficient while possessing maximum.
S303:One or more IP is added on data path between physical internet ports and operating system IP protocol stack Location.
As shown in figure 4, it is added on data path between physical internet ports and operating system IP protocol stack one or more After IP address, obtain the present embodiment correspond to full IP DPDK models 1 as shown in figure 4, the newly-increased corresponding network interface of IP address be towards Operating system protocol stack and physical internet ports both direction are presented simultaneously.
S304:Address resolution protocol arp request broadcast is sent to the operating system IP protocol stack and the physical internet ports Message, and the operating system IP protocol stack or the arp request hairs of physical internet ports transmission to IP address reception Send arp response messages.
Specifically, it is responsible for the worker thread of receiving/transmission message periodically to operating system IP protocol stack and physical internet ports Arp broadcast is all sent (to be usually free arp, send out just for the increased ip of DPDK (being named as ADDED_IP) address on the network interface It send, each ADDED_IP binds different mac).
Understandably, the corresponding network interface of IP address added in the present embodiment is oriented manipulation system IP protocol stack and physics Network interface, therefore, arp broadcasts the message to operating system IP protocol stack and physical internet ports transmission, and the arp requests received may be What operating system IP protocol stack or physical internet ports were sent.
It should be noted that it is not the increased ip/ of DPDK at this to receiving broadcast arp and destination address from any direction The arp messages of MAC, need transparent transmission and cannot end in DPDK, otherwise can influence other ip nodes.
S305:Broadcast message and the arp response messages is asked to establish one or more of IP address according to the arp Corresponding route information table.
Specifically, DPDK route information tables are established according to arp message, periodically inquires the ip nodes in DPDK route information tables Arp states, update ip nodes state.
S306:The message that the IP address receives is transmitted to the corresponding worker thread processing of DPDK, and by the IP The message that location is sent out is sent to corresponding destination address in the route information table.
Specifically, the message for being issued to IP address is distributed to not (from operating system IP protocol stack or physical internet ports) Same DPDK modules (each DPDK modules correspond to a worker thread) processing, to each message sent out from ADDED_IP, is looked into It askes DPDK route information tables and obtains source and destination mac, sent out after filling in mac layers.
Method in the present embodiment is equivalent to increases multiple ip nodes for DPDK in total exchange net, so as to convenient All nodes carry out directly point-to-point interacting message, using the method for increasing DPDK ip nodes, realize full ip multinodes P2p accesses the big system that can easily establish multiserver low cost.
Fig. 5 is that a kind of flow of network data processing method based on Intel DPDK in another embodiment of the present invention is shown It is intended to, as shown in figure 5, the method includes:
S501:Build Intel DPDK running environment.
S502:Multiple worker threads are created, carry out the parallel processing of network packet.
S503:When the port parameter come into when calling rte_kni_init () is more than the quantity of physical internet ports, in DPDK One or more IP address are added on data path between operating system IP protocol stack.
Specifically, it is transmitted when calling rte_kni_init () practical into the number more than actual physics network interface, such as DPDK Physical internet ports are 3, if being further added by 2 virtual network ports, need to come into rte_kni_init () as port parameter by 5.And It is transmitted when calling rte_kni_init () into the number more than actual physics network interface, rte_ is called to each newly-increased virtual network port { when calling, the 1st parameter is passed to mbuf ponds pointer to kni_alloc () generations virtual network port, and the 3rd parameter passes NULL skies and refer to Needle }, add one or more ip/mac addresses between physical internet ports and protocol stack (this ip is referred to as " DPDK locals ip ").
It should be noted that (either physical internet ports or virtual network port are all by this under DPDK by rte_kni_alloc () Function generates network node, and the return value of the function is to carry out the handle of transmission-receiving function) first parameter coming into can be one (the mbuf ponds cannot be appeared in again in the rte_kni_alloc () of other network interfaces, be virtual net in a mbuf ponds independently applied It is mouthful exclusive) or the mbuf ponds shared with other network interfaces.
As shown in fig. 6, addition one or more IP on data path between DPDK and operating system IP protocol stack Location, as each DPDK modules generate a virtual network port of connection operating system protocol stack and DPDK in this way, obtain this implementation The corresponding full IP DPDK models 1 of example are as shown in fig. 6, the newly-increased corresponding virtual network port of IP address is then only facing operating system IP Protocol stack is presented, therefore either arp or common ip transmitting-receivings are all Protocol-oriented stack.
Understandably, being different from increases the method for ip nodes in above-described embodiment, increased in the present embodiment is virtual net Mouthful, actual physics network interface is not bound.
S504:Arp broadcast messages are sent, and to the behaviour of IP address reception to the operating system IP protocol stack The arp requests for making the transmission of system IP protocol stack send arp response messages.
Specifically, independent ip is by the arp interactions with protocol stack, and generation arp address broadcasts generate.
Understandably, the corresponding network interface of IP address added in the present embodiment is only oriented manipulation system IP protocol stack, Therefore, arp broadcast messages are only sent to operating system IP protocol stack, and the arp requests received are operating system IP protocol stack It sends.
S505:One or more of IP address are established according to arp broadcast messages and the arp response messages to correspond to Route information table.
S506:The message that the IP address receives is transmitted to the corresponding worker thread processing of DPDK, and by the IP The message that location is sent out is sent to corresponding destination address in the route information table.
Specifically, this step includes:Each DPDK modules pass through an IP address and the operating system IP protocol stack It interacts;It, will by brct1 bridges mode when using the DPDK modules of the IP address that need to send out data packet from physical internet ports The IP address is connected to physical internet ports, and the data packet is sent out from the physical internet ports.For example, brctl addif Br0 vEthV0 are exactly that virtual network port vEthV0 is added in bridge br0.
It is all Protocol-oriented stack to increase the corresponding network interface of IP address in the present embodiment, i.e., is with operation only on the port IP protocol stack of uniting carries out message interaction, when the module of the network interface is used to need to send out data packet from physical internet ports (such as to another One server sends ip packets), you can practical physical internet ports are connected in a manner of by brctl bridges and go out packet, can also be used Any physical network interface that DPDK takes over give out a contract for a project (because the module under DPDK is typically all thread under same process, mutual resource It is shared).
In the present embodiment, using the method for increasing virtual ip nodes using DPDK, realize that each DPDK modules possess alone ip Node independently possesses mbuf and receives buffering, will not influence other modules because of the cache management problem of a module.Further , this virtual network port using DPDK generations can be connected to practical Physical Network by brctl bridges (virtual bridge) mode Mouthful, the system architecture of realization ip full-mesh.
It can be seen that above-described embodiment uses different methods (for example, in OM, debugging for different risk class Report increases individually virtual ip nodes, would not influence protocol layer message<Because agreement face message is critically important>, and it is business report Text, protocol layer message increase ip nodes by scheme 1.) increase ip nodes, it can realize different channels and lifting system Stability, moreover it is possible to facilitate positioning investigation problem.
Fig. 7 is a kind of structural representation of network data processing device based on Intel DPDK in one embodiment of the invention Figure, as shown in fig. 7, described device includes:Running environment construction unit 701, IP address adding device 702 and message process unit 703.Wherein:
Running environment construction unit 701 is used to build data surface development kit Intel DPDK running environment;IP address adds Add unit 702 for adding one or more IP address using DPDK, and establish the corresponding road of one or more of IP address By information table;Message process unit 703 is used to the message that the IP address receives being transmitted at the corresponding worker threads of DPDK Reason, and the message that the IP address is sent out is sent to corresponding destination address in the route information table.
In the present embodiment, Intel DPDK running environment is built by running environment construction unit 701;IP address addition is single Member 702 adds one or more IP address using DPDK, and establishes the corresponding route information table of one or more of IP address; The message that the IP address receives is transmitted to the corresponding worker threads of DPDK and handled by message process unit 703, and by the IP The message that address is sent out is sent to corresponding destination address in the route information table.In this way, the present embodiment is saved using IP is increased The method of point realizes that the p2p of full IP multinodes is accessed, has expanded the data-bag interacting channel of cross-server, can easily establish The big system of distribution of multiserver low-cost high-efficiency interconnection based on DPDK;DPDK can be utilized to increase virtual ip nodes, it is real Now each module possesses alone ip nodes, independently possesses mbuf and receives buffering, will not be because of the cache management problem shadow of a module Ring other modules.
In an alternate embodiment of the present invention where, the IP address adding device 702, is specifically used for:
One or more IP address are added on data path between physical internet ports and operating system IP protocol stack;
Address resolution protocol arp request broadcast messages are sent to the operating system IP protocol stack and the physical internet ports, And the operating system IP protocol stack or the arp request transmissions arp of physical internet ports transmission to IP address reception Response message;
Broadcast message and the arp response messages is asked to establish one or more of IP address and correspond to according to the arp Route information table.
In an alternate embodiment of the present invention where, the IP address adding device 702, is specifically used for:
When the port parameter come into when calling rte_kni_init () is more than the quantity of physical internet ports, in DPDK and operation One or more IP address are added on data path between system IP protocol stack;
Arp request broadcast messages are sent, and to the behaviour of IP address reception to the operating system IP protocol stack The arp requests for making the transmission of system IP protocol stack send arp response messages;
Broadcast message and the arp response messages is asked to establish one or more of IP address and correspond to according to the arp Route information table.
Further, the message process unit 703, is specifically used for:
Each DPDK modules are interacted by an IP address and the operating system IP protocol stack;
It, will by brct1 bridges mode when using the DPDK modules of the IP address that need to send out data packet from physical internet ports The IP address is connected to physical internet ports, and the data packet is sent out from the physical internet ports.
In an alternate embodiment of the present invention where, as shown in figure 8, described device further includes:Worker thread creating unit 704, it is used for:
Multiple worker threads are created, carry out the parallel processing of network packet.
In an alternate embodiment of the present invention where, the worker thread creating unit 704, is specifically used for:
The first worker thread for each responsible processing message distributes a RX memory ring, each to be responsible for sending and receiving Second worker thread of message distributes a RX memories ring and a TX memory ring;
When first worker thread sends message, the message is preserved, and data mbuf is referred to by memory buffer mbuf Needle is sent to the TX memory rings of second worker thread, to be sent out the message by second worker thread;
When second worker thread receives message, the message is forwarded to the RX memory rings of the first worker thread.
For device embodiment, since it is basicly similar to embodiment of the method, so description is fairly simple, it is related Part illustrates referring to the part of embodiment of the method.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Aforementioned program can be stored in a computer read/write memory medium.The journey Sequence when being executed, performs the step of including above-mentioned each method embodiment;And aforementioned storage medium includes:ROM, RAM, magnetic disc or The various media that can store program code such as person's CD.
In the description of the present invention, it should be noted that the orientation or position relationship of the instructions such as term " on ", " under " are base In orientation shown in the drawings or position relationship, it is for only for ease of the description present invention and simplifies description rather than instruction or imply Signified device or element must have specific orientation, with specific azimuth configuration and operation, therefore it is not intended that this The limitation of invention.Unless otherwise clearly defined and limited, term " installation ", " connected ", " connection " should be interpreted broadly, example Such as, it may be fixed connection or may be dismantle connection, or integral connection;Can be mechanically connected or be electrically connected It connects;It can be directly connected, can also be indirectly connected by intermediary, can be the connection inside two elements.For this For the those of ordinary skill in field, the concrete meaning of above-mentioned term in the present invention can be understood as the case may be.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to one Entity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation There are any actual relationship or orders.Moreover, term " comprising ", "comprising" or its any other variant are intended to contain Lid non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only will including those Element, but also including other elements that are not explicitly listed or further include as this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that Also there are other identical elements in process, method, article or equipment including the element.
The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to the foregoing embodiments The present invention is described in detail, it will be understood by those of ordinary skill in the art that:It still can be to aforementioned each implementation Technical solution recorded in example modifies or carries out equivalent replacement to which part technical characteristic;And these modification or It replaces, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of network data processing method based on Intel DPDK, which is characterized in that the method includes:
Build data surface development kit Intel DPDK running environment;
One or more IP address are added, and establish the corresponding route information table of one or more of IP address using DPDK;
The message that the IP address receives is transmitted to the corresponding worker thread processing of DPDK, and the report that the IP address is sent out Text is sent to corresponding destination address in the route information table.
2. according to the method described in claim 1, it is characterized in that, described add one or more IP address using DPDK, and The corresponding route information table of one or more of IP address is established, including:
One or more IP address are added on data path between physical internet ports and operating system IP protocol stack;
Address resolution protocol arp request broadcast messages are sent, and right to the operating system IP protocol stack and the physical internet ports The arp requests that the operating system IP protocol stack or the physical internet ports that the IP address receives are sent send arp responses Message;
Broadcast message and the arp response messages is asked to establish the corresponding road of one or more of IP address according to the arp By information table.
3. according to the method described in claim 1, it is characterized in that, described add one or more IP address using DPDK, and The corresponding route information table of one or more of IP address is established, including:
When the port parameter come into when calling rte_kni_init () is more than the quantity of physical internet ports, in DPDK and operating system One or more IP address are added on data path between IP protocol stack;
Arp request broadcast messages are sent, and to the operation system of IP address reception to the operating system IP protocol stack The arp requests that IP protocol stack of uniting is sent send arp response messages;
Broadcast message and the arp response messages is asked to establish the corresponding road of one or more of IP address according to the arp By information table.
4. according to the method described in claim 3, it is characterized in that, the message that the IP address is received is transmitted to DPDK Corresponding worker thread processing, and the message that the IP address is sent out is sent to corresponding destination in the route information table Location, including:
Each DPDK modules are interacted by an IP address and the operating system IP protocol stack;
When using the DPDK modules of the IP address that need to send out data packet from physical internet ports, by brct1 bridges mode by described in IP address is connected to physical internet ports, and the data packet is sent out from the physical internet ports.
5. method according to any one of claims 1 to 4, which is characterized in that described to add one or more using DPDK A IP address, and establish before the corresponding route information table of one or more of IP address, the method further includes:
Multiple worker threads are created, carry out the parallel processing of network packet.
6. according to the method described in claim 5, it is characterized in that, described create multiple worker threads, progress network packet Parallel processing, including:
The first worker thread for each responsible processing message distributes a RX memory ring, each to be responsible for sending and receiving message The second worker thread distribute a RX memories ring and a TX memory ring;
When first worker thread sends message, the message is preserved, and data mbuf pointers are sent out by memory buffer mbuf It send to the TX memory rings of second worker thread, to be sent out the message by second worker thread;
When second worker thread receives message, the message is forwarded to the RX memory rings of the first worker thread.
7. a kind of network data processing device based on Intel DPDK, which is characterized in that described device includes:
Running environment construction unit, for building data surface development kit Intel DPDK running environment;
IP address adding device, for adding one or more IP address using DPDK, and with establishing one or more of IP The corresponding route information table in location;
Message process unit, the message for the IP address to be received are transmitted to the corresponding worker thread processing of DPDK, and will The message that the IP address is sent out is sent to corresponding destination address in the route information table.
8. device according to claim 7, which is characterized in that the IP address adding device is specifically used for:
One or more IP address are added on data path between physical internet ports and operating system IP protocol stack;
Address resolution protocol arp request broadcast messages are sent, and right to the operating system IP protocol stack and the physical internet ports The arp requests that the operating system IP protocol stack or the physical internet ports that the IP address receives are sent send arp responses Message;
Broadcast message and the arp response messages is asked to establish the corresponding road of one or more of IP address according to the arp By information table.
9. device according to claim 7, which is characterized in that the IP address adding device is specifically used for:
When the port parameter come into when calling rte_kni_init () is more than the quantity of physical internet ports, in DPDK and operating system One or more IP address are added on data path between IP protocol stack;
Arp request broadcast messages are sent, and to the operation system of IP address reception to the operating system IP protocol stack The arp requests that IP protocol stack of uniting is sent send arp response messages;
Broadcast message and the arp response messages is asked to establish the corresponding road of one or more of IP address according to the arp By information table.
10. device according to claim 9, which is characterized in that the message process unit is specifically used for:
Each DPDK modules are interacted by an IP address and the operating system IP protocol stack;
When using the DPDK modules of the IP address that need to send out data packet from physical internet ports, by brct1 bridges mode by described in IP address is connected to physical internet ports, and the data packet is sent out from the physical internet ports.
CN201611267423.5A 2016-12-31 2016-12-31 Network data processing method and device based on Intel DPDK Expired - Fee Related CN108270676B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611267423.5A CN108270676B (en) 2016-12-31 2016-12-31 Network data processing method and device based on Intel DPDK

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611267423.5A CN108270676B (en) 2016-12-31 2016-12-31 Network data processing method and device based on Intel DPDK

Publications (2)

Publication Number Publication Date
CN108270676A true CN108270676A (en) 2018-07-10
CN108270676B CN108270676B (en) 2020-07-28

Family

ID=62770342

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611267423.5A Expired - Fee Related CN108270676B (en) 2016-12-31 2016-12-31 Network data processing method and device based on Intel DPDK

Country Status (1)

Country Link
CN (1) CN108270676B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669792A (en) * 2018-12-24 2019-04-23 网宿科技股份有限公司 Analyze the method and service server of data message
CN110798366A (en) * 2018-08-01 2020-02-14 阿里巴巴集团控股有限公司 Task logic processing method, device and equipment
CN111049762A (en) * 2019-12-23 2020-04-21 上海金仕达软件科技有限公司 Data acquisition method and device, storage medium and switch
CN111859062A (en) * 2019-04-30 2020-10-30 大唐移动通信设备有限公司 DPDK-based network data processing method and device
CN112506674A (en) * 2019-09-16 2021-03-16 北京华耀科技有限公司 System and method for communication between user state TCP/IP protocol stack and local application in Linux system
CN113672410A (en) * 2021-08-25 2021-11-19 北京天融信网络安全技术有限公司 Data processing method and electronic device
CN113691619A (en) * 2021-08-24 2021-11-23 北京天融信网络安全技术有限公司 Message processing method and device, electronic equipment and storage medium
CN114301619A (en) * 2021-11-16 2022-04-08 北京威努特技术有限公司 Industrial control firewall without hardware management port and realization method of simulation management port of industrial control firewall
CN114422489A (en) * 2020-10-13 2022-04-29 中国电信股份有限公司 Information transmission method and system based on service grid
CN115242895A (en) * 2022-07-19 2022-10-25 杭州迪普科技股份有限公司 DPDK-based local access method and device
CN115412502A (en) * 2022-11-02 2022-11-29 之江实验室 Network port expansion and message rapid equalization processing method
CN116170404A (en) * 2023-02-17 2023-05-26 通明智云(北京)科技有限公司 DPDK-based data forwarding method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099957A (en) * 2015-08-20 2015-11-25 电子科技大学 Data packet forwarding method based on software table look-up
CN105357151A (en) * 2015-11-19 2016-02-24 成都科来软件有限公司 DPDK-based packet capture and mirror image flow forwarding method
CN105577567A (en) * 2016-01-29 2016-05-11 国家电网公司 Network data packet parallel processing method based on Intel DPDK
CN105939349A (en) * 2016-05-25 2016-09-14 电子科技大学 Method for realizing follow-up safe access of user data
US20160275026A1 (en) * 2015-03-20 2016-09-22 Intel Corporation Weakly ordered doorbell
CN106209506A (en) * 2016-06-30 2016-12-07 瑞斯康达科技发展股份有限公司 A kind of virtualization deep-packet detection flow analysis method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160275026A1 (en) * 2015-03-20 2016-09-22 Intel Corporation Weakly ordered doorbell
CN105099957A (en) * 2015-08-20 2015-11-25 电子科技大学 Data packet forwarding method based on software table look-up
CN105357151A (en) * 2015-11-19 2016-02-24 成都科来软件有限公司 DPDK-based packet capture and mirror image flow forwarding method
CN105577567A (en) * 2016-01-29 2016-05-11 国家电网公司 Network data packet parallel processing method based on Intel DPDK
CN105939349A (en) * 2016-05-25 2016-09-14 电子科技大学 Method for realizing follow-up safe access of user data
CN106209506A (en) * 2016-06-30 2016-12-07 瑞斯康达科技发展股份有限公司 A kind of virtualization deep-packet detection flow analysis method and system

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110798366B (en) * 2018-08-01 2023-02-24 阿里巴巴集团控股有限公司 Task logic processing method, device and equipment
CN110798366A (en) * 2018-08-01 2020-02-14 阿里巴巴集团控股有限公司 Task logic processing method, device and equipment
CN109669792A (en) * 2018-12-24 2019-04-23 网宿科技股份有限公司 Analyze the method and service server of data message
CN111859062A (en) * 2019-04-30 2020-10-30 大唐移动通信设备有限公司 DPDK-based network data processing method and device
CN111859062B (en) * 2019-04-30 2023-09-22 大唐移动通信设备有限公司 Network data processing method and device based on DPDK
CN112506674A (en) * 2019-09-16 2021-03-16 北京华耀科技有限公司 System and method for communication between user state TCP/IP protocol stack and local application in Linux system
CN112506674B (en) * 2019-09-16 2024-02-02 北京华耀科技有限公司 System and method for communication between user mode TCP/IP protocol stack and local application in Linux system
CN111049762A (en) * 2019-12-23 2020-04-21 上海金仕达软件科技有限公司 Data acquisition method and device, storage medium and switch
CN114422489B (en) * 2020-10-13 2024-01-26 中国电信股份有限公司 Information transmission method and system based on service grid
CN114422489A (en) * 2020-10-13 2022-04-29 中国电信股份有限公司 Information transmission method and system based on service grid
CN113691619A (en) * 2021-08-24 2021-11-23 北京天融信网络安全技术有限公司 Message processing method and device, electronic equipment and storage medium
CN113672410B (en) * 2021-08-25 2023-08-25 北京天融信网络安全技术有限公司 Data processing method and electronic device
CN113672410A (en) * 2021-08-25 2021-11-19 北京天融信网络安全技术有限公司 Data processing method and electronic device
CN114301619A (en) * 2021-11-16 2022-04-08 北京威努特技术有限公司 Industrial control firewall without hardware management port and realization method of simulation management port of industrial control firewall
CN114301619B (en) * 2021-11-16 2024-01-30 北京威努特技术有限公司 Industrial control firewall without hardware management port and implementation method of simulation management port of industrial control firewall
CN115242895B (en) * 2022-07-19 2023-04-18 杭州迪普科技股份有限公司 DPDK-based local access method and device
CN115242895A (en) * 2022-07-19 2022-10-25 杭州迪普科技股份有限公司 DPDK-based local access method and device
CN115412502B (en) * 2022-11-02 2023-03-24 之江实验室 Network port expansion and message rapid equalization processing method
CN115412502A (en) * 2022-11-02 2022-11-29 之江实验室 Network port expansion and message rapid equalization processing method
CN116170404A (en) * 2023-02-17 2023-05-26 通明智云(北京)科技有限公司 DPDK-based data forwarding method and device
CN116170404B (en) * 2023-02-17 2023-09-29 通明智云(北京)科技有限公司 DPDK-based data forwarding method and device

Also Published As

Publication number Publication date
CN108270676B (en) 2020-07-28

Similar Documents

Publication Publication Date Title
CN108270676A (en) A kind of network data processing method and device based on IntelDPDK
CN103416025B (en) For adding the system and method for VLAN tag via cloud bridge
US20210243247A1 (en) Service mesh offload to network devices
CN101535965B (en) Technique for improving scalability and portability of a storage management system
CN103155524B (en) The system and method for IIP address is shared between the multiple cores in multiple nucleus system
CN104380278B (en) Equipment, system and method for client-side management session continuity
CN103650426B (en) For carrying out the system and method that cloud bridge connects between public cloud and privately owned cloud
CN108476208A (en) Multi-path transmission designs
CN103503424B (en) For realizing the system and method connecting mirror image in multiple nucleus system
ES2553428T3 (en) Method, device and content processing system
CN104052789A (en) Load balancing for a virtual networking system
CN107079060A (en) The system and method optimized for carrier-class NAT
CN102771089A (en) Systems and methods for mixed mode handling of IPv6 and IPv4 traffic by a virtual server
CN102907055A (en) Systems and methods for link load balancing on multi-core device
CN105677251B (en) Storage system based on Redis cluster
CN104995880A (en) Quantized congestion notification in a virtual networking system
CN102460394A (en) Systems and methods for a distributed hash table in a multi-core system
CN102771083A (en) Systems and methods for mixed mode of IPv6 and IPv4 DNS of global server load balancing
CN106503058B (en) A kind of data load method, terminal and computing cluster
CN102770853A (en) Systems and methods for managing large cache services in a multi-core system
CN102771085A (en) Systems and methods for maintaining transparent end to end cache redirection
CN102771090A (en) Systems and methods for policy based transparent client IP prosecution
CN103155496A (en) Systems and methods for server initiated connection management in a multi-core system
US11218544B1 (en) Tiered queuing system
CN110022330A (en) For the processing method of network packet, device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200728

Termination date: 20211231

CF01 Termination of patent right due to non-payment of annual fee