Method, controller and system for automatic configuration of spanning tree protocol based on DPU in K8s cluster

By using a DPU-based automatic configuration method for the Spanning Tree Protocol in a Kubernetes cluster, the issue of OVN-Kubernetes' lack of support for STP and RSTP was resolved, achieving automated configuration of the Spanning Tree Protocol and improving the efficiency and quality of network operations and maintenance.

CN120166028BActive Publication Date: 2026-03-27YUSUR TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

OVN-Kubernetes does not support Spanning Tree Protocol (STP) and RSTP, which requires network administrators to configure them manually, increasing management complexity and error risks, and affecting network operation and maintenance efficiency and quality.

Method used

It provides an automatic configuration method for Spanning Tree Protocol (STP) based on DPU. By monitoring changes in configuration instances in the Kubernetes cluster, it updates the virtual switch database, configures or starts STP and RSTP in real time, and monitors the protocol status through custom resource definition units to achieve automated configuration.

Benefits of technology

It improves the real-time performance and reliability of the Spanning Tree Protocol in Kubernetes clusters, thereby enhancing network operation and maintenance efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120166028B_ABST
    Figure CN120166028B_ABST
Patent Text Reader

Abstract

The application provides a method, controller and system for automatic configuration of a DPU-based spanning tree protocol in a K8s cluster. The method comprises: real-time monitoring of whether a spanning tree protocol configuration instance in the K8s cluster has configuration data changes, and if so, updating a bridge device table of a virtual switch database according to the spanning tree protocol configuration instance, so that the virtual switch in the DPU receives updated spanning tree protocol configuration data and correspondingly configures or starts a corresponding spanning tree protocol STP and / or a rapid spanning tree protocol RSTP; real-time monitoring of whether the virtual switch configures or starts the STP and / or the RSTP, and if so, updating a state of a custom resource definition unit for the spanning tree protocol, so that a user knows the current spanning tree protocol setting state of the virtual switch. The application can realize automatic configuration of the spanning tree protocol in the K8s cluster, and can effectively improve the real-time performance and reliability of the automatic configuration, thereby effectively improving the efficiency and quality of network operation and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to an automatic configuration method, controller and system for DPU-based spanning tree protocol in a Kubernetes cluster. Background Technology

[0002] Kubernetes (K8s) is an open-source container orchestration system cluster. OVN-Kubernetes is a Kubernetes network component based on Open Virtual Network (OVN), primarily focusing on the implementation of virtualized networks and overlay networks, while traditional network device management functions are not its priority. Therefore, to fill this gap, a solution is needed that allows for fine-grained control of network topology to meet performance, security, and manageability requirements. It should also have the ability to customize the spanning tree protocol configuration according to specific network architectures and application needs. Furthermore, it extends the software-defined network (SDN) functionality of existing virtual switches (OVS).

[0003] The existing OVN-Kubernetes was designed to provide high performance and flexibility for Kubernetes networks. Its core functionality focuses on the implementation of virtualized and overlay networks, rather than traditional network device management functions such as Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP). Therefore, its feature set may not include these traditional network protocols.

[0004] However, because OVNs-Kubernetes does not provide direct support for STP and RSTP spanning tree protocols, network administrators must manually configure and manage these legacy network protocols. This manual configuration increases management complexity and the risk of introducing errors, especially in large-scale or dynamically changing network environments.

[0005] Therefore, there is an urgent need to design a method that can automatically configure the spanning tree protocol in a Kubernetes cluster. Summary of the Invention

[0006] In view of this, embodiments of this application provide an automatic configuration method, controller, and system for the DPU-based spanning tree protocol in a Kubernetes cluster, in order to eliminate or improve one or more defects existing in the prior art.

[0007] One aspect of this application provides an automatic configuration method for the DPU-based spanning tree protocol in a Kubernetes cluster, including:

[0008] The system monitors in real time whether the Spanning Tree Protocol (STP) configuration instance in the K8s cluster has changed its configuration data. If so, it updates the bridging device table in the virtual switch database according to the STP configuration instance. This allows the virtual switches in the Data Processor (DPU) to receive the updated configuration data based on the updated bridging device table in the virtual switch database. The system also determines whether the configuration data contains STP configuration data. If so, it configures or starts the corresponding STP and / or RSTP according to the STP configuration data.

[0009] The system monitors in real time whether the virtual switch is configured or started with the corresponding Spanning Tree Protocol (STP) and / or Rapid Spanning Tree Protocol (RSTP). If so, the system updates the status of the custom resource definition unit for the Spanning Tree Protocol so that the user can know the current Spanning Tree Protocol setting status of the virtual switch from the custom resource definition unit.

[0010] In some embodiments of this application, updating the bridging device table of the virtual switch database according to the spanning tree protocol configuration instance includes:

[0011] Parse the resource expected state field of the spanning tree protocol configuration instance and map the parsed resource expected state field to the custom setting options of the bridging device table in the virtual switch database;

[0012] The mapped custom settings options are merged with the original custom settings options in the virtual switch database;

[0013] Update the bridging device table of the virtual switch database based on the database operation structure;

[0014] The status of the custom resource definition unit for the spanning tree protocol is updated accordingly based on the updated bridging device table in the virtual switch database.

[0015] In some embodiments of this application, before the real-time monitoring of whether the spanning tree protocol configuration instance in the Kubernetes cluster has undergone configuration data changes, the method further includes:

[0016] Establish a connection with the virtual switch database and communicate with the virtual switch daemon through the virtual switch database protocol.

[0017] In some embodiments of this application, the custom resource definition unit for the Spanning Tree Protocol is pre-created in the K8s cluster and is used to control the distribution of the Spanning Tree Protocol configuration data of the virtual switch; the Spanning Tree Protocol configuration data includes various configuration parameters corresponding to Spanning Tree Protocol (STP) and / or Rapid Spanning Tree Protocol (RSTP);

[0018] Correspondingly, the Spanning Tree Protocol (STP) configuration instance is pre-created in the K8s cluster and is used to configure various configuration parameters corresponding to the Spanning Tree Protocol (STP) and / or Rapid Spanning Tree Protocol (RSTP) of the virtual switch based on the STP configuration data issued by the custom resource definition unit.

[0019] In some embodiments of this application, the various configuration parameters corresponding to the Spanning Tree Protocol (STP) include: the STP priority parameter, timer parameter, maximum lifespan parameter of Bridge Protocol Data Unit (BPDU) in the network, and transition time parameter of a specified virtual switch port from a blocking state to a forwarding state.

[0020] In some embodiments of this application, the various configuration parameters corresponding to the Rapid Spanning Tree Protocol (RSTP) include: RSTP priority parameters, virtual switch address parameters, virtual switch aging time parameters, version parameters, maximum bridge aging time parameters, bridge forwarding delay time parameters, and the maximum number of Bridge Protocol Data Units (BPDUs) allowed to be sent per second.

[0021] In some embodiments of this application, the corresponding update of the state of the custom resource definition unit for the spanning tree protocol includes:

[0022] Update the runtime status monitoring fields of the custom resource definition unit for the Spanning Tree Protocol, wherein the runtime status monitoring fields include: the unique identifier of the bridging device, root bridge information, designated bridge, designated port, and bridging port information.

[0023] Another aspect of this application provides a controller, comprising:

[0024] The Spanning Tree Protocol (STP) configuration module is used to monitor in real time whether the STP configuration instance in the K8s cluster has changed its configuration data. If so, it updates the bridging device table of the virtual switch database according to the STP configuration instance, so that the virtual switch set in the data processor (DPU) receives the currently updated configuration data based on the updated bridging device table of the virtual switch database. It also determines whether the configuration data contains STP configuration data. If so, it configures or starts the corresponding STP and / or RSTP according to the STP configuration data.

[0025] The virtual switch monitoring module is used to monitor in real time whether the virtual switch is configured or started with the corresponding Spanning Tree Protocol (STP) and / or Rapid Spanning Tree Protocol (RSTP). If so, the status of the custom resource definition unit for the Spanning Tree Protocol is updated accordingly, so that the user can know the current Spanning Tree Protocol setting status of the virtual switch from the custom resource definition unit.

[0026] The third aspect of this application provides an automatic configuration system for the DPU-based spanning tree protocol in a Kubernetes cluster, comprising: controllers, hosts, and data processors (DPUs) configured in the Kubernetes cluster;

[0027] The controller is used to execute the automatic configuration method of the DPU-based spanning tree protocol in the K8s cluster;

[0028] The host computer is equipped with a virtual switch agent; the data processor (DPU) is equipped with a virtual switch, and the controller communicates with the virtual switch via the virtual switch agent.

[0029] In some embodiments of this application, the controller is also communicatively connected to at least one of a distributed search engine, a service monitoring system, and a distributed real-time data tracing system.

[0030] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the described automatic configuration method of the DPU-based spanning tree protocol in a Kubernetes cluster.

[0031] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the described automatic configuration method of the DPU-based spanning tree protocol in a Kubernetes cluster.

[0032] The fifth aspect of this application provides a computer program product including a computer program that, when executed by a processor, implements the described automatic configuration method of the DPU-based spanning tree protocol in a Kubernetes cluster.

[0033] The automatic configuration method of Spanning Tree Protocol (STP) in a Kubernetes cluster based on DPU provided in this application monitors in real time whether the STP configuration instance in the Kubernetes cluster has undergone configuration data changes. If so, the bridging device table in the virtual switch database is updated according to the STP configuration instance. This allows the virtual switches configured in the DPU to receive the updated configuration data based on the updated bridging device table in the virtual switch database. The method also determines whether the configuration data contains STP configuration data. If so, the corresponding STP and / or RSTP are configured or started according to the STP configuration data. Furthermore, the method monitors in real time whether the virtual switches are configured or started. If so, the status of the custom resource definition unit for STP is updated accordingly. This allows users to know the current STP setting status of the virtual switches from the custom resource definition unit. This method enables automated configuration of STP in the Kubernetes cluster and effectively improves the real-time performance and reliability of automated configuration, thereby improving the efficiency and quality of network operation and maintenance.

[0034] Additional advantages, objectives, and features of this application will be set forth in part in the description which follows, and will in part become apparent to those skilled in the art upon review of the following description, or may be learned by practice of the application. The objectives and other advantages of this application can be realized and obtained by means of the structures specifically pointed out in the specification and drawings.

[0035] Those skilled in the art will understand that the purposes and advantages that can be achieved with this application are not limited to those specifically described above, and that the above and other purposes that this application can achieve will be more clearly understood from the following detailed description. Attached Figure Description

[0036] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, do not constitute a limitation thereof. The components in the drawings are not drawn to scale but are merely for illustrating the principles of this application. For ease of illustration and description of certain parts of this application, corresponding portions in the drawings may be enlarged, i.e., may appear larger relative to other components in an exemplary device actually manufactured according to this application. In the drawings:

[0037] Figure 1 This is a schematic diagram of the first process of the automatic configuration method of the DPU-based spanning tree protocol in a K8s cluster according to an embodiment of this application.

[0038] Figure 2 This is a schematic diagram of the second process of the automatic configuration method of the DPU-based spanning tree protocol in a K8s cluster according to an embodiment of this application.

[0039] Figure 3 This is a schematic diagram of the controller structure in one embodiment of this application.

[0040] Figure 4 This is a schematic diagram of the first architecture of an automatic configuration system for a DPU-based spanning tree protocol in a K8s cluster, according to an embodiment of this application.

[0041] Figure 5 This is a schematic diagram of a second architecture of the DPU-based spanning tree protocol auto-configuration system in a K8s cluster, according to one embodiment of this application.

[0042] Figure 6 This is a schematic diagram illustrating the execution interaction of the automatic configuration method of the DPU-based spanning tree protocol in a K8s cluster in an application example of this application. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and their descriptions are used to explain this application, but are not intended to limit it.

[0044] It should also be noted that, in order to avoid obscuring this application with unnecessary details, only the structures and / or processing steps closely related to the solution according to this application are shown in the accompanying drawings, while other details that are not closely related to this application are omitted.

[0045] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.

[0046] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.

[0047] In the following description, embodiments of the present application will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.

[0048] Existing solutions rely solely on manual management and configuration to manage STP and RSTP protocols on network devices. Modern cloud-native and automated network architectures emphasize automatic configuration and self-healing capabilities, principles that manual STP and RSTP management contradicts. The lack of automation can lead to slow network deployment and fault recovery, impacting business flexibility and reliability. As network topology changes and requirements evolve, manually configured STP and RSTP parameters require continuous maintenance and updates. This not only increases operational burden but also increases the risk of inconsistencies or errors in configuration, affecting overall network stability and performance. Existing manual management methods typically lack integration with a comprehensive monitoring and management platform. The absence of real-time monitoring and automatic alerting mechanisms can delay response times to network issues, impacting troubleshooting and performance optimization efficiency.

[0049] In summary, OVN-Kubernetes faces significant challenges in manual management and configuration due to its lack of support for STP and RSTP. This not only affects the efficiency and quality of network operations and maintenance but also limits its application scenarios and applicability in traditional network management.

[0050] To address the aforementioned issues, this application provides an automatic configuration method for the DPU-based spanning tree protocol in a Kubernetes cluster, a controller, system, electronic device, computer-readable storage medium, and computer program product for executing the automatic configuration method for the DPU-based spanning tree protocol in a Kubernetes cluster, which will be described in detail in the following embodiments.

[0051] Based on this, embodiments of this application provide an automatic configuration method for a DPU-based spanning tree protocol in a Kubernetes cluster, which can be implemented by a controller. See [link to relevant documentation]. Figure 1 The automatic configuration method of the DPU-based spanning tree protocol in a Kubernetes cluster specifically includes the following:

[0052] Step 100: Monitor in real time whether the Spanning Tree Protocol (STP) configuration instance in the K8s cluster has undergone configuration data changes. If so, update the bridging device table in the virtual switch database according to the STP configuration instance, so that the virtual switches set in the DPU can receive the currently updated configuration data based on the updated bridging device table in the virtual switch database. Determine whether the configuration data contains STP configuration data. If so, configure or start the corresponding STP and / or RSTP according to the STP configuration data.

[0053] Step 200: Monitor in real time whether the virtual switch is configured or started with the corresponding Spanning Tree Protocol (STP) and / or Rapid Spanning Tree Protocol (RSTP). If so, update the status of the custom resource definition unit for the Spanning Tree Protocol so that the user can know the current Spanning Tree Protocol setting status of the virtual switch from the custom resource definition unit.

[0054] It is understood that the Spanning Tree Protocol (STP) configuration instance is pre-created in the Kubernetes cluster and is used to configure various configuration parameters corresponding to the STP and / or RSTP of the virtual switch based on the STP configuration data issued by the custom resource definition unit. The custom resource definition unit for STP can be abbreviated as OvsStp CRD.

[0055] In one or more embodiments of this application, the Spanning Tree Protocol (STP) configuration instance can be abbreviated as OvsStp instance or OvsStp CRD instance; the virtual switch database can refer to the Open vSwitch database, which can be abbreviated as OVSDB; the bridging device table can be abbreviated as bridge table. The controller can be written as OvsStp controller.

[0056] As is understandable, a Data Processing Unit (DPU) is also called a data processing unit. A DPU is a processor specifically designed for network and storage acceleration, typically used in high-performance computing (HPC) and data centers. It reduces the load on the CPU, providing higher network throughput and lower latency.

[0057] Open vSwitch (OVS) is a virtual switching software primarily used in virtual machine (VM) environments. As a virtual switch, it supports various virtualization technologies. In this virtualized environment of a single machine, a virtual switch has two main functions: facilitating traffic between VMs and enabling communication between VMs and the external network. It provides some important functions and drivers for VPP.

[0058] As described above, the automatic configuration method of DPU-based Spanning Tree Protocol in a Kubernetes cluster provided in this application embodiment develops an OvsStp controller responsible for monitoring and processing changes to the OvsStp CRD. This controller can map the configuration in the CRD to the custom setting options (other_config option) of the bridging device table of the virtual switch OVS via the OVSDB protocol. The controller synchronizes the state changes of STP and RSTP by monitoring the bridging device table of the virtual switch OVS, ensuring the real-time performance and correctness of the configuration.

[0059] To further improve the reliability and effectiveness of updating the bridging device table in the virtual switch database based on the Spanning Tree Protocol (STP) configuration instance, this application provides an automatic configuration method for STP in a Kubernetes cluster based on a DPU (Data Processing Unit). See [link to relevant documentation]. Figure 2 Step 100 of the automatic configuration method of the DPU-based spanning tree protocol in a Kubernetes cluster specifically includes the following:

[0060] Step 110: Monitor in real time whether the Spanning Tree Protocol (STP) configuration instance in the K8s cluster has undergone configuration data changes. If so, parse the resource expected state field of the STP configuration instance and map the parsed resource expected state field to the custom setting options of the bridging device table in the virtual switch database.

[0061] Step 120: Merge the mapped custom settings options with the original custom settings options in the virtual switch database.

[0062] Step 130: Update the bridging device table of the virtual switch database based on the database operation structure.

[0063] Step 140: Update the status of the custom resource definition unit for Spanning Tree Protocol (STP) according to the updated bridging device table of the virtual switch database, so that the virtual switch set in the DPU receives the currently updated configuration data based on the updated bridging device table of the virtual switch database, and determines whether the configuration data contains STP configuration data. If so, configure or start the corresponding Spanning Tree Protocol (STP) and / or Rapid Spanning Tree Protocol (RSTP) according to the STP configuration data.

[0064] Understandably, the resource expected status field can be abbreviated to the spec field; custom setting options can be abbreviated to otherconfig options or other_config options.

[0065] To further improve the efficiency and reliability of automatic configuration of the DPU-based Spanning Tree Protocol in a Kubernetes cluster, this application provides an embodiment of an automatic configuration method for the DPU-based Spanning Tree Protocol in a Kubernetes cluster, see [link to relevant documentation]. Figure 2 The automatic configuration method of the DPU-based spanning tree protocol in a Kubernetes cluster, prior to step 100, specifically includes the following:

[0066] Step 010: Establish a connection with the virtual switch database and communicate with the virtual switch daemon through the virtual switch database protocol.

[0067] Specifically, the libovsdb library is used to establish a connection with the OVS database (OVSDB) and secure TLS communication with the OVS daemon is conducted via the OVSDB protocol. The libovsdb library is an OVSDB client library designed specifically for handling OVSDB interactions, providing powerful features and a flexible API that makes managing and operating network infrastructure more efficient and convenient.

[0068] To further improve the reliability and effectiveness of custom resource definition units and Spanning Tree Protocol (STP) configuration instances, this application provides an automatic configuration method for STP in a Kubernetes cluster based on a DPU. In this method, the custom resource definition unit for STP is pre-created in the Kubernetes cluster and used to control the distribution of STP configuration data from the virtual switch. The STP configuration data includes various configuration parameters corresponding to STP and / or RSTP.

[0069] Correspondingly, the Spanning Tree Protocol (STP) configuration instance is pre-created in the K8s cluster and is used to configure various configuration parameters corresponding to the Spanning Tree Protocol (STP) and / or Rapid Spanning Tree Protocol (RSTP) of the virtual switch based on the STP configuration data issued by the custom resource definition unit.

[0070] Specifically, the administrator first creates a custom resource definition (CRD) in the Kubernetes cluster to control the configuration distribution of Open vSwitch (OVS)'s Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP). The CRD defines a custom resource type named OVSSTPConfig, which contains several configuration parameters. These parameters allow users to fine-tune the behavior of STP and RSTP.

[0071] You can then create an OvsStp instance to configure the STP and RSTP parameters of OVS. For example, you can enable RSTP by configuring rstpEnable to true and set various RSTP parameters, such as priority, path cost, and port edge attributes. The rstpEnable command is used to enable RSTP functionality on the device.

[0072] In one embodiment of this application, the various configuration parameters corresponding to the Spanning Tree Protocol (STP) include: the STP priority parameter stpPriority, the timer parameter stpHelloTime, the maximum survival time parameter stpMaxAge for Bridge Protocol Data Units (BPDUs) in the network, and the transition time parameter stpForwardDelay for a specified virtual switch port between a blocking state and a forwarding state.

[0073] In one embodiment of this application, the various configuration parameters corresponding to the Rapid Spanning Tree Protocol (RSTP) include: the RSTP priority parameter RstpPriority, the virtual switch address parameter rstpAddress, the virtual switch aging time parameter rstpAgeingTime, the version parameter rstpForceProtocolVersion, the bridge maximum aging time parameter rstpMaxAge, the bridge forwarding delay time parameter rstpForwardDelay, and the maximum number of Bridge Protocol Data Units (BPDUs) allowed to be sent per second parameter rstpTransmitHoldCount.

[0074] To further improve the efficiency and reliability of automatic configuration of the DPU-based Spanning Tree Protocol in a Kubernetes cluster, this application provides an embodiment of an automatic configuration method for the DPU-based Spanning Tree Protocol in a Kubernetes cluster, see [link to relevant documentation]. Figure 2 Step 200 of the automatic configuration method of the DPU-based spanning tree protocol in a Kubernetes cluster specifically includes the following:

[0075] Step 210: Monitor in real time whether the virtual switch is configured or started with the corresponding Spanning Tree Protocol (STP) and / or Rapid Spanning Tree Protocol (RSTP). If so, update the running status monitoring field of the custom resource definition unit for Spanning Tree Protocol so that the user can know the current Spanning Tree Protocol setting status of the virtual switch from the custom resource definition unit.

[0076] The running status monitoring field is the status field, which includes: the unique identifier of the bridging device rstp_bridge_id, the root bridge information rstp_root_id and rstp_root_path_cost, the designated bridge rstp_designated_id, the designated port rstp_designated_port_id, and the bridging port information rstp_bridge_port_id.

[0077] From a software perspective, this application also provides a controller for executing all or part of the automatic configuration method of the DPU-based spanning tree protocol in a Kubernetes cluster, see [link to relevant documentation]. Figure 3 The controller specifically includes the following components:

[0078] The Spanning Tree Protocol (STP) configuration module 10 is used to monitor in real time whether the STP configuration instance in the K8s cluster has undergone configuration data changes. If so, it updates the bridging device table of the virtual switch database according to the STP configuration instance, so that the virtual switches set in the DPU can receive the currently updated configuration data based on the updated bridging device table of the virtual switch database. It also determines whether the configuration data contains STP configuration data. If so, it configures or starts the corresponding STP and / or RSTP according to the STP configuration data.

[0079] The virtual switch monitoring module 20 is used to monitor in real time whether the virtual switch is configured or started with the corresponding Spanning Tree Protocol (STP) and / or Rapid Spanning Tree Protocol (RSTP). If so, the status of the custom resource definition unit for the Spanning Tree Protocol is updated accordingly, so that the user can know the current Spanning Tree Protocol setting status of the virtual switch from the custom resource definition unit.

[0080] The controller provided in this application can be used to execute the processing flow of the automatic configuration method of the DPU-based spanning tree protocol in the K8s cluster described in the above embodiments. Its functions will not be repeated here, but can be found in the detailed description of the above embodiments of the automatic configuration method of the DPU-based spanning tree protocol in the K8s cluster.

[0081] The automatic configuration of the DPU-based spanning tree protocol in the Kubernetes cluster by the controller can be performed on either the server or the client device. The choice depends on the processing power of the client device and the limitations of the user scenario. This application does not impose any limitations on this. If all operations are performed on the client device, the client device may further include a processor for the specific processing of the automatic configuration of the DPU-based spanning tree protocol in the Kubernetes cluster.

[0082] The aforementioned client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission. The server may include a server on the task scheduling center side; in other implementation scenarios, it may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, a server cluster consisting of multiple servers, or a distributed server structure.

[0083] The server and the client device can communicate using any suitable network protocol, including those not yet developed as of the date of this application. Such network protocols may include, for example, TCP / IP, UDP / IP, HTTP, HTTPS, etc. Furthermore, such network protocols may also include RPC (Remote Procedure Call Protocol) and REST (Representational State Transfer Protocol) protocols used on top of the aforementioned protocols.

[0084] As can be seen from the above description, the controller provided in this application embodiment can realize the automated configuration of the spanning tree protocol in the K8s cluster, and can effectively improve the real-time performance and reliability of the automated configuration, thereby effectively improving the efficiency and quality of network operation and maintenance.

[0085] This application also provides an automatic configuration system for the DPU-based spanning tree protocol in a Kubernetes cluster, which includes a controller for executing all or part of the aforementioned automatic configuration method for the DPU-based spanning tree protocol in a Kubernetes cluster. See [link to relevant documentation]. Figure 4 The automatic configuration system of the DPU-based spanning tree protocol in the Kubernetes cluster specifically includes the following:

[0086] Controllers, hosts, and data processing units (DPUs) are configured in a Kubernetes cluster.

[0087] The controller is used to execute the automatic configuration method of the DPU-based spanning tree protocol in the K8s cluster provided in the foregoing embodiments.

[0088] The host computer is equipped with a virtual switch agent; the data processor (DPU) is equipped with a virtual switch, and the controller communicates with the virtual switch via the virtual switch agent.

[0089] See Figure 5In the DPU-based spanning tree protocol auto-configuration system in a Kubernetes cluster, the controller also has communication connections with at least one of the distributed search engine, the service monitoring system, and the distributed real-time data tracing system.

[0090] To further illustrate the above embodiments, this application also provides a specific application example of an automatic configuration method for the DPU-based Spanning Tree Protocol (STP) in a Kubernetes cluster, implemented using an automatic configuration system based on the DPU. This application example effectively addresses the shortcomings of OVn-Kubernetes in not supporting STP and RSTP management by introducing a Custom Resource Definition (CRD), developing an OvsStp controller, and utilizing the mechanisms of OVSDB and Open vSwitch. A CRD named OVSSTPConfig is created to control the configuration of OVS's STP and RSTP. These configurations include STP and RSTP priorities, various time parameters such as hello-time, max-age, forward-delay, and other related configuration options. Users can specifically configure OVS's STP and RSTP parameters by creating OvsStp instances. For example, RSTP can be enabled, and various parameters can be set to meet network topology and performance requirements.

[0091] Understandably, a Pod is the smallest deployment unit in a Kubernetes cluster; it's a wrapper around a container and provides some shared resources and context. VPP stands for Vector Packet Processor from FD.io, a fast, scalable Layer 2-4 multi-platform network stack. It can run in Linux user space on various architectures, including x86, ARM, and Power architectures. The Data Plane Development Kit (DPDK) is an open-source software project managed by the Linux Foundation. It provides a set of data plane libraries and polling-mode drivers for network interface controllers, used to offload TCP packet processing from the operating system kernel to processes running in user space. This offloading achieves higher computational efficiency and higher packet throughput than using interrupt-driven processing provided in the kernel. BPDU (Bridge Protocol Data Unit) is a control message used in the Spanning Tree Protocol (STP) and its improved versions (such as Rapid Spanning Tree Protocol, RSTP) to exchange spanning tree information and maintain network topology. BPDU helps switches in the network elect a root bridge. The root bridge is the reference point for all paths in the network. Switches periodically send BPDUs (Block Buffer Duties) to understand the network topology. This allows for rapid adjustments when the topology changes, preventing loops. BPDUs are the foundation of the Spanning Tree Protocol (STP). By exchanging BPDUs, STP can identify and block loops in the network, ensuring that network data does not enter infinite loops. BPDUs contain information about the switches and path costs, which STP uses to calculate and select the optimal path.

[0092] See Figure 6 The specific application example of the DPU-based spanning tree protocol auto-configuration method in a Kubernetes cluster includes the following:

[0093] Step 1: Create a CRD for OVS STP configuration.

[0094] First, a custom resource definition (CRD) is created in the Kubernetes cluster to control the configuration distribution of Open vSwitch (OVS)'s Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP). The CRD defines a custom resource type named OVSSTPConfig, which contains several configuration parameters, such as stpPriority, stpHelloTime, stpMaxAge, stpForwardDelay, and RstpPriority and rstpAgeingTime. These parameters allow users to fine-tune the behavior of STP and RSTP.

[0095] Step 2: Create an OvsStp instance and configure stp and rstp.

[0096] An OvsStp instance can be created to configure OVS's STP and RSTP parameters. For example, RSTP can be enabled by setting rstpEnable to true, and various RSTP parameters, such as priority, path cost, and port edge attributes, can be set. It is understood that abbreviations used in this application are case-insensitive; for example, stp and STP have the same meaning, both referring to the Spanning Tree Protocol.

[0097] Specifically, the STP configuration process is as follows:

[0098] 1) Enable STP;

[0099] 2) Configure the `stpPriority` parameter for the Spanning Tree Protocol (STP) to determine which switch or bridge in the network becomes the root bridge. In STP, the root bridge is the most important node in the network topology; all paths are built around it. The range is 0 to 65,535 because it occupies a 16-bit field. A 16-bit field can represent values ​​from 0 to 2^16-1, or 0 to 65,535. This range design provides sufficient precision and flexibility to ensure network administrators can finely control and manage the behavior of STP.

[0100] 3) Configure stpHelloTime, a timer parameter in the Spanning Tree Protocol (STP) that determines the time interval at which the root bridge sends "Hello" BPDUs (Bridge Protocol Data Units). The value of this parameter ranges from 1 to 10 seconds. Sending period: stp-hello-time specifies the time interval at which the root bridge sends "Hello" BPDUs. BPDUs are control messages used by the STP to exchange information and maintain network topology. By periodically sending BPDUs, the STP can detect changes in network topology in a timely manner, such as link failures or the addition of new devices.

[0101] 4) Network Convergence: Shorter hello-time intervals can speed up the detection of network topology changes, thereby accelerating network convergence. However, setting it too short may increase network load and unnecessary BPDU traffic.

[0102] 5) Configure stpMaxAge: This specifies the maximum time a BPDU (Bridge Protocol Data Unit) can remain alive in the network. It determines the time a switch needs to consider a path invalid after it stops receiving BPDUs on that path. The default value is typically 20 seconds. Values ​​within this range allow network administrators to adjust the BPDU lifetime based on specific network needs and topology to optimize network performance and stability. In large networks, a longer stp-max-age ensures that BPDUs have sufficient time to propagate to all parts of the network. In networks with frequent topology changes, a shorter stp-max-age allows the Spanning Tree Protocol to detect and respond to path changes more quickly, improving network convergence speed.

[0103] 6) Configure stpForwardDelay: This specifies the transition time for a switch port from the Blocking state to the Forwarding state. This transition time includes two phases: Learning and Listening. When the network topology changes, the Spanning Tree Protocol (STP) needs time to recalculate and stabilize the topology. stp-forward-delay ensures that the port goes through the learning and listening phases before transitioning from the Blocking state to the Forwarding state, avoiding temporary loops. During topology changes, it ensures that the port learns the correct MAC address entries before forwarding packets, thus enabling efficient packet forwarding. Parameter range: 4 to 30 seconds, with a default value typically of 15 seconds. In environments with frequent network topology changes, stp-forward-delay ensures sufficient time for the network to stabilize before the port begins forwarding traffic, preventing packet loss and loops. In large networks, properly adjusting stp-forward-delay can help the Spanning Tree Protocol better manage topology changes and improve network reliability.

[0104] Specifically, the rstp configuration process is as follows:

[0105] 1) Configure rstpEnable to true to enable RSTP functionality;

[0106] 2) Configure RstpPriority to set the root bridge's priority. A lower value increases the likelihood of it becoming the root bridge. The maximum value is 0xFFFF, and the default value is 0x8000. Network administrators can optimize network performance and path selection by setting lower priority values ​​to ensure certain devices become root bridges in the Spanning Tree Protocol (STP). For example, suppose there are three OVS virtual switches A, B, and C in the network, all with a default priority of 32,768. If the administrator wants switch A to become the root bridge, they can set its priority to 16,384, while retaining the default priorities of the other two switches. Switch A will then have priority as the root bridge. This way, network administrators can ensure optimized network topology and reliability.

[0107] 3) Configure rstpAddress, used to configure the switch address parameter in the Rapid Spanning Tree Protocol (RSTP). The rstpAddress parameter represents the switch address configured in the RSTP network. This address is usually the switch's MAC address, used to uniquely identify the switch in the network. In the RSTP protocol, switches send and receive BPDU (Bridge Protocol Data Unit) messages, which contain the switch's address and are used for path selection and network convergence in the protocol.

[0108] 4) Configuring `rstpAgeingTime` is a parameter in the Rapid Spanning Tree Protocol (RSTP) that configures the aging time of a switch. It determines how long an entry in the MAC address table is retained when there is no communication. The `rstpAgeingTime` parameter defines how long the switch retains an entry in the MAC address table. Within this time period, if no traffic is detected for that entry, it will be deleted. By controlling the aging time of the MAC address table, switches can manage network topology more effectively and prevent stale entries from occupying table entries. The value range is 10 to 1,000,000 seconds. Default value: The default aging time for most switches is 300 seconds.

[0109] 5) `rstpForceProtocolVersion` is a parameter used to configure the version of the Fast Spanning Tree Protocol (STP). It allows you to force the switch to use a specific STP version. By setting the `rstp-force-protocol-version` parameter, you can force the switch to use a specified STP version. In some network environments, it may be necessary to maintain compatibility with older devices or specific configurations, so this parameter can be used to specify the use of an older STP version. The acceptable integer values ​​for this parameter are generally 0 or 2: 0 represents Standard Spanning Tree Protocol (STP); 2 represents Fast Spanning Tree Protocol (RSTP).

[0110] 6) `rstpMaxAge` is a configuration option used to set the maximum aging time for bridges in RSTP (Rapid Spanning Tree Protocol). This parameter determines the maximum time the bridge retains BPDU (Bridge Protocol Data Unit) information in the spanning tree protocol. If no new BPDU is received within this time, the bridge will consider the path invalid and recalculate the spanning tree. By setting `rstp-max-age`, you can determine how long the bridge retains BPDU information before re-evaluating the path. This time setting helps avoid loops in the network and ensures that the spanning tree can be recalculated promptly after a path fails. Acceptable integer values ​​for this parameter are between 6 and 40, in seconds. Minimum value 6: indicates a minimum aging time of 6 seconds for BPDU information. Maximum value 40: indicates a maximum aging time of 40 seconds for BPDU information.

[0111] 7) Configuring `rstpForwardDelay` is a configuration option used to set the forwarding delay time for bridges in RSTP (Rapid Spanning Tree Protocol). This parameter determines the learning and listening time a port needs to go through before transitioning from a blocking state to a forwarding state. This mechanism effectively avoids temporary loops and broadcast storms. When the network topology changes, the port does not immediately transition to the forwarding state but undergoes a learning and listening phase, thus preventing temporary loops. During the learning phase, the bridge learns the mapping relationship between MAC addresses and ports in the network, ensuring correct forwarding of data frames during the forwarding phase. This parameter accepts integer values ​​between 4 and 30, in seconds.

[0112] 8) Configuring `rstpTransmitHoldCount` is a configuration option used to set the maximum number of BPDUs (Spanning Tree Protocol Data Units) allowed to be sent per second in RSTP (Rapid Spanning Tree Protocol). This parameter determines how many BPDUs can be sent within a time interval, thus controlling the transmission frequency of BPDUs in the network. By limiting the number of BPDUs sent per second, unnecessary network load can be prevented due to excessive BPDUs. An appropriate BPDU transmission frequency ensures the effective operation of the Spanning Tree Protocol without affecting the overall network performance. Acceptable integer values ​​for this parameter are between 1 and 10.

[0113] Step 3: Develop the OvsStp controller.

[0114] Develop an OvsStp controller to listen for and handle changes to the CRD objects defined above. This controller needs to:

[0115] A connection is established with the OVS database (OVSDB) through the libovsdb library, and secure TLS communication is conducted with the OVS daemon through the OVSDB protocol.

[0116] Listen for creation, update, and deletion events of OvsStp CRDs and map the CRD's spec field to the other_config option of the OVSDB bridge table.

[0117] Retrieve the original other_config, merge it with the new configuration in the CRD, and then perform operations (add, delete, modify, and query) on the OVSDB bridge table through the ovsdb.Operation structure.

[0118] Specifically, the OVS STP controller listens for and processes changes to the CRD objects defined above. It establishes a connection with the Open vSwitch database (OVSDB) through the libovsdb library and conducts secure TLS communication with the Open vSwitch daemon via the OVSDB protocol. After establishing a connection with the OVSDB server, in order to manage and configure the STP functions and parameters of OVS, the controller maps the spec field of the CRD to the otherconfig option of the OVS DB bridge, obtains the original otherconfig, merges the two, and then performs operations (add, delete, modify, query) on the OVSDB bridge through the ovsdb.Operation structure to access the bridge's STP otherconfig, thereby disseminating the changes to the CRD as the OVS configuration.

[0119] Step 4: OVS internally processes configuration updates.

[0120] Upon receiving a configuration update, Open vSwitch enables the corresponding STP or RSTP functionality based on the parameters specified in the configuration (such as stpEnable=true or rstpEnable=true). Ports on each bridge in OVS are managed according to the STP or RSTP protocol status. Each port has a status (such as Disabled, Blocking, Listening, Learning, Forwarding, etc.), which are dynamically adjusted by the protocol based on the network topology and configuration.

[0121] Specifically, upon receiving a configuration update, Open vSwitch enables the corresponding STP or RSTP functionality based on the parameters specified in the configuration (such as stp_enable=true or rstp_enable=true). This allows it to participate in the Spanning Tree Protocol or Rapid Spanning Tree Protocol operations within the network. Each port on the Open vSwitch bridge is managed according to the STP or RSTP protocol status. Each port has a status (such as Disabled, Blocking, Listening, Learning, Forwarding, etc.), which are dynamically adjusted by the protocol based on the network topology and configuration.

[0122] Step 5: Controller synchronization status.

[0123] The OvsStp controller also needs to monitor the OVS bridge table. If it detects a change in the STP status of the bridge, it updates the status field of the corresponding OvsStp CRD so that users can understand the current STP status of OVS through the CRD.

[0124] Specifically, the OVS STP controller listens to the OVS bridge table. If it receives a change in the STP status configuration of the bridge, it sets the status of the corresponding OVSStp CRD.

[0125] Step 6: User adjusts configuration.

[0126] Users can view the status field of the OvsStp CRD to check if it meets expectations based on the status and network diagnostic results. If not, the spec configuration of the OvsStp CRD can be adjusted. By adjusting configuration parameters (such as hello-time, max-age, forward-delay, etc.), Open vSwitch can dynamically adjust the network topology to optimize performance and reliability.

[0127] Specifically, users can check the status of ovsstpcrd and see if it meets expectations based on the status and network diagnostics. If not, they can adjust the spec configuration of ovs stp crd (for example, according to the configuration parameters of STP and RSTP, such as hello-time, max-age, forward-delay, etc., and adjust the state transition time of the port in Open vSwitch to achieve the purpose of quickly converging the network topology).

[0128] The status field is primarily used for monitoring and diagnosing the operational status of RSTP in the network, for example:

[0129] (1) Unique identifier of bridging device: Each bridging device can be uniquely identified by rstp_bridge_id, which facilitates management and maintenance.

[0130] (2) Root bridge information: The root bridge of the current network topology and the path cost to the root bridge can be known through rstp_root_id and rstp_root_path_cost, so as to understand the quality of the network path.

[0131] (3) Specifying bridges and ports: The specified bridges and ports for each network segment can be found through rstp_designated_id and rstp_designated_port_id, which helps to maintain the topology of the spanning tree.

[0132] (4) Bridge port information: The rstp_bridge_port_id can be used to find out which port on the bridging device participates in the spanning tree protocol, which is convenient for configuration and management.

[0133] In summary, the automatic configuration method of the DPU-based spanning tree protocol in a Kubernetes cluster provided in this application example has the following beneficial effects:

[0134] 1) Flexibility and scalability

[0135] Custom Resource Definitions (CRDs): By defining CRDs, you can flexibly extend and customize the STP and RSTP configurations of OVS without modifying the OVS source code.

[0136] Scalability of configuration parameters: The configuration parameters in CRD can be flexibly adjusted according to requirements to meet the needs of different network environments.

[0137] 2) Automation and Simplified Management

[0138] Automated configuration distribution: The OvsStp controller automatically distributes the configuration in the CRD to OVS, reducing the complexity and error risk of manual configuration.

[0139] Centralized Management: In a Kubernetes environment, STP and RSTP configurations for multiple OVS instances are managed through a unified CRD, improving management efficiency.

[0140] 3) Real-time monitoring and dynamic adjustment

[0141] Status synchronization: The controller can synchronize the STP status of OVS to the status field of CRD in real time, making it convenient for administrators to understand the current network topology status.

[0142] Dynamic adjustment: Administrators can dynamically adjust the configuration parameters in the CRD based on real-time monitoring and network diagnostic results, quickly respond to network changes, and improve network reliability and stability.

[0143] 4) Improve network reliability

[0144] Preventing network loops: By finely configuring STP and RSTP parameters, such as hello-time, max-age, and forward-delay, the stability and rapid convergence of the network topology can be ensured, thus preventing network loops.

[0145] Optimize path selection: Configuring parameters such as rstpPriority can optimize network path selection and ensure efficient data transmission.

[0146] 5) Safety

[0147] Secure communication: TLS secure communication with OVSDB is achieved through the libovsdb library, ensuring the security and integrity of configuration data during transmission.

[0148] 6) Compatibility and Standardization

[0149] Compatible with existing protocols: The solution is compatible with STP and RSTP protocol standards and is suitable for existing network devices and configurations.

[0150] Standardized Management: The standardized management of Kubernetes CRDs and controllers improves the standardization of network configuration and management.

[0151] 8) Easy to integrate and deploy

[0152] Native Kubernetes support: The solution leverages native Kubernetes features, making it easy to integrate into existing Kubernetes clusters, facilitating deployment and maintenance.

[0153] Simplified operation: Administrators can use familiar Kubernetes tools and interfaces to manage OVS STP and RSTP configurations, reducing learning and operational costs.

[0154] This application also provides an electronic device, which may include a processor, a memory, a receiver, and a transmitter. The processor is used to execute the automatic configuration method of the DPU-based spanning tree protocol in a Kubernetes cluster mentioned in the above embodiments. The processor and memory can be connected via a bus or other means, taking a bus connection as an example. The receiver can be connected to the processor and memory via wired or wireless means.

[0155] The processor can be a central processing unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.

[0156] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the DPU-based automatic configuration method for the spanning tree protocol in a Kubernetes cluster in the embodiments of this application. The processor executes various functional applications and data processing by running the non-transitory software programs, instructions, and modules stored in the memory, thereby implementing the DPU-based automatic configuration method for the spanning tree protocol in a Kubernetes cluster as described in the above method embodiments.

[0157] The memory may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor, etc. Furthermore, the memory may include high-speed random access memory and non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0158] The one or more modules are stored in the memory, and when executed by the processor, the automatic configuration method of the DPU-based spanning tree protocol in the K8s cluster is executed in the embodiment.

[0159] In some embodiments of this application, the user equipment may include a processor, a memory, and a transceiver unit. The transceiver unit may include a receiver and a transmitter. The processor, memory, receiver, and transmitter may be connected via a bus system. The memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to control the transceiver unit to send and receive signals.

[0160] As one implementation method, the functions of the receiver and transmitter in this application can be implemented by transceiver circuits or dedicated transceiver chips, and the processor can be implemented by dedicated processing chips, processing circuits or general-purpose chips.

[0161] As another implementation approach, the server provided in this application embodiment can be implemented using a general-purpose computer. That is, the program code implementing the processor, receiver, and transmitter functions is stored in memory, and the general-purpose processor implements the processor, receiver, and transmitter functions by executing the code in memory.

[0162] This application also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the steps of the aforementioned DPU-based automatic configuration method for the spanning tree protocol in a Kubernetes cluster. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.

[0163] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the aforementioned automatic configuration method of the DPU-based spanning tree protocol in a K8s cluster.

[0164] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave.

[0165] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0166] In this application, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.

[0167] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to the embodiments of this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. An automatic configuration method for the spanning tree protocol based on the data processor (DPU) in a Kubernetes cluster, characterized in that, include: The system monitors in real time whether the Spanning Tree Protocol (STP) configuration instance in the K8s cluster has changed its configuration data. If so, it updates the bridging device table in the virtual switch database according to the STP configuration instance. This allows the virtual switches in the Data Processor (DPU) to receive the updated configuration data based on the updated bridging device table in the virtual switch database. The system also determines whether the configuration data contains STP configuration data. If so, it configures or starts the corresponding STP and / or RSTP according to the STP configuration data. The system monitors in real time whether the virtual switch is configured or started with the corresponding Spanning Tree Protocol (STP) and / or Rapid Spanning Tree Protocol (RSTP). If so, the system updates the status of the custom resource definition unit for the Spanning Tree Protocol so that the user can know the current Spanning Tree Protocol setting status of the virtual switch from the custom resource definition unit.

2. The automatic configuration method of the spanning tree protocol based on the data processor DPU in a Kubernetes cluster according to claim 1, characterized in that, The step of updating the bridging device table in the virtual switch database according to the spanning tree protocol configuration instance includes: Parse the resource expected state field of the spanning tree protocol configuration instance and map the parsed resource expected state field to the custom setting options of the bridging device table in the virtual switch database; The mapped custom settings options are merged with the original custom settings options in the virtual switch database; Update the bridging device table of the virtual switch database based on the database operation structure; The status of the custom resource definition unit for the spanning tree protocol is updated accordingly based on the updated bridging device table in the virtual switch database.

3. The automatic configuration method of the spanning tree protocol based on the data processor DPU in a Kubernetes cluster according to claim 1, characterized in that, Before the real-time monitoring of whether the spanning tree protocol configuration instance in the Kubernetes cluster has undergone configuration data changes, the following is also included: Establish a connection with the virtual switch database and communicate with the virtual switch daemon through the virtual switch database protocol.

4. The automatic configuration method of the spanning tree protocol based on the data processor DPU in a Kubernetes cluster according to claim 2, characterized in that, The custom resource definition unit for the spanning tree protocol is pre-created in the K8s cluster and is used to control the distribution of the spanning tree protocol configuration data of the virtual switch. The Spanning Tree Protocol configuration data includes various configuration parameters corresponding to Spanning Tree Protocol (STP) and / or Rapid Spanning Tree Protocol (RSTP). Correspondingly, the Spanning Tree Protocol (STP) configuration instance is pre-created in the K8s cluster and is used to configure various configuration parameters corresponding to the Spanning Tree Protocol (STP) and / or Rapid Spanning Tree Protocol (RSTP) of the virtual switch based on the STP configuration data issued by the custom resource definition unit.

5. The automatic configuration method of the spanning tree protocol based on the data processor DPU in a Kubernetes cluster according to claim 4, characterized in that, The various configuration parameters corresponding to the Spanning Tree Protocol (STP) include: the STP priority parameter, timer parameter, maximum survival time parameter of Bridge Protocol Data Unit (BPDU) in the network, and the transition time parameter of a specified virtual switch port from a blocking state to a forwarding state.

6. The automatic configuration method of the spanning tree protocol based on the data processor DPU in a Kubernetes cluster according to claim 4, characterized in that, The various configuration parameters corresponding to the Rapid Spanning Tree Protocol (RSTP) include: RSTP priority parameters, virtual switch address parameters, virtual switch aging time parameters, version parameters, maximum bridge aging time parameters, bridge forwarding delay time parameters, and the maximum number of Bridge Protocol Data Units (BPDUs) allowed to be sent per second.

7. The automatic configuration method of the spanning tree protocol based on the data processor DPU in a Kubernetes cluster according to claim 1, characterized in that, The corresponding update of the state of the custom resource definition unit for the spanning tree protocol includes: Update the runtime status monitoring fields of the custom resource definition unit for the Spanning Tree Protocol, wherein the runtime status monitoring fields include: the unique identifier of the bridging device, root bridge information, designated bridge, designated port, and bridging port information.

8. A controller, characterized in that, include: The Spanning Tree Protocol (STP) configuration module is used to monitor in real time whether the STP configuration instance in the K8s cluster has changed its configuration data. If so, it updates the bridging device table of the virtual switch database according to the STP configuration instance, so that the virtual switch set in the data processor (DPU) receives the currently updated configuration data based on the updated bridging device table of the virtual switch database. It also determines whether the configuration data contains STP configuration data. If so, it configures or starts the corresponding STP and / or RSTP according to the STP configuration data. The virtual switch monitoring module is used to monitor in real time whether the virtual switch is configured or started with the corresponding Spanning Tree Protocol (STP) and / or Rapid Spanning Tree Protocol (RSTP). If so, the status of the custom resource definition unit for the Spanning Tree Protocol is updated accordingly, so that the user can know the current Spanning Tree Protocol setting status of the virtual switch from the custom resource definition unit.

9. An automatic configuration system for the spanning tree protocol based on a data processor (DPU) in a Kubernetes cluster, characterized in that, include: Controllers, hosts, and data processing units (DPUs) are configured in a Kubernetes cluster. The controller is used to execute the automatic configuration method of the spanning tree protocol based on the data processor DPU in a K8s cluster as described in any one of claims 1 to 7; The host computer is equipped with a virtual switch agent; the data processor (DPU) is equipped with a virtual switch, and the controller communicates with the virtual switch via the virtual switch agent.

10. The automatic configuration system for the spanning tree protocol based on the data processor (DPU) in a Kubernetes cluster according to claim 9, characterized in that, The controller is also connected to at least one of the distributed search engine, the service monitoring system, and the distributed real-time data tracking system.

Citation Information

Patent Citations

  • Topology trimming method and device for ring network and virtual switch

    CN112671583A

  • Kubernetes-based DPU (Data Processing Unit) system-on-chip management method and Kubernetes-based DPU system-on-chip management device

    CN118964116A