Message uploading method and distributed switch stacking system
By using a cross-card forwarding method that determines the destination card and performs private encapsulation based on load parameters in a distributed switch stacking system, the packet processing path is optimized, the latency and resource waste caused by multi-hop forwarding are resolved, and the system performance is improved.
Patent Information
- Application Number
- CN202411914577.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2026-06-26
AI Technical Summary
In a distributed switch stacking system, the multi-hop forwarding path of protocol packets leads to increased processing latency, high control channel bandwidth consumption, and wasted CPU resources. Furthermore, the stacked LPU of the master device becomes a performance bottleneck, affecting network response speed and overall throughput.
By determining the destination board from the MPU card of the device based on the load parameters of the LPU card and SFU card of the master device, and using private encapsulation and preset identifiers to forward the packets across cards, the packets are sent directly to the CPU of the lightest-loaded board, reducing the number of software-level forwardings and optimizing the packet processing path.
It reduces message processing latency, saves control channel bandwidth and CPU resources, improves the overall system performance and throughput, and avoids stacked cards becoming a performance bottleneck.
Smart Images

Figure CN122293619A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication technology, and more specifically, to a message uploading method and a distributed switch stacking system. Background Technology
[0002] With the continuous development of network equipment, distributed switches have been widely used in data centers and enterprise networks. These switches typically consist of multiple LPU (Line Processing Unit) cards, SFU (Switch Fabric Unit) cards, and MPU (Main Processing Unit) cards. To improve equipment reliability, two or more physical switches are often virtualized into a single logical switch using stacking technology. A common distributed switch stacking model is as follows: Figure 1 As shown.
[0003] Distributed switches primarily have two channels: a data channel and a data channel. The data channel carries user data forwarding and is responsible for transmitting user data frames or packets between various LPUs, ensuring that data can be transmitted correctly and efficiently in the network, such as in common Layer 2 and Layer 3 forwarding. The data channel does not require CPU involvement; it is entirely handled by the switching chip hardware for forwarding. Figure 1 In this setup, the LPU's switching chip and the SFU's switching chip are connected via a backplane, and the devices are connected through VSL links. Another channel is the protocol and control channel, used for managing and controlling network devices. It is responsible for protocol processing, configuration management, and status monitoring, such as running routing protocols to ensure network devices can correctly learn and maintain routing tables. The protocol and control channel requires CPU (Central Processing Unit) participation, and the CPUs of different boards need to communicate with each other. Figure 1 In this configuration, the CPU of the MPU is connected to the CPUs of the LPU and SFU via an Ethernet channel, and the CPUs of the LPU and SFU are connected to their respective switching chips via PCIe.
[0004] In stacked mode, to enable multiple physical switches to function as a single logical device, all protocol packets requiring centralized processing received by the slave device's LPU must be sent to the master device's MPU for processing. However, the uplink path of these protocol packets typically involves multiple forwarding stages, resulting in the so-called "multi-hop" phenomenon.
[0005] For example, when an LPU on a slave device receives a protocol message requiring centralized processing, the message is first identified by the switching chip on that LPU and sent to its own CPU for preliminary processing. Then, it is sent to the slave device's MPU via an Ethernet channel. Next, the message is sent to the slave device's stacking LPU (responsible for stack interconnection), and then forwarded to the master device's stacking LPU via a VSL (Virtual Switch Link). Finally, it reaches the master device's MPU for centralized processing. In this process, the message undergoes at least four software forwardings from one board's CPU to another, which not only increases message processing latency but also consumes significant control channel bandwidth and CPU resources.
[0006] Furthermore, since all protocol messages ultimately need to be centrally processed through the stacked LPU of the master device, the stacked LPU of the master device becomes the performance bottleneck of the entire system. As network traffic continues to increase, the inefficiency of this centralized processing method becomes increasingly prominent, severely limiting the overall throughput of the system and affecting network response speed and quality of service.
[0007] Therefore, optimizing this complex multi-hop forwarding path, reducing packet processing latency, improving the utilization efficiency of the control channel, and distributing the processing load to avoid stacked cards becoming a performance bottleneck have become urgent problems to be solved. Summary of the Invention
[0008] In view of this, the purpose of the present invention is to provide a message uploading method and related apparatus.
[0009] To achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows:
[0010] In a first aspect, the present invention provides a message uploading method, applied to a slave device in a stacked system, the method comprising:
[0011] The switching chip of the source LPU card of the slave device receives the message to be processed. If no matching destination card is found, the message to be processed is sent to the CPU of the MPU card of the slave device. The source LPU card is any LPU card of the slave device, and the message to be processed is a protocol message received by the source LPU card from outside the stacking system and needs to be sent to the CPU of the MPU card of the master device for centralized processing.
[0012] The CPU of the slave device's MPU card sends the message to be processed to the CPU of the master device's MPU card via the existing stacking link;
[0013] The CPU of the slave device's MPU card determines the destination board based on the load parameters of all LPU cards and SFU cards of the master device, and returns the information of the determined destination board to the switching chip of the source LPU card of the slave device.
[0014] When the switching chip of the source LPU card in the slave device receives the message to be processed again, it adds a private encapsulation to the message to be processed using the information of the destination board and a preset identifier to obtain an encapsulation protocol message. According to the forwarding path table pre-issued by the MPU card of the slave device, it determines the outgoing port and forwards it across cards through the data channel until it reaches the switching chip of the destination board. This allows the switching chip of the destination board to decapsulate the encapsulation protocol message, restore the message to be processed, and send it from the CPU of the destination board to the CPU of the MPU card of the master device.
[0015] Optionally, the load parameters include backplane bandwidth, packet reception rate, and CPU utilization. The step of the slave device's MPU card CPU determining the destination board based on the load parameters of all LPU cards and SFU cards of the master device includes:
[0016] The CPU of the slave device's MPU card determines the load status of each LPU card and SFU card of the master device based on the backplane bandwidth, packet reception rate, CPU utilization, and corresponding preset weight values of each LPU card and SFU card of the master device.
[0017] The CPU of the slave device's MPU card determines the card with the lightest load from among the master device's LPU cards and SFU cards as the target card, based on the load status of each LPU card and SFU card in the master device.
[0018] Optionally, the method further includes the step of the slave device's MPU card pre-issuing the forwarding path table, which includes:
[0019] The CPU of the MPU card of the slave device calculates the forwarding path from the source LPU card to any LPU card or SFU card of the master device as the destination card according to the topology of the stacking system, and generates a forwarding path table and sends it to the switching chip of each forwarding card of the slave device on the forwarding path. The forwarding path table includes destination card information and output port.
[0020] Optionally, the step of adding a private encapsulation to the message to be processed using the information of the destination board and a preset identifier to obtain an encapsulated protocol message includes:
[0021] The switching chip of the source LPU card writes the information of the destination board and the preset identifier to the beginning of the Ethernet header of the message to be processed, thereby obtaining the encapsulated protocol message.
[0022] Optionally, if the source LPU card is not a stacking card of the slave device, the step of forwarding data across cards until reaching the destination card includes:
[0023] The switching chip of the source LPU card sends the encapsulated protocol message to the switching chip of the slave device's SFU card through the data channel;
[0024] The switching chip of the SFU card of the slave device sends the encapsulation protocol message to the switching chip of the stacking card of the slave device through the data channel, based on the destination board information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the MPU card of the slave device.
[0025] The switching chip of the slave device's stacking card sends the encapsulation protocol message to the switching chip of the master device's stacking card via a data channel, based on the destination board information in the encapsulation protocol message and the forwarding path table pre-issued by the slave device's MPU card CPU. This allows the master device's stacking card switching chip to determine whether the master device's stacking card is the destination board based on the destination board information in the encapsulation protocol message. If the master device's stacking card is the destination board, the switching chip decapsulates the encapsulation protocol message, recovers the pending message, and the master device's stacking card CPU reports it to the master device's main control card M. The CPU of the MPU card, and in the case where the stacking card of the master device is not the destination card, forwards the encapsulation protocol message through the data channel to the switching chip of the next forwarding card according to the destination card information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the MPU card of the master device. The switching chips of the remaining forwarding cards forward the encapsulation protocol message sequentially through the data channel until it reaches the switching chip of the destination card. The switching chip of the destination card decapsulates the encapsulation protocol message to restore the message to be processed and reports it to the CPU of the MPU card of the master device by the CPU of the target card.
[0026] Optionally, if the source LPU card is a stacked card of the slave device, the step of forwarding data across cards until reaching the destination card includes:
[0027] The switching chip of the source LPU card sends the encapsulation protocol message to the switching chip of the stacking card of the master device through the data channel. The switching chip of the stacking card of the master device determines whether the stacking card of the master device is the destination card based on the destination card information in the encapsulation protocol message. If the stacking card of the master device is the destination card, the encapsulation protocol message is decapsulated to restore the message to be processed, and the CPU of the stacking card of the master device reports it to the CPU of the MPU card of the master device. If the stacking card of the master device is not the destination card, the encapsulation protocol message is forwarded through the data channel to the switching chip of the next forwarding card based on the destination card information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the MPU card of the master device. The remaining switching chips of the forwarding cards sequentially forward the encapsulation protocol message through the data channel until it reaches the switching chip of the destination card. The switching chip of the destination card decapsulates the encapsulation protocol message to restore the message to be processed, and the CPU of the destination card reports it to the CPU of the MPU card of the master device.
[0028] Optionally, the method further includes:
[0029] If the switching chip of the source LPU does not receive the message to be processed again within a preset time after the last time it received the message to be processed, it will clear the destination board information determined for the message to be processed.
[0030] Secondly, embodiments of the present invention provide a message uploading method, applied to a master device in a stacking system, the method comprising:
[0031] The switching chip of the master device's stacking card receives the encapsulation protocol message from the slave device in the stacking system. If the master device's stacking card is determined to be the destination card based on the destination card information in the encapsulation protocol message, the encapsulation protocol message is decapsulated, and the CPU of the master device's stacking card forwards the obtained message to be processed to the CPU of the master device's MPU card. The encapsulation protocol message is generated by the slave device and transmitted to the master device by executing the message uploading method according to any one of claims 1 to 7.
[0032] Optionally, the method further includes:
[0033] The switching chip of the stacking card of the master device receives the encapsulation protocol message from the slave device of the stacking system. If it is determined that the stacking card of the master device is not the destination card according to the destination card information in the encapsulation protocol message, the master device forwards the encapsulation protocol message to the switching chip of the SFU card of the master device through the data channel according to the destination card information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the MPU card of the master device.
[0034] If the switching chip of the SFU card of the master device determines that the SFU card of the master device is the destination card based on the information of the destination card in the encapsulation protocol message, then the encapsulation protocol message is decapsulated, and the CPU of the SFU card of the master device sends the obtained message to be processed to the CPU of the MPU card of the master device.
[0035] If the switching chip of the SFU card of the master device determines that the SFU card of the master device is not the destination card based on the destination card information in the encapsulation protocol message, then according to the destination card information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the MPU card of the master device, the encapsulation protocol message is forwarded through the data channel to the switching chip of the LPU card in the master device, which is the destination card, so that the switching chip of the destination card decapsulates the encapsulation protocol message and the CPU of the target card sends the obtained message to be processed to the CPU of the MPU card of the master device.
[0036] Thirdly, embodiments of the present invention provide a distributed switch stacking system, including a slave device and a master device, wherein the slave device is used to execute the message uploading method described in the first aspect, and the master device is used to execute the message uploading method described in the second aspect.
[0037] The message uploading method provided in this embodiment of the invention is as follows: When the switching chip of the source LPU of the slave device in the stacking system receives a message to be processed from outside the stacking system that needs to be sent to the CPU of the MPU card of the master device for centralized processing, if no matching destination board is found, the message to be processed is sent to the CPU of the MPU card of the slave device. The CPU of the MPU card of the slave device sends the message to be processed to the CPU of the MPU card of the master device in the stacking system through the existing stacking link. The CPU of the MPU card of the slave device determines the destination board according to the load parameters of all LPU cards and SFU cards of the master device, and sends the message to the CPU of the master device. The information of the destination board is returned to the switching chip of the source LPU in the slave device. When the switching chip of the source LPU in the slave device receives the message to be processed again, it adds a private encapsulation to the message to be processed using the information of the destination board and the preset identifier to obtain the encapsulated protocol message. According to the forwarding path table pre-issued by the CPU of the slave device's MPU card, the port is determined, and the message is forwarded across cards through the data channel until it reaches the switching chip of the destination board. This allows the switching chip of the destination board to decapsulate the encapsulated protocol message, restore the message to be processed, and send it to the CPU of the MPU card of the master device by the CPU of the destination board. In this embodiment of the invention, the CPU of the slave device's MPU card determines the destination board based on the load parameters of all LPU cards and SFU cards of the master device and returns the information of the determined destination board to the switching chip of the slave device's source LPU. The switching chip of the slave device's source LPU card adds a private encapsulation to the message to be processed using the information of the destination board and a preset identifier, and determines the port according to the forwarding path table pre-issued by the slave device's MPU card CPU. It then performs cross-card forwarding through the data channel until it reaches the switching chip of the destination board. The switching chip of the destination board decapsulates the encapsulated protocol message to restore the message to be processed and sends it to the CPU of the master device's MPU card by the CPU of the destination board. Thus, the message to be processed received by any LPU card of the slave device only needs to undergo one forwarding from one CPU to another to reach the CPU of the master device's MPU card. That is, it only needs one software-level forwarding to reach the CPU of the master device's MPU card, which greatly reduces latency, thereby saving control channel bandwidth and CPU resources and improving the overall performance of the system.
[0038] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0039] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This figure shows a schematic block diagram of a distributed switch stacking system provided by an embodiment of the present invention;
[0041] Figure 2 The diagram illustrates a flowchart of a message uploading method applied to a slave device, according to an embodiment of the present invention.
[0042] Figure 3 The diagram shows a flowchart of a message uploading method for a master device provided by an embodiment of the present invention. Detailed Implementation
[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0044] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0045] It should be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0046] To reduce message processing latency, improve control channel utilization efficiency, and distribute processing load to avoid stacked cards becoming a performance bottleneck, embodiments of the present invention provide an application for... Figure 1 The method for uploading messages from the device will be described in detail below.
[0047] Please refer to Figure 2 The message uploading method includes steps S101 to S104.
[0048] S101: The device receives the message to be processed from the switching chip of the source LPU card. If no matching destination card is found, the message to be processed is sent to the CPU of the slave device's MPU card.
[0049] The source LPU card is any LPU card of the slave device, and the message to be processed is the protocol message received by the source LPU card from outside the stacking system and needs to be sent to the CPU of the master device's MPU card for centralized processing.
[0050] When the switching chip of the source LPU card of the slave device receives the first packet of the protocol message to be centrally processed, it cannot find a matching destination board. At this time, by sending the message to be processed to the CPU of the slave device's MPU card, the CPU of the slave device's MPU card determines the destination board for the message to be processed. Thus, when the switching chip of the source LPU card of the slave device receives the message to be processed again, it can send the message to be processed based on the information of the destination board determined by the CPU of the slave device's MPU card.
[0051] S102, the CPU of the slave device's MPU card sends the message to be processed to the CPU of the master device's MPU card in the stacking system via the existing stacking link.
[0052] For the currently received pending message, since no destination card has been matched, it needs to be sent to the CPU of the MPU card of the master device in the stacking system via the existing stacking link. That is, the switching chip of the source LPU card of the slave device identifies the pending message and sends it to its own CPU for preliminary processing. Then, it is sent to the CPU of the MPU card of the slave device via the Ethernet channel. Next, the pending message is sent to the CPU of the stacking card of the slave device, and then forwarded to the CPU of the stacking card of the master device via the VSL link (stacking link), and finally delivered to the CPU of the MPU of the master device for centralized processing.
[0053] S103, the slave device's MPU card determines the destination board based on the load parameters of all LPU cards and SFU cards of the master device, and returns the information of the determined destination board to the switching chip of the source LPU card of the slave device.
[0054] In one possible implementation, the load parameters for the LPU and SFU cards include backplane bandwidth, packet reception rate, and CPU utilization. Backplane bandwidth refers to the data transmission capacity of the LPU and SFU cards; it provides an overall understanding of the smoothness of communication between the cards and whether there are any bandwidth bottlenecks. Packet reception rate refers to the number of data packets received by the card per second; it indicates the card's data packet processing speed and thus its workload. CPU utilization refers to the percentage of CPU usage over a given period.
[0055] The implementation process of "determining the destination board from the MPU card of the slave device based on the load parameters of all LPU cards and SFU cards of the master device" can be as follows:
[0056] The CPU of the slave device's MPU card determines the load status of each LPU and SFU card in the master device based on the backplane bandwidth, packet reception rate, CPU utilization, and corresponding preset weight values of each LPU and SFU card in the master device. The CPU of the slave device's MPU card then selects the card with the lightest load from among the master device's LPU and SFU cards as the destination card.
[0057] In this embodiment of the invention, the CPU of the slave device's MPU card collects the backplane bandwidth, packet reception rate, and CPU utilization of each LPU card and SFU card of the master device, and performs standardized processing on the collected data. Using the corresponding preset weight values of backplane bandwidth, packet reception rate, and CPU utilization, the backplane bandwidth, packet reception rate, and CPU utilization are weighted and summed to obtain the result representing the load status of each LPU card and SFU card.
[0058] Based on the load status of each LPU card and SFU card, the one with the lightest load status is selected as the target board.
[0059] In another possible implementation, the load parameters for the LPU and SFU cards include backplane bandwidth, packet reception rate, CPU utilization, and current health. The current health of the cards can be obtained based on metrics such as backplane bandwidth, packet reception rate, CPU utilization, memory utilization, packet loss rate, and runtime.
[0060] The process of "the CPU of the slave device's MPU card determining the destination board based on the load parameters of all LPU cards and SFU cards of the master device" can be implemented as follows:
[0061] The CPU of the slave device's MPU card determines the load status of each LPU and SFU card in the master device based on the backplane bandwidth, packet reception rate, CPU utilization, and corresponding preset weight values of each LPU and SFU card. Based on the load status and current health of each LPU and SFU card in the master device, it then selects the target board with the lightest load and whose current health meets preset conditions from among the master device's LPU and SFU cards. Here, the preset condition is that the current health reaches a preset threshold.
[0062] S104, when the switching chip of the source LPU card receives the message to be processed again, it adds a private encapsulation to the message to be processed using the information of the destination board and the preset identifier to obtain the encapsulated protocol message; it determines the port according to the forwarding path table pre-issued by the CPU of the slave device's MPU card, and forwards it across cards through the data channel until it reaches the switching chip of the destination board, so that the switching chip of the destination board can decapsulate the encapsulated protocol message, restore the message to be processed, and send it to the CPU of the master device's MPU card by the CPU of the destination board.
[0063] In this step, when the source LPU card's switching chip receives the message to be processed again, since it is not the first packet of the protocol message to be centrally processed, the source LPU card's switching chip has already received the destination board information sent by the CPU of the device's MPU card.
[0064] The implementation process of "using the information of the destination board and the preset identifier of the switching chip of the source LPU card in the device to add private encapsulation to the message to be processed" can be as follows: the switching chip of the source LPU card in the device writes the information of the destination board and the preset identifier to the beginning of the Ethernet header of the message to be processed, and obtains the encapsulated protocol message.
[0065] Each LPU and SFU card in the slave device and each LPU and SFU card in the master device have a pre-assigned unique identifier, which is stored in the switching chip of each LPU and SFU card in the slave device and each LPU and SFU card in the master device. In the stacked system, the boards of each member device are uniformly sequentially identified, and the information of the destination board refers to the identifier of the destination board.
[0066] When adding private encapsulation to a message to be processed, it can be achieved through methods such as next hop or flexible tunneling.
[0067] In this embodiment of the invention, the CPU of the slave device's MPU card calculates the forwarding path from the source LPU card of the slave device to any LPU card or SFU card of the master device as the destination board according to the topology of the stacking system, and generates a forwarding path table and sends it to the switching chip of each forwarding board of the slave device on the forwarding path.
[0068] The forwarding path table includes destination board information and output port.
[0069] The switching chip of the source LPU card in the slave device determines the outgoing port from the forwarding path table based on the destination board information, forwards the message to be processed from the outgoing port, and forwards the message to be processed to the switching chip of the forwarding board of the next slave device through the data channel with the forwarding board of the next slave device.
[0070] For each forwarding board of a slave device on the forwarding path, its switching chip determines whether the received packet is an encapsulation protocol packet by identifying whether the Ethernet header of the received packet carries a preset identifier. Based on the target board information carried in the Ethernet header of the packet, the switching chip of the forwarding board determines the output port from the forwarding path table pre-issued by the CPU of the slave device's MPU card. The packet to be processed is then forwarded from the output port to the switching chip of the next slave device's forwarding board via the data channel with the next slave device's forwarding board; that is, the forwarding method is hardware forwarding.
[0071] Similarly, the CPU of the MPU card of the master device calculates the forwarding path from any LPU card of the device to any LPU card or SFU card of the master device as the destination card according to the topology of the stacking system, and generates a forwarding path table and sends it to the switching chip of each forwarding card of the master device on the forwarding path.
[0072] For each forwarding board of the master device on the forwarding path, its switching chip determines whether the received packet is an encapsulation protocol packet by identifying whether the private encapsulation before the Ethernet header carries a preset identifier. The switching chip of the forwarding board determines whether the forwarding board is the destination board based on the target board information carried in the private encapsulation before the Ethernet header. If it is not the destination board, the switching chip of the forwarding board determines the output port from the forwarding path table pre-issued by the CPU of the master device's MPU card, forwards the packet to be processed from the output port, and forwards the packet to be processed to the switching chip of the next master device's forwarding board through the data channel with the forwarding board of the next master device. That is, the forwarding method is hardware forwarding.
[0073] The LPU cards in the device include LPU cards that are stacked cards and LPU cards that are not stacked cards, for example, such as Figure 1 As shown, LPU0 of the slave device is a stacking card, while LPU1 and LPU2 of the slave device are not stacking cards. LPU0, LPU1 and LPU2 of the slave device can all be used as source LPU cards to receive protocol messages from outside the stacking system that need to be handed over to the CPU of the master device's MPU card for centralized processing.
[0074] Additionally, the stacking cards of the slave device can also serve as forwarding cards for encapsulated protocol messages. The SFU of the slave device can also serve as a forwarding card for encapsulated protocol messages.
[0075] The LPU card of the main device also includes LPU cards that are stacked cards and LPU cards that are not stacked cards, for example, such as Figure 1 As shown, LPU0 of the master device is a stacking card, while LPU1 and LPU2 of the master device are not stacking cards. LPU0, LPU1 and LPU2 of the master device can all be used as destination cards for encapsulating protocol messages.
[0076] Additionally, the master device's stacking card can also serve as a forwarding card for encapsulated protocol messages. The master device's SFU card can also serve as a forwarding card for encapsulated protocol messages.
[0077] In this embodiment of the invention, for the case where "the source LPU card of the slave device is not a stacked card of the slave device", the implementation process of the switching chip of the source LPU card in the slave device performing cross-card forwarding through the data channel until reaching the switching chip of the destination board can be as follows:
[0078] The switching chip of the source LPU card of the slave device sends the encapsulated protocol message to the switching chip of the SFU card of the slave device through the data channel.
[0079] The switching chip of the SFU card in the slave device sends the encapsulation protocol message to the switching chip of the stacking card of the slave device through the data channel, based on the destination card information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the slave device's MPU card.
[0080] The switching chip of the slave device's stacking card sends the encapsulation protocol message to the switching chip of the master device's stacking card through the data channel, based on the destination board information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the slave device's MPU card. This allows the switching chip of the master device's stacking card to determine whether the master device's stacking card is the destination board based on the destination board information in the encapsulation protocol message.
[0081] In this embodiment, when the stacking card of the master device is the destination board, the switching chip of the stacking card of the master device decapsulates the encapsulated protocol message, recovers the message to be processed, and reports it from the CPU of the stacking card of the master device to the CPU of the master control card MPU card of the master device.
[0082] When the stacking card of the master device is not the destination card, the switching chip of the stacking card forwards the encapsulation protocol message to the switching chip of the next forwarding card through the data channel, based on the destination card information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the master device's MPU card. The remaining switching chips of each forwarding card then forward the encapsulation protocol message sequentially through the data channel until it reaches the switching chip of the destination card. The switching chip of the destination card decapsulates the encapsulation protocol message, restores the message to be processed, and reports it to the CPU of the master device's MPU card by the CPU of the target card.
[0083] In the scenario where "the source LPU card in the slave device is a stacked card of the slave device," the switching chip of the source LPU card in the slave device forwards data across cards until it reaches the switching chip of the destination card, which can be achieved as follows:
[0084] The switching chip of the source LPU of the device sends the encapsulated protocol message to the switching chip of the master device's stacking card through the data channel, so that the switching chip of the master device's stacking card can determine whether the master device's stacking card is the destination card based on the destination card information in the encapsulated protocol message.
[0085] In this embodiment of the invention, when the stacking card of the master device is the destination board, the switching chip of the stacking card of the master device decapsulates the encapsulated protocol message, recovers the message to be processed, and reports it from the CPU of the stacking card of the master device to the CPU of the master control card MPU card of the master device.
[0086] When the stacking card of the master device is not the destination card, the switching chip of the stacking card forwards the encapsulation protocol message to the switching chip of the next forwarding card through the data channel, based on the destination card information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the master device's MPU card. The remaining switching chips of each forwarding card then forward the encapsulation protocol message sequentially through the data channel until it reaches the switching chip of the destination card. The switching chip of the destination card decapsulates the encapsulation protocol message, restores the message to be processed, and reports it to the CPU of the master device's MPU card by the CPU of the target card.
[0087] When the switching chip of the source LPU card in the slave device first receives a message to be processed, the CPU of the slave device's MPU card determines a matching destination board for the source LPU card so that it can perform cross-card forwarding based on the destination board information when it receives a message to be processed again. However, if the switching chip of the source LPU card in the slave device does not receive a message to be processed again within a preset time after the most recent message to be processed, it clears the destination board information determined for the message to be processed.
[0088] Please refer to Figure 3 The present invention also provides an application for Figure 1 The message uploading method of the master device includes steps S201 to S204.
[0089] S201, the switching chip of the master device's stacking card receives the encapsulation protocol message from the slave device of the stacking system. If the master device's stacking card is determined to be the destination card based on the destination card information in the encapsulation protocol message, the encapsulation protocol message is decapsulated, and the CPU of the master device's stacking card forwards the obtained message to be processed to the CPU of the master device's main control card MPU.
[0090] The encapsulation protocol message is generated by the slave device through the above steps S101 to S104 and transmitted to the master device.
[0091] S202, the switching chip of the master device's stacking card receives the encapsulation protocol message from the slave device in the stacking system. If it is determined that the master device's stacking card is not the destination card based on the destination card information in the encapsulation protocol message, the master device forwards the encapsulation protocol message to the switching chip of the master device's SFU card through the data channel according to the destination card information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the master device's MPU card.
[0092] S203, if the switching chip of the SFU card of the master device determines that the SFU card of the master device is the destination card according to the information of the destination card in the encapsulation protocol message, then the encapsulation protocol message is decapsulated, and the CPU of the SFU card of the master device sends the obtained message to be processed to the CPU of the MPU card of the master device.
[0093] S204, if the switching chip of the SFU card of the master device determines that the SFU card of the master device is not the destination card according to the information of the destination card in the encapsulation protocol message, then according to the information of the destination card in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the MPU card of the master device, the encapsulation protocol message is forwarded through the data channel to the switching chip of the LPU card in the master device, which is the destination card, so that the switching chip of the destination card decapsulates the encapsulation protocol message and the CPU of the target card sends the obtained message to be processed to the CPU of the MPU card of the master device.
[0094] The following example will further illustrate the method provided by the embodiments of the present invention.
[0095] by Figure 1 Taking the distributed switch stacking system shown as an example, the LPU0 of the slave device is a stacking card, while the LPU1 and LPU2 of the slave device are not stacking cards. The switching chips of the LPU0, LPU1 and LPU2 of the slave device are all connected to the switching chip of the SFU card of the slave device, thus establishing a data channel.
[0096] The LPU0 of the main device is a stacking card, while the LPU1 and LPU2 of the main device are not stacking cards. The switching chips of the LPU0, LPU1 and LPU2 of the main device are all connected to the switching chip of the SFU of the main device, thus establishing a data channel.
[0097] The slave device's LPU0 is connected to the master device's LPU0 via a VSL link, which refers to the link between the switching chip of the slave device's stack card (LPU0) and the switching chip of the master device's stack card (LPU0).
[0098] Each board in the master and slave devices is pre-assigned a unique identifier. For example, master device LPU0 is M_LPU_ADDR0, master device LPU1 is M_LPU_ADDR1, master device LPU2 is M_LPU_ADDR2, master device SFU0 is M_SFU_ADDR0, slave device LPU0 is S_LPU_ADDR0, slave device LPU1 is S_LPU_ADDR1, slave device LPU2 is S_LPU_ADDR2, and slave device SFU0 is S_SFU_ADDR0.
[0099] Configure rules for identifying private packages in the switching chips of each board in the master and slave devices, and set up a forwarding path table in conjunction with the overall topology information.
[0100] Suppose that a message to be processed is received from device LPU2. Device LPU2 obtains information such as the backplane bandwidth, packet reception rate, and CPU utilization of each card of the master device, as well as the corresponding preset weight values. After comprehensive evaluation, the master device LPU1 with a lighter load is selected as the destination card.
[0101] The LPU2 switching chip adds a private encapsulation to the message to be processed. The encapsulation contains the destination board's identifier (M_LPU_ADDR1) and a preset identifier, thus obtaining the encapsulated protocol message.
[0102] The switching chip of the slave device LPU2 identifies the encapsulation information of the encapsulated protocol message and searches the forwarding path table pre-issued by the CPU of the slave device's MPU card according to the identifier of the destination board. It determines that the next forwarding board in the slave device is SFU0, and the switching chip of the slave device LPU2 sends the encapsulated protocol message to the switching chip of the slave device SFU0 through the backplane.
[0103] The switching chip of the slave device SFU0 identifies the encapsulation information of the encapsulation protocol message and searches the forwarding path table pre-issued by the CPU of the slave device's MPU card according to the identifier of the destination board. It determines that the next forwarding board in the slave device is LPU0, and the switching chip of the slave device SFU0 sends the encapsulation protocol message to the slave device LPU0 through the backplane.
[0104] The switching chip of the slave device LPU0 identifies the encapsulation information of the encapsulation protocol message and searches the forwarding path table pre-issued by the CPU of the slave device's MPU card according to the identifier of the destination board. It determines that the next forwarding board is the master device's LPU0, and the switching chip of the slave device LPU0 sends the encapsulation protocol message to the master device LPU0 through the VSL link.
[0105] The switching chip of the master device LPU0 identifies the encapsulation information of the encapsulation protocol message. Based on the identifier of the destination board, it determines that the master device LPU0 is not the destination board. The switching chip of the master device LPU0 searches the forwarding path table pre-issued by the CPU of the master device's MPU card based on the identifier of the destination board, and determines that the next forwarding board is the master device's SFU0. The switching chip of the master device LPU0 sends the encapsulated protocol message to the master device SFU0 through the backplane.
[0106] The switching chip of the master device SFU0 identifies the encapsulation information of the encapsulation protocol message. Based on the identifier of the destination board, it determines that the master device SFU0 is not the destination board. The switching chip of the master device SFU0 searches the forwarding path table pre-issued by the CPU of the master device's MPU card according to the identifier of the destination board, and determines that the next forwarding board is the master device's LPU1. The switching chip of the master device SFU0 sends the encapsulated protocol message to the master device LPU1 through the backplane.
[0107] The switching chip of the master device LPU1 identifies the encapsulation information of the encapsulation protocol message. Based on the identifier of the destination board, it determines that the master device LPU1 is the destination board. The switching chip of the master device LPU1 decapsulates the encapsulation protocol message, restores the encapsulation protocol message to the message to be processed, and sends it to the CPU of the master device LPU1. The CPU of the master device LPU1 then sends the message to be processed to the CPU of the master device MPU. Finally, the master device MPU performs centralized processing on the received message.
[0108] When adding private encapsulation to protocol messages to be processed, this can be achieved through methods such as Nexthop or flexible tunneling. The switching chips on each board can identify the encapsulation information and look up the forwarding path table based on the destination board's information for forwarding, which can be achieved through methods such as ACL or SCL.
[0109] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0110] (1) In this embodiment of the invention, the CPU of the MPU card of the slave device determines the destination board according to the load parameters of all LPU cards and SFU cards of the master device and returns the information of the determined destination board to the switching chip of the source LPU of the slave device. The switching chip of the source LPU card of the slave device adds private encapsulation to the message to be processed using the information of the destination board and the preset identifier, and determines the port according to the forwarding path table pre-issued by the CPU of the MPU card of the slave device. It forwards the message across cards through the data channel until it reaches the switching chip of the destination board. The switching chip of the destination board decapsulates the encapsulated protocol message to restore the message to be processed and sends it to the CPU of the MPU card of the master device by the CPU of the destination board. Thus, the message only needs to go through one forwarding from one CPU to another to reach the master control card MPU, that is, only one software-level forwarding is needed to reach the master control card MPU, which greatly reduces the latency, thereby saving control channel bandwidth and CPU resources and improving the overall performance of the system.
[0111] (2) The slave device sends different encapsulation protocol messages to different boards of different master devices. The different boards of the master devices restore the encapsulation protocol messages into messages to be processed and send them to the CPU of the MPU card of the master device, thus avoiding the stacking cards of the master devices becoming a performance bottleneck.
[0112] (3) By selecting a destination board with a lighter load and / or a higher current monitoring level to encapsulate and send protocol messages, resource utilization is more balanced and the overall system efficiency is improved.
[0113] (4) It reduces the load on the stacking cards of the main equipment, improves the overall throughput of the system, and enables the network to handle more data traffic.
[0114] This invention also provides a distributed switch stacking system, which includes a master device and a slave device. The slave device executes a message uploading method including the above-described steps S101 to S104, and the master device executes a message uploading method including the above-described steps S201 to S204.
[0115] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0116] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0117] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0118] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A message uploading method, characterized in that, The method, applied to a slave device in a stacked system, includes: The switching chip of the source LPU card of the slave device receives the message to be processed. If no matching destination card is found, the message to be processed is sent to the CPU of the MPU card of the slave device. The source LPU card is any LPU card of the slave device, and the message to be processed is a protocol message received by the source LPU card from outside the stacking system and needs to be sent to the CPU of the MPU card of the master device for centralized processing. The CPU of the slave device's MPU card sends the message to be processed to the CPU of the master device's MPU card via the existing stacking link; The CPU of the slave device's MPU card determines the destination board based on the load parameters of all LPU cards and SFU cards of the master device, and returns the information of the determined destination board to the switching chip of the source LPU card of the slave device. When the switching chip of the source LPU card in the slave device receives the message to be processed again, it adds a private encapsulation to the message to be processed using the information of the destination board and a preset identifier to obtain an encapsulation protocol message. According to the forwarding path table pre-issued by the MPU card of the slave device, it determines the outgoing port and forwards it across cards through the data channel until it reaches the switching chip of the destination board. This allows the switching chip of the destination board to decapsulate the encapsulation protocol message, restore the message to be processed, and send it from the CPU of the destination board to the CPU of the MPU card of the master device.
2. The message sending method of claim 1, wherein, The load parameters include backplane bandwidth, packet reception rate, and CPU utilization. The step of the slave device's MPU card CPU determining the destination board based on the load parameters of all LPU cards and SFU cards of the master device includes: The CPU of the slave device's MPU card determines the load status of each LPU card and SFU card of the master device based on the backplane bandwidth, packet reception rate, CPU utilization, and corresponding preset weight values of each LPU card and SFU card of the master device. The CPU of the slave device's MPU card determines the card with the lightest load from among the master device's LPU cards and SFU cards as the target card, based on the load status of each LPU card and SFU card in the master device.
3. The message sending method of claim 1, wherein, The method further includes the step of the slave device's MPU card pre-issuing the forwarding path table, which includes: The CPU of the MPU card of the slave device calculates the forwarding path from the source LPU card to any LPU card or SFU card of the master device as the destination card according to the topology of the stacking system, and generates a forwarding path table and sends it to the switching chip of each forwarding card of the slave device on the forwarding path. The forwarding path table includes destination card information and output port.
4. The message sending method of claim 1, wherein, The step of adding a private encapsulation to the message to be processed using the information of the destination board and a preset identifier to obtain an encapsulated protocol message includes: The switching chip of the source LPU card writes the information of the destination board and the preset identifier to the beginning of the Ethernet header of the message to be processed, thereby obtaining the encapsulated protocol message.
5. The message sending method of claim 1, wherein, If the source LPU card is not a stacking card of the slave device, the step of forwarding data across cards until reaching the destination card includes: The switching chip of the source LPU card sends the encapsulated protocol message to the switching chip of the slave device's SFU card through the data channel; The switching chip of the SFU card of the slave device sends the encapsulation protocol message to the switching chip of the stacking card of the slave device through the data channel, based on the destination board information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the MPU card of the slave device. The switching chip of the slave device's stacking card sends the encapsulation protocol message to the switching chip of the master device's stacking card via a data channel, based on the destination board information in the encapsulation protocol message and the forwarding path table pre-issued by the slave device's MPU card CPU. This allows the master device's stacking card switching chip to determine whether the master device's stacking card is the destination board based on the destination board information in the encapsulation protocol message. If the master device's stacking card is the destination board, the switching chip decapsulates the encapsulation protocol message, recovers the pending message, and the master device's stacking card CPU reports it to the master device's main control card M. The CPU of the MPU card, and in the case where the stacking card of the master device is not the destination card, forwards the encapsulation protocol message through the data channel to the switching chip of the next forwarding card according to the destination card information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the MPU card of the master device. The switching chips of the remaining forwarding cards forward the encapsulation protocol message sequentially through the data channel until it reaches the switching chip of the destination card. The switching chip of the destination card decapsulates the encapsulation protocol message to restore the message to be processed and reports it to the CPU of the MPU card of the master device by the CPU of the target card.
6. The message sending method of claim 1, wherein, If the source LPU card is a stacked card of the slave device, the step of forwarding data across cards until it reaches the destination card includes: The switching chip of the source LPU sends the encapsulation protocol message to the switching chip of the stacking card of the master device through the data channel. The switching chip of the stacking card of the master device determines whether the stacking card of the master device is the destination card based on the destination card information in the encapsulation protocol message. If the stacking card of the master device is the destination card, the encapsulation protocol message is decapsulated to restore the message to be processed, and the CPU of the stacking card of the master device reports it to the CPU of the MPU card of the master device. If the stacking card of the master device is not the destination card, the encapsulation protocol message is forwarded through the data channel to the switching chip of the next forwarding card based on the destination card information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the MPU card of the master device. The remaining switching chips of the forwarding cards sequentially forward the encapsulation protocol message through the data channel until it reaches the switching chip of the destination card. The switching chip of the destination card decapsulates the encapsulation protocol message to restore the message to be processed, and the CPU of the destination card reports it to the CPU of the MPU card of the master device.
7. The method of claim 1, wherein, The method further includes: If the switching chip of the source LPU card does not receive the message to be processed again within a preset time after the last time it received the message to be processed, it will clear the destination board information determined for the message to be processed.
8. A message uploading method, characterized by, The method, applied to a master device in a stacked system, includes: The switching chip of the master device's stacking card receives the encapsulation protocol message from the slave device in the stacking system. If the master device's stacking card is determined to be the destination card based on the destination card information in the encapsulation protocol message, the encapsulation protocol message is decapsulated, and the CPU of the master device's stacking card forwards the obtained message to be processed to the CPU of the master device's MPU card. The encapsulation protocol message is generated by the slave device and transmitted to the master device by executing the message uploading method according to any one of claims 1 to 7.
9. The message sending method of claim 8, wherein, The method further includes: The switching chip of the stacking card of the master device receives the encapsulation protocol message from the slave device of the stacking system. If it is determined that the stacking card of the master device is not the destination card according to the destination card information in the encapsulation protocol message, the master device forwards the encapsulation protocol message to the switching chip of the SFU card of the master device through the data channel according to the destination card information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the MPU card of the master device. If the switching chip of the SFU card of the master device determines that the SFU card of the master device is the destination card based on the information of the destination card in the encapsulation protocol message, then the encapsulation protocol message is decapsulated, and the CPU of the SFU card of the master device sends the obtained message to be processed to the CPU of the MPU card of the master device. If the switching chip of the SFU card of the master device determines that the SFU card of the master device is not the destination card based on the destination card information in the encapsulation protocol message, then according to the destination card information in the encapsulation protocol message and the forwarding path table pre-issued by the CPU of the MPU card of the master device, the encapsulation protocol message is forwarded through the data channel to the switching chip of the LPU card in the master device, which is the destination card, so that the switching chip of the destination card decapsulates the encapsulation protocol message and the CPU of the target card sends the obtained message to be processed to the CPU of the MPU card of the master device.
10. A distributed switch stacking system, comprising: It includes a slave device and a master device, wherein the slave device is used to perform the message uploading method according to any one of claims 1 to 7, and the master device is used to perform the message uploading method according to any one of claims 8 to 9.
