DSA message forwarding acceleration method based on DPDK
Through the DSA message forwarding acceleration method based on DPDK, the defects of the existing DSA forwarding framework in software forwarding performance are solved, high-performance processing and flexible interface configuration are realized, and the use of virtual interfaces is supported.
Patent Information
- Application Number
- CN202510289874.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-04-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing DSA forwarding framework has major shortcomings in software forwarding performance, and requires that the main interface must be a physical interface, which limits the integration and integration of virtual interfaces.
Through the DSA message forwarding acceleration method based on DPDK, unified configuration management of DSA is carried out, configuration synchronization interface is provided, configuration actions are sensed and configuration processing is carried out; packet packet collection and transmission is carried out through the physical interface of the switching chip; packet feature database is provided for parsing, table lookup and forwarding processing is carried out; processing packets are sent directly to the high-performance application processing queue or to the kernel protocol stack through the virtual interface.
It realizes high-performance processing on the DSA message forwarding path, reduces the need for network protocol processing, avoids a large number of network protocol development work in the DPDK, supports the use of virtual interfaces, and improves forwarding performance and flexibility.
Smart Images

Figure CN119814563A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of message forwarding, and in particular relates to a DSA message forwarding acceleration method based on DPDK. Background Art
[0002] DSA refers to Linux DSA (Distributed Switch Architecture), a switch chip management subsystem that comes with the Linux kernel. It is designed to enable switch chips to be directly configured and queried through standard Linux network tools (such as bridge, iproute2, and ifconfig).
[0003] DPDK, the data plane development kit, is a user-mode packet forwarding framework that provides a network device driver in the user space of the Linux operating system. These drivers allow applications to interact directly with the network card, bypassing the kernel's network protocol stack, and achieve faster and customizable network packet processing. And with the development of technology, DPDK is widely used in various user-mode upper-layer software deployments.
[0004] In the prior art, the switching chip accesses the kernel through the DSA framework, provides a network interface to the user space, and uses a conventional network card physical interface as a data channel; all DSA interface data packets must pass through the physical main interface and the kernel protocol stack before finally reaching the application in the user space.
[0005] However, the Linux kernel's network protocol stack is a huge forwarding system with inherent performance defects. Specifically, for application scenarios that require high-performance analysis and processing of messages, existing solutions have major drawbacks, and the existing DSA forwarding framework requires a primary interface, and the primary interface must be a physical interface. This limitation also makes it impossible to integrate and combine virtual interfaces with software features. Therefore, the existing DSA has high versatility in network configuration, high adaptability in device drivers, and kernel network protocol processing capabilities, but has major defects in software forwarding performance. Summary of the invention
[0006] The purpose of the embodiments of the present invention is to provide a DSA message forwarding acceleration method based on DPDK, aiming to solve the problems raised in the background technology.
[0007] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions: A DSA message forwarding acceleration method based on DPDK, the method specifically comprising the following steps: Perform unified DSA configuration management, provide configuration synchronization interface, perceive configuration actions and perform configuration processing; Through the physical interface of the switching chip, the message is received, the target message is received and transmitted; Providing a message feature library, and based on the message feature library, parsing, table lookup and forwarding processing are performed on the target message to obtain a processed message; Sending the processed message directly to a high-performance application processing queue, or sending it to a kernel protocol stack through a virtual interface; Deploy multiple high-performance applications on DPDK.
[0008] As a further limitation of the technical solution of the embodiment of the present invention, the driving and management of the physical network card by DPDK, and DPDK providing a virtual interface to communicate with the kernel specifically include the following steps: Configure network interface management tools; Drive the physical switch chip, connect to the DSA protocol stack framework of the Linux operating system, record and synchronize DSA configuration items, and provide a configuration synchronization interface; Based on the configuration synchronization interface, the configuration action of the network interface management tool is perceived in real time and configuration processing is performed.
[0009] As a further limitation of the technical solution of the embodiment of the present invention, the packet receiving is performed through the physical interface of the switching chip, the target packet is received and transmitted, and the packet is received from the physical network card using the DPDK circular packet receiving model.
[0010] As a further limitation of the technical solution of the embodiment of the present invention, the providing of a message feature library, parsing, table lookup and forwarding the target message based on the message feature library to obtain a processed message specifically comprises the following steps: Providing a message feature library, wherein the message feature library includes multiple feature sets and corresponding processing decisions; According to the plurality of feature sets and corresponding processing decisions, the target message is parsed, table-looked up and forwarded to obtain a processed message.
[0011] As a further limitation of the technical solution of the embodiment of the present invention, the multiple processing decisions include: delivery to a high-performance application queue, delivery to a virtual channel queue, delivery back to a physical network card, message modification, and message discard.
[0012] As a further limitation of the technical solution of the embodiment of the present invention, in parsing the target message, the feature value of the target message is parsed according to the multiple feature sets, the feature items are matched according to the feature values, and the corresponding processing decisions are matched according to the feature items.
[0013] As a further limitation of the technical solution of the embodiment of the present invention, the message feature library is provided, the processed message is directly sent to a high-performance application processing queue, and the processed message is allocated, queued and / or dequeued.
[0014] As a further limitation of the technical solution of the embodiment of the present invention, the multiple high-performance applications include firewall applications and audit applications.
[0015] A DSA message forwarding acceleration system based on DPDK, the system includes a unified configuration management unit, a message packet receiving and transmission unit, a message parsing and table lookup forwarding unit, a message application processing unit and an application DPDK deployment unit, wherein: The unified configuration management unit is used to perform unified configuration management of DSA, provide configuration synchronization interface, perceive configuration actions and perform configuration processing; The message packet receiving and transmission unit is used to receive and transmit the target message through the physical interface of the switching chip; A message parsing, table lookup and forwarding unit, used to provide a message feature library, and based on the message feature library, parse, table lookup and forward the target message to obtain a processed message; A message application processing unit, used to send the processed message directly to a high-performance application processing queue, or to a kernel protocol stack through a virtual interface; Application DPDK deployment unit, used to deploy multiple high-performance applications on DPDK.
[0016] As a further limitation of the technical solution of the embodiment of the present invention, the unified configuration management unit specifically includes: A tool configuration module, used to configure a network interface management tool; The interface provides a module for driving the physical switching chip, connecting to the DSA protocol stack framework of the Linux operating system, recording and synchronizing DSA configuration items, and providing a configuration synchronization interface; The configuration processing module is used to perceive the configuration actions of the network interface management tool in real time and perform configuration processing based on the configuration synchronization interface.
[0017] Compared with the prior art, the present invention has the following beneficial effects: The embodiments of the present invention can deploy applications that require high-performance forwarding to the DPDK under this framework on the message forwarding path of DSA to achieve high-performance processing. A small number of messages that require network protocol processing can also be directly sent to the kernel protocol stack through the virtual DSA channel, avoiding a large amount of network protocol development work in DPDK. The DSA interface configuration of the physical interface of the switching chip can be synchronized to the DPDK in real time. The user does not need to perceive the underlying forwarding differences of DSA, and the DSA main interface is changed from a physical interface to a virtual interface. The physical interface level can be arbitrarily combined in DPDK, so the high-performance forwarding framework of DSA+DPDK can be quickly deployed on a variety of physical interface products. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention.
[0019] Figure 1 A flow chart of a method provided by an embodiment of the present invention is shown.
[0020] Figure 2 The application architecture diagram of the system provided by the embodiment of the present invention is shown. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0022] It is understandable that in the prior art, the switching chip accesses the kernel through the DSA framework, provides a network interface to the user space, and uses the conventional network card physical interface as the data channel; all DSA interface data packets must pass through the physical main interface and the kernel protocol stack before they can finally reach the user space application. However, the network protocol stack of the Linux kernel is a huge forwarding system, and there are natural defects in performance. For application scenarios that require high-performance analysis and processing of messages, the existing solutions have major drawbacks, and the existing DSA forwarding framework requires a main interface, and requires that the main interface must be a physical interface. This limitation also makes it impossible to integrate and combine virtual interfaces with software characteristics. Therefore, the existing DSA has high versatility in network configuration, high adaptability in device drivers, and kernel network protocol processing capabilities, but there are major defects in software forwarding performance.
[0023] To solve the above problems, the embodiment of the present invention provides a configuration synchronization interface, senses configuration actions and performs configuration processing by performing unified configuration management of DSA; receives packets through the physical interface of the switching chip, receives target packets and transmits them; provides a message feature library, and parses, looks up and forwards the target packets based on the message feature library to obtain processed packets; directly sends the processed packets to the high-performance application processing queue, or sends them to the kernel protocol stack through a virtual interface; and deploys multiple high-performance applications in DPDK. Applications that require high-performance forwarding can be deployed to the DPDK under this framework on the message forwarding path of DSA to achieve high-performance processing. A small number of messages that require network protocol processing can also be directly sent to the kernel protocol stack through the virtual DSA channel to avoid a large amount of network protocol development work in DPDK. The DSA interface configuration of the physical interface of the switching chip can be synchronized to the DPDK in real time, and users do not need to perceive the underlying forwarding differences of DSA. The DSA main interface is changed from a physical interface to a virtual interface, and the physical interface layer can be arbitrarily combined in DPDK. Therefore, the high-performance forwarding framework of DSA+DPDK can be quickly deployed on a variety of physical interface products.
[0024] Specifically, Figure 1 A flow chart of a method provided by an embodiment of the present invention is shown.
[0025] In a preferred embodiment of the present invention, a DSA message forwarding acceleration method based on DPDK is provided, and the method specifically comprises the following steps: Step S101, perform DSA unified configuration management, provide a configuration synchronization interface, perceive configuration actions and perform configuration processing.
[0026] In an embodiment of the present invention, by configuring a network interface management tool, such as ip / ifconfig / bridge, the physical switching chip is driven to connect to the DSA protocol stack framework of the Linux operating system, and the DSA configuration items are recorded and synchronized, a configuration synchronization interface is provided, and then based on the configuration synchronization interface, the configuration actions of the network interface management tool are perceived in real time and configuration processing is performed.
[0027] Step S102: Receive the target message and transmit it through the physical interface of the switching chip.
[0028] In the embodiment of the present invention, the physical interface of the switching chip is used to receive packets from the physical network card using the DPDK cyclic packet receiving model to implement packet receiving, receive the target message and transmit it.
[0029] It can be understood that the message received by the physical interface of the switching chip is transmitted between the physical network card and the CPU software system; the physical network card is driven and managed by DPDK.
[0030] Step S103, providing a message feature library, and based on the message feature library, parsing, table lookup and forwarding processing are performed on the target message to obtain a processed message.
[0031] In an embodiment of the present invention, a message feature library including multiple feature sets and corresponding processing decisions is provided, and then the target message is parsed, looked up and forwarded according to the multiple feature sets and the corresponding processing decisions to obtain a processed message, wherein the multiple processing decisions include: delivery to a high-performance application queue, delivery to a virtual channel queue, delivery back to a physical network card, message modification and message discard; in parsing the target message, the feature value of the target message is parsed according to the multiple feature sets, and then the feature items are matched according to the feature values, and then the corresponding processing decisions are matched according to the feature items.
[0032] Step S104: Send the processed message directly to a high-performance application processing queue, or send it to a kernel protocol stack through a virtual interface.
[0033] In the embodiment of the present invention, the processed message is directly sent to the high-performance application processing queue, and the processed message is allocated, queued and / or dequeued, or sent to the kernel protocol stack through a virtual interface.
[0034] It is understandable that the kernel DSA protocol stack framework of the Linux system needs to be modified to support the use of the virtual channel as the main interface for DSA message forwarding, so as to ensure that the message from module 8 to the kernel is correctly connected to the DSA protocol stack.
[0035] Step S105, deploy multiple high-performance applications in DPDK.
[0036] In an embodiment of the present invention, multiple high-performance applications such as firewall applications and audit applications are deployed in DPDK, so that specific messages (for example, IP is 1.1.1.1) received by the physical interface of the specified switching chip can be processed by high-performance firewall applications, and non-specific messages are sent to the DSA kernel protocol stack through the virtual interface, such as common ARP / ICMP ping messages. While achieving normal network communication of the interface, high-performance application analysis and processing of specific messages can be achieved, and the interface configuration of the entire process can follow the unified configuration management of DSA.
[0037] Furthermore, Figure 2 The application architecture diagram of the system provided by the embodiment of the present invention is shown.
[0038] Among them, in another preferred embodiment provided by the present invention, a DSA message forwarding acceleration system based on DPDK includes: The unified configuration management unit 101 is used to perform unified configuration management of DSA, provide a configuration synchronization interface, perceive configuration actions and perform configuration processing.
[0039] In an embodiment of the present invention, the unified configuration management unit 101 drives the physical switching chip by configuring a network interface management tool, such as ip / ifconfig / bridge, to connect to the DSA protocol stack framework of the Linux operating system, and records and synchronizes DSA configuration items, provides a configuration synchronization interface, and then based on the configuration synchronization interface, perceives the configuration actions of the network interface management tool in real time and performs configuration processing.
[0040] Specifically, in a preferred embodiment of the present invention, the unified configuration management unit 101 specifically includes: A tool configuration module, used to configure a network interface management tool; The interface provides a module for driving the physical switching chip, connecting to the DSA protocol stack framework of the Linux operating system, recording and synchronizing DSA configuration items, and providing a configuration synchronization interface; The configuration processing module is used to perceive the configuration actions of the network interface management tool in real time and perform configuration processing based on the configuration synchronization interface.
[0041] Furthermore, the DSA message forwarding acceleration system based on DPDK also includes: The message packet receiving and transmitting unit 102 is used to receive and transmit the target message through the physical interface of the switching chip.
[0042] In the embodiment of the present invention, the message packet receiving and transmitting unit 102 receives packets from the physical network card through the physical interface of the switching chip, adopts the cyclic packet receiving model of DPDK, implements message packet receiving, receives the target message and transmits it.
[0043] The message parsing, table lookup and forwarding unit 103 is used to provide a message feature library, and based on the message feature library, parse, table lookup and forward the target message to obtain a processed message.
[0044] In an embodiment of the present invention, the message parsing, table lookup and forwarding unit 103 provides a message feature library including multiple feature sets and corresponding processing decisions, and then parses, looks up and forwards the target message according to the multiple feature sets and the corresponding processing decisions to obtain a processed message, wherein the multiple processing decisions include: delivery to a high-performance application queue, delivery to a virtual channel queue, delivery back to a physical network card, message modification and message discard; in parsing the target message, according to the multiple feature sets, the feature value of the target message is parsed, and then the feature items are matched according to the feature values, and then the corresponding processing decisions are matched according to the feature items.
[0045] The message application processing unit 104 is used to send the processed message directly to the high-performance application processing queue, or send it to the kernel protocol stack through a virtual interface.
[0046] In the embodiment of the present invention, the message application processing unit 104 directly sends the processed message to the high-performance application processing queue, allocates, queues and / or dequeues the processed message, or sends it to the kernel protocol stack through a virtual interface.
[0047] The application DPDK deployment unit 105 is used to deploy multiple high-performance applications in DPDK.
[0048] In an embodiment of the present invention, the DPDK deployment unit 105 is applied to deploy multiple high-performance applications such as firewall applications and audit applications in DPDK, so that specific messages (for example, IP is 1.1.1.1) received by the physical interface of the specified switching chip can be processed by high-performance firewall applications, and non-specific messages are sent to the DSA kernel protocol stack through the virtual interface, such as common ARP / ICMP ping messages. While achieving normal network communication of the interface, high-performance application analysis and processing of specific messages can be achieved, and the interface configuration of the entire process can follow the unified configuration management of DSA.
[0049] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0050] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0051] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0052] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0053] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A DSA message forwarding acceleration method based on DPDK, characterized in that: The method specifically comprises the following steps: Perform unified DSA configuration management, provide configuration synchronization interface, perceive configuration actions and perform configuration processing; Through the physical interface of the switching chip, the message is received, the target message is received and transmitted; Providing a message feature library, and based on the message feature library, parsing, table lookup and forwarding processing are performed on the target message to obtain a processed message; Sending the processed message directly to a high-performance application processing queue, or sending it to a kernel protocol stack through a virtual interface; Deploy multiple high-performance applications on DPDK.
2. The DSA message forwarding acceleration method based on DPDK according to claim 1 is characterized in that: The driving and management of the physical network card by DPDK, and DPDK providing a virtual interface to communicate with the kernel specifically include the following steps: Configure network interface management tools; Drive the physical switch chip, connect to the DSA protocol stack framework of the Linux operating system, record and synchronize DSA configuration items, and provide a configuration synchronization interface; Based on the configuration synchronization interface, the configuration action of the network interface management tool is perceived in real time and configuration processing is performed.
3. The DSA message forwarding acceleration method based on DPDK according to claim 1 is characterized in that: The packet receiving is performed through the physical interface of the switching chip, the target packet is received and transmitted, and the packet is received from the physical network card using the DPDK cyclic packet receiving model.
4. The DSA message forwarding acceleration method based on DPDK according to claim 1 is characterized in that: The providing of a message feature library, parsing, table looking up and forwarding the target message based on the message feature library, and obtaining a processed message specifically comprises the following steps: Providing a message feature library, wherein the message feature library includes multiple feature sets and corresponding processing decisions; According to the plurality of feature sets and corresponding processing decisions, the target message is parsed, table-looked up and forwarded to obtain a processed message.
5. The DSA message forwarding acceleration method based on DPDK according to claim 4 is characterized in that: The plurality of processing decisions include: delivery to a high-performance application queue, delivery to a virtual channel queue, delivery back to a physical network card, message modification, and message discard.
6. The DSA message forwarding acceleration method based on DPDK according to claim 4 is characterized in that: In the parsing of the target message, the feature value of the target message is parsed according to the plurality of feature sets, feature items are matched according to the feature values, and corresponding processing decisions are matched according to the feature items.
7. The DSA message forwarding acceleration method based on DPDK according to claim 1, characterized in that: The message feature library is provided, the processed message is directly sent to a high-performance application processing queue, and the processed message is allocated, queued and / or dequeued.
8. The DSA message forwarding acceleration method based on DPDK according to claim 1, characterized in that: The plurality of high performance applications include a firewall application and an auditing application.
Citation Information
Patent Citations
Message processing method and device, medium and equipment
CN112422453A
Hardware assisted virtual switch
CN116260776A
Message transmitting and receiving method, switching chip, processing equipment and hardware platform
CN118509499A