A method, device, equipment and medium for limiting speed of a board-to-board communication skb queue

CN122909211APending Publication Date: 2026-10-13SHEN ZHOU SHU MA WANG LUO BEI JING YOU XIAN GONG SI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611217742.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0004]然而,现有技术方案在板间通信场景下的限速效果不佳

Benefits of technology

本申请实施例提供的一种板间通信skb队列限速的方法,通过将报文分流至数据流队列并基于数据流队列的收包资源丢弃门限进行限速判断,能够以队列为粒度对skb资源占用进行差异化管理,使不同协议类型的报文按照其重要性获得不同的skb资源分配,防止非关键报文抢占关键报文的收包资源,从而保证RPC、DEVSM等关键控制报文在突发流量下仍可正常接收;在限速判断通过后,将报文送入出口调度层的优先级队列或加权轮询队列进行排队转发,使入端口侧的skb资源控制与出口侧的队列调度相配合,在保障关键报文收包资源的同时,进一步确保高优先级报文在出口转发时的低时延传输和普通报文的公平带宽分配,提高了板间通信在多模式并存场景下的限速效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122909211A_ABST
    Figure CN122909211A_ABST
Patent Text Reader

Abstract

The application discloses a method and device for limiting the speed of an inter-board communication skb queue, equipment and a medium, and relates to the technical field of communication. The method comprises the following steps: obtaining a message received by inter-boards; according to the protocol type or channel identifier of the message, the message is shunted to a target data flow queue in a plurality of preset data flow queues; according to the packet receiving resource discard threshold pre-configured by the target data flow queue, it is judged whether the number of skb resources currently occupied by the target data flow queue is less than the packet receiving resource discard threshold; if the number of skb resources currently occupied is less than the packet receiving resource discard threshold, it is determined that the message is allowed to pass, and the message is sent to a target exit queue in a plurality of exit queues of an exit scheduling layer according to the service priority; and the message in the target exit queue is queued and forwarded according to the scheduling strategy corresponding to the target exit queue. The method can improve the speed limiting effect in the inter-board communication scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a method, apparatus, device and medium for limiting the speed of inter-board communication skb queues. Background Technology

[0002] In a chassis switch (i.e., a rack-mount switch), the main control board and line cards communicate with each other via a backplane channel, carrying a large number of protocol control messages (such as ARP, routing protocols, RPC, etc.) and C2C (Chassis-to-Chassis) messages in stacked scenarios. To ensure reliable transmission of control plane protocol messages, mechanisms such as RDP (Reliable Datagram Protocol) are typically used for inter-board data transmission. However, the bandwidth of the inter-board channel and the CPU processing power are limited. When there is a sudden surge in traffic, if various types of messages are not differentiated and restricted, the CPU may be filled with non-critical messages, and the skb (socket buffer) resources may be exhausted, thus affecting the normal reception and processing of critical control messages such as RPC and DEVSM.

[0003] In existing technologies, hardware meters (rate limiters) are typically configured on the egress side of switching chips for various inter-board packets. By setting independent rate limiting rules for different protocols, queue scheduling with priority forwarding of high-priority packets is achieved. Taking chips such as the BCM53242 as an example, it supports an egress scheduling system consisting of one Strict Priority (SP) queue and three Weighted Round Robin (WRR) queues, which can map packets to different egress queues for scheduling and forwarding based on packet priority. Meanwhile, some solutions introduce a packet reception rate limiting mechanism based on skb resources on the ingress port side. By monitoring the number of occupied skb resources, packet dropping control is implemented to prevent CPU resources from being exhausted.

[0004] However, existing technical solutions are not effective at limiting speeds in inter-board communication scenarios. Summary of the Invention

[0005] This application provides a method, apparatus, device, and medium for limiting the rate of inter-board communication skb queues, which can improve the rate limiting effect in inter-board communication scenarios.

[0006] To achieve the above objectives, this application adopts the following technical solution: Firstly, this application provides a method for rate limiting of inter-board communication skb queues, including: Obtain messages received between boards; Based on the protocol type or channel identifier of the message, the message is diverted to a target data stream queue from among multiple preset data stream queues; Based on the packet receiving resource discarding threshold pre-configured in the target data stream queue, determine whether the number of skb resources currently occupied by the target data stream queue is less than the packet receiving resource discarding threshold; If the number of skb resources currently occupied by the target data stream queue is less than the packet drop threshold, the packet is determined to be allowed to pass, and the packet is sent to one of the multiple egress queues in the egress scheduling layer according to the service priority. The packets in the target egress queue are queued and forwarded according to the scheduling strategy corresponding to the target egress queue; wherein, the scheduling strategy includes priority scheduling and weighted round-robin scheduling.

[0007] Optionally, after acquiring the messages received between boards, the method further includes: When the message is a C2C message in a stacked scenario, the channel identifier carried in the message is parsed through a user-defined field, and the C2C message is mapped to the target data stream queue with the same protocol as in the standalone mode according to the channel identifier.

[0008] Optionally, the egress scheduling layer includes a priority queue and multiple weighted round-robin queues; the step of sending the packet to a target egress queue among the multiple egress queues of the egress scheduling layer according to the service priority includes: Messages with the first priority are sent to the priority queue, and messages with the second priority are sent to one of the multiple weighted polling queues. In this context, the first priority is higher than the second priority. Packets mapped to the priority queue are always forwarded with priority over packets in all weighted round-robin queues during scheduling. Each of the multiple weighted round-robin queues is configured with a scheduling weight, and each weighted round-robin queue allocates egress bandwidth according to the proportional relationship between their respective configured scheduling weights.

[0009] Optionally, before obtaining the messages received between boards, the method further includes: Pre-configure the corresponding data stream queue number for each type of protocol between boards, and store the mapping table from protocol type to data stream queue; The step of routing the message to a target data stream queue from multiple preset data stream queues based on the message's protocol type or channel identifier includes: The mapping table is queried according to the protocol type or channel identifier of the message to obtain the corresponding data stream queue number, and the message is sent to the target data stream queue corresponding to the data stream queue number.

[0010] Optionally, the packet discard threshold is obtained in the following way: The packet drop threshold is obtained based on the ratio of the maximum skb resources allowed to be occupied by the target data stream queue to the total skb resources of the system.

[0011] Optionally, the method further includes: If the number of skb resources currently occupied by the target data stream queue is greater than or equal to the packet discard threshold, the packet is directly discarded.

[0012] Optionally, the plurality of preset data stream queues includes a privileged data stream queue, which does not participate in rate limiting verification.

[0013] Secondly, this application provides a device for rate limiting of inter-board communication skb queues, comprising: The acquisition module is used to acquire messages received between boards; The processing module is used to distribute the packet to a target data stream queue among multiple preset data stream queues according to the protocol type or channel identifier of the packet; determine whether the number of skb resources currently occupied by the target data stream queue is less than the packet discarding threshold according to the packet receiving resource discarding threshold pre-configured by the target data stream queue; if the number of skb resources currently occupied by the target data stream queue is less than the packet discarding threshold, then the packet is determined to be allowed to pass, and the packet is sent to a target egress queue among multiple egress queues of the egress scheduling layer according to the service priority; The forwarding module is used to queue and forward packets in the target egress queue according to the scheduling strategy corresponding to the target egress queue; wherein, the scheduling strategy includes priority scheduling and weighted round-robin scheduling.

[0014] Thirdly, this application provides a computing device, including a memory and a processor; The memory stores one or more computer programs, the one or more computer programs including instructions; when the instructions are executed by the processor, the computing device performs the method as described in any one of the first aspects.

[0015] Fourthly, this application provides a computer-readable storage medium for storing a computer program for performing the method as described in any one of the first aspects.

[0016] As can be seen from the above technical solution, this application has at least the following beneficial effects: This application provides a method for rate limiting of skb queues in inter-board communication. By diverting packets to data stream queues and determining rate limits based on the packet drop threshold of the data stream queues, it enables differentiated management of skb resource usage at the queue level. This allows packets of different protocol types to receive different skb resource allocations according to their importance, preventing non-critical packets from preempting the packet reception resources of critical packets. This ensures that critical control packets such as RPC and DEVSM can still be received normally under burst traffic. After the rate limiting determination is passed, the packets are sent to the priority queue or weighted polling queue of the egress scheduling layer for queuing and forwarding. This allows the skb resource control on the ingress port side to cooperate with the queue scheduling on the egress side. While ensuring the packet reception resources of critical packets, it further ensures low-latency transmission of high-priority packets during egress forwarding and fair bandwidth allocation of ordinary packets, improving the rate limiting effect of inter-board communication in multi-mode coexistence scenarios.

[0017] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description

[0018] Figure 1 A flowchart illustrating a method for rate limiting of inter-board communication skb queues provided in this application embodiment; Figure 2 This is a schematic diagram of the overall process of inter-board protocol rate limiting provided in the embodiments of this application; Figure 3 This is a schematic diagram illustrating the mapping between stacked C2C type messages and UDF / channels provided in an embodiment of this application. Figure 4 A schematic diagram of a device for limiting the rate of inter-board communication skb queues provided in an embodiment of this application; Figure 5 This is a schematic diagram of a computing device provided in an embodiment of this application. Detailed Implementation

[0019] The terms "first," "second," and "third," etc., used in this application specification and accompanying drawings are used to distinguish different objects, not to limit a specific order.

[0020] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0021] Existing solutions for rate limiting in inter-board communication scenarios are ineffective due to several issues. Firstly, current ingress-side skb rate limiting schemes operate at the port or global level, failing to differentiate skb resource usage by protocol type. When sudden traffic surges, non-critical protocol messages may exhaust skb resources, leading to the discarding of critical protocol messages due to lack of available skb resources. Secondly, C2C messages in stacked scenarios carry channel identifiers rather than protocol types. Existing solutions cannot uniformly identify C2C messages as their corresponding protocol types and incorporate them into the same rate limiting management system as those for similar protocols in independent mode. Configuring separate rate limiting resources for C2C messages increases configuration complexity and resource overhead; conversely, without separate configuration, C2C messages may bypass rate limiting, causing rate limiting to fail in stacked scenarios. Therefore, a rate limiting method for inter-board communication is needed that can perform differentiated rate limiting of skb resources at the protocol queue level and integrate stacked C2C messages with independent mode messages into the same rate limiting management system.

[0022] In view of this, embodiments of this application provide a method for rate limiting of inter-board communication skb queues, which can be executed by a network switching device.

[0023] This application addresses the problems of existing inter-board communication rate limiting schemes being unable to perform differentiated control of skb resources at the protocol granularity, and stacked C2C messages and independent mode messages not being able to share the same rate limiting resources. It proposes to divert messages to different data stream queues according to protocol type or channel identifier, configure packet drop thresholds independently for each data stream queue, so that different protocol messages occupy different skb resource quotas, and send allowed messages to the egress scheduling layer for differentiated forwarding after rate limiting judgment, thereby combining queue-level skb resource control on the ingress port side with queue scheduling on the egress side.

[0024] To make the technical solution of this application clearer and easier to understand, the following describes a method for rate limiting of inter-board communication skb queues provided by an embodiment of this application, in conjunction with the accompanying drawings. Figure 1As shown, this figure is a flowchart of a method for rate limiting of inter-board communication skb queues provided in an embodiment of this application. In this embodiment, the method includes: S201. The network switching device obtains the messages received between the boards.

[0025] The inter-board area is the data transmission channel area within a network switching device, between the main control board and various service line cards. A message is a protocol data packet transmitted through this inter-board channel, containing various control and management data packets such as ARP (Address Resolution Protocol, used to convert between IP addresses and hardware MAC addresses), RPC (Remote Procedure Call, a communication protocol for cross-board interaction of commands and configuration parameters between the device's main control board and line cards), DEVSM (Device StateManager, used to synchronize the hardware operating status and port status information of the board cards), DC01 (Device Channel 01, carrying the regular inter-board service interaction data stream), DC08 (Device Channel 08, carrying the regular inter-board service interaction data stream), and stacked C2C (Card to Card, a dedicated transmission message for cross-device interaction between different line cards and the main control board in a stacked switch scenario), etc.

[0026] The network switching device opens the inter-board message receiving port and continuously listens for data signals transmitted in the inter-board transmission channel. When a data packet arrives at the port, the device's underlying reading program captures the complete data packet, completes the reading of the packet header and payload fields, and caches them temporarily in the skb packet receiving resource space. After this operation, the device obtains the original inter-board message data stored in the skb packet receiving resource, with complete and parseable fields. This original message data represents a control or management service data transmitted through the inter-board channel, waiting for the device to perform traffic diversion and rate limiting processing. It also indicates that there is data traffic waiting to be processed in the current inter-board channel.

[0027] S202. The network switching device distributes the message to a target data stream queue from multiple preset data stream queues according to the message's protocol type or channel identifier.

[0028] The protocol type is a protocol identifier carried in the message, used to distinguish different types of inter-board data packets such as ARP, RPC, and DEVSM. The channel identifier is the channel ID obtained through UDF parsing within the stacked C2C message, used to distinguish inter-board data flows from different service channels. Traffic splitting is the operation by which network switching equipment divides different types of packets into corresponding storage queues according to preset matching rules. The preset data flow queues are pre-defined packet buffer queues numbered from 0 to 15, used by the network switching equipment to temporarily store inter-board packets of the same type. The target data flow queue is the corresponding data flow queue to which a single packet needs to be stored after being determined by the matching rules.

[0029] In some embodiments, a corresponding data flow queue number is pre-configured for each protocol type between boards, and a mapping table of protocol types to data flow queues is stored; the mapping table is queried according to the protocol type or channel identifier of the message to obtain the corresponding data flow queue number, and the message is sent to the target data flow queue corresponding to the data flow queue number.

[0030] The data stream queue number is a numerical identifier assigned to each data stream queue to distinguish between different queues. The mapping table is a table stored locally on the device, which records the correspondence between the protocol type and the corresponding data stream queue number for each type of board.

[0031] Network switching devices pre-build a mapping table locally, which records the protocol type between each board and its corresponding data flow queue number. The device reads the protocol type or channel identifier carried in the packet, uses the read identifier as a search condition to look up the mapping table, obtains the matching data flow queue number after the search is completed, and then stores the current packet into the target data flow queue corresponding to the number. After the device completes the above operations, it obtains the packet stored in the corresponding data flow queue buffer space. This storage state indicates that the packet has been classified and the current packet occupies the skb packet receiving resource of the corresponding data flow queue.

[0032] S203. The network switching device determines whether the number of skb resources currently occupied by the target data stream queue is less than the packet drop threshold based on the packet drop threshold pre-configured in the target data stream queue.

[0033] The packet receiving resource discard threshold is obtained as follows: based on the ratio of the maximum skb resources allowed to be occupied by the target data stream queue to the total skb resources of the system, the packet receiving resource discard threshold is obtained.

[0034] The maximum skb resource is the upper limit of skb resources that can be allocated to a single target data stream queue. The total system skb resource is the total amount of skb resources available for caching packets in all network switching devices. The percentage is the percentage obtained by dividing the maximum queue skb resource value by the total system skb resource value.

[0035] The network switching device reads the maximum skb resource value allocated to the target data stream queue and the total system skb resource value of the entire device. The two sets of values ​​are divided and converted into percentages. After the calculation, the percentage of packet drop threshold is obtained. This percentage value represents the upper limit of the total skb resources of the entire device that the target data stream queue can occupy.

[0036] skb resources are data storage resources used by network switching devices for temporary buffering of inter-board packets. The number of skb resources is the count of skb resources currently occupied by the buffered packets in the target data stream queue.

[0037] The network switching device retrieves the packet drop threshold value of the target data stream queue that was entered in advance, and simultaneously counts the number of skb resources currently occupied by the target data stream queue. The counted number of skb resources is compared with the retrieved packet drop threshold value. After the network switching device completes the comparison operation, it obtains the comparison results of the two sets of values. The comparison results represent the correspondence between the scale of skb resources currently occupied by the target data stream queue and the set threshold.

[0038] In some embodiments, a privileged data stream queue is included among the multiple preset data stream queues. The privileged data stream queue does not participate in rate limiting verification. The packet receiving resource drop threshold of the privileged data stream queue is configured to 100% or no drop threshold is configured. It is used to carry critical messages of the inter-board control plane, so that the critical messages do not participate in rate limiting and pass directly.

[0039] The key messages in the inter-board control plane are RPC and DEVSM messages, which are used to synchronize board status and issue device configurations.

[0040] The network switching device delineates a privileged data flow queue from all preset data flow queues. Specifically, the network switching device uses queue number 0 in the preset data flow queue as the privileged data flow queue and configures a 100% packet drop threshold for this privileged data flow queue, or does not configure a packet drop threshold for it. Key control plane packets such as RPC and DEVSM are diverted and stored in this privileged data flow queue. The comparison operation between skb resource occupancy and threshold value is no longer performed. The packets in the queue are directly sent to the egress scheduling layer. After the device completes the above configuration and packet diversion operation, it obtains key control plane packets stored in the privileged data flow queue that have skipped the rate limit verification process. This storage and transfer status indicates that this type of packet is not constrained by the skb resource occupancy ratio and can directly enter the forwarding stage.

[0041] S204. If the number of skb resources currently occupied by the target data stream queue is less than the packet discard threshold, the packet is allowed to pass and is sent to one of the target egress queues among the multiple egress queues in the egress scheduling layer according to the service priority.

[0042] Service priority is a hierarchical identifier used by the device to classify different types of packets, distinguishing the order in which packets are forwarded. The egress scheduling layer is the hardware scheduling module of the network switching device responsible for packet forwarding queuing. The egress queue is a buffer queue within the egress scheduling layer used to temporarily store packets awaiting forwarding. The destination egress queue is the corresponding egress queue into which a single packet is stored after matching its service priority.

[0043] In some embodiments, the outbound scheduling layer includes a priority queue and multiple weighted polling queues; packets with a first priority are sent to the priority queue, and packets with a second priority are sent to one of the multiple weighted polling queues; Among them, the first priority is higher than the second priority. The packets mapped to the priority queue are always forwarded with priority over the packets in all weighted round-robin queues during scheduling. Each of the multiple weighted round-robin queues is configured with a scheduling weight, and the egress bandwidth is allocated according to the proportional relationship between the scheduling weights configured in each weighted round-robin queue.

[0044] Priority queues are a type of egress queue within the egress scheduling layer. These priority queues have the highest forwarding priority during scheduling. As long as there are packets to be forwarded in this priority queue, the network switching device will prioritize processing the packets in this queue, forwarding them before packets in all weighted round-robin queues. Weighted round-robin queues are another type of egress queue within the egress scheduling layer, with their forwarding bandwidth allocated by a preset value. The first priority is a higher-level service priority identifier. The second priority is a lower-level service priority identifier. The scheduling weight is a fixed value assigned to the weighted round-robin queue to allocate egress bandwidth. Egress bandwidth is the data transmission capacity of the inter-board channel available for packet forwarding.

[0045] The network switching device compares the number of skb resources currently occupied by the target data stream queue with the packet drop threshold. If the comparison result shows that the occupancy has not reached the threshold, a packet release judgment result is generated. The device reads the service priority identifier carried by the packet and distributes the packet to the target egress queue corresponding to the egress scheduling layer according to the identifier. The egress scheduling layer pre-divides one priority queue and multiple weighted round-robin queues. The device identifies the priority level of the packet, stores the packet with the first priority in the priority queue, and stores the packet with the second priority in any weighted round-robin queue. When forwarding packets, the device first processes all packets in the priority queue, and then processes the packets in the weighted round-robin queues in turn. Each weighted round-robin queue reads the scheduling weight value stored in itself and allocates the egress bandwidth according to the ratio between the weight values. After the device completes the above packet distribution operation, it obtains the packet stored in the corresponding egress queue cache space. This storage status indicates that the packet has passed the skb resource occupancy verification and the packet has been assigned to the corresponding forwarding cache queue according to its own service priority.

[0046] If the number of skb resources currently occupied by the target data stream queue is greater than or equal to the packet discard threshold, the packet is discarded directly.

[0047] The network switching device retrieves the number of skb resources currently occupied in the target data stream queue and compares this value with the preset packet drop threshold. When the comparison result shows that the occupied value is greater than or equal to the threshold value, the device releases the buffer space occupied by the current packet and clears all data of the packet. After the device completes the operation, it obtains the cleared and destroyed packet data. This processing result indicates that the skb resource occupied value of the current target data stream queue exceeds the allocation limit, and this packet will no longer enter the egress scheduling process.

[0048] S205. The network switching device queues and forwards packets in the target egress queue according to the scheduling policy corresponding to the target egress queue; wherein, the scheduling policy includes priority scheduling and weighted round-robin scheduling.

[0049] When network switching devices process egress queue packet forwarding, the execution logic, packet processing order, and bandwidth allocation methods of the two scheduling strategies differ in several ways. With priority scheduling for egress queues, the device continuously reads the packets cached within the queue. As long as there are unsent packets in the queue, the device will not switch to other egress queues for forwarding. Packets in other queues must wait until all packets in the current queue have been sent before they can be forwarded. This scheduling method does not allocate a fixed proportion of egress bandwidth to queues; the packet forwarding order is determined solely by the queue's priority level. With weighted round-robin scheduling, there is no absolute forwarding order for egress queues. The device reads the pre-configured scheduling weight value for each weighted round-robin queue and, based on the ratio of different queue weight values, cyclically retrieves the corresponding number of packets from each queue to complete the transmission. Each queue can continuously receive its corresponding share of egress bandwidth according to its weight, preventing a situation where one queue's packets occupy all forwarding resources for an extended period while other queues continuously wait.

[0050] After the device processes packets using two scheduling strategies, it will obtain two different packet output data streams. The data stream obtained by priority scheduling indicates that packets from high-level queues will occupy all forwarding resources, while the sending of packets from low-level queues will be continuously suspended. The data stream obtained by weighted round-robin scheduling indicates that multiple queues send packets in turn according to their weight ratios, and each queue can continuously obtain its corresponding share of forwarding opportunities.

[0051] The outbound scheduling layer adopts the BCM53242 chip-based outbound scheduling system, which includes one priority queue and three weighted polling queues. The device maps packets to the corresponding outbound queues according to service importance: critical control packets such as RPC and DEVSM are mapped to the priority queue, while channel packets such as DC01 and DC08 are mapped to the weighted polling queues, and corresponding scheduling weights are configured for each weighted polling queue.

[0052] like Figure 2 As shown in the figure, this figure is a schematic diagram of the overall process of inter-board protocol rate limiting provided in the embodiment of this application. Figure 2The complete process logic is as follows: Inter-board communication messages first enter the device's ingress port, and are divided into data flow queues 0 to 15 by the L1 layer routing logic; the system determines whether the current queue is a privileged data flow queue (i.e., queue 0, which is specifically for carrying critical messages of the inter-board control plane among multiple preset data flow queues, and whose packet reception resource discard threshold is configured to 100% or no discard threshold is configured). If it is a privileged data flow queue, the message does not participate in the skb rate limiting verification and is directly sent to the egress scheduling layer; if it is a normal data flow queue, the system reads the preset skb packet reception resource discard threshold of the queue, counts the current skb resource occupied by the queue and compares it with the threshold; if the skb resource occupied is greater than or equal to the packet reception resource discard threshold, the device directly discards the message; if it does not exceed the limit, the message is mapped to the target egress queue corresponding to the egress scheduling layer through the L4 hardware table entry. Finally, all allowed messages enter the BCM53242 chip egress scheduling layer, where one priority queue and three weighted polling queues complete the queuing and forwarding according to their respective scheduling strategies.

[0053] The method also includes: When the message is a C2C message in a stacked scenario, the channel identifier carried in the message is parsed through a user-defined field, and the C2C message is mapped to the same target data stream queue as the same protocol in the standalone mode according to the channel identifier.

[0054] User-defined fields (UDFs) are packet parsing fields that network switching devices can configure themselves, used to read data stored at a custom offset position within the packet. The channel identifier is the channel ID recorded within the stacked C2C packet, used to distinguish inter-board data flows of different service channels. Standalone mode is a working mode in which a single network switching device operates independently and is not stacked with other switches. Similar protocols are inter-board protocols with consistent functions and purposes, such as ARP packets in standalone mode and ARP-type C2C packets in stacked scenarios.

[0055] The network switching device identifies the type of the currently received packet. After determining that the packet belongs to a C2C packet in a stacked scenario, it calls a user-defined field parsing program to read the channel identifier from a preset offset position within the packet. The network switching device then retrieves a locally stored mapping table of protocol types and data stream queues. Based on the read channel identifier, it determines the protocol type corresponding to the C2C packet, and then queries the mapping table with that protocol type to obtain the target data stream queue that is the same as that for packets of the same protocol in standalone mode. Finally, the C2C packet is sent to the buffer of that target data stream queue. At this point, C2C packets in a stacked scenario and packets of the same protocol in standalone mode are stored in the same data stream queue, and both types of packets share the same packet reception resource drop threshold for rate limiting verification.

[0056] like Figure 3As shown in the figure, this is a schematic diagram of the stacked C2C type message and UDF / channel mapping provided in an embodiment of this application. Figure 3 The complete logic is as follows: The network switching device distinguishes between two types of input packets: stand-alone mode inter-board packets and C2C packets in stacked scenarios. For stand-alone mode inter-board packets, the device calls the existing sChannelRules protocol rules to complete the matching. For C2C packets in stacked scenarios, the device calls the newly added C2C-specific sChannelRules rules and simultaneously enables the extended user-defined field (UDF) parsing logic to extract the channel identifier from the packet. The device uses the extracted channel identifier to query the mapping table between protocol type and data flow queue, mapping the C2C message to the target data flow queue corresponding to the same function and protocol in independent mode. After the two types of messages complete the rule matching, they enter the L4 / ACL classification matching stage. The mapping table is searched in combination with the protocol type or channel identifier to match the corresponding target data flow queue. After the matching is completed, the messages corresponding to the DC01 and DC08 channels are distributed to the weighted polling queues 1 to 3 in the egress scheduling layer. All other types of management messages are sent to the priority queue in the egress scheduling layer. The weighted polling queue can allocate egress bandwidth according to its own configured scheduling weight, and the messages in the priority queue will be forwarded first.

[0057] In some embodiments, the device provides a configuration interface and a display interface. Users can issue configuration commands through the configuration interface to dynamically adjust the rate limiting parameters. The configuration commands include a packet drop threshold configuration command, a mapping relationship configuration command, and a status display command. Specifically, the packet drop threshold configuration command sets a percentage value for the packet drop threshold for a specified data stream queue; the mapping relationship configuration command establishes or modifies the correspondence between protocol types and data stream queues; and the status display command outputs the current skb resource occupancy status of each data stream queue and a count of the number of dropped packets on the display interface.

[0058] Based on the above description, this application has the following beneficial effects: This application provides a method for rate limiting of skb queues in inter-board communication. By diverting packets to data stream queues and determining rate limits based on the packet drop threshold of the data stream queues, it enables differentiated management of skb resource usage at the queue level. This allows packets of different protocol types to receive different skb resource allocations according to their importance, preventing non-critical packets from preempting the packet reception resources of critical packets. This ensures that critical control packets such as RPC and DEVSM can still be received normally under burst traffic. After the rate limiting determination is passed, the packets are sent to the priority queue or weighted polling queue of the egress scheduling layer for queuing and forwarding. This allows the skb resource control on the ingress port side to cooperate with the queue scheduling on the egress side. While ensuring the packet reception resources of critical packets, it further ensures low-latency transmission of high-priority packets during egress forwarding and fair bandwidth allocation of ordinary packets, improving the rate limiting effect of inter-board communication in multi-mode coexistence scenarios.

[0059] The above text combined Figures 1-3 The method for limiting the rate of inter-board communication skb queues provided in the embodiments of this application has been described in detail. The apparatus and equipment provided in the embodiments of this application will be described below with reference to the accompanying drawings.

[0060] like Figure 4 As shown in the figure, this is a schematic diagram of a device for rate limiting of inter-board communication skb queues provided in an embodiment of this application. The device includes: The acquisition module 301 is used to acquire messages received between boards; The processing module 302 is configured to: divert the packet to a target data stream queue from multiple preset data stream queues according to the protocol type or channel identifier of the packet; determine whether the number of skb resources currently occupied by the target data stream queue is less than the packet discarding threshold according to the packet receiving resource discarding threshold pre-configured by the target data stream queue; if the number of skb resources currently occupied by the target data stream queue is less than the packet discarding threshold, then determine that the packet is allowed to pass, and send the packet to a target egress queue from multiple egress queues in the egress scheduling layer according to the service priority; The forwarding module 303 is used to queue and forward packets in the target egress queue according to the scheduling strategy corresponding to the target egress queue; wherein, the scheduling strategy includes priority scheduling and weighted round-robin scheduling.

[0061] Optionally, the processing module 302 is further configured to, when the message is a C2C message in a stacked scenario, parse the channel identifier carried in the message through a user-defined field, and map the C2C message to the target data stream queue with the same protocol as in the independent mode according to the channel identifier.

[0062] Optionally, the outbound scheduling layer includes a priority queue and multiple weighted polling queues. The processing module 302 is specifically used to send packets with a first priority into the priority queue and packets with a second priority into one of the multiple weighted polling queues. In this context, the first priority is higher than the second priority. Packets mapped to the priority queue are always forwarded with priority over packets in all weighted round-robin queues during scheduling. Each of the multiple weighted round-robin queues is configured with a scheduling weight, and each weighted round-robin queue allocates egress bandwidth according to the proportional relationship between their respective configured scheduling weights.

[0063] Optionally, the processing module 302 is also used to pre-configure the corresponding data stream queue number for each type of protocol between boards, and store the mapping table of protocol type to data stream queue; The processing module 302 is specifically used to query the mapping table according to the protocol type or channel identifier of the message, obtain the corresponding data stream queue number, and send the message into the target data stream queue corresponding to the data stream queue number.

[0064] Optionally, the processing module 302 is specifically used to obtain the packet receiving resource discard threshold based on the ratio of the maximum skb resources allowed to be occupied by the target data stream queue to the total skb resources of the system.

[0065] Optionally, the processing module 302 is further configured to directly discard the packet if the number of skb resources currently occupied by the target data stream queue is greater than or equal to the packet discard threshold.

[0066] The inter-board communication skb queue rate limiting device according to the embodiments of this application can correspond to the execution of the method described in the embodiments of this application, and the other operations and / or functions of each module / unit of the inter-board communication skb queue rate limiting device are respectively for implementing Figure 1 For the sake of brevity, the corresponding processes of each method in the illustrated embodiments will not be described in detail here.

[0067] This application also provides a computing device. For example... Figure 5 As shown in the figure, this is a schematic diagram of a computing device provided in an embodiment of this application. The computing device 400 includes a bus 401, a processor 402, a communication interface 403, and a memory 404. The processor 402, the memory 404, and the communication interface 403 communicate with each other via the bus 401.

[0068] Bus 401 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0069] Processor 402 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).

[0070] Communication interface 403 is used for communication with external devices.

[0071] Memory 404 may include volatile memory, such as random access memory (RAM). Memory 404 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0072] The memory 404 stores executable code, and the processor 402 executes the executable code to perform the aforementioned method for limiting the rate of the inter-board communication skb queue.

[0073] Specifically, in achieving Figure 4 In the case of the illustrated embodiment, and Figure 4 When the modules or units of the inter-board communication skb queue rate limiting device described in the embodiment are implemented in software, the execution... Figure 4 The software or program code required for the functions of each module / unit can be partially or entirely stored in memory 404. Processor 402 executes the program code corresponding to each unit stored in memory 404, and executes the aforementioned method for limiting the speed of the inter-board communication skb queue.

[0074] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-described method for limiting the rate of the inter-board communication skb queue.

[0075] This application also provides a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in this application are generated.

[0076] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0077] When the computer program product is executed by a computer, the computer executes any of the aforementioned methods for limiting the rate of the inter-board communication skb queue. The computer program product can be a software installation package; when any of the aforementioned methods for limiting the rate of the inter-board communication skb queue needs to be used, the computer program product can be downloaded and executed on the computer.

[0078] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.

[0079] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered within the scope of protection of this application.

Claims

1. A method for rate limiting of inter-board communication skb queues, characterized in that, The method includes: Obtain messages received between boards; Based on the protocol type or channel identifier of the message, the message is diverted to a target data stream queue from among multiple preset data stream queues; Based on the packet receiving resource discarding threshold pre-configured in the target data stream queue, determine whether the number of skb resources currently occupied by the target data stream queue is less than the packet receiving resource discarding threshold; If the number of skb resources currently occupied by the target data stream queue is less than the packet drop threshold, the packet is determined to be allowed to pass, and the packet is sent to one of the multiple egress queues in the egress scheduling layer according to the service priority. The packets in the target egress queue are queued and forwarded according to the scheduling strategy corresponding to the target egress queue; wherein, the scheduling strategy includes priority scheduling and weighted round-robin scheduling.

2. The method according to claim 1, characterized in that, After acquiring the messages received between boards, the method further includes: When the message is a C2C message in a stacked scenario, the channel identifier carried in the message is parsed through a user-defined field, and the C2C message is mapped to the target data stream queue with the same protocol as in the standalone mode according to the channel identifier.

3. The method according to claim 1, characterized in that, The exit scheduling layer includes a priority queue and multiple weighted polling queues; The step of sending the message to a target egress queue from among multiple egress queues in the egress scheduling layer according to service priority includes: Messages with the first priority are sent to the priority queue, and messages with the second priority are sent to one of the multiple weighted polling queues. In this context, the first priority is higher than the second priority. Packets mapped to the priority queue are always forwarded with priority over packets in all weighted round-robin queues during scheduling. Each of the multiple weighted round-robin queues is configured with a scheduling weight, and each weighted round-robin queue allocates egress bandwidth according to the proportional relationship between their respective configured scheduling weights.

4. The method according to claim 1, characterized in that, Before acquiring the messages received between boards, the method further includes: Pre-configure the corresponding data stream queue number for each type of protocol between boards, and store the mapping table from protocol type to data stream queue; The step of routing the message to a target data stream queue from multiple preset data stream queues based on the message's protocol type or channel identifier includes: The mapping table is queried according to the protocol type or channel identifier of the message to obtain the corresponding data stream queue number, and the message is sent to the target data stream queue corresponding to the data stream queue number.

5. The method according to claim 1, characterized in that, The packet discard threshold is obtained in the following way: The packet drop threshold is obtained based on the ratio of the maximum skb resources allowed to be occupied by the target data stream queue to the total skb resources of the system.

6. The method according to claim 1, characterized in that, The method further includes: If the number of skb resources currently occupied by the target data stream queue is greater than or equal to the packet discard threshold, the packet is directly discarded.

7. The method according to claim 1, characterized in that, The plurality of preset data stream queues includes a privileged data stream queue, which does not participate in rate limiting verification.

8. A device for rate limiting of skb queues in inter-board communication, characterized in that, The device includes: The acquisition module is used to acquire messages received between boards; The processing module is used to divert the packet to a target data stream queue from multiple preset data stream queues according to the protocol type or channel identifier of the packet; determine whether the number of skb resources currently occupied by the target data stream queue is less than the packet discarding threshold according to the packet receiving resource discarding threshold pre-configured by the target data stream queue; if the number of skb resources currently occupied by the target data stream queue is less than the packet discarding threshold, then the packet is determined to be allowed to pass, and the packet is sent to a target egress queue from multiple egress queues in the egress scheduling layer according to the service priority. The forwarding module is used to queue and forward packets in the target egress queue according to the scheduling strategy corresponding to the target egress queue; wherein, the scheduling strategy includes priority scheduling and weighted round-robin scheduling.

9. A computing device, characterized in that, Including memory and processor; The memory stores one or more computer programs, the one or more computer programs including instructions; when the instructions are executed by the processor, the computing device performs the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for performing the method as described in any one of claims 1 to 7.