A message transmission method, device and equipment for control plane and data plane decoupling
By interacting with the kernel's Socket interface through the user-space control plane protocol and using synchronizer components outside the kernel, the problem of sending remote routing tables from the data plane to user-space VPP/OVS/hardware chips is solved. This decouples the control plane and data plane, improves data transmission efficiency, and simplifies product development and upgrades.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DAWNING CLOUD COMPUTING TECH CO LTD
- Filing Date
- 2024-12-03
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, it is difficult to distribute the remote routing table of the data plane to the user-space VPP/OVS/hardware chip to guide data forwarding without extensive modification of the control plane protocol and user plane protocol, resulting in low data transmission efficiency.
The remote routing table is dynamically generated by interacting with the kernel's Socket interface through the user-space control plane protocol. The remote routing table is then synchronized to the data forwarding module through a synchronizer component outside the kernel. The data forwarding module forwards service packets according to the remote routing table. At the same time, the learned local routing table entries are synchronized to the kernel through the synchronizer component, and then the kernel synchronizes them to the control plane protocol.
It achieves decoupling of the control plane and data plane, maintains the rich protocol features of the control plane protocol and the excellent forwarding performance of the data plane components, and is suitable for products such as switches, routers, cloud gateways, and firewalls, simplifying the development and upgrade process.
Smart Images

Figure CN119697087B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer vision technology, and in particular to a message transmission method, apparatus and device that decouples the control plane and data plane. Background Technology
[0002] For network and security devices, data plane transmission is typically implemented in two ways: data plane based on hardware chips and forwarding based on general-purpose server CPU cores.
[0003] Traditional CPU kernel forwarding performance is affected by many factors such as memory copying and process switching. Therefore, pure software acceleration solutions such as DPDK+VPP and DPDK+OVS, as well as data plane acceleration technologies that combine software and hardware such as RDMA (Remote Direct Memory Access) have been developed.
[0004] Traditional user-space control plane protocols, such as FRRouting, Quagga, and StrongSwan, all run on top of the kernel. The user-space control plane protocol sends and receives protocol messages through the kernel's sockets, generates remote routing tables based on the sending and receiving of protocol messages, and distributes them to the kernel via the Netlink mechanism. The kernel then sends and receives service messages based on the distributed remote routing tables and reports the local routing table entries learned during the sending and receiving of service messages to the user-space control plane protocol. The user-space control plane protocol generates a local routing table based on the local routing table entries and publishes it to other remote nodes.
[0005] The above scheme distributes the forwarding table to the kernel, which then handles data forwarding. However, this involves a translation from the kernel to the network interface card (NIC) memory, resulting in low data transmission efficiency. Currently, some solutions implement the data forwarding module outside the kernel. This module can be a user-space VPP / OVS / hardware chip. However, distributing the remote routing table from the data plane to the user-space VPP / OVS / hardware chip to guide data forwarding presents significant challenges. Summary of the Invention
[0006] The purpose of this application is to provide a message transmission method that decouples the control plane and data plane, in order to solve the problem of how to distribute the remote routing table of the data plane to the user-space VPP / OVS / hardware chip to guide data forwarding without making extensive modifications to the control plane protocol and user plane protocol.
[0007] In a first aspect, embodiments of this application provide a message transmission method for decoupling the control plane and data plane, the method comprising:
[0008] The user-mode control plane protocol interacts with the kernel's Socket interface, and transmits protocol messages to the data forwarding module outside the kernel via the Socket interface, dynamically generating a remote routing table based on the protocol messages.
[0009] The remote routing table is sent to the kernel via the control plane protocol, and then synchronized to the data forwarding module by the kernel through a synchronizer component outside the kernel.
[0010] The data forwarding module forwards service packets according to the remote routing table, and synchronizes the learned local routing table entries to the kernel through the synchronizer component, and then synchronizes them to the control plane protocol through the kernel.
[0011] The remote routing table is distributed to the kernel via the control plane protocol, and then synchronized to the data forwarding module by the kernel through a synchronizer component outside the kernel, including:
[0012] The remote routing table is sent to the kernel via the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event. The change includes adding, deleting, or updating.
[0013] When the synchronizer component detects the routing change event, it retrieves the remote routing table from the kernel and calls the data forwarding module interface to send the retrieved remote routing table to the data forwarding module.
[0014] In some possible embodiments, the learned local routing table entries are synchronized to the kernel via the synchronizer component through the data forwarding module, including:
[0015] When the data forwarding module detects a change in a local routing table entry, it automatically generates a routing table entry change event, including additions, deletions, or updates.
[0016] When the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel.
[0017] When the kernel detects a change in a routing table entry, it retrieves the local routing table entry and sends it to the control plane protocol.
[0018] In some possible embodiments, the data forwarding module includes a VPP / OVS user-space data plane forwarding engine and a network interface card (NIC).
[0019] When the VPP / OVS user-space data plane forwarding engine receives a protocol message sent by the Socket interface, it sends the protocol message through the network card; when it receives a protocol message from the network card, it sends it to the Socket interface.
[0020] The VPP / OVS user-space data plane forwarding engine receives the remote routing table sent by the synchronizer, forwards service packets through the network interface card according to the remote routing table, and sends the learned local routing table entries to the synchronizer component.
[0021] In some possible embodiments, the data forwarding module includes a driver module for the switching chip and the switching chip itself;
[0022] When the driver module of the switching chip receives a protocol message sent by the Socket interface, it sends the protocol message through the switching chip; when it receives a protocol message from the switching chip, it sends it to the Socket interface.
[0023] The driver module of the switching chip receives the remote routing table sent by the synchronizer, forwards service packets through the switching chip according to the remote routing table, and sends the learned local routing table entries to the synchronizer component.
[0024] In some possible embodiments, the remote routing table is distributed to the kernel via the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event, including:
[0025] The remote routing table is sent to the kernel via the first Netlink interface through the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event in the form of a Netlink message.
[0026] In some possible embodiments, when the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel, including:
[0027] When the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel via the second Netlink interface.
[0028] When the kernel detects a change in a routing table entry, it retrieves the local routing table entry and sends it to the control plane protocol via the first Netlink interface.
[0029] Secondly, embodiments of this application provide a message transmission apparatus with decoupled control plane and data plane, comprising:
[0030] The remote routing table generation module is used to interact with the kernel's Socket interface through the user-space control plane protocol, transmit protocol messages to the data forwarding module through the Socket interface, and dynamically generate a remote routing table based on the protocol messages.
[0031] The remote routing table synchronization module is used to send the remote routing table to the kernel through the control plane protocol, and the kernel synchronizes it to the data forwarding module outside the kernel through the synchronizer component outside the kernel;
[0032] The message forwarding and local routing table synchronization module is used to forward service messages according to the remote routing table through the data forwarding module, synchronize the learned local routing table entries to the kernel through the synchronizer component, and then synchronize them to the control plane protocol through the kernel.
[0033] In some possible embodiments, the remote routing table synchronization unit distributes the remote routing table to the kernel via the control plane protocol, and the kernel synchronizes it to the data forwarding module outside the kernel via a synchronizer component outside the kernel, including:
[0034] The remote routing table is sent to the kernel via the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event. The change includes adding, deleting, or updating.
[0035] When the synchronizer component detects the routing change event, it retrieves the remote routing table from the kernel and calls the data forwarding module interface to send the retrieved remote routing table to the data forwarding module.
[0036] In some possible embodiments, the packet forwarding and local routing table synchronization unit synchronizes the learned local routing table entries to the kernel through the synchronizer component via the data forwarding module, including:
[0037] When the data forwarding module detects a change in a local routing table entry, it automatically generates a routing table entry change event, including additions, deletions, or updates.
[0038] When the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel.
[0039] When the kernel detects a change in a routing table entry, it retrieves the local routing table entry and sends it to the control plane protocol.
[0040] In some possible embodiments, the data forwarding module includes a VPP / OVS user-space data plane forwarding engine and a network interface card (NIC).
[0041] When the VPP / OVS user-space data plane forwarding engine receives a protocol message sent by the Socket interface, it sends the protocol message through the network card; when it receives a protocol message from the network card, it sends it to the Socket interface.
[0042] The VPP / OVS user-space data plane forwarding engine receives the remote routing table sent by the synchronizer, forwards service packets through the network interface card according to the remote routing table, and sends the learned local routing table entries to the synchronizer component.
[0043] In some possible embodiments, the data forwarding module includes a driver module for the switching chip and the switching chip itself;
[0044] When the driver module of the switching chip receives a protocol message sent by the Socket interface, it sends the protocol message through the switching chip; when it receives a protocol message from the switching chip, it sends it to the Socket interface.
[0045] The driver module of the switching chip receives the remote routing table sent by the synchronizer, forwards service packets through the switching chip according to the remote routing table, and sends the learned local routing table entries to the synchronizer component.
[0046] In some possible embodiments, the remote routing table is distributed to the kernel via the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event, including:
[0047] The remote routing table is sent to the kernel via the first Netlink interface through the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event in the form of a Netlink message.
[0048] In some possible embodiments, when the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel, including:
[0049] When the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel via the second Netlink interface.
[0050] When the kernel detects a change in a routing table entry, it retrieves the local routing table entry and sends it to the control plane protocol via the first Netlink interface.
[0051] Thirdly, another embodiment of this application provides a message transmission device with decoupled control plane and data plane, including at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any of the message transmission methods with decoupled control plane and data plane provided in the embodiments of this application.
[0052] Fourthly, another embodiment of this application provides a computer storage medium storing a computer program for causing a computer to execute any of the control plane and data plane decoupled message transmission methods provided in the embodiments of this application.
[0053] This application's embodiments, through a synchronizer component, enable a loosely coupled product architecture. Without altering the control plane protocol components or data plane components, it retains both the rich protocol features of the control plane protocol suite and the excellent forwarding performance of the data plane components. This greatly facilitates product development and iterative upgrades and is applicable to various products such as switches, routers, cloud network gateways, and firewalls. This addresses the significant challenges currently present in distributing remote routing tables from the data plane to user-space VPP / OVS / hardware chips to guide data forwarding.
[0054] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0055] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0056] Figure 1 This is a schematic diagram of a software architecture based on general-purpose server CPU core forwarding in related technologies;
[0057] Figure 2 A schematic diagram of a solution using user-space VPP / OVS / hardware chip for a data forwarding module implemented outside the kernel;
[0058] Figure 3 A schematic diagram of a scheme to modify the kernel driver to improve data transmission efficiency;
[0059] Figure 4 This is a schematic flowchart of a message transmission method for decoupling the control plane and data plane according to an embodiment of this application;
[0060] Figure 5 This is a schematic diagram of a data forwarding module according to an embodiment of the present application, including a VPP / OVS user-space data plane forwarding engine and a network interface card;
[0061] Figure 6A schematic diagram of a data forwarding module according to an embodiment of this application includes a driver module for a switching chip and a switching chip.
[0062] Figure 7 This is a structural diagram of a message transmission apparatus for decoupling the control plane and data plane according to an embodiment of this application;
[0063] Figure 8 This is a structural diagram of a message transmission device with decoupled control plane and data plane according to an embodiment of this application. Detailed Implementation
[0064] To further illustrate the technical solutions provided in the embodiments of this application, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on conventional or non-inventive effort. For steps that do not logically have a necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application. In actual processing or when the control device executes the method, it may be executed sequentially or in parallel according to the method shown in the embodiments or drawings.
[0065] The relevant technical terms in the embodiments of this application are explained as follows:
[0066] 1) FRRouting (Free Range Routing open-source routing suite)
[0067] FRRouting is an open-source internet routing protocol suite for Linux and Unix platforms, supporting multiple protocols including IGP (Interior Gateway Protocol), BGP (Border Gateway Protocol), multicast, and BFD (Bidirectional Forwarding Detection).
[0068] IGP refers to a routing protocol used within an autonomous system.
[0069] BGP is a routing protocol for autonomous systems that runs on top of TCP. BGP is the only protocol used to handle networks the size of the Internet, and it is also the only protocol that can properly handle multiple connections between unrelated routing domains.
[0070] BFD is a network protocol used to detect faults between two forwarding points.
[0071] 2) VPP, an open-source data plane forwarding engine
[0072] The VPP platform is a scalable framework that provides out-of-the-box, production-quality switch / router functionality. It's a high-performance packet processing stack that can run on a CPU. The benefits of implementing VPP include its high performance, proven technology, modularity and flexibility, and rich feature set.
[0073] 3) OVS (Open v Switch, an open-source data plane forwarding engine)
[0074] Openvswitch is an excellent open-source software switch that supports mainstream switch functions, such as Layer 2 switching, network isolation, QoS, and traffic monitoring.
[0075] 4) DPDK (Data Plane Development Kit, packet acceleration technology)
[0076] Unlike Linux systems, which are designed for general use, DPDK focuses on high-performance packet processing in network applications. Specifically, DPDK applications run in user space, using their own data plane libraries to send and receive packets, bypassing the Linux kernel protocol stack's packet processing. It is not a complete product that users can directly build applications from, and it does not include tools that require interaction with the control layer (including the kernel and protocol stack).
[0077] 5) Switch, forwarding chip.
[0078] Switch chips operate based on the Ethernet packet structure. Ethernet packets have a fixed format but variable length, and the packet header contains information such as the destination MAC address, source MAC address, and message length. Most Ethernet switches used are Layer 2 switches, meaning they switch based on Ethernet MAC addresses.
[0079] 6) Quagga, an open-source routing software, supports multiple routing protocols such as IP, RIPNG, OSPFv2, OSPFv3, and BGP. Quagga is an open-source dynamic routing software based on Zebra that implements RIP, OSPF, and BGP. Its CLI commands are similar to those in Cisco IOS, allowing you to use Quagga to turn a Linux machine into a fully functional router.
[0080] 7) StrongSwan, as an open-source VPN gateway software, is highly favored for its powerful features and stable performance. StrongSwan is an IPsec-based VPN gateway that supports protocols such as IKEv1, IKEv2, and EAP. It can be used to establish various types of VPN connections, including site-to-site, host-to-host, and roadwarrior connections.
[0081] 8) Kernel Operating System: The kernel operating system refers to the core part of most operating systems. It consists of the parts of the operating system used to manage memory, files, peripherals, and system resources. The operating system kernel typically runs processes and provides inter-process communication.
[0082] 9) OSPF (Open Shortest Path First) is an Interior Gateway Protocol (IGP) used for route decision-making within a single Autonomous System (AS). It is an implementation of a link-state routing protocol and belongs to the IGP family, thus operating within the AS. As a control platform technology for VXLAN, it enables automatic VTEP discovery and mutual host information announcements by exchanging BGP EVPN routes between VTEPs, thereby avoiding unnecessary data traffic flooding.
[0083] For network and security devices, data plane transmission typically employs two methods:
[0084] 1) Hardware chip-based data plane: It has advantages such as high forwarding performance and low power consumption, but it also suffers from problems such as wide compatibility with various models, low driver universality, and high price. Dedicated network equipment manufacturers usually adopt hardware forwarding methods to ensure line-speed forwarding capabilities, such as using commercial Switch, P4 and other technologies.
[0085] 2) Forwarding based on general-purpose server CPU cores: This method has advantages such as good versatility and low cost, but its performance is inferior to hardware forwarding. For traditional server manufacturers, maintaining versatility is more important than performance, so they usually prefer to use CPU core forwarding.
[0086] like Figure 1 The diagram shows a software architecture based on general-purpose server CPU kernel forwarding in related technologies. Traditional user-space control plane protocols, such as FRRouting suites, run on the kernel. Traditional user-space control plane protocols include BGP, VPN, BFD, etc.
[0087] The protocol message sending and receiving method is as follows: the user-mode control plane protocol sends and receives protocol messages through the kernel's Socket interface, thereby publishing local information and learning remote information;
[0088] The remote routing table is distributed as follows: the user-space control plane protocol learns the remote information, performs protocol calculations, and then distributes the final remote routing table to the kernel's forwarding table via Netlink to guide actual service forwarding.
[0089] The local routing table entries (MAC / Arp / Route) are reported by notifying the upper-layer user-space control plane protocol through the Kernel Netlink mechanism. The user-space control plane protocol then generates a local routing table based on the local routing table entries and publishes it to the remote nodes.
[0090] The above method, which is based on general-purpose server CPU kernel forwarding, places the forwarding table in the kernel and the kernel handles the sending and receiving of service packets. However, since the kernel needs to convert the service packets from the kernel to the network card memory, the data transmission efficiency is low.
[0091] To address the aforementioned issues, related technologies propose implementing a data forwarding module outside the kernel. This data forwarding module can be a user-space VPP / OVS / hardware chip.
[0092] like Figure 2 The diagram shows a data forwarding module implemented outside the kernel using a user-space VPP / OVS / hardware chip scheme. Since the user-space control plane protocol previously only interacted with the kernel to generate routing tables, the original user-space control plane protocol could not directly interact with the data forwarding module to generate routing tables.
[0093] Therefore, it is necessary to modify the user-space control plane logic, changing the remote routing table obtained by the control plane from being sent to the kernel to being sent to the data plane forwarding engine in the data forwarding module. The data plane forwarding engine then sends and receives service packets based on the remote routing table and feeds back the learned local routing table entries to the user-space control plane protocol through a notification mechanism. The user-space control plane protocol then generates a local routing table based on the local routing table entries it notifies.
[0094] It is evident that VPP / OVS / Switch and similar protocols need to be modified to develop corresponding message sending and receiving APIs to replace sockets. The user-space control plane protocol transforms the original socket-based standard program into one based on the VPP / OVS / Switch message sending and receiving API for protocol message sending and receiving. This allows the user-space control plane protocol to send protocol messages to the VPP / OVS / Switch message sending and receiving API, which then forwards the protocol messages to the remote end. Conversely, VPP / OVS / Switch can also send protocol messages received from the remote end to the user-space control plane protocol via the API. This effectively moves protocol message forwarding from kernel space to user space.
[0095] The data forwarding engine in the aforementioned VPP / OVS / Switch is used to receive the remote routing table issued by the user-space control plane protocol, forward service packets according to the remote routing table, and report the learned local routing table entries to the user-space control plane protocol, thereby moving the forwarding of service packets from kernel space to user space.
[0096] However, to implement the business packet forwarding of the data forwarding engine, it involves the distribution of remote routing tables and the reporting of local routing tables. The specific implementation method is as follows:
[0097] The VPP / OVS / Switch data forwarding engine determines the reporting API interface after changes to local routing table entries and reports them through this reporting API interface. The user-space control plane protocol transforms the original logic of the Kernel's Netlink in detecting changes to using the reporting API method for detection.
[0098] VPP / OVS / Switch needs to provide APIs for issuing, updating, and deleting remote routing table entries. After the control plane protocol calculates the remote routing table, it updates the remote routing table entries through these APIs.
[0099] Operating systems operate in kernel mode and user mode. Kernel mode runs operating system components, while user mode runs user-written program components. The modifications described above transfer the data forwarding function from kernel mode to user mode, essentially running an application on the operating system to perform the forwarding. However, because the routing table learning logic of the user-mode control plane protocol interacts with the kernel, implementing the above-described forwarding method only supports configuring remote routing tables via commands; it does not support the generation and distribution of dynamic routing tables.
[0100] like Figure 3The diagram illustrates a scheme to improve data transmission efficiency by modifying the kernel driver. This scheme uses the forwarding logic of the switching chip as the kernel driver. The user-space control plane protocol, via a kernel socket, sends and receives protocol packets through the switching chip's forwarding logic. The user-space control plane protocol interacts with the kernel-space switching chip's forwarding logic to send and receive service packets through the kernel driver. The user-space control plane protocol distributes the learned remote routing table to the kernel driver, and the kernel driver reports the learned local routing table entries to the user-space control plane protocol.
[0101] The aforementioned solution of modifying the kernel driver to improve data transmission efficiency is not suitable for user-space data plane forwarding engines such as VPP / OVS. It requires extensive modifications to the kernel driver to adapt to the logic of different commercial forwarding chips, and kernel development is also limited in terms of development language, efficiency, and tools. Writing the forwarding logic to the chip as a Linux kernel driver does not affect FRR; the only requirement is to implement the chip forwarding logic adaptation at the kernel driver level. However, this solution only addresses the actual physical switching chip and is not suitable for user-space software forwarding like VPP / OVS.
[0102] It is evident that regardless of the aforementioned modification scheme, the changes to the control plane protocol, data forwarding plane protocol, and kernel are substantial. The control plane protocol components and data plane protocol components are deeply coupled, making it impossible for them to work independently, and subsequent upgrades and modifications will be difficult.
[0103] Given the challenge of how related technologies can distribute remote routing tables from the data plane to user-space VPP / OVS / hardware chips to guide data forwarding without significant modifications to control plane and user plane protocols, this application proposes a decoupled packet transmission method, apparatus, and device. The key development lies in combining open-source control plane protocols with an external kernel data forwarding module. Protocol packets can be sent to the FRR, allowing the FRR to learn dynamic routing tables and write them into the data forwarding module.
[0104] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0105] The message transmission method for decoupling the control plane and data plane in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0106] See Figure 4A message transmission method for decoupling the control plane and data plane according to an embodiment of this application, the method comprising:
[0107] Step 401: Interact with the kernel's Socket interface through the user-mode control plane protocol, transmit protocol messages to the data forwarding module outside the kernel via the Socket interface, and dynamically generate a remote routing table based on the protocol messages;
[0108] The user-space control plane protocol can be, but is not limited to, FRR (Free Route Response), and can specifically be BGP / VPN / BFD, etc. The user-space control plane protocol interacts with the kernel's Socket interface, sending and receiving protocol messages. The kernel's Socket interface connects to a data forwarding module outside the kernel, sending and receiving protocol messages from the data forwarding module. The data forwarding module sends and receives protocol messages from remote nodes. This enables the user-space control plane protocol to interact with the kernel's Socket interface, and transmit protocol messages via the Socket interface to the data forwarding module outside the kernel. During the transmission of these protocol messages, the control plane protocol interacts directly with the kernel, thus requiring minimal modification to the control plane protocol. Furthermore, because the control plane protocol interacts with the Socket, it can learn routes based on the sent and received protocol messages and dynamically generate remote routing tables.
[0109] Step 402: The remote routing table is sent to the kernel via the control plane protocol, and then synchronized to the data forwarding module by the kernel through a synchronizer component outside the kernel;
[0110] This application embodiment adds a synchronizer component outside the kernel. This synchronizer component is connected to the kernel and the data forwarding module, and can realize the synchronization of the remote routing table sent to the kernel by the control plane protocol to the data forwarding module.
[0111] Step 403: The data forwarding module forwards service packets according to the remote routing table, and synchronizes the learned local routing table entries to the kernel through the synchronizer component, and then synchronizes them to the control plane protocol through the kernel.
[0112] In this embodiment, the data forwarding module outside the kernel forwards service packets according to the remote routing table. Thus, the data forwarding module can learn local routing table entries, and the synchronizer component can synchronize local routing table entries to the kernel, while the kernel synchronizes them to the control plane protocol.
[0113] The aforementioned data block module is mainly used to implement data forwarding in the data plane, and can be, but is not limited to, in the form of DPDK, hardware switching chips, etc.
[0114] This application embodiment adds a synchronizer component to coordinate the control plane and data plane. This synchronizer component achieves decoupling of the control plane and data plane, as well as flexible replacement of the data plane. During the development process, the control plane / data plane components can be developed, debugged and integrated independently.
[0115] In some possible embodiments, the remote routing table is distributed to the kernel via the control plane protocol, and then synchronized by the kernel to a data forwarding module outside the kernel via a synchronizer component outside the kernel, including:
[0116] The remote routing table is sent to the kernel via the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event. The change includes adding, deleting, or updating.
[0117] When the synchronizer component detects the routing change event, it retrieves the remote routing table from the kernel and calls the data forwarding module interface to send the retrieved remote routing table to the data forwarding module.
[0118] The synchronizer component in this embodiment can monitor in real time whether the kernel generates a routing change event, and can also notify the synchronizer component when the kernel generates a routing change event, thereby synchronizing the kernel's remote routing table to the data forwarding module through monitoring.
[0119] In some possible embodiments, the learned local routing table entries are synchronized to the kernel via the synchronizer component through the data forwarding module, including:
[0120] When the data forwarding module detects a change in a local routing table entry, it automatically generates a routing table entry change event, including additions, deletions, or updates.
[0121] When the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel.
[0122] When the kernel detects a change in a routing table entry, it retrieves the local routing table entry and sends it to the control plane protocol.
[0123] In this embodiment, the synchronizer component can monitor in real time whether the data forwarding module generates a routing change event, and can also notify the synchronizer component when the data forwarding module generates a routing change event, thereby synchronizing the local routing table entries of the data forwarding module to the kernel through monitoring.
[0124] In some possible embodiments, the data forwarding module includes a VPP / OVS user-space data plane forwarding engine and a network interface card (NIC).
[0125] When the VPP / OVS user-space data plane forwarding engine receives a protocol message sent by the Socket interface, it sends the protocol message through the network card; when it receives a protocol message from the network card, it sends it to the Socket interface.
[0126] The VPP / OVS user-space data plane forwarding engine receives the remote routing table sent by the synchronizer, forwards service packets through the network interface card according to the remote routing table, and sends the learned local routing table entries to the synchronizer component.
[0127] like Figure 5 The diagram illustrates the data forwarding module, including the VPP / OVS user-space data plane forwarding engine and the network interface card (NIC). The VPP / OVS user-space data plane forwarding engine is a user-space data plane forwarding engine such as DPDK-VPP or DPDK-OVS. The VPP / OVS user-space data plane forwarding engine forwards service packets through the NIC. For control protocol packets, the user-space control plane protocol still interacts with the kernel via standard sockets. The kernel sends the protocol packets back to the VPP / OVS user-space data plane forwarding engine through the veth / taptun interface, and then sends them out from the NIC; or it receives protocol packets from the NIC and sends them back to the kernel through the veth / taptun interface. Local routing table entries (ARP / MAC / routing, etc.) learned by the VPP / OVS user-space data plane forwarding engine are distributed to the kernel via the Netlink mechanism through the synchronizer component. The kernel then notifies the control plane protocol through Netlink. This process does not modify or affect the control plane protocol. For other forwarding information (ARP / MAC / routing, etc.) learned by the control plane protocol, it is sent to the kernel via Netlink. The synchronizer component senses the generated netlink message and sends the remote routing table to the VPP / OVS user-space data plane forwarding engine.
[0128] In some possible embodiments, the data forwarding module includes a driver module for the switching chip and the switching chip itself;
[0129] When the driver module of the switching chip receives a protocol message sent by the Socket interface, it sends the protocol message through the switching chip; when it receives a protocol message from the switching chip, it sends it to the Socket interface.
[0130] The driver module of the switching chip receives the remote routing table sent by the synchronizer, forwards service packets through the switching chip according to the remote routing table, and sends the learned local routing table entries to the synchronizer component.
[0131] like Figure 6The diagram illustrates the data forwarding module, including the driver module for the switching chip and the switching chip itself. The driver module forwards service packets through the switching chip. For control protocol packets, the user-space control plane protocol interacts with the kernel via standard sockets. The kernel sends protocol packets back to the driver module of the switching chip via an interface, and then sends them out from the switching chip; or it receives protocol packets from the driver module and sends them back to the kernel via an interface. Local routing table entries (ARP / MAC / routing, etc.) learned by the driver module are distributed to the kernel via Netlink through the synchronizer component. The kernel then notifies the control plane protocol via Netlink. This process does not modify or affect the control plane protocol. Other forwarding information (ARP / MAC / routing, etc.) learned by the control plane protocol is distributed to the kernel via Netlink. The synchronizer component detects the generated Netlink messages and distributes the remote routing table to the driver module of the switching chip.
[0132] In some possible embodiments, the remote routing table is distributed to the kernel via the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event, including:
[0133] The remote routing table is sent to the kernel via the first Netlink interface through the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event in the form of a Netlink message.
[0134] In this embodiment of the application, the remote routing table (Arp / mac / routing, etc.) learned by the control plane protocol is sent to the kernel through the Netlink mechanism. When the kernel detects a change in the routing table entry, it automatically generates a routing change event in the form of a Netlink message. The synchronizer component senses the generated Netlink message, obtains the remote routing table entry in the kernel, and sends the forwarding table to the data forwarding module.
[0135] In some possible embodiments, when the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel, including:
[0136] When the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel via the second Netlink interface.
[0137] When the kernel detects a change in a routing table entry, it retrieves the local routing table entry and sends it to the control plane protocol via the first Netlink interface.
[0138] In this embodiment of the application, the local routing table entries (Arp / mac / routes, etc.) learned by the data forwarding module are sent to the kernel via the Netlink mechanism through the synchronizer component. The kernel then notifies the control plane protocol via the Netlink mechanism. The reporting process of these local routing table entries has no impact on the control plane protocol.
[0139] This application embodiment realizes the synchronization of remote routing table entries MAC / IP / ARP / MTU / Route / Vxlan, as well as the reporting and synchronization of local BGP EVPN Type2 / 3 / routes, and realizes the synchronization of protocol message distribution for IPsec VPN of Strong Swan protocol. More synchronization functions can be expanded in the future, and more types of forwarding modules can be supported.
[0140] This application embodiment possesses both rich network protocol control plane and high-performance data plane forwarding capabilities, along with excellent scalability, utilizing various types of data plane engines. Through a "synchronizer component" mechanism, it achieves coordination in the protocol message receiving / sending direction, and enables the uploading and downloading of control plane forwarding table entries, completely decoupling the control plane and data plane, thus facilitating development, maintenance, and upgrades.
[0141] Based on the same inventive concept, embodiments of this application provide a message transmission apparatus that decouples the control plane and data plane, such as... Figure 7 As shown, it includes:
[0142] The remote routing table generation module 701 is used to interact with the kernel's Socket interface through the user-mode control plane protocol, transmit protocol messages to the data forwarding module outside the kernel through the Socket interface, and dynamically generate a remote routing table based on the protocol messages.
[0143] The remote routing table synchronization module 702 is used to send the remote routing table to the kernel through the control plane protocol, and the kernel synchronizes it to the data forwarding module through a synchronizer component outside the kernel.
[0144] The message forwarding and local routing table synchronization module 703 is used to forward service messages through the data forwarding module according to the remote routing table, synchronize the learned local routing table entries to the kernel through the synchronizer component, and then synchronize them to the control plane protocol through the kernel.
[0145] In some possible embodiments, the remote routing table synchronization unit distributes the remote routing table to the kernel via the control plane protocol, and the kernel synchronizes it to the data forwarding module outside the kernel via a synchronizer component outside the kernel, including:
[0146] The remote routing table is sent to the kernel via the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event. The change includes adding, deleting, or updating.
[0147] When the synchronizer component detects the routing change event, it retrieves the remote routing table from the kernel and calls the data forwarding module interface to send the retrieved remote routing table to the data forwarding module.
[0148] In some possible embodiments, the packet forwarding and local routing table synchronization unit synchronizes the learned local routing table entries to the kernel through the synchronizer component via the data forwarding module, including:
[0149] When the data forwarding module detects a change in a local routing table entry, it automatically generates a routing table entry change event, including additions, deletions, or updates.
[0150] When the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel.
[0151] When the kernel detects a change in a routing table entry, it retrieves the local routing table entry and sends it to the control plane protocol.
[0152] In some possible embodiments, the data forwarding module includes a VPP / OVS user-space data plane forwarding engine and a network interface card (NIC).
[0153] When the VPP / OVS user-space data plane forwarding engine receives a protocol message sent by the Socket interface, it sends the protocol message through the network card; when it receives a protocol message from the network card, it sends it to the Socket interface.
[0154] The VPP / OVS user-space data plane forwarding engine receives the remote routing table sent by the synchronizer, forwards service packets through the network interface card according to the remote routing table, and sends the learned local routing table entries to the synchronizer component.
[0155] In some possible embodiments, the data forwarding module includes a driver module for the switching chip and the switching chip itself;
[0156] When the driver module of the switching chip receives a protocol message sent by the Socket interface, it sends the protocol message through the switching chip; when it receives a protocol message from the switching chip, it sends it to the Socket interface.
[0157] The driver module of the switching chip receives the remote routing table sent by the synchronizer, forwards service packets through the switching chip according to the remote routing table, and sends the learned local routing table entries to the synchronizer component.
[0158] In some possible embodiments, the remote routing table is distributed to the kernel via the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event, including:
[0159] The remote routing table is sent to the kernel via the first Netlink interface through the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event in the form of a Netlink message.
[0160] In some possible embodiments, when the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel, including:
[0161] When the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel via the second Netlink interface.
[0162] When the kernel detects a change in a routing table entry, it retrieves the local routing table entry and sends it to the control plane protocol via the first Netlink interface.
[0163] Having introduced the message transmission method and apparatus for decoupling the control plane and data plane according to exemplary embodiments of this application, the following describes a message transmission device for decoupling the control plane and data plane according to another exemplary embodiment of this application.
[0164] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."
[0165] In some possible implementations, the message transmission device with decoupled control plane and data plane according to this application may include at least one processor and at least one memory. The memory stores program code that, when executed by the processor, causes the processor to perform the steps of the message transmission method with decoupled control plane and data plane according to various exemplary embodiments of this application described above.
[0166] The following reference Figure 8This application describes a message transmission device 180 with decoupled control plane and data plane according to this embodiment. Figure 8 The message transmission device 180 shown, which decouples the control plane and data plane, is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0167] like Figure 8 As shown, the message transmission device 180, which decouples the control plane and data plane, is presented in the form of a general-purpose electronic device. The components of the message transmission device 180, which decouples the control plane and data plane, may include, but are not limited to: at least one processor 181, at least one memory 182, and a bus 183 connecting different system components (including memory 182 and processor 181).
[0168] Bus 183 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the various bus structures.
[0169] The memory 182 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 1821 and / or cache memory 1822, and may further include read-only memory (ROM) 1823.
[0170] The memory 182 may also include a program / utility 1825 having a set (at least one) of program modules 1824, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0171] The control plane and data plane decoupled message transmission device 180 can also communicate with one or more external devices 184 (e.g., keyboard, pointing device, etc.), one or more devices that enable users to interact with the control plane and data plane decoupled message transmission device 180, and / or any device that enables the control plane and data plane decoupled message transmission device 180 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 185. Furthermore, the control plane and data plane decoupled message transmission device 180 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 186. As shown, network adapter 186 communicates with other modules of the control plane and data plane decoupled message transmission device 180 via bus 183. It should be understood that, although not shown in the figure, the message transmission device 180, which can be combined with the decoupled control plane and data plane, may use other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0172] In some possible implementations, various aspects of the control plane and data plane decoupled message transmission method provided in this application can also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to cause the computer device to perform the steps of the control plane and data plane decoupled message transmission method according to various exemplary embodiments of this application described above.
[0173] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0174] The monitoring program product of the embodiments of this application may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on an electronic device. However, the program product of this application is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0175] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0176] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0177] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's electronic device, partially on the user's device, as a standalone software package, partially on the user's electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device can be connected to the user's electronic device via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external electronic device (e.g., via the Internet using an Internet service provider).
[0178] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0179] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0180] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0181] This application is described with reference to flowchart illustrations and block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block and / or segment of the flowchart illustrations and block diagrams, as well as combinations of blocks and segments in the flowchart illustrations and block diagrams, can be implemented by computer program instructions. These computer program instructions can 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 a machine for implementing the flowchart illustrations. Figure 1 One or more processes and boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0182] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and boxes Figure 1 The function specified in one or more boxes.
[0183] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and boxes Figure 1 The steps of the function specified in one or more boxes.
[0184] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0185] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for packet transmission with control plane and data plane decoupling, characterized in that, The method includes: The user-mode control plane protocol interacts with the kernel's Socket interface, and transmits protocol messages to the data forwarding module outside the kernel via the Socket interface, dynamically generating a remote routing table based on the protocol messages. The remote routing table is sent to the kernel via the control plane protocol, and then synchronized to the data forwarding module by the kernel through a synchronizer component outside the kernel. When the data forwarding module detects a change in a local routing table entry, it automatically generates a routing table entry change event, including additions, deletions, or updates. When the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel. When the kernel detects a change in a routing table entry, it retrieves the local routing table entry and sends it to the control plane protocol.
2. The method of claim 1, wherein, The remote routing table is distributed to the kernel via the control plane protocol, and then synchronized to the data forwarding module by the kernel through a synchronizer component outside the kernel, including: The remote routing table is sent to the kernel via the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event. The change includes adding, deleting, or updating. When the synchronizer component detects the routing change event, it retrieves the remote routing table from the kernel and calls the data forwarding module interface to send the retrieved remote routing table to the data forwarding module.
3. The method of claim 1, wherein, The data forwarding module includes a VPP / OVS user-space data plane forwarding engine and a network interface card; When the VPP / OVS user-space data plane forwarding engine receives a protocol message sent by the Socket interface, it sends the protocol message through the network card; when it receives a protocol message from the network card, it sends it to the Socket interface. The VPP / OVS user-space data plane forwarding engine receives the remote routing table sent by the synchronizer, forwards service packets through the network interface card according to the remote routing table, and sends the learned local routing table entries to the synchronizer component.
4. The method of claim 1, wherein, The data forwarding module includes a driver module for the switching chip and the switching chip itself. When the driver module of the switching chip receives a protocol message sent by the Socket interface, it sends the protocol message through the switching chip; when it receives a protocol message from the switching chip, it sends it to the Socket interface. The driver module of the switching chip receives the remote routing table sent by the synchronizer, forwards service packets through the switching chip according to the remote routing table, and sends the learned local routing table entries to the synchronizer component.
5. The method according to claim 2, characterized in that, The remote routing table is distributed to the kernel via the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event, including: The remote routing table is sent to the kernel via the first Netlink interface through the control plane protocol. When the kernel detects a change in the remote routing table, it automatically generates a routing change event in the form of a Netlink message.
6. The method of claim 1, wherein, When the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel, including: When the synchronizer component detects a routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel via the second Netlink interface. When the kernel detects a change in a routing table entry, it retrieves the local routing table entry and sends it to the control plane protocol via the first Netlink interface.
7. A packet transmission device for control plane and data plane decoupling, characterized in that, include: The remote routing table generation unit is used to interact with the kernel's Socket interface through the user-mode control plane protocol, transmit protocol messages to the data forwarding module outside the kernel through the Socket interface, and dynamically generate a remote routing table based on the protocol messages. The remote routing table synchronization unit is used to send the remote routing table to the kernel through the control plane protocol, and the kernel synchronizes it to the data forwarding module through a synchronizer component outside the kernel. The message forwarding and local routing table synchronization unit is used to automatically generate a routing table entry change event when the data forwarding module detects a change in a local routing table entry, the change including addition, deletion or update; when the synchronizer component detects the routing table entry change event, it retrieves the local routing table entry from the data forwarding module and sends it to the kernel; when the kernel detects a change in a routing table entry, it retrieves the local routing table entry and sends it to the control plane protocol.
8. A message transmission device with decoupled control plane and data plane, characterized in that, The method includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1-7.
9. A computer storage medium, characterized in that The computer storage medium stores a computer program that enables the computer to perform the method as described in any one of claims 1-7.