Packet forwarding method and apparatus for programmable chip, and computing device cluster
By creating virtual instances and virtual devices in the control system, the problem of high development costs for programmable devices is solved, efficient message forwarding and multi-APP compatibility are achieved, and application scenarios are expanded.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-07-17
- Publication Date
- 2026-07-02
AI Technical Summary
In existing technologies, when using programmable devices, the APP needs to adapt to various CPU systems and SDK libraries, resulting in high development costs. Furthermore, commonly used tools such as tcpdump and netstat cannot be applied to the business panel interface, which increases the development difficulty and cost.
By creating virtual instances and virtual devices in the control system, users can manage business panel ports within the virtual instances, achieve packet forwarding, be compatible with applications based on kernel protocol stacks and bypass kernels, reduce development costs, and expand application scenarios.
It reduces the development cost of programmable devices, improves forwarding performance, and enables programmable devices to be compatible with a variety of apps, thus expanding application scenarios.
Smart Images

Figure CN2025109043_02072026_PF_FP_ABST
Abstract
Description
A message forwarding method, apparatus, and computing device cluster for a programmable chip
[0001] This application claims priority to Chinese Patent Application No. 202411957875.0, filed on December 27, 2024, entitled "A Message Forwarding Method, Apparatus and Computing Device Cluster for a Programmable Chip", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This invention relates to the field of message forwarding technology, and in particular to a message forwarding method, apparatus and computing device cluster for a programmable chip. Background Technology
[0003] When building cloud networks, cloud vendors typically use programmable devices to implement network function virtualization (NFV). Cloud vendors can define the forwarding logic of programmable chips using domain-specific languages (DSLs), allowing them to customize the chip's forwarding functions while maintaining high product performance, thus improving chip development efficiency.
[0004] Programmable devices can include programmable chip systems and central processing unit (CPU) systems. In related technologies, the CPU system can access the registers of the service panel port via a driver to obtain data such as the port's status and throughput, and cache this data in the local vendor's software development kit (SDK) library. Once the application (APP) in the CPU system determines its requirements, it can call the SDK interface to retrieve the relevant data for the service panel port that meets those requirements from the SDK library, thereby configuring the corresponding service panel port for the specified needs.
[0005] Because the app may need to adapt to various CPU systems and SDK libraries, it must configure numerous interfaces to ensure compatibility with these different systems and SDK libraries. This increases the development cost of programmable devices. Furthermore, some commonly used open-source tools and software, such as tcpdump and netstat, cannot be applied to these business panel interfaces. Summary of the Invention
[0006] To address the aforementioned issues, embodiments of this application provide a message forwarding method for programmable chips, which reduces the development cost of programmable devices, improves forwarding performance, and enables the control system to be compatible with various existing applications through a virtual service interface on the control system side, thereby expanding the application scenarios of programmable devices. Furthermore, this application also provides a corresponding apparatus and computing device cluster for the message forwarding method for programmable chips.
[0007] Therefore, the following technical solutions are adopted in the embodiments of this application:
[0008] In a first aspect, this application provides a message forwarding method for a programmable chip. The method is applied to a control platform running on infrastructure. Nodes in the infrastructure are equipped with programmable devices, and these nodes are network-connected to other nodes via the programmable devices. The control system of the programmable devices manages the forwarding system of the programmable devices. The forwarding system is connected to multiple service panel ports, and the forwarding system transmits data through these service panel ports. The method includes: obtaining first instance configuration information input by a first user, which indicates the instance specifications of a first virtual instance; creating a first virtual instance on the control system based on the first instance configuration information; obtaining parameter information of a first service panel port, including the first service panel port; and configuring the first virtual instance based on the parameter information of the first service panel port to create a corresponding first virtual device, which is associated with the first service panel port. The first virtual instance is used to manage the first service panel port through the first virtual device. The virtual instance can be a virtual machine (VM), a container, etc.
[0009] In this implementation, the method creates a virtual instance within the control system and a virtual device corresponding to the service panel port within that virtual instance, allowing users to see the service panel port within the virtual instance. When using the virtual instance, the user can run an application within it, enabling the application to send control messages using the service panel port corresponding to the virtual device within the virtual instance. This method eliminates the need to configure interfaces to call the service panel port, thereby reducing the development cost of programmable devices. Furthermore, the forwarding function of the programmable device built using this method is compatible with kernel-based protocol stack applications, applications that support kernel bypass, and various existing applications, thus expanding the application scenarios of programmable devices.
[0010] In one implementation, a virtual instance is used to run a first user's application (APP). The first virtual instance includes a network device object, which is associated with a first virtual device. The network device object is used to send a first control message from a first service panel port and / or send a second control message from the APP.
[0011] In this embodiment, the method can generate a corresponding network device object based on the virtual device, and convert the virtual device into a virtual network interface in the Linux kernel, so that the virtual device can send and receive messages from any form of APP, thereby improving the application scenarios of programmable devices.
[0012] In one embodiment, the method further includes: obtaining second instance configuration information input by a second user, the second instance configuration information being used to indicate the instance specifications of the second virtual instance; creating a second virtual instance on the control system based on the second instance configuration information; obtaining parameter information of a second service panel port, a plurality of service panel ports including the second service panel port; and creating a corresponding second virtual device in the second virtual instance based on the parameter information of the second service panel port, the second virtual device being associated with the second service panel port, wherein the second virtual instance is used to manage the second service panel port through the second virtual device.
[0013] In this implementation, multiple virtual instances can be created on the control system of the same programmable device for different users. Through logical isolation, different users do not interfere with each other during use, while simultaneously realizing the management function of the service panel port, thereby improving the overall efficiency of the programmable device.
[0014] Secondly, this application provides a message forwarding method for a programmable chip. The method is applied to a virtual instance, which runs on a control system. The control system is deployed on a programmable device, and the programmable device is located in nodes on an infrastructure. The nodes are connected to other nodes via the programmable device. The control system manages the forwarding system of the programmable device. The forwarding system is connected to multiple service panel ports and transmits data through the multiple service panel ports. The method includes: obtaining parameter information of the service panel ports; creating a virtual device based on the parameter information of the service panel ports, associating the virtual device with the service panel ports, and the multiple service panel ports including the service panel ports; and generating a corresponding network device object based on the virtual device. The network device object is used to send a first control message from the service panel port and / or send a second control message from the APP of the user running the virtual instance.
[0015] In this implementation, the method creates a virtual device corresponding to the service panel port within a virtual instance of the control system, allowing users to see the service panel port within the virtual instance. When using the virtual instance, the user can run an application within it, enabling the application to send control messages using the service panel port corresponding to the virtual device within the virtual instance. This method eliminates the need to configure interfaces to call the service panel port, thereby reducing the development cost of programmable devices. Furthermore, this method allows programmable devices to be compatible with kernel-based protocol stack applications, applications that support kernel bypass, and various existing applications, thus expanding the application scenarios of programmable devices.
[0016] In one implementation, the method receives a first control message sent by a forwarding system; determines a first network device object to receive the first control message based on the association between the destination address and the service panel port in the first control message, the network device object including the first network device object; and sends the first control message to the first network device object. The virtual instance records the association between the service panel ports, which includes the identity identifier of the service panel port and the identity identifier of the network device object corresponding to the service panel port.
[0017] In one implementation, the method involves determining that a second network device object has received a second control message sent by a user's APP, the network device object including the second network device object; determining the target service panel port for sending the second control message based on the association between the identity identifier of the second network device object and the service panel port; adding the identity identifier of the target service panel port to the second control message; and sending the second control message with the added identity identifier of the target service panel port to the forwarding system. The forwarding system is used to send the second control message to the corresponding target service panel port based on the added identity identifier of the target service panel port in the second control message.
[0018] In one implementation, the method receives a third control message sent by a forwarding system, the private header of the third control message carrying metadata; based on the metadata, determines a third network device object receiving the third control message, the network device object including a third network device object; and sends the third control message to the third network device object.
[0019] In one implementation, the method records the network device object bound to the user's APP in the protocol stack, so that the APP can send and receive control messages through the service panel port corresponding to the specified network device object, thereby enabling the programmable device to be compatible with APPs based on the kernel protocol stack, thus improving the application scenarios of the programmable device.
[0020] In one implementation, upon receiving a fourth control message from a user's application, the method drives the PMD in polling mode to send the fourth control message to a virtualized network interface card (vNIC). The vNIC, obtained based on a network device object, is used to receive and send control messages between the application and the network device object. This method can create a vNIC corresponding to each network device object in the DPDK library, allowing the application to forward control messages through the service panel port corresponding to the specified network device object. This enables programmable devices to support kernel-bypassing applications, thereby expanding the application scenarios of programmable devices.
[0021] Thirdly, this application provides a message forwarding method for a programmable chip. The method is applied to a control system, which runs a control platform and a virtual instance. The control system is deployed on a programmable device, which is located in nodes on an infrastructure. The nodes are connected to other nodes via the programmable device. The control system manages the forwarding system of the programmable device. The forwarding system is connected to multiple service panel ports and transmits data through these ports. The method includes: the control platform obtaining instance configuration information input by a user, which indicates the instance specifications of the virtual instance; creating a virtual instance on the control system based on the instance configuration information; obtaining parameter information of the service panel ports, including multiple service panel ports; creating a virtual device on the virtual instance based on the parameter information, which is associated with the service panel ports and used by the virtual instance to manage the service panel ports; and generating a corresponding network device object based on the virtual device, which is used to send a first control message from the service panel port and / or send a second control message from a user's application (APP) running on the virtual instance.
[0022] Fourthly, this application provides a message forwarding device for a programmable chip, comprising: a first processing module for acquiring first instance configuration information input by a first user, the first instance configuration information indicating the instance specifications of a first virtual instance; a second processing module for creating a first virtual instance on a control system based on the first instance configuration information; a third processing module for acquiring parameter information of a first service panel port, wherein multiple service panel ports include the first service panel port, the control system of the programmable device manages the forwarding system of the programmable device, the forwarding system is connected to multiple service panel ports, the forwarding system transmits data through the multiple service panel ports, the multiple service panel ports include the service panel port; and a fourth processing module for configuring the first virtual instance based on the parameter information of the first service panel port to create a corresponding first virtual device, the first virtual device being associated with the first service panel port, wherein the first virtual instance is used to manage the first service panel port through the first virtual device.
[0023] In one implementation, a virtual instance is used to run a first user's application (APP). The first virtual instance includes a network device object, which is associated with a first virtual device. The network device object is used to send a first control message from a first service panel port and / or send a second control message from the APP.
[0024] In one embodiment, the first processing module is further configured to acquire second instance configuration information input by the second user, the second instance configuration information being used to indicate the instance specifications of the second virtual instance; the second processing module is further configured to create a second virtual instance on the control system based on the second instance configuration information; the third processing module is further configured to acquire parameter information of a second service panel port, the plurality of service panel ports including the second service panel port; the fourth processing module is further configured to create a corresponding second virtual device in the second virtual instance based on the parameter information of the second service panel port, the second virtual device being associated with the second service panel port, wherein the second virtual instance is used to manage the second service panel port through the second virtual device.
[0025] Fifthly, this application provides a message forwarding device for a programmable chip, comprising: a first processing module for acquiring parameter information of a service panel port; a control system for the programmable device for managing the forwarding system of the programmable device, the forwarding system being connected to multiple service panel ports, the forwarding system transmitting data through the multiple service panel ports, the multiple service panel ports including the service panel ports; a second processing module for creating a virtual device based on the parameter information of the service panel ports, the virtual device being associated with the service panel ports, the multiple service panel ports including the service panel ports; and a third processing module for generating a corresponding network device object based on the virtual device, the network device object being used to send a first control message from the service panel port and / or send a second control message from an APP running on the virtual instance.
[0026] In one implementation, the virtual instance records the association relationship of the service panel port. The association relationship of the service panel port includes the identity identifier of the service panel port and the identity identifier of the network device object corresponding to the service panel port. The third processing module is further configured to receive the first control message sent by the forwarding system; determine the first network device object receiving the first control message based on the destination address in the first control message and the association relationship of the service panel port. The network device object includes the first network device object; and send the first control message to the first network device object.
[0027] In one implementation, the third processing module is further configured to: determine that the second network device object has received the second control message sent by the user's APP; determine the target service panel port for sending the second control message based on the association between the identity identifier of the second network device object and the service panel port; add the identity identifier of the target service panel port to the second control message; and send the second control message with the added identity identifier of the target service panel port to the forwarding system; the forwarding system is configured to send the second control message to the corresponding target service panel port based on the added identity identifier of the target service panel port in the second control message.
[0028] In one implementation, the third processing module is further configured to receive a third control message sent by the forwarding system, wherein the private header of the third control message carries metadata; based on the metadata carried in the private header of the third control message, determine the third network device object receiving the third control message, wherein the network device object includes a third network device object; and send the third control message to the third network device object.
[0029] In one implementation, the third processing module is also used to record the network device object bound to the user's APP in the protocol stack.
[0030] In one implementation, the third processing module is further configured to receive a fourth control message sent by the user's APP; drive the PMD in polling mode to send the fourth control message to the virtualized network interface card (vNIC); the vNIC is obtained based on the network device object and is used to receive and send control messages between the APP and the network device object.
[0031] In a sixth aspect, an embodiment of this application provides a computing device, comprising: at least one memory; and at least one processor, the processor being configured to execute instructions stored in the memory to cause the computing device to perform embodiments as described in the first aspect, the second aspect, or the third aspect.
[0032] In a seventh aspect, embodiments of this application provide a computer-readable storage medium including computer program instructions, which, when executed by a computing device, execute various possible implementations of the first aspect, the second aspect, or the third aspect.
[0033] Eighthly, this application provides a computer program product containing instructions, characterized in that the computer program product stores instructions that, when executed by a computing device, cause the computing device to implement various possible embodiments of the first aspect, or various possible embodiments of the second aspect, or various possible embodiments of the third aspect.
[0034] In a ninth aspect, an embodiment of this application provides a computing device cluster, including at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, such that the computing device cluster performs the embodiments of the first aspect, the second aspect, or the third aspect.
[0035] In a tenth aspect, embodiments of this application provide a computer-readable storage medium including computer program instructions that, when executed by a cluster of computing devices, execute as in the embodiments of the first aspect, the second aspect, or the third aspect.
[0036] Eleventhly, this application provides a computer program product containing instructions, characterized in that the computer program product stores instructions that, when executed by a computing device cluster, cause the computing device cluster to implement various possible implementations of the first aspect, or various possible implementations of the second aspect, or various possible implementations of the third aspect. Attached Figure Description
[0037] The accompanying drawings used in the description of the embodiments or prior art are briefly introduced below.
[0038] Figure 1 is a schematic diagram of the structure of a programmable device provided in an embodiment of this application;
[0039] Figure 2 is a schematic diagram of the application scenario of the programmable device provided in the embodiments of this application;
[0040] Figure 3 is a schematic diagram of the structure of the cloud control platform provided in the embodiment of this application for managing at least one programmable device;
[0041] Figure 4 is a flowchart illustrating a message forwarding method for a programmable chip provided in an embodiment of this application.
[0042] Figure 5 is a flowchart illustrating another message forwarding method for a programmable chip provided in this embodiment of the application.
[0043] Figure 6 is a schematic diagram of the process of constructing and forwarding virtual instance functions provided in the embodiments of this application;
[0044] Figure 7 is a schematic diagram of the connection relationship between the various entities of the virtual instance for sending and receiving control messages provided in the embodiments of this application;
[0045] Figure 8 is a flowchart of the control system receiving control messages provided in the embodiments of this application;
[0046] Figure 9 is a flowchart of the control system sending control messages provided in the embodiments of this application;
[0047] Figure 10 is one of the schematic diagrams showing the connection relationship of various entities in the virtual instance for sending and receiving control messages provided in the embodiments of this application;
[0048] Figure 11 is a second schematic diagram of the connection relationship between the various entities of the virtual instance sending and receiving control messages provided in the embodiments of this application;
[0049] Figure 12 is a schematic diagram of an application scenario in which the programmable device provided in the embodiments of this application is rented to different users;
[0050] Figure 13 is a schematic diagram of the structure of a message forwarding device for a programmable chip provided in an embodiment of this application;
[0051] Figure 14 is a schematic diagram of the structure of a programmable chip message forwarding device provided in an embodiment of this application;
[0052] Figure 15 is a schematic diagram of the structure of a computing device provided in an embodiment of this application;
[0053] Figure 16 is a schematic diagram of the architecture of a computing device cluster provided in an embodiment of this application;
[0054] Figure 17 is a schematic diagram of another computing device cluster architecture provided in the embodiments of this application. Detailed Implementation
[0055] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0056] In this article, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.
[0057] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. For example, "first response message" and "second response message," etc., are used to distinguish different response messages, not to describe a specific order of response messages.
[0058] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0059] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processing units means two or more processing units, multiple elements means two or more elements, etc.
[0060] Before introducing the technical solution protected by this application, several technical terms involved in the technical solution protected by this application will be explained in advance, namely:
[0061] Messages can be divided into control messages and service messages. Service messages are those received by the forwarding system from the service panel port, processed independently, and then sent out through the service panel port. Control messages are those received by the forwarding system from the service panel port and forwarded to the control system for processing. Examples include Layer 3 messages with the destination address being the local device's Internet Protocol (IP), neighbor learning protocols (such as Address Resolution Protocol (ARP), Internet Control Message Protocol version 6 (ICMPv6), etc.), and Link Layer Discovery Protocol (LLDP) link control messages.
[0062] The forwarding system, also known as the programmable chip system mentioned above, can include a programmable chip and a service panel port. The programmable chip connects to the data plane network through the service panel port and is used to forward packets using custom forwarding logic. That is, the forwarding system can forward received control packets to the control system and send control packets sent by the control system outwards through the service panel port. The service panel port is the network interface for the programmable chip to receive and send packets.
[0063] The control system, also known as the CPU system mentioned above, can include CPU chips, buses, etc. The control system can connect to the forwarding system to process control messages. That is, after receiving control messages from the forwarding system, the control system can process them. After generating a message, the control system can send it to the forwarding system. Because the service panel port belongs to the forwarding system, it cannot be presented to the control system as a general external device, thus preventing the control system from directly managing the service panel port.
[0064] The technical solution protected in this application mainly focuses on the management and control of control messages. Control messages are data units transmitted in network communication, used to transmit information between source and destination nodes. Control messages generally include a destination address and a source address to ensure that data can be correctly routed from the sender (source) to the receiver (destination). The destination address refers to the identity identifier of the node receiving the control message. The source address refers to the identity identifier of the node generating the control message.
[0065] In addition, programmable chips can implement access control lists (ACLs) and routing policies via DSL. Upon receiving control messages, the programmable chip can forward these messages based on these custom functions. ACLs define which network traffic is allowed or denied, filtering packets based on conditions such as IP address and port number. Routing policies determine the path selection of packets within the network, optimizing routes based on factors such as performance, cost, or security.
[0066] This application provides a programmable device that can create at least one virtual instance on a control system and, based on the parameter information of the service panel port, create at least one virtual device corresponding to each service panel port in each virtual instance. When the control system manages the service panel ports, after determining the specified virtual device in the virtual instance, it can directly manage the service panel port associated with the specified virtual device based on the association relationship between the virtual device and the service panel port. During the process of creating the virtual device corresponding to the service panel port in the virtual instance, the control system can automatically create the virtual device based on the interface information of the service panel port, without the need for additional configuration files or user intervention, thereby improving the application scenarios of the programmable device.
[0067] Figure 1 is a schematic diagram of the structure of a programmable device provided in an embodiment of this application. As shown in Figure 1, the programmable device 100 includes an operating system installed and running thereon (the operating system relative to the virtual instance can be called the host operating system), and the host operating system may include a forwarding system 110 and a control system 120.
[0068] The forwarding system 110 may include at least one programmable chip. The programmable chip may be a network processor (NP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other chip with customizable logic. The programmable chip typically includes multiple interfaces, each consisting of at least one pin. The interfaces of the programmable chip can connect to other chips and / or other devices, enabling interaction between the programmable chip and other chips and / or other devices.
[0069] In this embodiment, when the forwarding system 110 manages the various interfaces of the programmable chip, it can detect attribute information such as the identity identifier of each interface, the identity identifier of the connected external node, the transmission traffic volume, and the status (interface status, whether packet loss occurs, traffic type, etc.) to obtain the attribute information of each interface. The forwarding system 110 can determine the type, function, and other custom information of each interface according to custom forwarding logic. The forwarding system 110 can generate a service panel port based on the attribute information and custom information of each interface. The parameter information of the service panel port includes the interface's attribute information and custom information, namely, the interface's identity identifier, the identity identifier of the connected external node, the transmission traffic volume, type, function, and status (interface status, whether packet loss occurs, traffic type, etc.). The forwarding system 110 can cache the parameter information of each service panel port in the register of its corresponding interface or in other memory.
[0070] For example, as shown in Figure 2, the forwarding system 110 can connect to the data plane network through a designated service panel port and forward packets through the designated service panel port to a designated receiving end, thereby achieving packet forwarding to the designated receiving end. The forwarding system 110 can also receive packets sent by the designated receiving end by receiving packets through the designated service panel port.
[0071] The control system 120, within the programmable device 100, may include at least one processor chip. The processor chip may be a CPU, GPU, or other chip with computing capabilities. The processor chip and the programmable chip may be different chips or the same chip. If the processor chip and the programmable chip are on the same chip, then a portion of the chip's computing resources are used as the processor chip, and another portion of the computing resources are used as the programmable chip.
[0072] The control system 120 and the forwarding system 110 can establish a data transmission channel via communication methods such as Ethernet. The control system 120 can send control messages to the forwarding system 110 through the transmission channel, and can also receive control messages sent by the forwarding system 110 through the transmission channel. For example, as shown in FIG2, the control system 120 and the forwarding system 110 can establish a data transmission channel through a NIC, so that the control system 120 can receive control messages sent by the forwarding system 110, and can also send control messages to the forwarding system 110.
[0073] In this embodiment, the control system 120 can run software modules to create virtual instances and virtual devices. The software modules can be network operating systems (NOS). NOS is a system specifically designed to manage network resources and provide services, supporting client / server mode, multitasking, multiple file systems, high reliability, security, fault tolerance, openness, and cross-platform compatibility.
[0074] The NOS utilizes virtualization technologies such as QEMU and Xen to create at least one virtual instance. Since virtual instances can run on any standard operating system, any OS on top of the NOS can use these virtual instances to perform related operations. Therefore, the forwarding function of the programmable device 100 built by the control system 120 is compatible with kernel-based protocol stack applications, kernel-bypassing applications, and various existing applications, thereby expanding the application scenarios of the programmable device 100.
[0075] The control system 120 includes a virtual instance manager (also known as a hypervisor). The virtual instance manager's function is to implement compute virtualization, network virtualization, and storage virtualization of virtual instances, and to manage these virtual instances. Computation virtualization refers to providing a portion of the processor, memory, and other resources of the programmable device 100 to the virtual instances. Network virtualization refers to providing a portion of the communication device's functionality (such as bandwidth) to the virtual instances. Storage virtualization refers to providing a portion of the disk space to the virtual instances. The virtual instance manager can also achieve logical isolation between different virtual instances and manage them, such as creating virtual instances, simulating virtual hardware for virtual instances based on the hardware layer (hardware emulation function), deleting virtual instances, forwarding and / or processing control messages between all virtual instances running on the programmable device 100 (e.g., virtual instance 1 and virtual instance 2), or forwarding control messages between virtual instances on the programmable device 100 and the external network, and handling I / O generated by virtual instances.
[0076] The runtime environments (such as the virtual instance's application, operating system, and virtual hardware) in different virtual instances are completely isolated. Communication between virtual instance 1 and virtual instance 2 requires forwarding messages through the virtual instance manager.
[0077] In this embodiment, the NOS can obtain parameter information of each service panel port from the registers of the interface corresponding to each service panel port or from other memory. After the NOS creates a virtual instance, it can use virtualization technology to create at least one virtual device corresponding to each service panel port in each virtual instance, using the parameter information of each service panel port as device parameters.
[0078] Virtual devices can be peripheral component interconnect express (PCIe) devices, computer express link (CXL) devices, etc. Taking PCIe devices as an example, virtual instances can leverage the hot-swappable, point-to-point transmission, high compatibility and scalability, and high bandwidth characteristics of PCIe devices to virtualize service panel ports as PCIe devices, allowing the virtual instance to reproduce the service panel port as closely as possible. In the control system 120, the service panel port exists in a virtualized manner within the virtual instance, allowing the control system 120 to directly manage and forward multiple service panel ports connected to the forwarding system 110.
[0079] This application provides a control platform, which can be a local control platform composed of a single computing device or multiple computing devices, or a cloud control platform implemented by cloud services. In programmable device applications, it can also run on the control system of the programmable device, managing the forwarding system through a PCIe interface or other bus interfaces. The technical solution protected by this application is described below using a cloud control platform as an example.
[0080] A cloud control platform can manage infrastructure and implement corresponding functions through the infrastructure. In this embodiment, the cloud control platform can manage one or more programmable devices 100. For example, as shown in FIG3, the cloud control platform of the data center can establish a connection with N programmable devices 100 through the internal network of the data center to manage the N programmable devices 100.
[0081] The cloud control platform can provide access interfaces (such as user interfaces and APIs). Users can register a cloud account and password on the cloud control platform and log in through the remote access interface. After successful authentication of the cloud account and password, users can further select and purchase virtual instances of specific specifications (processor, memory, disk) on the cloud control platform. After successful purchase, the cloud control platform provides the remote login account and password for the purchased virtual instance. Clients can remotely log in to the virtual instance and install and run their applications within it.
[0082] The cloud control platform can be logically divided into user console, compute management service, network management service, storage management service, authentication service, and image management service. The user console provides a user interface or API for user interaction. The compute management service manages servers running virtual instances and bare metal servers. The network management service manages network services (such as gateways and firewalls). The storage management service manages storage services (such as data bucket services). The authentication service manages user accounts and passwords. The image management service manages virtual instance images.
[0083] The cloud control platform's client can receive control plane commands sent by the platform and create and manage virtual instances throughout their lifecycle on the server based on these commands. Therefore, users can create, manage, log in to, and operate virtual instances in the cloud data center through the cloud control platform.
[0084] Figure 4 is a flowchart illustrating a message forwarding method for a programmable chip provided in this embodiment. As shown in Figure 4, this method is applied to a cloud control platform, which runs on infrastructure. Programmable devices are installed on nodes within the infrastructure, and these nodes connect to other nodes via the programmable devices. The control system of the programmable devices manages the forwarding system of the programmable devices. The forwarding system connects to multiple service panel ports, and transmits data through these ports. The specific implementation process of this method is as follows:
[0085] Step S401: Obtain the first instance configuration information input by the first user. The first instance configuration information indicates the instance specifications of the first virtual instance. The virtual instance can be a VM, a container, etc.
[0086] Step S402: Based on the configuration information of the first instance, create the first virtual instance on the control system.
[0087] Step S403: Obtain parameter information of the first service panel port.
[0088] Step S404: Based on the parameter information of the first service panel port, configure the first virtual instance to create the corresponding first virtual device. The first virtual device is associated with the first service panel port, and the first virtual instance is used to manage the first service panel port through the first virtual device.
[0089] In this embodiment, the method can create a virtual instance in the control system and a virtual device corresponding to the service panel port within the virtual instance, allowing users to see the service panel port within the virtual instance. When using the virtual instance, the APP running on the virtual instance can use the service panel port corresponding to the virtual device within the virtual instance to send control messages. This method eliminates the need to configure interfaces to call the service panel port, thereby reducing the development cost of programmable devices. The forwarding function of the programmable device 100 constructed by this method is compatible with kernel protocol stack-based APPs, APPs that support kernel bypass, and various existing APPs, thereby expanding the application scenarios of the programmable device 100.
[0090] Figure 5 is a flowchart illustrating another message forwarding method for a programmable chip provided in this embodiment. As shown in Figure 5, this method is applied to a virtual instance, which runs on a control system. The programmable device is located in a node on the infrastructure, and the node connects to other nodes via the programmable device network. The control system manages the forwarding system of the programmable device, which is connected to multiple service panel ports and transmits data through these ports. The specific implementation process of this method is as follows:
[0091] Step S501: Obtain parameter information from the service panel port.
[0092] Step S502: Create a virtual device based on the parameter information of the service panel port. The virtual device is associated with the service panel port.
[0093] Step S503: Generate the corresponding network device object based on the virtual device.
[0094] The following description, using the structure of the virtual instance shown in Figure 6, illustrates this concept. As shown in Figure 6, the virtual instance can run at least one application (APP) for user interaction. The virtual instance can load the NIC driver (referred to here as the "first NIC driver") and locate locally created virtual devices. After matching the virtual device through the first NIC driver, the virtual instance can obtain the device's parameter information, i.e., the parameter information of the service panel port. Based on the virtual device's parameter information, the virtual instance can create a corresponding network device object in kernel mode. This network device object refers to a virtual network interface in the Linux kernel. The network device object can connect to the APP, serving as the APP's network interface. The virtual instance can generate corresponding network device objects based on the virtual device, transforming the virtual device into a virtual network interface in the Linux kernel. This allows the virtual device to receive and send control messages from any form of APP, thereby expanding the application scenarios of the programmable device 100.
[0095] A virtual instance can create a data module to store data related to network device objects, such as the identity of the network device object, the code running the network device object, and parameter information of the service panel ports. The data module can associate the identity of the service panel port with the identity of the corresponding network device object to obtain the association relationship between various service panel ports, and store the association relationship between various service panel ports.
[0096] In this embodiment, the virtual instance stores the association relationship of each service panel port in the data module so that after receiving a control message, it can match the association relationship of each service panel port stored in the data module according to the destination address (i.e., identity identifier) in the control message to find out which network device object or which service panel port the control message was sent to.
[0097] Since the control system 120 and the forwarding system 110 establish a transmission channel for transmitting control messages via standard communication methods such as Ethernet, the transmission channel between the control system 120 and the forwarding system 110 can be a NIC that supports communication methods such as Ethernet. In this case, the control system 120 is equipped with a NIC driver (referred to here as the "second NIC driver" for distinction). The control system 120 can use the second NIC driver to call the corresponding NIC to transmit control messages via the Ethernet channel between the processor chip (such as the CPU) and the programmable chip.
[0098] In this embodiment of the application, when a virtual instance sends and receives control messages, multiple network device objects can be connected to different second NIC drivers through data modules, so that the network device objects can send control messages to the associated service panel ports in the forwarding system 110 and receive control messages sent by the associated service panel ports in the forwarding system 110 through the second NIC drivers.
[0099] For example, Figure 7 is a schematic diagram of the control system sending and receiving control messages provided in an embodiment of this application. As shown in Figure 7, the network device object, data module, and second NIC driver in the control system 120 participate in the reception and transmission of control messages.
[0100] Referring to Figure 8, the process of the control system 120 receiving messages is as follows:
[0101] In step S801, the second NIC driver receives the first control message.
[0102] Specifically, after receiving the first control message through the service panel port, the forwarding system 110 sends the first control message to the control system 120. The NIC driver of the forwarding system 110 itself can transmit the first control message to the NIC connected to the control system 120. When the NIC transmits the control message sent by the forwarding system 110, it can generate an interrupt and call the processing function of the second NIC driver of the control system 120 to receive the first control message.
[0103] Taking the destination address carried in the control message as an example, the destination address of the first control message can refer to the service panel port at Layer 2 (i.e., the media access control (MAC) layer), the identity of the current host node (i.e., the OS) at Layer 3 (i.e., the IP layer), or the identity of the interface at Layer 4 (i.e., the socket port, such as the transmission control protocol (TCP), user datagram protocol (UDP), etc.).
[0104] In step S802, the second NIC driver sends a first control message to the data module.
[0105] In step S803, the data module determines the network device object that receives the first control message based on the association between the first control message and the service panel port stored in its own memory.
[0106] In step S804, the data module sends a first control message to the network device object.
[0107] Specifically, taking a Layer 2 service panel port as an example, when the data module receives the first control message, it can obtain the destination address from the message. After obtaining the destination address, the data module can compare it with its stored association relationships for service panel ports to find the network device object that matches the destination address. Once the corresponding network device object is identified, the data module sends the first control message to that device object.
[0108] Optionally, after receiving a control message, the forwarding system 110 can add a custom private header to the control message, and add various metadata to the private header. The data module uses custom rules to identify the metadata in the private header of the control message to determine which network device object the control message is sent to.
[0109] In step S805, the network device object sends the first control message to the designated APP.
[0110] Specifically, after receiving the first control message, the network device can send the first control message to the designated APP through the standard kernel protocol stack to realize the function of receiving control messages.
[0111] Referring to Figure 9, the process of the control system 120 sending messages is as follows:
[0112] In step S901, the network device receives the second control message sent by the APP.
[0113] Specifically, after the application generates the second control message in the kernel, it can call the kernel interface to send the second control message. The kernel interface can find the network device object corresponding to the application based on the routing rules or policies recorded in the protocol stack, and send the second control message to the corresponding network device object.
[0114] In step S902, the network device sends a second control message to the data module.
[0115] In step S903, the data module determines the service panel port in the forwarding system 110 for forwarding the second control message based on the identity of the network device object that received the second control message and the association between the service panel port stored in its own memory.
[0116] In step S904, the data module adds the corresponding service panel port identification to the second control message.
[0117] In step S905, the data module sends a second control message with an identity identifier to the second NIC driver.
[0118] Specifically, when a network device receives a second control message, it can directly send the message to the data module. Upon receiving the second control message, the data module also obtains the identity identifier of the network device that sent it. Subsequently, the data module compares this identity identifier with its stored associations of service panel ports to identify the service panel port corresponding to the network device's identity identifier. Once the correct service panel port is identified, the data module adds a private header to the second control message, saving the service panel port's identity identifier and other relevant information to the header's metadata. The second control message with the identity identifier is then sent to the second NIC driver.
[0119] In step S906, the second NIC driver sends a second control message with an identity identifier.
[0120] Specifically, after receiving the second control message with an identifier, the second NIC driver can pass the control message to the NIC connected to the forwarding system 110. When the NIC receives the second control message, it can send the control message to the forwarding system 110 through the Ethernet channel between the computing chip and the programmable chip, ensuring that the forwarding system 110 can receive the second control message with the identifier. Once the forwarding system 110 receives the second control message with the identifier, it can send the second control message outward through the corresponding service panel port according to the identifier carried in the control message.
[0121] In one embodiment, as shown in Figure 10, a virtual instance can be divided into user mode and kernel mode within a virtual environment. The virtual instance can run the application in user mode. In kernel mode, the virtual instance can create network device objects and data modules, and invoke the second NIC driver.
[0122] Virtual instances can record the network device objects that an application is bound to in the kernel's protocol stack. For example, network device object 1 is bound to application 1, serving as its network interface. Network device object 2 is bound to application 2, serving as its network interface. Virtual instances can record the network device objects bound to an application in the kernel protocol stack, allowing the application to send control messages through the service panel port corresponding to the specified network device object. This enables programmable devices to be compatible with applications based on the kernel protocol stack, thereby expanding the application scenarios of programmable devices.
[0123] When an app sends a control message, it can distribute the message to the corresponding network device object based on the network device object it is bound to, as recorded in the protocol stack. When a network device object reports a control message, it can report the message to the corresponding app based on the app it belongs to, as recorded in the protocol stack. For details on the implementation process, please refer to Figure 6-8 and its related description. Optionally, the protocol stack can find the corresponding network device object for the app, or the corresponding app for the sent control message, based on other routing rules or policies.
[0124] In another embodiment, as shown in Figure 11, the application running on the virtual instance is a bypass kernel application, i.e., a Data Plane Development Kit (DPDK) application. In user space, the virtual instance can create at least one virtual network interface card (vNIC) using the DPDK library to use a poll mode driver (PMD). The virtual instance can create corresponding vNICs based on the network device objects connected to the DPDK application, namely vNIC 1, ..., vNIC N. The virtual instance can create a vNIC corresponding to each network device object in the DPDK library, allowing the application to send control messages through the service panel port corresponding to the specified network device object, thereby enabling the programmable device to support bypass kernel applications and thus improving the application scenarios of the programmable device.
[0125] When a DPDK APP sends control messages, it can use PMD to send the message service to a designated vNIC according to the set polling strategy. After receiving the control message, the designated vNIC can transmit the control message to the network device object corresponding to that vNIC, so that the network device object can continue to send messages. The subsequent process can be referred to Figure 7-9 and its related description.
[0126] Polling strategies can send control messages to the vNIC with the least traffic, or send control messages to the vNIC corresponding to a service panel port based on the service panel port's identity identifier in the control message. For example, taking the strategy of sending control messages to the vNIC with the least traffic as an example, the DPDK APP can use the vNIC PMD to poll the traffic volume of each vNIC and send the current packet traffic to the vNIC with the least traffic.
[0127] In this embodiment, the control system 120 can create multiple virtual instances, and different virtual instances can be rented or sold to different users, so that the programmable device 100 can be used by multiple users, thereby improving the utilization rate of the programmable device 100.
[0128] For example, as shown in Figure 12, the programmable device 100 can create x virtual instances, where x is a positive integer greater than 1. The programmable device 100 can rent out each of the x virtual instances to x users and deploy them in different user environments. Users can directly view the virtual devices within the virtual instances, thus improving user reliability. Since the service panel ports corresponding to the virtual devices created in each virtual instance are different, different users renting virtual instances will not affect each other, further improving user reliability.
[0129] Based on the above description, this application provides a message forwarding device 1300 for a programmable chip. As shown in FIG13, the device 1300 includes:
[0130] The first processing module 1310 is used to obtain first instance configuration information input by the first user, the first instance configuration information being used to indicate the instance specifications of the first virtual instance; the second processing module 1320 is used to create the first virtual instance on the control system based on the first instance configuration information; the third processing module 1330 is used to obtain parameter information of the first service panel port, the multiple service panel ports including the first service panel port, the control system of the programmable device being used to manage the forwarding system of the programmable device, the forwarding system being connected to the multiple service panel ports, the forwarding system transmitting data through the multiple service panel ports, the multiple service panel ports including the service panel port; the fourth processing module 1340 is used to configure the first virtual instance based on the parameter information of the first service panel port to create a corresponding first virtual device, the first virtual device being associated with the first service panel port, wherein the first virtual instance is used to manage the first service panel port through the first virtual device.
[0131] In one implementation, a virtual instance is used to run a first user's application (APP). The first virtual instance includes a network device object, which is associated with a first virtual device. The network device object is used to send a first control message from a first service panel port and / or send a second control message from the APP.
[0132] In one embodiment, the first processing module 1310 is further configured to obtain second instance configuration information input by the second user, the second instance configuration information being used to indicate the instance specifications of the second virtual instance; the second processing module 1320 is further configured to create a second virtual instance on the control system based on the second instance configuration information; the third processing module 1330 is further configured to obtain parameter information of a second service panel port, the plurality of service panel ports including the second service panel port; the fourth processing module 1340 is further configured to create a corresponding second virtual device in the second virtual instance based on the parameter information of the second service panel port, the second virtual device being associated with the second service panel port, wherein the second virtual instance is used to manage the second service panel port through the second virtual device.
[0133] Based on the above description, this application provides a message forwarding device 1400 for a programmable chip. As shown in FIG14, the device 1400 includes:
[0134] The first processing module 1410 is used to obtain parameter information of the service panel port; the control system of the programmable device is used to manage the forwarding system of the programmable device, the forwarding system is connected to multiple service panel ports, the forwarding system transmits data through multiple service panel ports, and the multiple service panel ports include the service panel ports; the second processing module 1420 is used to create a virtual device based on the parameter information of the service panel port, the virtual device is associated with the service panel port, and the multiple service panel ports include the service panel ports; the third processing module 1430 is used to generate a corresponding network device object based on the virtual device, the network device object is used to send a first control message from the service panel port, and / or send a second control message from the APP of the user running the virtual instance.
[0135] In one implementation, the virtual instance records the association relationship of the service panel port. The association relationship of the service panel port includes the identity identifier of the service panel port and the identity identifier of the network device object corresponding to the service panel port. The third processing module 1430 is also used to receive the first control message sent by the forwarding system; determine the first network device object receiving the first control message according to the destination address in the first control message and the association relationship of the service panel port. The network device object includes the first network device object; and send the first control message to the first network device object.
[0136] In one embodiment, the third processing module 1430 is further configured to determine that the second network device object has received a second control message sent by the user's APP, the network device object including the second network device object; determine the target service panel port for sending the second control message based on the association between the identity identifier of the second network device object and the service panel port; add the identity identifier of the target service panel port for sending the second control message to the second control message; send the second control message with the identity identifier of the target service panel port added to it to the forwarding system; the forwarding system is configured to send the second control message to the corresponding target service panel port based on the identity identifier of the target service panel port added to the second control message.
[0137] In one embodiment, the third processing module 1430 is further configured to receive a third control message sent by the forwarding system, wherein the private header of the third control message carries metadata; based on the metadata carried in the private header of the third control message, determine the third network device object receiving the third control message, wherein the network device object includes a third network device object; and send the third control message to the third network device object.
[0138] In one implementation, the third processing module 1430 is also used to record the network device object bound to the user's APP in the protocol stack.
[0139] In one implementation, the third processing module 1430 is further configured to receive a fourth control message sent by the user's APP; drive the PMD in polling mode to send the fourth control message to the virtualized network interface card vNIC; the vNIC is obtained based on the network device object and is used to receive and send control messages between the APP and the network device object.
[0140] Taking the message forwarding device 1400 of the programmable chip as an example, the first processing module 1410, the second processing module 1420, and the third processing module 1430 can all be implemented in software or in hardware. For example, the implementation of the first processing module 1410 will be described below. Similarly, the implementation of the second processing module 1420 and the third processing module 1430 can refer to the implementation of the first processing module 1410.
[0141] As an example of a software functional unit, the first processing module 1410 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the aforementioned computing instance may be one or more. For example, the first processing module 1410 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.
[0142] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0143] As an example of a hardware functional unit, the first processing module 1410 may include at least one computing device, such as a server. Alternatively, the first processing module 1410 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.
[0144] The multiple computing devices included in the first processing module 1410 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the first processing module 1410 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the first processing module 1410 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0145] It should be noted that, in other embodiments, the first processing module 1410 can be used to execute any step in the method shown in FIG. 5, the second processing module 1420 can be used to execute any step in the method shown in FIG. 5, and the third processing module 1430 can be used to execute any step in the method shown in FIG. 5. The steps implemented by the first processing module 1410, the second processing module 1420, and the third processing module 1430 can be specified as needed. The first processing module 1410, the second processing module 1420, and the third processing module 1430 respectively implement different steps in the method shown in FIG. 5 to realize all the functions of the device 1400.
[0146] Figure 15 is a schematic diagram of a computing device provided in an embodiment of this application. As shown in Figure 15, the computing device 1500 includes a bus 1510, a processor 1520, a memory 1530, and a communication interface 1540. The processor 1520, the memory 1530, and the communication interface 1540 communicate with each other via the bus 1510. The computing device 1500 can be a server, computer, laptop, server rack, etc. It should be understood that this application does not limit the number of processors and memories in the computing device 1500.
[0147] Bus 1510 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 15, but this does not imply that there is only one bus or one type of bus. Bus 1510 can include pathways for transmitting information between various components of computing device 1500 (e.g., processor 1520, memory 1530, communication interface 1540).
[0148] The processor 1520 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).
[0149] The memory 1530 may include volatile memory, such as random access memory (RAM). The memory 1530 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0150] The memory 1530 stores executable program code, and the processor 1520 executes this executable program code to implement the functions of the aforementioned multiple modules, such as the first processing module 1410, the second processing module 1420, and the third processing module 1430, thereby realizing the method shown in FIG5. That is, the memory 1530 stores instructions for executing the method shown in FIG5.
[0151] Alternatively, the memory 1530 may store executable code, which the processor 1520 executes to implement the functions of the aforementioned modules, thereby achieving the method shown in FIG5. That is, the memory 1530 stores instructions for executing the method shown in FIG5.
[0152] The communication interface 1540 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 1500 and other devices or communication networks.
[0153] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0154] As shown in Figure 16, the computing device cluster includes at least one computing device 1500. The memory 1530 of one or more computing devices 1500 in the computing device cluster may store the same instructions for executing the method shown in Figure 5.
[0155] In some possible implementations, the memory 1530 of one or more computing devices 1500 in the computing device cluster may also store partial instructions for executing the method shown in FIG. 5. In other words, a combination of one or more computing devices 1500 can jointly execute instructions for executing the method shown in FIG. 5.
[0156] It should be noted that the memories 1530 in different computing devices 1500 within the computing device cluster can store different instructions, which are used to execute parts of the functions of the first processing module 1410, the second processing module 1420, and the third processing module 1430, respectively. That is, the instructions stored in the memories 1530 of different computing devices 1500 can implement the functions of one or more of the first processing module 1410, the second processing module 1420, and the third processing module 1430.
[0157] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 17 illustrates one possible implementation. As shown in Figure 17, two computing devices, computing device 1500A and computing device 1500B, are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this type of possible implementation, the memory 1530 in computing device 1500A stores instructions for performing the functions of some modules in the first processing module 1410, the second processing module 1420, and the third processing module 1430. Simultaneously, the memory 1530 in computing device 1500B stores instructions for performing the functions of another portion of the modules in the first processing module 1410, the second processing module 1420, and the third processing module 1430.
[0158] The connection method between the computing device clusters shown in Figure 17 can be considered in light of the fact that the method provided in this application as shown in Figure 5 requires a large amount of data storage. Therefore, it is considered that the functions implemented by another part of the modules in the first processing module 1410, the second processing module 1420 and the third processing module 1430 are handed over to the computing device 1500B for execution.
[0159] It should be understood that the functions of computing device 1500A shown in Figure 17 can also be performed by multiple computing devices 1500. Similarly, the functions of computing device 1500B can also be performed by multiple computing devices 1500.
[0160] This application also provides another computing device cluster. The connection relationship between the computing devices in this computing device cluster can be similarly referred to the connection method of the computing device clusters shown in Figures 15 and 16. The difference is that the memory 1530 of one or more computing devices 1500 in this computing device cluster can store the same instructions for executing the method shown in Figure 5.
[0161] In some possible implementations, the memory 1530 of one or more computing devices 1500 in the computing device cluster may also store partial instructions for executing the method shown in FIG. 5. In other words, a combination of one or more computing devices 1500 can jointly execute instructions for executing the method shown in FIG. 5.
[0162] It should be noted that the memory 1530 in different computing devices 1500 within the computing device cluster can store different instructions for executing some functions of the computing device 1500. That is, the instructions stored in the memory 1530 of different computing devices 1500 can implement the functions of one or more of the aforementioned first processing module 1410, second processing module 1420, and third processing module 1430.
[0163] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform the method shown in FIG5.
[0164] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform the method shown in FIG. 5.
[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A message forwarding method for a programmable chip, characterized in that, The method is applied to a control platform that runs on infrastructure. Nodes in the infrastructure are equipped with programmable devices, and these nodes are network-connected to other nodes via these programmable devices. The control system of the programmable devices manages their forwarding system, which is connected to multiple service panel ports. The forwarding system transmits data through these multiple service panel ports. The method includes: Obtain the first instance configuration information input by the first user, wherein the first instance configuration information is used to indicate the instance specification of the first virtual instance; Based on the configuration information of the first instance, the first virtual instance is created on the control system; Obtain parameter information of the first service panel port, wherein the plurality of service panel ports include the first service panel port; Based on the parameter information of the first service panel port, the first virtual instance is configured to create a corresponding first virtual device. The first virtual device is associated with the first service panel port, and the first virtual instance is used to manage the first service panel port through the first virtual device.
2. The method according to claim 1, characterized in that, The virtual instance is used to run the first user's application APP. The first virtual instance includes a network device object, which is associated with the first virtual device. The network device object is used to send a first control message from the first service panel port and / or send a second control message from the APP.
3. The method according to claim 1 or 2, characterized in that, The method further includes: Obtain the second instance configuration information input by the second user, which is used to indicate the instance specifications of the second virtual instance; Based on the configuration information of the second instance, the second virtual instance is created on the control system; Obtain parameter information of the second service panel port, wherein the plurality of service panel ports include the second service panel port; Based on the parameter information of the second service panel port, a corresponding second virtual device is created in the second virtual instance. The second virtual device is associated with the second service panel port, and the second virtual instance is used to manage the second service panel port through the second virtual device.
4. A message forwarding method for a programmable chip, characterized in that, The method is applied to a virtual instance running on a control system deployed on a programmable device. The programmable device is located in nodes on an infrastructure network, and these nodes are connected to other nodes via the programmable device. The control system manages the forwarding system of the programmable device, which is connected to multiple service panel ports. The forwarding system transmits data through these multiple service panel ports, including: Obtain parameter information from the business panel port; Based on the parameter information of the service panel port, a virtual device is created. The virtual device is associated with the service panel port, and the plurality of service panel ports include the service panel port. Based on the virtual device, a corresponding network device object is generated. The network device object is used to send a first control message from the service panel port and / or send a second control message from the virtual instance running the user's application APP.
5. The method according to claim 4, characterized in that, The virtual instance records the association relationships of the service panel ports. These association relationships include the identity identifier of the service panel port and the identity identifier of the network device object corresponding to the service panel port. The method further includes: Received the first control message sent by the forwarding system; Based on the association between the destination address in the first control message and the service panel port, the first network device object that receives the first control message is determined, and the network device object includes the first network device object. The first control message is sent to the first network device object.
6. The method according to claim 4 or 5, characterized in that, The network device object includes the second network device object, and the method further includes: It is determined that the second network device object has received the second control message sent by the user's APP; Based on the identity of the second network device object and the association between the service panel port, the target service panel port for sending the second control message is determined; Add the identity identifier of the target service panel port that sent the second control message to the second control message; The second control message, which adds the identity identifier of the target service panel port, is sent to the forwarding system; the forwarding system is used to send the second control message to the corresponding target service panel port based on the identity identifier of the target service panel port added in the second control message.
7. The method according to any one of claims 4-6, characterized in that, The method further includes: The system receives a third control message sent by the forwarding system, the private header of which carries metadata. Based on the metadata, a third network device object that receives the third control message is determined, and the network device object includes the third network device object; The third control message is sent to the third network device object.
8. The method according to any one of claims 4-7, characterized in that, The method further includes: The protocol stack records the network device object bound to the user's APP.
9. The method according to any one of claims 4-8, characterized in that, The method further includes: Received the fourth control message sent by the user's APP; The PMD is driven by polling mode to send the fourth control message to the virtualized network interface card (vNIC); the vNIC is obtained based on the network device object and is used to receive and send control messages between the APP and the network device object.
10. A message forwarding method for a programmable chip, characterized in that, The method is applied to a control system on which a control platform and virtual instances run. The control system is deployed on a programmable device, which is located in nodes on an infrastructure. These nodes are network-connected to other nodes via the programmable device. The control system manages the forwarding system of the programmable device, which is connected to multiple service panel ports. The forwarding system transmits data through these multiple service panel ports. The method includes: The control platform obtains instance configuration information input by the user, and the instance configuration information is used to indicate the instance specifications of the virtual instance; Based on the instance configuration information, the virtual instance is created on the control system; Obtain parameter information of the service panel port, wherein the plurality of service panel ports include the service panel port; Based on the parameter information of the service panel port, a virtual device is created on the virtual instance. The virtual device is associated with the service panel port, and the virtual instance is used to manage the service panel port through the virtual device. Based on the virtual device, a corresponding network device object is generated. The network device object is used to send a first control message from the service panel port and / or send a second control message from the virtual instance running the user's application APP.
11. A message forwarding device for a programmable chip, characterized in that, include: The first processing module is used to obtain the first instance configuration information input by the first user, wherein the first instance configuration information is used to indicate the instance specifications of the first virtual instance; The second processing module is used to create the first virtual instance on the control system based on the configuration information of the first instance. The third processing module is used to obtain parameter information of the first service panel port, the plurality of service panel ports including the first service panel port; the control system of the programmable device is used to manage the forwarding system of the programmable device, the forwarding system is connected to the plurality of service panel ports, the forwarding system transmits data through the plurality of service panel ports, the plurality of service panel ports including the service panel port; The fourth processing module is used to configure the first virtual instance based on the parameter information of the first service panel port to create a corresponding first virtual device. The first virtual device is associated with the first service panel port, wherein the first virtual instance is used to manage the first service panel port through the first virtual device.
12. The apparatus according to claim 11, characterized in that, The virtual instance is used to run the first user's application APP. The first virtual instance includes a network device object, which is associated with the first virtual device. The network device object is used to send a first control message from the first service panel port and / or send a second control message from the APP.
13. The apparatus according to claim 11 or 12, characterized in that, The first processing module is further configured to obtain second instance configuration information input by the second user, wherein the second instance configuration information is used to indicate the instance specifications of the second virtual instance; The second processing module is further configured to create the second virtual instance on the control system based on the second instance configuration information; The third processing module is also used to obtain parameter information of the second service panel port, wherein the plurality of service panel ports include the second service panel port; The fourth processing module is further configured to create a corresponding second virtual device in the second virtual instance based on the parameter information of the second service panel port. The second virtual device is associated with the second service panel port, wherein the second virtual instance is used to manage the second service panel port through the second virtual device.
14. A message forwarding device for a programmable chip, characterized in that, include: The first processing module is used to obtain parameter information from the business panel port; The control system of the programmable device is used to manage the forwarding system of the programmable device. The forwarding system is connected to multiple service panel ports, and the forwarding system transmits data through the multiple service panel ports, which include the service panel ports. The second processing module is used to create a virtual device based on the parameter information of the service panel port. The virtual device is associated with the service panel port, and the plurality of service panel ports include the service panel port. The third processing module is used to generate a corresponding network device object based on the virtual device. The network device object is used to send a first control message from the service panel port and / or send a second control message from the virtual instance running the user's application APP.
15. The apparatus according to claim 14, characterized in that, The virtual instance records the association relationships of the service panel ports. These association relationships include the identity identifier of the service panel port and the identity identifier of the network device object corresponding to the service panel port. The third processing module is further used for... Received the first control message sent by the forwarding system; Based on the association between the destination address in the first control message and the service panel port, the first network device object that receives the first control message is determined, and the network device object includes the first network device object. The first control message is sent to the first network device object.
16. The apparatus according to claim 14 or 15, characterized in that, The third processing module is also used for It is determined that the second network device object receives the second control message sent by the user's APP, and the network device object includes the second network device object; Based on the identity of the second network device object and the association between the service panel port, the target service panel port for sending the second control message is determined; Add the identity identifier of the target service panel port that sent the second control message to the second control message; A second control message containing the identity identifier of the target service panel port is sent to the forwarding system; The forwarding system is used to send the second control message to the corresponding target service panel port based on the identity identifier of the target service panel port added in the second control message.
17. The apparatus according to any one of claims 14-16, characterized in that, The third processing module is also used for The system receives a third control message sent by the forwarding system, the private header of which carries metadata. Based on the metadata, a third network device object that receives the third control message is determined, and the network device object includes the third network device object; The third control message is sent to the third network device object.
18. The apparatus according to any one of claims 14-17, characterized in that, The third processing module is also used for The protocol stack records the network device object bound to the user's APP.
19. The apparatus according to any one of claims 14-18, characterized in that, The third processing module is also used for Received the fourth control message sent by the user's APP; The PMD is driven by polling mode to send the fourth control message to the virtualized network interface card (vNIC). The vNIC is obtained based on the network device object and is used to receive and send control messages between the APP and the network device object.
20. A computing device cluster, characterized in that, include: At least one computing device, each computing device including a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method as described in any one of claims 1-3, or the method as described in any one of claims 4-10.
21. A computer-readable storage medium, characterized in that, Includes computer program instructions, which, when executed by a cluster of computing devices, enable the computing devices to perform the method as described in any one of claims 1-3, or the method as described in any one of claims 4-10.
22. A computer program product containing instructions, characterized in that, The computer program product stores instructions that, when executed by a cluster of computing devices, cause the cluster of computing devices to perform the method according to any one of claims 1-3 or the method according to any one of claims 4-10.