CN111934894B - Method and system for managing wireless network interface based on DPDK - Google Patents

Method and system for managing wireless network interface based on DPDK Download PDF

Info

Publication number
CN111934894B
CN111934894B CN201910393980.9A CN201910393980A CN111934894B CN 111934894 B CN111934894 B CN 111934894B CN 201910393980 A CN201910393980 A CN 201910393980A CN 111934894 B CN111934894 B CN 111934894B
Authority
CN
China
Prior art keywords
ring
dpdk
packet
mapping
sock
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
CN201910393980.9A
Other languages
Chinese (zh)
Other versions
CN111934894A (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.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies 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 Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN201910393980.9A priority Critical patent/CN111934894B/en
Publication of CN111934894A publication Critical patent/CN111934894A/en
Application granted granted Critical
Publication of CN111934894B publication Critical patent/CN111934894B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • 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/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses a DPDK-based method and a DPDK-based system for managing a wireless network interface, and relates to the technical field of wireless function development of soft forwarding equipment for realizing network virtualization. The method comprises the following steps: creating tx _ ring and rx _ ring managed by a user-mode DPDK for each wireless network interface, and binding the tx _ ring and the rx _ ring into a virtual transceiving port of the DPDK; establishing a receiving and sending socket directly connected with a hardware layer for each wireless network interface based on AF _ PACKET, and setting rx _ sock and tx _ sock based on a PACKET mapping mode; mapping tx _ ring to the kernel space of tx _ sock by adopting memory mapping, and mapping rx _ ring to the kernel space of rx _ sock to realize memory sharing; and directly polling the marks of the tx _ ring and the rx _ ring through the DPDK to finish frame transceiving. The invention skips the kernel protocol stack processing, and saves the data copy operation during one-time receiving and sending; the wireless drive does not need to be changed, and the time delay is qualified.

Description

Method and system for managing wireless network interface based on DPDK
Technical Field
The invention relates to the technical field of wireless function development of soft forwarding equipment for realizing network virtualization, in particular to a method and a system for managing a wireless network interface based on DPDK.
Background
The general special device for the communication forwarding equipment efficiently forwards the message through a built-in hardware circuit or a hardware circuit formed by programming, namely, only a few data frames need to be processed by a CPU. However, with the rapid development of the internet, the rapid emergence of the cloud industry and the requirement of network virtualization, a large amount of data frames are generally processed by a CPU, that is, communication and information processing are integrated. This integration is ICT (Information and Communication Technology, Information telecommunication Technology).
The normal devices are all KIOs (normal kernel mode IO access), and the process of receiving packets to the CPU is as follows: hardware interruption, distributing a packet to a kernel thread, software interruption, processing the packet by the kernel thread in a protocol stack, informing a user layer after the processing, a network layer, a logic layer and a service layer. Due to the existence of interrupt processing and the memory copy and switching of the kernel-mode user mode, the efficiency of processing packets by the CPU is low, and the large-bandwidth data frame processing required by the ICT cannot be supported.
In order to implement ICT, the industry uses the DPDK (data plane development kit) technology proposed by INTEL to implement soft forwarding, thereby implementing the network virtualization function that the industry is trying to push. The idea of the DPDK is to bypass the processing of the Linux kernel protocol stack to the data packet, implement a set of data planes in the user space to transmit and receive and process the data packet, and close the interrupt. Thus, the CPU can realize the processing of data frames with large bandwidth.
The core of the DPDK technique is to create an IGB _ UIO (DPDK interface technique, which can implement direct binding of a network card to a DPDK) by using LINUX UIO (soft forwarding advocated user mode IO access) technique, convert the drive of a GE network card into user mode direct access, directly map a hardware register to the user mode, implement that the network card is taken over by the DPDK, so that the received message is directly sent to the user mode and forwarded in a polling manner, and no more time is consumed for switching between the kernel mode and the user mode, as shown in fig. 1.
However, the IGB _ UIO technology of DPDK only supports a small number of INTEL push GE/XGE cable cards at present, and does not support WIFI/LTE wireless network cards in the industry. The wireless network card works in a current general mode, namely, after receiving a message, hardware triggers DMA (direct Memory Access) interruption, a kernel reads and analyzes the packet, and finally the packet is forwarded according to a kernel routing table. DMA is a general technology, and a general network card supports the function, so that the data transmission of a network card data frame and a system memory is realized by efficiently utilizing a system bus. If there is no DMA, the DMA can be completed by the CPU completely, but the use efficiency of the CPU is affected. If the local application layer program needs to be processed, the message is copied from the kernel mode to the user mode, and a USR _ API (user mode application program interface) is triggered, as shown in fig. 2.
The LTE (long term evolution mobile communication technology)/WIFI (wireless fidelity wireless access technology) does not develop UIO drive similar to IGB _ UIO based on soft forwarding requirement, obviously, the LTE/WIFI wireless network card cannot be directly managed by the DPDK, and the relatively complex packet processing mode is sent to the DPDK, increasing the packet forwarding delay. It should be noted that, in principle, the wireless network card chip driver can modify the mode to launch the UIO driver to support the DPDK direct management, but the workload here is very large, and is not feasible in the industry at all.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
in the scheme of INTEL, for a network card that is not supported by DPDK, such as a wireless network card, or a push KNI (kernel network card interface technology proposed by DPDK), a KNI port is created substantially, and a wireless data packet is routed by two hops, that is, a LINUX IP protocol stack is formed. However, there is a problem that routing forwarding of many device companies is uniformly performed by a user-mode protocol stack developed by themselves for the sake of integrity and reliability of routing, without using a LINUX IP protocol stack and without maintaining the LINUX IP protocol stack. Thus, even if the time delay is not considered, the default IP protocol stack routing mode of the wireless network card is not compatible with the design requirements of the equipment companies.
A general method for direct implementation is that a radio frame processing flow is unchanged, and the radio frame processing flow is submitted to a CPU and then forwarded to a DPDK, so that forwarding is feasible, but a packet needs to go through a complete flow, a user mode and a kernel mode are copied and switched, and two-hop routing exists, which results in a larger time delay. In addition, two routing tables need to be maintained, which also does not meet the design requirement.
Disclosure of Invention
The invention aims to overcome the defects of the background technology and provides a method and a system for managing a wireless network interface based on DPDK, which skip the processing of a kernel protocol stack and save the data copy operation during one time of receiving and transmitting; the wireless driver does not need to be changed, only uses a user mode routing protocol stack to realize the routing processing of the packet, namely, two routing tables do not need to be maintained, the time delay is qualified, and the design requirement is met.
In a first aspect, a method for managing a wireless network interface based on DPDK is provided, which includes the following steps:
creating a sending queue ring tx _ ring and a receiving queue ring rx _ ring managed by a user-mode DPDK for each wireless network interface, and binding the tx _ ring and the rx _ ring into a virtual transceiving port of the DPDK;
establishing a receiving and transmitting socket which is directly connected with a hardware layer for each wireless network interface respectively based on AF _ PACKET, and setting a wireless module PACKET sending kernel queue ring rx _ sock and a wireless module PACKET receiving kernel queue ring tx _ sock which are based on a PACKET mapping mode for the sockets;
mapping tx _ ring to the kernel space of tx _ sock by adopting memory mapping, and mapping rx _ ring to the kernel space of rx _ sock to realize memory sharing;
and directly polling the marks of the tx _ ring and the rx _ ring through the DPDK to finish frame transceiving.
According to the first aspect, in a first possible implementation manner of the first aspect, after the receiving and sending sockets directly connected to the hardware layer are respectively created for each wireless network interface based on the AF _ PACKET, the method further includes the following steps:
the original socket identification that the link layer directly uploaded the data frame is created.
According to the first aspect, in a second possible implementation manner of the first aspect, the memory mapping is performed by using a packet _ mmap memory mapping technique.
According to the first aspect, in a third possible implementation manner of the first aspect, after the flag of tx _ ring and rx _ ring is polled directly by the DPDK, the method further includes the following steps:
carrying out DPDK soft forwarding on the data frame according to a dynamic route configured by a pure user mode routing protocol stack, and sending the management frame to the user mode routing protocol stack for processing; based on the virtual port technology of the DPDK, the control planes of all the ports are uniformly managed.
According to a third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, after the DPDK-based virtual port technology uniformly manages the control planes of all the ports, the method further includes the following steps:
and configuring the kernel mode routing protocol stack of the operating system into an inactive state.
In a second aspect, a system for managing a wireless network interface based on DPDK is provided, which includes:
a virtual transceiving port creating unit configured to: creating a sending queue ring tx _ ring and a receiving queue ring rx _ ring managed by a user-mode DPDK for each wireless network interface, and binding the tx _ ring and the rx _ ring into a virtual transceiving port of the DPDK;
a socket creation unit to: establishing a receiving and sending socket which is directly connected with a hardware layer for each wireless network interface based on AF _ PACKET, and setting a wireless module PACKET sending kernel queue ring rx _ sock and a wireless module PACKET receiving kernel queue ring tx _ sock which are based on a PACKET mapping mode for the sockets;
a memory mapping unit to: mapping tx _ ring to the kernel space of tx _ sock by adopting memory mapping, and mapping rx _ ring to the kernel space of rx _ sock to realize memory sharing;
a transceiving unit for: and directly polling the marks of tx _ ring and rx _ ring through the DPDK to finish receiving and sending.
According to the second aspect, in a first possible implementation manner of the second aspect, the socket creating unit is further configured to: the original socket identification that the link layer directly uploaded the data frame is created.
According to a second aspect, in a second possible implementation manner of the second aspect, the memory mapping unit performs mapping by using a packet _ mmap memory mapping technique.
According to the second aspect, in a third possible implementation manner of the second aspect, the system further includes:
a management unit to: after the receiving and sending unit directly polls the marks of tx _ ring and rx _ ring through DPDK to complete the receiving and sending of the frame, the management unit performs DPDK soft forwarding on the data frame according to the dynamic route configured by the pure user state routing protocol stack and sends the management frame to the user state routing protocol stack for processing; based on the virtual port technology of the DPDK, the control planes of all the ports are uniformly managed.
According to a third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the system further includes:
a configuration unit for: after the management unit uniformly manages the control planes of all the ports based on the virtual port technology of the DPDK, the configuration unit configures a kernel mode routing protocol stack of the operating system into an inactive state.
Compared with the prior art, the invention has the following advantages:
the invention uses AF _ PACKET to directly connect the receiving and sending frames of the wireless module from the bottom layer of the kernel protocol stack to a piece of memory space in a user mode, namely skipping the processing of the kernel protocol stack; uniformly managing the control planes of all ports by using a DPDK virtual port technology; the shared space of the kernel mode and the user mode is realized by using a packet _ mmap technology, and the data copy operation during one-time receiving and sending is omitted; the wireless driver does not need to be changed, only uses a user mode routing protocol stack to realize the routing processing of the packet, namely, two routing tables do not need to be maintained, the time delay is qualified, and the design requirement is met.
Drawings
Fig. 1 is a schematic diagram of a relationship between a DPDK soft forwarding platform and a linux protocol stack;
FIG. 2 is a schematic diagram of a conventional wireless network card;
fig. 3 is a flowchart of a method for DPDK-based management of a wireless network interface according to an embodiment of the present invention;
FIG. 4 is a flow chart of a process for implementing direct connection between an application layer and a hardware layer, bypassing other layers, based on AF _ PACKET;
fig. 5 is a schematic diagram for simply illustrating the operation of WIFI;
fig. 6 is a diagram simply illustrating the working principle of wireless LTE;
fig. 7 is a diagram of a DPDK uniformly managing wireless virtual ports and general DPDK-bound ports.
Detailed Description
Interpretation of professional terms
NFV network virtualization
DMA direct memory access
Mobile communication technology of LTE long-term evolution
Wireless access technology of WIFI wireless fidelity
AF _ PACKET can directly act on the original socket of the link layer
SOCK _ RAW is used to create the original socket identification for the link layer to directly upload data frames
packet _ mmap kernel mode and user mode packet-based memory sharing mapping
IGB _ UIO DPDk interface technology capable of realizing direct binding of network card to DPDk
USR _ API user-mode application program
Kernel network card interface technology of KNI DPDK push
Transmission queue ring managed by Tx _ ring user state DPDK
Rx _ ring user state DPDK managed receive queue ring
Tx _ sock wireless module core queue ring of sending out package
Rx _ sock wireless module package receiving inner core queue ring
Ifconfig general linux command for obtaining equipment port information
Dhclient universal linux command for dynamically acquiring port IP configuration
Mmap memory map, i.e. memory map
UIO soft forwarding advocated user mode IO access
Referring to fig. 3, an embodiment of the present invention provides a method for managing a wireless network interface based on DPDK, including the following steps:
s1, creating a sending queue ring tx _ ring and a receiving queue ring rx _ ring managed by a user DPDK for each wireless network interface, and binding the tx _ ring and the rx _ ring into a virtual transceiving port of the DPDK;
s2, respectively creating a transceiving socket directly connected with a hardware layer for each wireless network interface based on AF _ PACKET, creating an original socket identifier SOCK _ RAW for directly uploading data frames by a link layer, and setting a wireless module PACKET sending kernel queue ring rx _ SOCK and a wireless module PACKET receiving kernel queue ring tx _ SOCK based on a PACKET mapping mode for the sockets;
s3, mapping tx _ ring to the kernel space of tx _ sock by adopting memory mapping, and mapping rx _ ring to the kernel space of rx _ sock to realize memory sharing without copying;
s4, directly polling the tx _ ring and rx _ ring marks through the DPDK to finish the frame transceiving, and no longer calling the normal standard transceiving interface function recvfrom/sendto.
The wireless network card receives and transmits the message and directly acts on a section of memory of the user mode, and the section of memory is configured into a virtual network card based on the DPDK technology. The virtual network card and the GE network card really bound to the DPDK share one forwarding plane. Namely, the virtual network card is also a corresponding port, and the routing time is not different from the GE card, so that the network card really bound by the wireless network card and the DPDK, such as the GE card, shares a routing forwarding plane, and the time delay is not increased compared with the time delay in the conventional mode, namely, the LINUX protocol stack forwarding is carried out.
Preferably, the memory mapping is performed by using a packet _ mmap memory mapping technology, so that a transceiving frame of the wireless module is directly sent to a piece of memory space of the user mode from a bottom layer, namely a link layer, of a kernel protocol stack, the memory space is shared by the kernel mode and the user mode, and a data copy operation during one transceiving is omitted.
Preferably, after the flag of tx _ ring and rx _ ring is polled directly by DPDK, the method further includes the following steps:
carrying out DPDK soft forwarding on the data frame according to a dynamic route configured by a pure user mode routing protocol stack, and sending the management frame to the user mode routing protocol stack for processing; based on the virtual port technology of the DPDK, the control planes of all the ports are uniformly managed. Therefore, the kernel protocol stack can be skipped over, the routing processing of the packet is realized only based on the user mode routing protocol stack, and the upper layer module does not maintain and configure the IP protocol stack forwarding routing table any more.
Preferably, after the DPDK-based virtual port technology uniformly manages the control planes of all ports, the method further includes the following steps:
and configuring the kernel mode routing protocol stack carried by the operating system into an inactive state, so that the equipment system only dynamically maintains one routing table of a user mode.
The embodiment of the invention does not change the drive of the wireless network card and the wireless management frame; the IP of a wireless network interface is not configured, and the linux protocol stack does not act on packet forwarding (therefore, the routing table of the IP protocol stack is not needed to be managed, so that two routing tables do not need to be maintained); the DPDK manages the data frames and the management frames of the newly-built virtual wireless port the same as the management of the common port.
Preferably, the embodiment of the present invention runs a pure user mode protocol stack developed by a device company, and the embodiment of the present invention only uses the user mode routing protocol stack to implement the routing processing of the packet, so that two routing tables are not required to be maintained.
Preferably, the DPDK forwarding platform completes the complete encapsulation and parsing of the service plane data frame.
An embodiment of the present invention further provides a system for managing a wireless network interface based on a DPDK, including:
a virtual transceiving port creating unit configured to: creating a sending queue ring tx _ ring and a receiving queue ring rx _ ring managed by a user-mode DPDK for each wireless network interface, and binding the tx _ ring and the rx _ ring into a virtual transceiving port of the DPDK;
a socket creation unit to: respectively creating a receiving and sending socket which is directly connected with a hardware layer for each wireless network interface based on AF _ PACKET, creating an original socket identification SOCK _ RAW which is directly sent by a link layer to a data frame, and setting a wireless module sending core queue ring rx _ SOCK and a wireless module receiving core queue ring tx _ SOCK which are based on a PACKET mapping mode for the sockets;
a memory mapping unit to: the tx _ ring is mapped to the inner core space of the tx _ sock by adopting memory mapping, and the rx _ ring is mapped to the inner core space of the rx _ sock, so that memory sharing is realized without copying;
a transceiving unit configured to: the flag of tx _ ring and rx _ ring is polled directly through DPDK to complete transceiving, and the normal standard transceiving interface function recvfrom/sendto is not called any more.
Preferably, the memory mapping unit performs mapping by using a packet _ mmap memory mapping technology, so that a kernel mode and a user mode share a memory space, and a data copy operation during one transceiving is omitted.
Preferably, the system further comprises:
a management unit to: after the receiving and sending unit directly polls the marks of tx _ ring and rx _ ring through DPDK to complete the receiving and sending of the frame, the management unit performs DPDK soft forwarding on the data frame according to the dynamic route configured by the pure user state routing protocol stack and sends the management frame to the user state routing protocol stack for processing; based on the virtual port technology of the DPDK, the control planes of all the ports are uniformly managed. Therefore, the kernel protocol stack can be skipped over, the routing processing of the packet is realized only based on the user mode routing protocol stack, and the upper layer module does not maintain and configure the IP protocol stack forwarding routing table any more.
Preferably, the system further comprises:
a configuration unit for: after the management unit uniformly manages the control planes of all ports based on the virtual port technology of the DPDK, the configuration unit configures a kernel mode routing protocol stack of the operating system into an inactive state, so that the equipment system only dynamically maintains one routing table of a user mode.
Preferably, the system further comprises:
a protocol stack execution unit to: a pure user-mode protocol stack developed by the equipment company is run.
The embodiment of the invention only uses the user mode routing protocol stack to realize the routing processing of the packet, thereby avoiding the need of maintaining two routing tables.
Preferably, the system further comprises:
a DPDK forwarding platform to: and completing the complete encapsulation and analysis of the service plane data frame.
Reference will now be made in detail to the present embodiments of the invention, examples of which are illustrated in the accompanying drawings. While the invention will be described in conjunction with the specific embodiments, it will be understood that they are not intended to limit the invention to the embodiments described. On the contrary, it is intended to cover alternatives, modifications, and equivalents as may be included within the spirit and scope of the invention as defined by the appended claims. It should be noted that the method steps described herein may be implemented by any functional block or functional arrangement, and that any functional block or functional arrangement may be implemented as a physical entity or a logical entity, or a combination of both.
In order that those skilled in the art will better understand the present invention, the following detailed description of the invention is provided in conjunction with the accompanying drawings and the detailed description of the invention.
Note that: the example to be described next is only a specific example, and does not limit the embodiments of the present invention necessarily to the following specific steps, values, conditions, data, orders, and the like. Those skilled in the art can, upon reading this specification, utilize the concepts of the present invention to construct more embodiments than those specifically described herein.
The embodiment of the invention solves the following technical problems:
1. how to deliver the wireless data frame to a DPDK for forwarding, and qualified delay;
and 2, the IP protocol stack carried by the LINUX is almost free and is not maintained, and how the wireless data frame bypasses the IP protocol stack.
In the embodiment of the invention, the WIFI and LTE drivers are still unchanged, namely, the WIFI and LTE drivers are still registered under the LINUX system.
In the embodiment of the invention, the sock is created by using AF _ PACKET, the kernel-mode user-mode memory sharing is realized by using mmap (memory map memory mapping, namely, the kernel-mode memory space and the user-mode memory space are mapped to the same physical space, so that the kernel-mode memory space and the user-mode memory space are shared without copying), and the unified compatibility management of the ports is realized by using a virtual port concept.
The embodiment of the invention creates AF _ PACKET socket of SOCK _ RAW for the wireless network card, realizes that the PACKET of the wireless drive is directly connected to the user mode memory without walking an IP protocol stack, and is shown in figure 4. Referring to fig. 4, the AF _ PACKET enables the PACKET to be almost directly from the kernel mode to the user mode, which shortens the processing time and CPU resources of the PACKET, otherwise, the PACKET cannot be processed by multiple hosts in case of large bandwidth traffic. The AF _ PACKET directly associates the user mode with the link layer of the kernel, so that the receiving and sending of the wireless drive PACKET can directly act on a section of memory of the user mode. As shown in the right side of fig. 4, if the AF _ PACKET is not used, the complete linux protocol stack is needed to be walked, and the linux protocol stack is finally applied to the user mode memory, as shown in the left side of fig. 4.
Fig. 5 is a schematic diagram of WIFI operation, where a left branch in fig. 5 describes a processing flow of WIFI data implemented in the embodiment of the present invention, a management layer and service forwarding are both directly only in a user state, and a right branch in fig. 5 describes a management channel of a wireless layer. It is clear that the management channel here is unchanged, which is explaining that the driving of WIFI is not changed by the embodiments of the present invention. Fig. 6 is a working principle diagram of LTE, which is similar to the working principle of WIFI and is not described herein again.
The embodiment of the invention does not change the working mode of the WIFI wireless management frame in the figure 5, and does not change the AT interface or the SDK API in the figure 6. The right branch of fig. 5/6 is the wireless management channel, and the embodiment of the present invention does not have any changes to the right branch of fig. 5/6. Therefore, in the embodiment of the present invention, when the wireless port is managed based on the DPDK, the wireless driver does not need to be changed, that is, the ifconfig (universal linux command, device port information acquisition) can still display the port.
In the embodiment of the invention, the memory of the user mode is created based on the packet _ mmap technology, so that the kernel mode user mode switching copy is not needed when the kernel mode is submitted. Packet _ mmap is a Packet mode-based memory map, i.e., a memory map. If mmap is not used, there must be a copy of the kernel-state to user-state of the packet, which clearly adds processing time to the packet. When the messages are transmitted and received based on AF _ PACKET polling, the kernel mode can be copied to the kernel space X and then copied to the user mode space by the X. After the packet _ mmap is adopted, the mapping of the X and the user state space is consistent on the physical space, and the copy is not needed, so that the processing time of the packet is obviously shortened.
In the embodiment of the present invention, the memory of the user mode is defined as the virtual port of the DPDK, so that there is no difference between the packet to be transmitted and received and the normal port processing of the DPDK, as shown in fig. 7, which is the DPDK technique of INTEL, and the management plane can be simplified.
The user mode routing protocol meeting the ICT requirement is different from the common communication equipment which processes the packet by a kernel mode protocol stack. In the embodiment of the invention, the packet to the user mode is a data frame, and is directly forwarded according to the user mode routing table; if the frame is a management frame, the frame is submitted to a user mode routing protocol stack for processing. The embodiment of the invention only uses the user mode routing protocol stack to realize the routing processing of the packet, thereby avoiding the need of maintaining two routing tables.
In the embodiment of the invention, the wireless port under linux is not configured with any route, dhclient is also closed, a DHCP (dynamic host configuration IP protocol) protocol is started, and the port IP of the equipment is configured, so that the original PACKET still enters a protocol stack after being extracted by AF _ PACKET, but is discarded no matter the original PACKET is a data frame or a management frame. In a word, the protocol stack does not influence data forwarding, and a data frame is naturally discarded because of no route; the management frame is discarded because the port is not configured with IP and is invalid.
In the embodiment of the invention, the DPDK manages the data frame and the management frame of the newly-built virtual wireless port simply, and is the same as a common port. For example, if a wlan0 is provided and a cable xge0, xge1 is used for dpdk direct management, the processing of a management frame (not radio management, ip layer) received from the wlan0 is the same as xge0/xge 1; the forwarding of traffic is also exactly the same, i.e. the same point-to-point function is used for dpdk implementation xge0- > wlan0 and xge0- > xge 1.
Based on the same inventive concept, the embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements all or part of the method steps of the above method.
The present invention can implement all or part of the processes of the above methods, and can also be implemented by using a computer program to instruct related hardware, where the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above method embodiments can be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
Based on the same inventive concept, an embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program running on the processor, and the processor executes the computer program to implement all or part of the method steps in the method.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center of the computer device and the various interfaces and lines connecting the various parts of the overall computer device.
The memory may be used to store computer programs and/or modules, and the processor may implement various functions of the computer device by executing or executing the computer programs and/or modules stored in the memory, as well as by invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (e.g., a sound playing function, an image playing function, etc.); the storage data area may store data (e.g., audio data, video data, etc.) created according to the use of the cellular phone. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, server, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), servers and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (6)

1. A DPDK-based method for managing wireless network interfaces, comprising the steps of:
creating a sending queue ring tx _ ring and a receiving queue ring rx _ ring managed by a user-mode DPDK for each wireless network interface, and binding the tx _ ring and the rx _ ring into a virtual transceiving port of the DPDK;
respectively creating a receiving and sending socket which is directly connected with a hardware layer for each wireless network interface based on AF _ PACKET, creating an original socket identification which is directly sent by a link layer to a data frame, and setting a wireless module sending core queue ring rx _ sock and a wireless module receiving core queue ring tx _ sock which are based on a PACKET mapping mode for the sockets;
mapping tx _ ring to the kernel space of tx _ sock by adopting memory mapping, and mapping rx _ ring to the kernel space of rx _ sock to realize memory sharing; the memory mapping is performed by adopting a packet _ mmap memory mapping technology;
and directly polling the marks of the tx _ ring and the rx _ ring through the DPDK to finish frame transceiving.
2. The method as claimed in claim 1, wherein after the direct polling of the tx _ ring and rx _ ring flags by the DPDK completes the transceiving of the frame, further comprising the steps of:
carrying out DPDK soft forwarding on the data frame according to a dynamic route configured by a pure user mode routing protocol stack, and sending the management frame to the user mode routing protocol stack for processing; based on the virtual port technology of the DPDK, the control planes of all the ports are uniformly managed.
3. The method of claim 2, wherein after the DPDK-based virtual port technology uniformly manages the control planes of all ports, the method further comprises the steps of:
and configuring the kernel mode routing protocol stack of the operating system into an inactive state.
4. A system for managing a wireless network interface based on DPDK, comprising:
a virtual transceiving port creating unit configured to: creating a sending queue ring tx _ ring and a receiving queue ring rx _ ring managed by a user-mode DPDK for each wireless network interface, and binding the tx _ ring and the rx _ ring into a virtual transceiving port of the DPDK;
a socket creation unit to: respectively creating a receiving and sending socket which is directly connected with a hardware layer for each wireless network interface based on AF _ PACKET, creating an original socket identification which is directly sent by a link layer to a data frame, and setting a wireless module sending core queue ring rx _ sock and a wireless module receiving core queue ring tx _ sock which are based on a PACKET mapping mode for the sockets;
a memory mapping unit to: mapping tx _ ring to the kernel space of tx _ sock by adopting memory mapping, and mapping rx _ ring to the kernel space of rx _ sock to realize memory sharing; the memory mapping unit adopts a packet _ mmap memory mapping technology to map;
a transceiving unit for: and directly polling the marks of the tx _ ring and the rx _ ring through the DPDK to finish frame transceiving.
5. The system of claim 4, further comprising:
a management unit to: after the receiving and sending unit directly polls the marks of tx _ ring and rx _ ring through DPDK to complete the receiving and sending of the frame, the management unit performs DPDK soft forwarding on the data frame according to the dynamic route configured by the pure user state routing protocol stack and sends the management frame to the user state routing protocol stack for processing; based on the virtual port technology of the DPDK, the control planes of all the ports are uniformly managed.
6. The system of claim 5, further comprising:
a configuration unit for: after the management unit uniformly manages the control planes of all ports based on the virtual port technology of the DPDK, the configuration unit configures a kernel mode routing protocol stack of the operating system into an inactive state.
CN201910393980.9A 2019-05-13 2019-05-13 Method and system for managing wireless network interface based on DPDK Active CN111934894B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910393980.9A CN111934894B (en) 2019-05-13 2019-05-13 Method and system for managing wireless network interface based on DPDK

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910393980.9A CN111934894B (en) 2019-05-13 2019-05-13 Method and system for managing wireless network interface based on DPDK

Publications (2)

Publication Number Publication Date
CN111934894A CN111934894A (en) 2020-11-13
CN111934894B true CN111934894B (en) 2022-08-12

Family

ID=73282601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910393980.9A Active CN111934894B (en) 2019-05-13 2019-05-13 Method and system for managing wireless network interface based on DPDK

Country Status (1)

Country Link
CN (1) CN111934894B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112737932B (en) * 2020-12-25 2023-04-07 江苏省未来网络创新研究院 DPDK-based high-performance IPSCE gateway
CN113382014B (en) * 2021-06-23 2022-12-06 中移(杭州)信息技术有限公司 Negotiation processing method, device, terminal equipment and storage medium
CN113364688B (en) * 2021-06-28 2023-06-13 北京天融信网络安全技术有限公司 Route synchronization method, device, electronic equipment and readable storage medium
CN113535433B (en) * 2021-07-21 2023-08-11 广州市品高软件股份有限公司 Control forwarding separation method, device, equipment and storage medium based on Linux system
CN115766044A (en) * 2021-08-31 2023-03-07 华为技术有限公司 Communication method based on user mode protocol stack and corresponding device
CN115473811A (en) * 2022-09-21 2022-12-13 西安超越申泰信息科技有限公司 Network performance optimization method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020926A (en) * 2016-04-29 2016-10-12 华为技术有限公司 Data transmission method and device used in virtual switch technique
CN107294869A (en) * 2017-06-22 2017-10-24 郑州云海信息技术有限公司 A kind of method and system of Microsoft Loopback Adapter message crawl
CN108366018A (en) * 2017-01-26 2018-08-03 普天信息技术有限公司 A kind of processing method of network data packets based on DPDK
CN109361693A (en) * 2018-11-21 2019-02-19 南京中孚信息技术有限公司 Virtual unit communication means and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10560394B2 (en) * 2017-09-22 2020-02-11 Cisco Technology, Inc. Dynamic transmission side scaling

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020926A (en) * 2016-04-29 2016-10-12 华为技术有限公司 Data transmission method and device used in virtual switch technique
CN108366018A (en) * 2017-01-26 2018-08-03 普天信息技术有限公司 A kind of processing method of network data packets based on DPDK
CN107294869A (en) * 2017-06-22 2017-10-24 郑州云海信息技术有限公司 A kind of method and system of Microsoft Loopback Adapter message crawl
CN109361693A (en) * 2018-11-21 2019-02-19 南京中孚信息技术有限公司 Virtual unit communication means and device

Also Published As

Publication number Publication date
CN111934894A (en) 2020-11-13

Similar Documents

Publication Publication Date Title
CN111934894B (en) Method and system for managing wireless network interface based on DPDK
US11005755B2 (en) Packet processing method in cloud computing system, host, and system
CN104011656B (en) Data are stored to reduce energy expenditure and improvement performance using immediate data path architecture
CN109412922B (en) Method, forwarding device, controller and system for transmitting message
US8417848B2 (en) Method and apparatus for implementing multiple service processing functions
US11048535B2 (en) Method and apparatus for transmitting data packet based on virtual machine
CN112799825A (en) Task processing method and network equipment
US9661550B2 (en) Communication apparatus, communication method, and communication system
CN110661690A (en) Techniques for hairpin transport network traffic
CN113498595B (en) PCIe-based data transmission method and device
CN110768903A (en) Method, device, terminal and storage medium for optimizing network connection
CN111756629A (en) Method, device, equipment, network and medium for accessing equipment to overlay network and communication
US11252457B2 (en) Multimedia streaming and routing apparatus and operation method of the same
WO2022111666A1 (en) Route advertisement method, apparatus, and system
CN115022424A (en) Virtual control method, system, equipment and medium for network card of hydroelectric LCU controller
US11604670B2 (en) Virtual machine live migration method, apparatus, and system
CN114050998A (en) Method, device, electronic equipment and medium for realizing remote direct memory access
CN113676544A (en) Cloud storage network and method for realizing service isolation in entity server
CN114531320A (en) Communication method, device, equipment, system and computer readable storage medium
CN113923075A (en) Data transmission method and device
CN109819689B (en) Communication system and communication method
JPWO2020122024A1 (en) Network interface card, computer, circuit information rewriting method and program
CN113709015A (en) Data transmission method, electronic device and storage medium
CN109976876B (en) Accelerator management method and device
CN117041147B (en) Intelligent network card equipment, host equipment, 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