Data transmission method, network equipment, device and storage medium
By registering the IOCTL interface and optimizing the data transmission channel in the DPDK layer, data is directly transmitted between the application layer and the DPDK layer, solving the problem of cumbersome data transmission delay and processing of base stations, and achieving efficient data transmission.
Patent Information
- Application Number
- CN202310781132.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2024-12-31
AI Technical Summary
The existing base station has 200 microsecond sleep operation during data transmission, which makes it difficult to meet the requirements of low latency. The processing process of the DPS protocol stack is cumbersome, affecting the timeliness of data transmission.
By registering the IOCTL interface in the DPDK layer, data is directly transmitted between the application layer and the DPDK layer, processing of three layers and above is eliminated, a dedicated control pool and ICE interrupt mechanism is adopted, priority and data types are distinguished, and ring queues and interrupt notifications are used. Message, optimize data transmission channel.
It improves the timeliness of data transmission, reduces memory copy and processing delays, meets the requirements of low latency, and is suitable for various communication systems such as 5G base stations.
Smart Images

Figure CN119232670A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data transmission method, network equipment, device and storage medium. Background Art
[0002] Currently, tasks using the base station custom protocol stack (Do It Yourself Protocol Stack, DIYPS) actively query the control queue of the data plane development kit (Data Plane Development Kit, DPDK).
[0003] In order to reduce the monopoly of the central processing unit (CPU) and avoid squeezing out the processing of other processes, the base station adopts a blocking receiving method. After the data is received, it needs to be processed by the DPS protocol stack, stripping off the media access control (MAC) header, Internet Protocol (IP) header, and User Datagram Protocol (UDP) header of each layer, and then passing it to the application layer through the Protocol Adaptation Module (PAM) adaptation layer. Similarly, the sending process is from top to bottom, and after "layer by layer coding", it is sent to the network card device through the DPDK driver.
[0004] However, the above process has a 200 microsecond (us) sleep operation, which is difficult to meet the low latency requirement. Summary of the invention
[0005] In view of the problems existing in the prior art, the embodiments of the present application provide a data transmission method, a network device, an apparatus and a storage medium.
[0006] In a first aspect, an embodiment of the present application provides a data transmission method, including:
[0007] Determine that data needs to be forwarded at Layer 2 between the application layer and the data plane development kit (DPDK) layer;
[0008] The input / output control IOCTL interface of the DPDK layer is called to transmit data between the application layer and the DPDK layer.
[0009] In some embodiments, the method further comprises:
[0010] Apply for a dedicated control pool for each data sending process;
[0011] In the data sending process, memory is requested from a dedicated control pool corresponding to the data sending process and filled with data to be sent.
[0012] In some embodiments, the method further comprises:
[0013] Apply for a network communication engine ICE interrupt for each media access control MAC soft core, and each ICE interrupt corresponds to an interrupt queue;
[0014] Query the data types corresponding to the multiple access control list (ACL) rules corresponding to the one interrupt queue;
[0015] Different ACL rule data are distinguished based on data types, wherein the different ACL rule data include first-category data of the first data transmission channel and second-category data of the second data transmission channel, wherein the first data transmission channel is a data transmission channel for performing layer 2 forwarding between the DPDK layer and the application layer, and the second data transmission channel is a data transmission channel for forwarding between the DPDK layer and the application layer through the DPS protocol stack;
[0016] The first type of data and the second round of data are placed in different ring queues, and interrupt notification messages corresponding to different data types are triggered.
[0017] In some embodiments, the querying of the data types corresponding to the multiple access control list (ACL) rules corresponding to the interruption queue includes:
[0018] Query the metadata fields in the multiple ACL rules and read the data type value;
[0019] Based on the data type value, data types corresponding to multiple ACL rules corresponding to the interrupt queue are obtained.
[0020] In some embodiments, the method further comprises:
[0021] Setting a MAC address for each data transmission process, wherein the MAC address includes first priority information and second priority information;
[0022] The first priority information is the process priority corresponding to each data transmission process, the second priority information is the service priority corresponding to each data transmission process, and the priority of the first priority information is higher than the priority of the second priority information;
[0023] The first priority information is associated with a data transmission channel, and the data transmission channel includes: a first data transmission channel for performing layer 2 forwarding between the DPDK layer and the application layer, and a second data transmission channel for forwarding between the DPDK layer and the application layer through a DPS protocol stack.
[0024] In a second aspect, an embodiment of the present application further provides a network device, including a memory, a transceiver, and a processor;
[0025] A memory for storing a computer program; a transceiver for sending and receiving data under the control of the processor; and a processor for reading the computer program in the memory and executing the data transmission method provided in the first aspect.
[0026] In a third aspect, an embodiment of the present application further provides a data transmission device, including:
[0027] A determination unit, used to determine that data needs to be forwarded at Layer 2 between the application layer and the data plane development kit DPDK layer;
[0028] The calling unit is used to call the input and output control IOCTL interface of the DPDK layer to transmit data between the application layer and the DPDK layer.
[0029] In some embodiments, the apparatus further comprises a first application unit, configured to:
[0030] Apply for a dedicated control pool for each data sending process;
[0031] In the data sending process, memory is requested from a dedicated control pool corresponding to the data sending process and filled with data to be sent.
[0032] In some embodiments, the apparatus further comprises:
[0033] The second application unit is used to apply for a network communication engine ICE interrupt for each media access control MAC soft core, and each ICE interrupt corresponds to an interrupt queue;
[0034] A query unit, used for querying data types corresponding to multiple access control list (ACL) rules corresponding to the one interrupt queue;
[0035] a distinguishing unit, configured to distinguish different ACL rule data based on data types, wherein the different ACL rule data include first-category data of the first data transmission channel and second-category data of the second data transmission channel, wherein the first data transmission channel is a data transmission channel for performing layer 2 forwarding between the DPDK layer and the application layer, and the second data transmission channel is a data transmission channel for forwarding between the DPDK layer and the application layer through the DPS protocol stack;
[0036] A trigger unit is used to put the first type of data and the second round of data into different ring queues, and trigger interrupt notification messages corresponding to different data types.
[0037] In some embodiments, the query unit is further configured to:
[0038] Query the metadata fields in the multiple ACL rules and read the data type value;
[0039] Based on the data type value, data types corresponding to multiple ACL rules corresponding to the interrupt queue are obtained.
[0040] In some embodiments, the apparatus further comprises:
[0041] A setting unit, configured to set a MAC address for each data transmission process, wherein the MAC address includes first priority information and second priority information;
[0042] The first priority information is the process priority corresponding to each data transmission process, the second priority information is the service priority corresponding to each data transmission process, and the priority of the first priority information is higher than the priority of the second priority information;
[0043] The first priority information is associated with a data transmission channel, and the data transmission channel includes: a first data transmission channel for performing layer 2 forwarding between the DPDK layer and the application layer, and a second data transmission channel for forwarding between the DPDK layer and the application layer through a DPS protocol stack.
[0044] In a fourth aspect, an embodiment of the present application further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the data transmission method provided in the first aspect as described above.
[0045] In a fifth aspect, an embodiment of the present application further provides a non-transitory readable storage medium, wherein the non-transitory readable storage medium stores a computer program, and the computer program is used to enable a computer to execute the data transmission method provided in the first aspect as described above.
[0046] In a sixth aspect, an embodiment of the present application further provides a communication device, wherein a computer program is stored in the communication device, and the computer program is used to enable the communication device to execute the data transmission method provided in the first aspect as described above.
[0047] In a seventh aspect, an embodiment of the present application further provides a chip product, wherein a computer program is stored in the chip product, and the computer program is used to enable the chip product to execute the data transmission method provided in the first aspect as described above.
[0048] The data transmission method, network device, apparatus and storage medium provided in the embodiments of the present application call the IOCTL interface registered in the DPDK layer. When data needs to be forwarded at the second layer between the application layer and the DPDK layer, the data is directly transmitted between the application layer and the DPDK layer, thereby eliminating the processing of the third layer and above and improving the timeliness of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0050] Figure 1 It is a schematic diagram of the architecture of the DPS protocol stack provided by the prior art;
[0051] Figure 2 It is a flowchart of a data transmission method provided in an embodiment of the present application;
[0052] Figure 3 It is a structural schematic diagram of a dedicated control pool provided in an embodiment of the present application;
[0053] Figure 4 It is a flowchart of DPDK interruption provided in an embodiment of the present application;
[0054] Figure 5 It is a flowchart of a data receiving method provided in an embodiment of the present application;
[0055] Figure 6 It is a flowchart of the sending and receiving method provided in an embodiment of the present application;
[0056] Figure 7 It is a schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0057] Figure 8 It is a structural diagram of the data transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] As the application scenarios of the 5th generation mobile communication (5G) base stations become more diverse, in low-latency scenarios, it is necessary to support a fast channel for control data between devices. This data channel requires timely and efficient message responses, and places higher requirements on the transmission of control data on the network side.
[0059] Figure 1It is a schematic diagram of the architecture of the DPS protocol stack provided by the prior art, such as Figure 1 As shown, the New Radio (NR) layer 2 includes: Packet Data Convergence Protocol (PDCP), Radio Link Control (RLC) and MAC layer. Ge represents Gigabit Ethernet interface (Gigabit Ethernet).
[0060] The DPS module mainly consists of three parts: Ethernet (Ethext) driver, UDP / IP protocol processing module and PAM adaptation layer. Among them, the PAM adaptation layer has two versions: simplified version and full version. The simplified version cooperates with DPS and Ethext driver. The UDP / IP protocol processing module is between the Ethext driver and the simplified version of the PAM adaptation layer, playing a connecting role. Specifically: calling the Ethernet frame receiving and sending function interface provided by the Ethext driver downward to realize the reception of underlying data and the sending of data processed by the DPS module; providing a standard socket interface for the simplified version of the PAM adaptation layer to achieve the adaptation between DPS and high-level logical links.
[0061] At present, the tasks using the base station DIYPS actively query the control queue of DPDK. In the process of receiving DPDK data, it needs to be processed by the DPS protocol stack, stripping off the MAC header, IP header, UDP header, etc. of each layer, and then passing it to the application layer through the PAM adaptation layer. Similarly, the sending process of DPDK data is from top to bottom, and after layers of coding, it is sent to the network card device through the DPDK driver. Figure 1 In the specification, CDL stands for Choreography Description Language and TRACE stands for Tracing.
[0062] This process uses a blocking receiving method with a 200us sleep operation to reduce the monopoly of the central processing unit (CPU), otherwise it will squeeze the processing of other processes. However, the 200us sleep operation in this process cannot meet the low latency requirement.
[0063] Typical control plane data goes through a UDP link, which is a headed link with a custom Operating System Platform (OSP) message header. The network side calls the platform-registered message sending Osp_Send_Msg interface, and based on the data priority, Linux Msgq or the Hardware Queue Manager (HQM) mechanism is selected to send OSP messages. The user side calls the platform-registered message receiving Osp_Receive_Msg interface to receive messages. In the TEACE / CDL link, in the Osp_Ioctl interface, Ioctl stands for Input / Output Control.
[0064] The UDP link needs to maintain the UDP Socket link in the PAM adaptation layer. The UDP / IP layer implements the processing of the UDP protocol, IP protocol, and other link layer protocols. DPS uses the system memory space, while DPDK uses a dedicated large page memory space, which means that data is copied once between DPS and DPDK, which also introduces a large delay.
[0065] At the same time, in the traditional data channel, the thread priority of DPS in the MAC soft core is lower than the priority of each task in the application layer. DPS-related tasks are at risk of being suppressed, making it difficult to meet the low latency requirements.
[0066] In view of the above-mentioned problems existing in the prior art, the embodiments of the present application provide a data transmission method, network equipment, apparatus and storage medium. By calling the IOCTL interface registered in the DPDK layer, when data needs to be forwarded at the second layer between the application layer and the DPDK layer, data is directly transmitted between the application layer and the DPDK layer, eliminating the processing of the third layer and above, thereby improving the timeliness of data transmission.
[0067] In the embodiments of the present application, the term "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0068] In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.
[0069] The technical solution provided in the embodiment of the present application can be applicable to a variety of systems, especially 5G systems. For example, applicable systems can be global system of mobile communication (Global System of Mobile Communication, GSM) system, code division multiple access (Code Division Multiple Access, CDMA) system, wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA) general packet radio service (Aeneral Packet Radio Service, GPRS) system, long-term evolution (Long Term Evolution, LTE) system, LTE frequency division duplex (Frequency Division Duplex, FDD) system, LTE time division duplex (Time Division Duplex, TDD) system, advanced long-term evolution (Long Term Evolution Advanced, LTE-A) system, universal mobile system (Universal Mobile Telecommunication System, UMTS), global interconnection microwave access (Worldwide Interoperability for Microwave Access, WiMAX) system, 5G new air interface (New Radio, NR) system, etc. These various systems include terminal equipment and network equipment. The system may also include core network parts, such as the Evolved Packet System (EPS), 5G System (5GS), etc.
[0070] The network device involved in the embodiment of the present application may be a base station, which may include multiple cells providing services for the terminal. Depending on the specific application scenario, the base station may also be called an access point, or may be a device in the access network that communicates with the wireless terminal device through one or more sectors on the air interface, or other names. The network device may be used to interchange received air frames with Internet Protocol (IP) packets, and serve as a router between the wireless terminal device and the rest of the access network, wherein the rest of the access network may include an Internet Protocol (IP) communication network. The network device may also coordinate the attribute management of the air interface. For example, the network device involved in the embodiments of the present application may be a network device (Base Transceiver Station, BTS) in the Global System for Mobile Communications (Global System for Mobile Communications, GSM) or Code Division Multiple Access (Code Division Multiple Access, CDMA), or a network device (NodeB) in Wide-band Code Division Multiple Access (WCDMA), or an evolved network device (Evolutional Node B, eNB or e-NodeB) in the Long Term Evolution (Long Term Evolution, LTE) system, a 5G base station (gNB) in the 5G network architecture (Next Generation System), or a Home evolved Node B (Home evolved Node B, HeNB), a relay node (RelayNode), a home base station (Femto), a pico base station (Pico), etc., which is not limited in the embodiments of the present application. In some network structures, the network device may include a centralized unit (CU) node and a distributed unit (DU) node, and the centralized unit and the distributed unit may also be arranged geographically separately.
[0071] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0072] The data transmission method, network equipment, device and storage medium provided in the embodiments of the present application are mainly used between the MAC layer and the physical (Physical, PHY) layer. The MAC layer is between the radio link control (Radio Link Control, RLC) RLC and PHY layer to realize the processing of logical channels to physical channels, including channel conversion, priority processing and scheduling management, and provide a set of efficient new data transmission solutions to support MAC packet grouping messages and schedule the transmission of completion messages.
[0073] Figure 2 is a flow chart of a data transmission method provided in an embodiment of the present application, such as Figure 2 As shown, the method comprises at least the following steps:
[0074] Step 201: Determine that data needs to be forwarded at Layer 2 between the application layer and the DPDK layer.
[0075] Step 202: Call the IOCTL interface of the DPDK layer to transmit data between the application layer and the DPDK layer.
[0076] Specifically, in order to reduce latency, this application bypasses the PAM layer and the processing of each layer of the DPS protocol stack, and directly registers the IOCTL interface to the application at the DPDK layer. In this way, data can be forwarded at the second layer between the application layer and DPDK, or at the third layer or above through the intermediate DPS protocol stack, depending on the data transmission requirements. Optionally, the MAC address is designed and planned according to the application scenario requirements and physical location information of each process.
[0077] When data needs to be forwarded at Layer 2 between the application layer and the DPDK layer, the IOCTL interface registered at the DPDK layer is directly called to transfer data between the application layer and the DPDK layer. In this article, the data transmission channel for Layer 2 forwarding between the application layer and the DPDK layer is called the fast channel, and the traditional data transmission channel for Layer 3 and above forwarding is called the normal channel.
[0078] The data transmission method provided in the embodiment of the present application calls the IOCTL interface registered in the DPDK layer. When data needs to be forwarded at the second layer between the application layer and the DPDK layer, the data is directly transmitted between the application layer and the DPDK layer, thereby eliminating the processing of the third layer and above, and improving the timeliness of data transmission.
[0079] In some embodiments, the data transmission method further includes:
[0080] Apply for a dedicated control pool for each data sending process;
[0081] In the data sending process, memory is requested from the dedicated control pool corresponding to the data sending process and filled with the data to be sent.
[0082] Specifically, since DSP has a data copy process, it is difficult to meet the low latency requirement. Therefore, a dedicated control pool can be applied for each process to reduce the impact of memory rewriting. It is applied to sending fast channel data. In the data sending process, it is necessary to apply for memory from the dedicated control pool corresponding to the data sending process to fill the data to be sent to avoid memory copying.
[0083] Figure 3 is a schematic diagram of the structure of the dedicated control pool provided in the embodiment of the present application, such as Figure 3 As shown, DPDK sends Ethernet frames and requests memory from the dedicated control layer.
[0084] The data transmission method provided in the embodiment of the present application applies for a dedicated control pool for each data sending process number, applies for memory from the dedicated control pool during the data generation process, and fills the memory with the data to be sent, thereby reducing the impact of memory rewriting, avoiding the delay caused by memory copying, and further improving the timeliness of data transmission.
[0085] In some embodiments, the data transmission method further includes:
[0086] Apply for an ICE interrupt for each MAC soft core, and each ICE interrupt corresponds to an interrupt queue;
[0087] Query the data types corresponding to multiple ACL rules corresponding to an interrupt queue;
[0088] Different ACL rule data are distinguished based on data types, and different ACL rule data include first-category data of a first data transmission channel and second-category data of a second data transmission channel, wherein the first data transmission channel is a data transmission channel for layer 2 forwarding between the DPDK layer and the application layer, and the second data transmission channel is a data transmission channel for forwarding between the DPDK layer and the application layer through the DPS protocol stack;
[0089] The first type of data and the second round of data are placed in different ring queues, and interrupt notification messages corresponding to different data types are triggered.
[0090] Specifically, receiving data through DPDK interrupt mode can further improve the timeliness of data reception. Apply for an Internet Communications Engine (ICE) interrupt for each MAC, and an ICE interrupt corresponds to an interrupt queue.
[0091] The same ICE interruption, or an ICE interruption queue corresponds to multiple access control list (ACL) rules. The relevant information of the data type can be read from the ACL rules to determine the data type. According to the data type corresponding to the ACL rule, different types of ACL rule data can be distinguished. The different types of ACL rule data here mainly refer to: the first type of data of the first data transmission channel, that is, the data transmitted by the fast channel; the second type of data of the second data transmission channel, that is, the data transmitted by the ordinary channel.
[0092] Put fast channel data and normal channel data into different ring queues, and trigger interrupt notification messages corresponding to different data types. Optionally, for the first type of data, i.e., fast channel data, notify the corresponding OSP registration message, send an interrupt notification message, and the application layer actively calls the Ioctl interface to receive it.
[0093] Figure 4 : is a flowchart of a DPDK interrupt provided in an embodiment of the present application, such as Figure 4 As shown, epoll wakeup is kernel sleep wakeup. In the data receiving process, after receiving the ICE interrupt message, epoll wakeup is used to trigger subsequent operations.
[0094] In some embodiments, the data types corresponding to the multiple access control list (ACL) rules corresponding to the interrupt queue are queried, including:
[0095] Query metadata fields in multiple ACL rules and read data type values;
[0096] Based on the data type value, the data types corresponding to multiple ACL rules corresponding to the interrupt queue are obtained.
[0097] Specifically, in the ACL rule, an additional metadata field can be added, and the metadata field contains relevant information about the data type, such as the data type value. By querying the metadata fields in multiple ACL rules corresponding to an ICE interruption queue, the data type value (pkt_type) of the ACL rule data can be read, and the ACL rule data can be distinguished according to different data type values.
[0098] The data transmission method provided in the embodiment of the present application further improves the timeliness of data reception by receiving data in a DPDK interrupt manner during the data reception process of the fast channel.
[0099] In some embodiments, the data transmission method further includes:
[0100] A MAC address is set for each data transmission process, wherein the MAC address includes first priority information and second priority information;
[0101] The first priority information is the process priority corresponding to each data transmission process, the second priority information is the service priority corresponding to each data transmission process, and the priority of the first priority information is higher than the priority of the second priority information;
[0102] The first priority information is associated with a data transmission channel, and the data transmission channel includes: a first data transmission channel for layer 2 forwarding between the DPDK layer and the application layer, and a second data transmission channel for forwarding between the DPDK layer and the application layer through the DPS protocol stack.
[0103] Specifically, since the thread priority of DPS in the MAC soft core is lower than the priority of each task in the application layer, it is difficult to meet the low latency requirement.
[0104] For control plane data, MAC addresses can be planned according to the application scenario requirements and physical location information of each data transmission process. Optionally, the MAC address may include first priority information and second priority information, where the first priority information is the process priority corresponding to each data transmission process and is associated with the data transmission channel, i.e., the data transmission channel corresponding to the data is different, and the first priority information is different. In the embodiment of the present application, the data transmission channel includes a normal channel and a fast channel. The second priority information is the service priority corresponding to each data transmission process, i.e., the priority of each task at the application layer. The priority of the first priority information is higher than that of the second priority information to ensure that the thread priority of the DPS in the MAC soft core is higher than the priority of each task at the application layer.
[0105] Optionally, the first priority information can be used as a priority category (the higher the value, the higher the priority), and the second priority information can be used as a subcategory in the category, and each priority category corresponds to a set of sending and receiving interfaces. The priority value of the first priority information is placed in the MAC address, and the MAC address is composed as follows: 00:01:02 (first priority information | second priority information): (rack | slot): (C0 + Procid), and the MAC address and priority information of the control plane data are shown in Table 1.
[0106] Table 1: MAC addresses and priorities of control plane data
[0107]
[0108] The data transmission method provided in the embodiment of the present application configures the first priority information and the second priority information in the MAC address, wherein the first priority information is the process priority corresponding to each data transmission process, the second priority information is the service priority corresponding to each data transmission process, and the priority of the first priority information is higher than the priority of the second priority information, thereby ensuring that the thread priority of the DPS in the MAC soft core is higher than the priority of each task in the application layer, thereby improving the timeliness of data transmission.
[0109] The data sending process and the data receiving process are described below respectively to facilitate further understanding of the data transmission method provided in the embodiment of the present application.
[0110] Figure 5 is a flow chart of a data receiving method provided in an embodiment of the present application, such as Figure 5 As shown in the figure, in the data receiving process, after the application layer receives the device driver (DD) message, it actively calls the IOCTL interface to obtain the ring index (Index) to query the process resource department and read the content from the ring queue. After receiving, if the buffer (buf) is no longer used, the application needs to actively release it.
[0111] Figure 6 is a flow chart of a data sending method provided in an embodiment of the present application, such as Figure 6 As shown in the figure, in the data sending process, the application bypasses the DPS protocol processing and directly calls the IOCTL interface registered by the DPDK layer to send messages. Before sending data, it is necessary to apply for memory from the control pool and fill it with the data to be sent. After the data is sent successfully, the memory is automatically released by the network card.
[0112] Figure 7 70 is a schematic diagram of the structure of a network device provided in an embodiment of the present application. The network device includes a memory 701, a transceiver 702, and a processor 703:
[0113] The memory 701 is used to store computer programs; the transceiver 702 is used to send and receive data under the control of the processor 703.
[0114] Specifically, the transceiver 702 is used to receive and send data under the control of the processor 703.
[0115] Among them, Figure 7In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 703 and memory represented by memory 701. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface.
[0116] The transceiver 702 may be a plurality of components, i.e., a transmitter and a receiver, and provides a unit for communicating with various other devices on a transmission medium, such as a wireless channel, a wired channel, an optical cable, etc. The processor 703 is responsible for managing the bus architecture and general processing, and the memory 701 may store data used by the processor 703 when performing operations.
[0117] The processor 703 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD). The processor may also adopt a multi-core architecture.
[0118] The processor 703 is used to read the computer program in the memory 701 and perform the following operations: determine that data needs to be forwarded at a second layer between the application layer and the data plane development kit DPDK layer; call the input and output control IOCTL interface of the DPDK layer to transmit data between the application layer and the DPDK layer.
[0119] In some embodiments, the processor 703 is used to read the computer program in the memory 701 and also perform the following operations: apply for a dedicated control pool for each data sending process; in the data sending process, apply for memory from the dedicated control pool corresponding to the data sending process and fill it with data to be sent.
[0120] In some embodiments, the processor 703 is used to read the computer program in the memory 701 and also perform the following operations: apply for a network communication engine ICE interrupt for each media access control MAC soft core, each ICE interrupt corresponds to an interrupt queue; query the data types corresponding to multiple access control list ACL rules corresponding to the one interrupt queue; distinguish different ACL rule data based on the data type, and the different ACL rule data include first type data of the first data transmission channel and second type data of the second data transmission channel, wherein the first data transmission channel is a data transmission channel for layer 2 forwarding between the DPDK layer and the application layer, and the second data transmission channel is a data transmission channel for forwarding between the DPDK layer and the application layer through the DPS protocol stack; put the first type of data and the second round of data into different ring queues, and trigger interrupt notification messages corresponding to different data types.
[0121] In some embodiments, querying the data types corresponding to multiple access control list (ACL) rules corresponding to the interruption queue includes: querying metadata fields in the multiple ACL rules to read data type values; and obtaining data types corresponding to the multiple ACL rules corresponding to the interruption queue based on the data type values.
[0122] In some embodiments, the processor 703 is used to read the computer program in the memory 701 and also perform the following operations: setting a MAC address for each data transmission process, the MAC address containing first priority information and second priority information; wherein the first priority information is the process priority corresponding to each data transmission process, the second priority information is the service priority corresponding to each data transmission process, and the priority of the first priority information is higher than the priority of the second priority information; the first priority information is associated with a data transmission channel, and the data transmission channel includes: a first data transmission channel for layer 2 forwarding between the DPDK layer and the application layer, and a second data transmission channel for forwarding between the DPDK layer and the application layer through the DPS protocol stack.
[0123] It should be noted here that the above-mentioned network device provided in the embodiment of the present invention can implement all the method steps implemented in the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be described in detail here.
[0124] Figure 8 is a schematic diagram of the structure of a data transmission device provided in an embodiment of the present application, such as Figure 8 As shown, the device comprises:
[0125] A determination unit 801 is used to determine that data needs to be forwarded at layer 2 between the application layer and the data plane development kit DPDK layer;
[0126] The calling unit 802 is used to call the input and output control IOCTL interface of the DPDK layer to transmit data between the application layer and the DPDK layer.
[0127] In some embodiments, the apparatus further comprises a first application unit, configured to:
[0128] Apply for a dedicated control pool for each data sending process;
[0129] In the data sending process, memory is requested from a dedicated control pool corresponding to the data sending process and filled with data to be sent.
[0130] In some embodiments, the apparatus further comprises:
[0131] The second application unit is used to apply for a network communication engine ICE interrupt for each media access control MAC soft core, and each ICE interrupt corresponds to an interrupt queue;
[0132] A query unit, used for querying data types corresponding to multiple access control list (ACL) rules corresponding to the one interrupt queue;
[0133] a distinguishing unit, configured to distinguish different ACL rule data based on data types, wherein the different ACL rule data include first-category data of the first data transmission channel and second-category data of the second data transmission channel, wherein the first data transmission channel is a data transmission channel for performing layer 2 forwarding between the DPDK layer and the application layer, and the second data transmission channel is a data transmission channel for forwarding between the DPDK layer and the application layer through the DPS protocol stack;
[0134] A trigger unit is used to put the first type of data and the second round of data into different ring queues, and trigger interrupt notification messages corresponding to different data types.
[0135] In some embodiments, the query unit is further configured to:
[0136] Query the metadata fields in the multiple ACL rules and read the data type value;
[0137] Based on the data type value, data types corresponding to multiple ACL rules corresponding to the interrupt queue are obtained.
[0138] In some embodiments, the apparatus further comprises:
[0139] A setting unit, configured to set a MAC address for each data transmission process, wherein the MAC address includes first priority information and second priority information;
[0140] The first priority information is the process priority corresponding to each data transmission process, the second priority information is the service priority corresponding to each data transmission process, and the priority of the first priority information is higher than the priority of the second priority information;
[0141] The first priority information is associated with a data transmission channel, and the data transmission channel includes: a first data transmission channel for performing layer 2 forwarding between the DPDK layer and the application layer, and a second data transmission channel for forwarding between the DPDK layer and the application layer through a DPS protocol stack.
[0142] The methods and devices provided in the various embodiments of the present application are based on the same application concept. Since the methods and devices solve problems based on similar principles, the implementation of the devices and methods can refer to each other, and the repeated parts will not be repeated.
[0143] It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0144] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (Processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0145] It should be noted here that the above-mentioned device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.
[0146] On the other hand, an embodiment of the present application further provides a non-transitory readable storage medium, wherein the non-transitory readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the data transmission method provided in the above embodiments, including:
[0147] Determine that data needs to be forwarded at layer 2 between the application layer and the data plane development kit DPDK layer; call the input and output control IOCTL interface of the DPDK layer to transmit data between the application layer and the DPDK layer.
[0148] The non-transitory readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.
[0149] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0150] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer executable instructions. These computer executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0151] These processor executable instructions may also be stored in a processor readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0152] These processor-executable instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0153] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data transmission method, characterized in that: include: Determine that data needs to be forwarded at Layer 2 between the application layer and the data plane development kit (DPDK) layer; The input / output control IOCTL interface of the DPDK layer is called to transmit data between the application layer and the DPDK layer.
2. The data transmission method according to claim 1, characterized in that: The method further comprises: Apply for a dedicated control pool for each data sending process; In the data sending process, memory is requested from a dedicated control pool corresponding to the data sending process and filled with data to be sent.
3. The data transmission method according to claim 1 or 2, characterized in that: The method further comprises: Apply for a network communication engine ICE interrupt for each media access control MAC soft core, and each ICE interrupt corresponds to an interrupt queue; Query the data types corresponding to the multiple access control list (ACL) rules corresponding to the one interrupt queue; Different ACL rule data are distinguished based on data types, wherein the different ACL rule data include first-category data of the first data transmission channel and second-category data of the second data transmission channel, wherein the first data transmission channel is a data transmission channel for performing layer 2 forwarding between the DPDK layer and the application layer, and the second data transmission channel is a data transmission channel for forwarding between the DPDK layer and the application layer through the DPS protocol stack; The first type of data and the second round of data are placed in different ring queues, and interrupt notification messages corresponding to different data types are triggered.
4. The data transmission method according to claim 3, characterized in that: The querying of the data types corresponding to the multiple access control list (ACL) rules corresponding to the interrupt queue includes: Query the metadata fields in the multiple ACL rules and read the data type value; Based on the data type value, data types corresponding to multiple ACL rules corresponding to the interrupt queue are obtained.
5. The data transmission method according to claim 1, characterized in that: The method further comprises: Setting a MAC address for each data transmission process, wherein the MAC address includes first priority information and second priority information; The first priority information is the process priority corresponding to each data transmission process, the second priority information is the service priority corresponding to each data transmission process, and the priority of the first priority information is higher than the priority of the second priority information; The first priority information is associated with a data transmission channel, and the data transmission channel includes: a first data transmission channel for performing layer 2 forwarding between the DPDK layer and the application layer, and a second data transmission channel for forwarding between the DPDK layer and the application layer through a DPS protocol stack.
6. A network device comprising a memory, a transceiver, and a processor; characterized in that: A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations: Determine that data needs to be forwarded at Layer 2 between the application layer and the data plane development kit (DPDK) layer; The input / output control IOCTL interface of the DPDK layer is called to transmit data between the application layer and the DPDK layer.
7. The network device according to claim 6, characterized in that: The processor is configured to read the computer program in the memory and further perform the following operations: Apply for a dedicated control pool for each data sending process; In the data sending process, memory is requested from a dedicated control pool corresponding to the data sending process and filled with data to be sent.
8. The network device according to claim 6 or 7, characterized in that: The processor is configured to read the computer program in the memory and further perform the following operations: Apply for a network communication engine ICE interrupt for each media access control MAC soft core, and each ICE interrupt corresponds to an interrupt queue; Query the data types corresponding to the multiple access control list (ACL) rules corresponding to the one interrupt queue; Different ACL rule data are distinguished based on data types, wherein the different ACL rule data include first-category data of the first data transmission channel and second-category data of the second data transmission channel, wherein the first data transmission channel is a data transmission channel for performing layer 2 forwarding between the DPDK layer and the application layer, and the second data transmission channel is a data transmission channel for forwarding between the DPDK layer and the application layer through the DPS protocol stack; The first type of data and the second round of data are placed in different ring queues, and interrupt notification messages corresponding to different data types are triggered.
9. The network device according to claim 8, characterized in that: The querying of the data types corresponding to the multiple access control list (ACL) rules corresponding to the interrupt queue includes: Query the metadata fields in the multiple ACL rules and read the data type value; Based on the data type value, data types corresponding to multiple ACL rules corresponding to the interrupt queue are obtained.
10. The network device according to claim 6, characterized in that: The processor is configured to read the computer program in the memory and further perform the following operations: Setting a MAC address for each data transmission process, wherein the MAC address includes first priority information and second priority information; The first priority information is the process priority corresponding to each data transmission process, the second priority information is the service priority corresponding to each data transmission process, and the priority of the first priority information is higher than the priority of the second priority information; The first priority information is associated with a data transmission channel, and the data transmission channel includes: a first data transmission channel for performing layer 2 forwarding between the DPDK layer and the application layer, and a second data transmission channel for forwarding between the DPDK layer and the application layer through a DPS protocol stack.
11. A data transmission device, characterized in that: include: A determination unit, used to determine that data needs to be forwarded at Layer 2 between the application layer and the data plane development kit DPDK layer; The calling unit is used to call the input and output control IOCTL interface of the DPDK layer to transmit data between the application layer and the DPDK layer.
12. A non-transitory readable storage medium, characterized in that: The non-transitory readable storage medium stores a computer program, and the computer program is used to enable a computer to execute the data transmission method according to any one of claims 1 to 5.
