Traffic management system and method, chip, and computer-readable storage medium

By adopting the design of multi-core multiplexed queue resource shared buffer area in network switching equipment, the problem of read and write conflicts of shared queue resources under multi-core forwarding architecture is solved, high-performance and low-latency traffic management is achieved, and the chip area is reduced. and power consumption.

WO2024222965A1PCT designated stage expired Publication Date: 2024-10-31SANECHIPS TECH CO LTD

Patent Information

Application Number
PCT/CN2024/090448
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-28
Filing Date
2024-04-28
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

In a multi-core forwarding architecture, the traditional core stacking method of network switching equipment causes chip area, power consumption and heat dissipation to become design bottlenecks, and there is also the problem of performance loss caused by read and write conflicts of shared queue resources.

Method used

Multi-core multiplexing queue resources are used to share the cache area, and the enqueuing processing module and the linked list management module are used to enqueue data and link list concatenation. The dequeuing processing module reads data according to the queue linked list information, achieving conflict-free multi-channel reading and writing, and abandoning Traditional core stacking method.

Benefits of technology

It reduces the area and power consumption of the chip, solves the problem of read and write conflicts of shared queue resources, achieves high-performance traffic management, finds a balance between physical implementation and logical implementation, and optimizes design performance and area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024090448_31102024_PF_FP_ABST
    Figure CN2024090448_31102024_PF_FP_ABST
Patent Text Reader

Abstract

A traffic management system and method, a chip, and a computer-readable storage medium, relating to the technical field of communications. The method comprises: acquiring an inbound packet descriptor, determining a target idle pointer on the basis of the inbound packet descriptor, and writing inbound packet data corresponding to the inbound packet descriptor into an idle sub-cache area corresponding to the target idle pointer; according to a cache area ID corresponding to the idle sub-cache area where the inbound packet data is written into, performing linked list series-connection and linked list updating to generate queue linked list information; and determining an outbound packet descriptor correspondingly carried by a port scheduling instruction, determining, according to the queue linked list information, a target read pointer corresponding to the outbound packet descriptor, and reading, from a target sub-cache area corresponding to the target read pointer, packet data to be dequeued. High-performance and low-latency queue resource sharing can be implemented, and the performance loss caused by read-write conflicts of sharing queue resource in a multi-core forwarding architecture is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Traffic management system, method, chip and computer-readable storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application No. 202310481763.1 filed on April 28, 2023, the contents of which are incorporated herein by reference in their entirety. Technical Field

[0003] The present application relates to the field of network communication technology, and in particular to a traffic management system, method, chip, and computer-readable storage medium. Background Art

[0004] In related technologies, to alleviate the ever-expanding bandwidth application demands in data centers, carrier networks, and other traffic-intensive high-performance computing environments, high-performance network switching devices typically use a multi-core forwarding architecture to improve chip processing capabilities. However, current network switching devices still use the traditional core stacking approach under the multi-core forwarding architecture, resulting in chip area / power consumption / heat dissipation issues becoming design bottlenecks. Therefore, how to strike a balance between the physical and logical implementation of network switching devices to achieve the optimal solution for performance cost and area in the current multi-core forwarding architecture design, and to reduce the performance loss introduced by read and write conflicts in shared queue resources in network switching devices under the multi-core forwarding architecture, has become a technical problem that needs to be solved urgently.

[0005] Summary of the Invention

[0006] An embodiment of the present application provides a traffic management system, which includes multiple cores and a queue resource shared cache area for multi-channel reading and writing by each core, wherein the queue resource shared cache area includes multiple sub-cache areas, and the core includes an enqueue processing module, a linked list management module, and a dequeue processing module connected in sequence, wherein the enqueue processing module is configured to obtain an incoming message descriptor, determine a target free pointer allocated to the incoming message descriptor, and write the incoming message descriptor to an idle sub-cache area corresponding to the target free pointer for enqueue processing, wherein the idle sub-cache area is a sub-cache area in an idle state; the linked list management module is configured to perform linked list concatenation and linked list update based on the cache area ID corresponding to the idle sub-cache area where the incoming message data is written, and generate queue linked list information; the dequeue processing module is configured to receive a port scheduling instruction, determine the outgoing message descriptor carried by the port scheduling instruction, and determine the target read pointer corresponding to the outgoing message descriptor based on the queue linked list information, and read the message data to be dequeued from the target sub-cache area corresponding to the target read pointer for dequeue processing.

[0007] In addition, an embodiment of the present application also provides a traffic management method, which includes: obtaining an incoming message descriptor, and determining a target idle pointer based on the incoming message descriptor, writing the incoming message data corresponding to the incoming message descriptor into an idle sub-cache corresponding to the target idle pointer, wherein the idle sub-cache is a sub-cache in an idle state; performing linked list concatenation and linked list update according to the cache ID corresponding to the idle sub-cache in which the incoming message data is written, and generating queue linked list information; and receiving a port scheduling instruction, determining the outgoing message descriptor carried by the port scheduling instruction, and determining the target read pointer corresponding to the outgoing message descriptor based on the queue linked list information, and reading the message data to be dequeued from the target sub-cache corresponding to the target read pointer.

[0008] In addition, an embodiment of the present application also provides a chip, including the traffic management system as described in any of the above items.

[0009] In addition, an embodiment of the present application further provides a computer-readable storage medium, on which a traffic management program is stored. When the traffic management program is executed by a processor, the steps of the traffic management method described above are implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0011] FIG1 is a schematic diagram of an application environment of an Ethernet switching device according to an embodiment of the present application;

[0012] FIG2 is a block diagram of a queue management subsystem according to an embodiment of the present application;

[0013] FIG3 is a schematic diagram of a shared idle pointer data flow according to an embodiment of the present application;

[0014] FIG4 is a flow chart showing the application and recovery of the idle pointer FIFO;

[0015] FIG5 is a schematic diagram of reading and writing a queue linked list according to an embodiment of the present application;

[0016] FIG6 is a schematic diagram showing a structural comparison between a cut-through (through forwarding) according to an embodiment of the present application and a traditional cut-through;

[0017] FIG7 is a flow chart of the packet linked list idle address recovery processing logic according to an embodiment of the present application;

[0018] FIG8 is a schematic diagram of a process for handling packet linked list read and write conflicts according to an embodiment of the present application;

[0019] FIG9 is a flow chart of an embodiment of a traffic management method according to the present application;

[0020] FIG10 is a schematic diagram of the structure of the chip involved in the solution of an embodiment of the present application.

[0021] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0022] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0023] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0024] In this application, unless otherwise specified or limited, the terms "connection" and "fixed" should be understood in a broad sense. For example, "connection" can mean fixed connection, detachable connection, or integration; it can mean mechanical connection or electrical connection; it can mean direct connection or indirect connection through an intermediate medium; it can mean internal communication between two elements or interaction between two elements, unless otherwise specified. For those skilled in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances.

[0025] In addition, the descriptions of "first", "second", etc. in this application are for descriptive purposes only and should not be understood as indicating or implying their relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that they can be implemented by ordinary technicians in this field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0026] Example 1

[0027] Currently, centralized chip-based high-performance, high-bandwidth traffic management systems typically utilize a multi-core architecture to enhance chip processing capabilities. However, with increasing requirements for power consumption, area, heat dissipation, performance, and latency, key technologies are required to achieve high-performance, low-latency cut-through functionality and resolve performance losses caused by read-write conflicts when multi-core, multi-channel queue resource sharing.

[0028] Centralized chip-based high-performance, high-bandwidth traffic management systems are primarily used in Ethernet switching equipment. To address the growing bandwidth demands of data centers (DCs), carrier networks, and other traffic-intensive high-performance computing environments, multi-core architectures are often employed to enhance chip processing capabilities. Faced with the market demand for ultra-high throughput from 5G and data center products, chip area, power consumption, heat dissipation, latency, and performance have become design bottlenecks. Ideally, achieving full queue resource sharing within a multi-core forwarding architecture and ultimately finding the optimal solution that balances current design implementation cost and area remain common challenges in the industry.

[0029] DC low latency has two main application scenarios:

[0030] 1) Artificial Intelligence (AI) and distributed storage: The proliferation of new AI algorithms and data has led to an increase in AI GPUs (Graphics Processing Units) and storage, placing new demands on network capacity (low latency and zero packet loss). This is primarily used in applications such as HPC (High Performance Computing), AI clusters (GNU clusters), and HFT (High Frequency Trading).

[0031] 2) Pod deployment mainly involves GPU server clusters, X86 computing clusters, and storage clusters, with a high volume of network traffic between clusters.

[0032] Network latency is part of end-to-end (E2E) latency, and many new protocols have been developed to reduce it. Traditional TCP (Transmission Control Protocol) has a latency of tens of microseconds (including kernel context switches of 5 to 10 microseconds, packet copying and encapsulation, and so on). Remote Direct Memory Access (RDMA) has replaced TCP. RDMA is a GON (group of unintended) retransmission mechanism with low tolerance for packet loss and requires lossless network transmission. Many other protocols are also working on similar issues, such as Google's QUIC (Quick UDP Internet Connection), which replaced TCP for the World Wide Web. Long-tail latency is a problem in large-scale distributed systems, primarily caused by jitter in latency. For example, assume that most service calls in a system respond within 10ms, but 1% experience a latency of 1 second. If a user request is processed only on one such server, then only one out of 100 user requests will be slow (1 second). If a user request must collect responses from 100 such services in parallel, 63% of user requests will take more than one second. Even for a service with a 1 in 10,000 probability of experiencing a response delay exceeding one second on a single server, if the service scales to 2,000 instances, almost one in five user requests will take more than one second. For messages requiring low latency, the JITTER function should be reduced. The length of the message also affects forwarding latency. For example, a 9,000-byte message requires 17 microseconds to receive a complete message. If the message's linked list is not fully concatenated, i.e., the message is read and forwarded, data transmission errors will occur.

[0033] In traditional network switching equipment, the architecture design of equipment with a rate below 2.4T is relatively simple, and the performance can also meet the design requirements.

[0034] However, applications on 12.8T / 51.2T high-performance switching devices face the following challenges: In a multi-core forwarding architecture, the traditional core stacking approach creates design bottlenecks in terms of area, power consumption, and heat dissipation. Striking a balance between physical and logical implementation, maximizing queue resource sharing among multiple cores, and resolving performance losses caused by read / write conflicts within these cores have become new issues and challenges.

[0035] Based on this, an embodiment of the present application proposes a traffic management system. In this embodiment, the traffic management system includes: multiple cores, and a queue resource shared cache area for each core to perform multi-channel reading and writing. The queue resource shared cache area includes multiple sub-caches, and the core includes an enqueue processing module, a linked list management module, and a dequeue processing module connected in sequence.

[0036] The enqueue processing module is configured to obtain an incoming message descriptor, determine a target idle pointer based on the incoming message descriptor, and write the incoming message data corresponding to the incoming message descriptor into an idle sub-cache area corresponding to the target idle pointer, wherein the idle sub-cache area is a sub-cache area in an idle state.

[0037] The linked list management module is configured to perform linked list concatenation and linked list update according to the buffer area ID (IDentity, identity identification number) corresponding to the idle sub-buffer area where the inbound message data is written, and generate queue linked list information.

[0038] In this embodiment, the packet linked lists are concatenated according to the buffer zone ID, and queue linked list information is generated after the queue entry condition is met.

[0039] The dequeue processing module is configured to receive a port scheduling instruction, determine the outgoing message descriptor carried by the port scheduling instruction, and determine the target read pointer corresponding to the outgoing message descriptor according to the queue linked list information, and read the message data to be dequeued from the target sub-buffer area corresponding to the target read pointer.

[0040] The traffic management system of this embodiment can be applied to SPINE, Leaf, TOR (Top of Rank), or DC (Data Center) switch scenarios. This embodiment of the application relates to a high-performance, high-bandwidth traffic management system for applications in cache sharing, queue management, and low-latency cut-through technologies.

[0041] Exemplarily, the traffic management system further includes a port scheduling subsystem, and the port scheduling subsystem is further connected to the dequeue processing module.

[0042] The port scheduling subsystem is configured to obtain a data read operation request, generate a port scheduling instruction according to the data read operation request, and send the port scheduling instruction to the dequeue processing module.

[0043] The embodiment of the present application adopts a multi-core multiplexing queue resource shared cache area to perform multi-channel reading and writing of the data cached in the queue resource shared cache area, without the need to set up an independent cache area for each core. While reducing the cost of hardware, it also facilitates the centralized management of data reading and writing, saving chip area / power consumption / heat dissipation, and a single core independently manages the enqueueing and dequeueing of queue information, avoiding read and write conflicts when sharing queue resources. This embodiment abandons the core stacking method under the traditional multi-core forwarding architecture. Instead, it obtains the incoming message descriptor through the kernel's enqueue processing module, determines the target free pointer allocated to the incoming message descriptor, and writes the incoming message descriptor into the free sub-cache corresponding to the target free pointer for enqueue processing. Then, the linked list management module performs linked list concatenation and linked list updates for the storage location of the enqueued message data in the queue resource shared cache area to generate queue linked list information, so that the dequeue processing module can read the required message data from the specified storage location in the queue resource shared cache area according to the queue linked list information, thereby ensuring that there is no conflict in reading and writing when queue resources are shared, ensuring the high performance requirements of the network switching device (or network switching chip), reducing bandwidth loss, and finding a balance between the physical implementation and logical implementation of the network switching device, achieving the optimal solution for performance cost and area of ​​the current multi-core forwarding architecture design, and effectively solving the performance loss problem introduced by the shared queue resource read and write conflict problem of the network switching device under the multi-core forwarding architecture.

[0044] It is worth mentioning that the embodiment of the present application provides a high-performance, high-bandwidth traffic management system that can achieve conflict-free reading and writing when queue resources are shared, ensuring performance requirements, finding a balance between logical implementation and physical implementation, and solving the problem that in traditional Ethernet switching equipment, multiple levels of switching equipment are needed to complete high-bandwidth networking and performance testing. Through the embodiment of the present application, a single independent device can be used to complete high-performance, high-bandwidth traffic management, achieving the design requirements of ultra-high throughput in DC data centers, and solving the area / power consumption / heat dissipation problems encountered by ultra-high-bandwidth traffic management architectures. The final area is reduced by 36%, power consumption is reduced, and local heat dissipation problems are solved. The technical solution of this embodiment involves SPINE / TOR / DC switch scenarios, which can enhance the core competitiveness of data communication equipment.

[0045] Furthermore, in a possible implementation manner, the kernel further includes an idle pointer management module and a cache management module, and both the idle pointer management module and the cache management module are connected to the enqueue processing module.

[0046] The enqueue processing module is configured to send the idle pointer application corresponding to the incoming message descriptor to the idle pointer management module after obtaining the incoming message descriptor.

[0047] The idle pointer management module is configured to obtain a target idle pointer from a preset pointer management resource pool in response to the idle pointer request, and send the target idle pointer to the enqueue processing module.

[0048] The enqueue processing module is further configured to send the target free pointer to the cache management module.

[0049] The cache management module is configured to determine, based on the target idle pointer, an idle sub-cache area corresponding to the target idle pointer, and send a first cache area ID corresponding to the idle sub-cache area to the enqueue processing module.

[0050] The enqueue processing module is further configured to write the message data corresponding to the incoming message descriptor into the idle sub-buffer area corresponding to the target idle pointer according to the first buffer area ID.

[0051] In this embodiment, the inbound message descriptor refers to the message descriptor of the inbound message data. The first buffer area ID refers to the buffer area ID of the free sub-buffer area corresponding to the target free pointer. Those skilled in the art will appreciate that the first buffer area ID can be used to indicate the address information of the free sub-buffer area corresponding to the target free pointer, so that the subsequent enqueue processing module can write the message data corresponding to the inbound message descriptor into the free sub-buffer area corresponding to the target free pointer based on the first buffer area ID.

[0052] In this embodiment, a kernel is provided with a free pointer management module and a cache management module, both of which are connected to an enqueue processing module. In response to a free pointer request sent by the enqueue processing module, the free pointer management module queries a free sub-cache with a free address from a preset pointer management resource pool, and then sends a pointer corresponding to the free sub-cache as a target free pointer to the enqueue processing module. The enqueue processing module then sends the target free pointer to the cache management module. The cache management module then determines, based on the target free pointer, a free sub-cache corresponding to the target free pointer and sends a first cache ID corresponding to the free sub-cache to the enqueue processing module. The enqueue processing module writes the message data corresponding to the inbound message descriptor into the free sub-cache corresponding to the target free pointer based on the first cache ID. This facilitates determining which sub-cache to write to based on the usage of free pointers in the pointer management resource pool, thereby achieving uniform data distribution, reducing write conflicts in the shared cache, and reducing the randomness of location storage when storing message data, thereby significantly reducing the probability of conflicts when multiple kernels simultaneously write data to the shared cache.

[0053] Exemplarily, the traffic management system further includes a congestion avoidance subsystem, which is connected to the enqueue processing module.

[0054] The congestion avoidance subsystem is configured to obtain pending message data, perform Quality of Service (QOS) scheduling on the pending message data, and send the QOS-scheduled pending message data to the enqueue processing module. The enqueue processing module is further configured to use the QOS-scheduled pending message data as the inbound message data, thereby effectively implementing dequeue processing of the qmu_dm queue.

[0055] In this embodiment, those skilled in the art will appreciate that QOS scheduling may include SP (Strict Priority) scheduling, RR (Round Robin) scheduling, and WRR (Weighted Round Robin) scheduling.

[0056] Furthermore, in an implementable manner, the congestion avoidance subsystem is connected to the dequeue processing module, and the dequeue processing module is further configured to identify the message data to be discarded stored in the queue resource shared buffer area; and mark the message data to be discarded with a discard identifier.

[0057] The congestion avoidance subsystem is further configured to identify the message data with the discard identifier stored in the queue resource shared buffer area as the message data to be discarded, reclaim the target cache address corresponding to the cache sub-area that caches the message data to be discarded, and generate message discard information.

[0058] The dequeue processing module is further configured to send the message discard information and the third cache area ID of the cache sub-area corresponding to the target cache address to the pointer management resource pool, so that the pointer management resource pool can reclaim the pointer corresponding to the third cache area ID.

[0059] In this embodiment, the discard flag can be used to indicate whether the message data is to be discarded. The third buffer area ID refers to the buffer area ID of the buffer sub-area corresponding to the target buffer address. Those skilled in the art will understand that the third buffer area ID can be used to indicate the address information of the buffer address corresponding to the message data to be discarded.

[0060] This embodiment connects the congestion avoidance subsystem with the dequeue processing module, identifies the message data to be discarded stored in the queue resource shared buffer area through the dequeue processing module, marks the message data to be discarded with a discard identifier, and then identifies the message data with the discard identifier stored in the queue resource shared buffer area as the message data to be discarded through the congestion avoidance subsystem, reclaims the target cache address corresponding to the cache sub-area that caches the message data to be discarded, and generates message discard information. Then, the dequeue processing module sends the message discard information and the third cache area ID of the cache sub-area corresponding to the target cache address to the pointer management resource. Pool, for the pointer management resource pool to recycle the pointer corresponding to the third buffer area ID, so as to facilitate the clearing of the to-be-discarded message data in the queue resource shared buffer area, and release the storage capacity of the storage address of the to-be-discarded message data. The pointer management resource pool recycles the pointer corresponding to the storage address of the to-be-discarded message data, so that the switching chip can write new data to the sub-buffer area with the released storage capacity, thereby making it possible to update the pointers of each sub-buffer area in the shared buffer area in real time, and evenly store the message data according to the real-time pointer information of each sub-buffer area, thereby reducing the probability of conflict when writing the message data into the shared cache.

[0061] Example 2

[0062] Based on the embodiment 1 of the present application, in another embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be repeated hereafter. On this basis, in order to help understand the technical concept or technical principle of the embodiment 1, a specific embodiment 2 is listed.

[0063] Please refer to Figure 2. This specific embodiment provides a high-performance and high-bandwidth traffic management system design. The first key technical solution of this specific embodiment is how the qmu_list (i.e., queue management subsystem, the above-mentioned traffic management system) in the traffic management system solves the read and write conflict problem of multiple cores and multiple channels.

[0064] As shown in Figure 2, the queue management subsystem qmu_list is divided into MUX (Multiplexer, multiplexer), share_idle_list (i.e. shared idle pointer), share_mem (i.e. shared cache), qmu_list_u* (queue list core (qmu_list_core), that is, the above-mentioned kernel, where "*" represents the kernel number. For example, if the traffic management system includes 5 kernels, it may specifically include qmu_list_u 1 、qmu_list_u 2 、qmu_list_u 3 、qmu_list_u 4 and qmu_list_u 5). Exemplarily, the queue list core supports 4 read and write channels, each of which includes qmu_em (i.e., the above-mentioned enqueue processing module), link_ram (i.e., the above-mentioned list management module) and qmu_dm (i.e., the above-mentioned dequeue processing module). The queue list core also includes idle_list_man (i.e., the above-mentioned idle pointer management module) and men_man (i.e., the above-mentioned cache management module).

[0065] MUX (Multiplexer): Based on the incoming pipeline (pipe) packet information (the relevant information carried along the pipeline, equivalent to the above-mentioned message descriptor) of the 4-way cgavd (congestion avoidance subsystem, not shown), the MUX sends the packet information to the corresponding linked list processing core.

[0066] qmu_em (queue processing module): Each qmu_list_core (queue list core) has 4 qmu_em (shown as qmu_em_u0 to qmu_em_u3 in Figure 2), corresponding to the 4 pipeline inputs after MUX allocation. After the qmu_em (enqueue processing module) in each channel receives the packet information from the cgavd (congestion avoidance subsystem, not shown) allocated by the MUX, it initiates a queue list information read operation. The read operation includes reading the head pointer (hp), tail pointer (tp), empty mark (empty) and enqueue block mark (cti). If a new free pointer is needed, an idle pointer application is initiated to the free pointer management module. After obtaining the free address, a PD (Packet Descriptor) information write operation is initiated to the cache management module men_man, and the linked list concatenation operation is performed in combination with the queue linked list information to update the next pointer. At the same time, a queue linked list update write operation is issued to the linked list management module. The queue linked list update includes updating the head pointer (hp), tail pointer (tp), empty mark (empty) and enqueue block mark (cti), and the enqueue information (including the enqueue completion valid signal and the enqueue completion queue number) is sent to the Schedule (central scheduler) scheduler module.

[0067] Link_ram (linked list management module): Each qmu_list_core (that is, the above-mentioned core) contains 4 link_rams (shown as link_ram_u0 to link_ram_u3 in Figure 2). Each link_ram is configured to receive the linked list RAM (random access memory) read and write requests from the corresponding qmu_em (enqueue processing module) and qmu_dm (dequeue processing module), and update the corresponding RAM information, including the head pointer (hp), tail pointer (tp), empty flag (empty), enqueue block flag (cti) and dequeue block flag (cto).

[0068] qmu_dm (dequeue processing module): Each qmu_list_core contains a qmu_dm, which receives the scheduling results (port scheduling instructions) from the Schedule (central scheduler) and performs linked list decomposition operations. Each qmu_list_core (queue linked list core) has a total of 4 linked lists. The qmu_dm reads the 4-way linked list information, and RR (Round Robin) selects one of the ways to perform the decompression operation, updates the RAM of the corresponding linked list, sends a read command to the cache management module, reads the packet information, and generates the corresponding dequeue information from the read command and sends it to the Schedule (central scheduler), cgavd (congestion avoidance subsystem), plm (packet linked list management unit, not shown) and qmu_cmd_fifo (port scheduling subsystem, not shown), and releases the idle pointer.

[0069] idle_list_man (idle pointer management module): Each qmu_list_core (queue list core) contains 1 idle_list_man, which provides idle pointer allocation for the 4-way qmu_em of the qmu_list_core (queue list core) and idle pointer recovery for the 1-way qmu_dm. Each idle pointer management module contains 4 exclusive pointer fifo blocks, which correspond one to one with the 4 qmu_ems of qmu_list_core (queue list core); when each qmu_em in qmu_list_core (queue list core) applies for an idle pointer, it first obtains the idle pointer from the corresponding exclusive pointer fifo block. When the exclusive pointer fifo block is exhausted, it is necessary to obtain the idle pointer from the shared pointer fifo block. If the shared pointer fifo block that has been applied for is exhausted, a new shared pointer fifo code is obtained from the shared idle pointer management resource pool. If a pointer is released during dequeue processing, the pointer is recovered to the corresponding pointer fifo. If the shared pointer fifo block is full after the pointer is recovered, the shared pointer fifo code is released back to the shared idle pointer management.

[0070] men_man (cache management module): Each qmu_list_core (queue list core) contains a men_man, which receives read and write packet information and read and write next hop requests from the four qmu_em and one qmu_dm channels within the qmu_list_core (queue list core). Each cache management module contains four exclusive packet information caches and four next exclusive caches, corresponding one-to-one with the four qmu_em channels. When performing packet information and next list read and write requests, it can distinguish whether the read and write is to the exclusive area cache or the shared area cache based on the storage location. If the read and write is to the shared area cache, the read and write request is initiated to the shared cache management.

[0071] share_idle_list (i.e., shared idle pointers): Receives requests and reclaims from the four qmu_list_cores (queue list cores). For example, share_idle_list consists of 64 shared pointer fifos. Upon receiving a request for an idle pointer, a shared pointer fifo code is selected from the resource pool fifo and assigned to the enqueue process. The enqueue process then releases an idle pointer to the corresponding shared pointer fifo block. If the fifo block is full after reclaiming, the fifo code is reclaimed and returned to the resource pool fifo.

[0072] share_mem (shared cache): receives packet information and next buffers from the four qmu_list_cores (queue list cores). share_mem consists of 64 shared packet information buffers and next buffers, which correspond one-to-one with 64 shared pointer fifos.

[0073] The enqueue process of the qmu_list (queue management subsystem) is as follows: the MUX sends the packet information to the corresponding qmu_list_core (queue linked list core) based on the port information in the packet information. The qmu_em (enqueue processing module) 0-3 in the qmu_list_core (queue linked list core) receives the packet information of the corresponding pipeline assigned by the MUX, initiates a pre-application of a shared pointer, obtains the allocated shared pointer from the free pointer management module, reads the relevant queue linked list information, and performs a linked list operation. Based on the queue linked list information, if a new free pointer needs to be requested, it is first obtained from the exclusive pointer fifo. If it is exhausted, it is obtained from the pre-application pointer fifo. After obtaining a free pointer, it generates a write command and sends it to the cache management module. The cache management module confirms that it is exclusive based on the storage location and directly writes the packet information to the exclusive cache RAM. If it is shared, it updates it to the shared cache management. At the same time, it receives the next update, completes the linked list operation and updates the various RAMs in the linked list management. Finally, it generates the corresponding enqueue information (including the enqueue completion valid signal and the enqueue completion queue number) and sends it to the schedule (central scheduler).

[0074] The dequeue process of qmu_list (queue management subsystem) is as follows: after the central scheduler Schedule completes the scheduling, it sends the scheduling result to qmu_list_core (queue linked list core, that is, the above-mentioned kernel). Each scheduling result corresponds to a qmu_dm (dequeue processing module) in qmu_list_core. After receiving the scheduling result, qmu_dm polls and selects one from the four queue linked lists for dequeue processing. After the selection is completed, it applies for an idle process. During the execution phase of the process, it obtains the read queue related information from the linked list management corresponding to the queue, and obtains the next information from the cache management, and performs the dequeueing operation. The cache management module confirms that if it is exclusive based on the storage location of next, it reads directly from the exclusive cache RAM. If it is shared, it reads from the shared cache management, and updates the corresponding linked list management RAM to read the packet information. The cache management module reads the packet information directly from the exclusive cache RAM if it is confirmed to be exclusive based on the storage location. If it is shared, it reads from the shared cache management and generates dequeue information (dequeue valid signal, dequeue queue number and dequeue related packet information) to the packet linked list module (i.e. the above-mentioned packet linked list management unit). After qmu_list (queue management subsystem) receives the dequeue feedback from cgavd (congestion avoidance subsystem), it sends the corresponding dequeue feedback information to the Schedule center scheduler (including dequeue valid signal, dequeue queue number, dequeue average packet length, dequeue actual packet length and dequeue c / e mark) and qmu_cmd_fifo port scheduling subsystem (including dequeue valid signal, dequeue queue number and dequeue related packet information). If the pointer has been read empty, an idle pointer recovery command is initiated when the read command is initiated, and the recovered pointer is recovered to the exclusive pointer fifo or shared pointer module according to the type of the recovered pointer.

[0075] It should be noted that the above specific embodiments are only used to help understand the technical concepts or technical principles of the embodiments of this application, and do not constitute a limitation of this application. More simple transformations based on the technical concepts should all be within the scope of protection of this application.

[0076] Example 3

[0077] Based on the above embodiment of the present application, in another embodiment of the present application, the same or similar content as the above embodiment 1 or embodiment 2 can be referred to the above introduction and will not be repeated hereafter. On this basis, the idle pointer management module and the cache management module are also connected to the dequeue processing module.

[0078] The dequeue processing module is configured to read the queue linked list information from the linked list management module after determining the outgoing message descriptor carried by the port scheduling instruction, and perform a linked list decomposition operation on the queue linked list information to obtain a read pointer application corresponding to the outgoing message descriptor.

[0079] The idle pointer management module is further configured to send a target read pointer corresponding to the read pointer request to the dequeue processing module in response to the read pointer request.

[0080] The dequeue processing module is further configured to send the target read pointer to the cache management module.

[0081] The cache management module is further configured to determine a target sub-cache area corresponding to the target read pointer, and send a second cache area ID corresponding to the target sub-cache area to the dequeue processing module.

[0082] The dequeue processing module is further configured to read the message data to be dequeued from the target sub-cache area corresponding to the target read pointer according to the second cache area ID.

[0083] In this embodiment, the outgoing message descriptor refers to the message descriptor of the message data to be dequeued. The second buffer area ID refers to the buffer area ID of the target sub-buffer area, that is, the second buffer area ID refers to the buffer area ID of the sub-buffer area corresponding to the target read pointer. It will be understood by those skilled in the art that the second buffer area ID can be used to indicate the address information of the idle sub-buffer area corresponding to the target read pointer, so that the subsequent dequeue processing module can read the message data corresponding to the outgoing message descriptor (i.e., the message data to be dequeued) from the target sub-buffer area corresponding to the target read pointer according to the second buffer area ID.

[0084] This embodiment connects the idle pointer management module and the cache management module to the dequeue processing module, wherein the dequeue processing module is configured to read the queue linked list information from the linked list management module after determining the outgoing message descriptor carried by the port scheduling instruction, and perform a linked list decomposition operation on the queue linked list information to obtain a read pointer application corresponding to the outgoing message descriptor, and then respond to the read pointer application through the idle pointer management module, send the target read pointer corresponding to the read pointer application to the dequeue processing module, the dequeue processing module then sends the target read pointer to the cache management module, the cache management module determines the target sub-cache area corresponding to the target read pointer, and sends the second cache area corresponding to the target sub-cache area to the cache management module. The area ID is sent to the dequeue processing module, and then the dequeue processing module reads the to-be-dequeued message data from the target sub-cache area corresponding to the target read pointer according to the second cache area ID, thereby determining the target sub-cache area corresponding to the stored message data to be dequeued according to the outgoing message descriptor carried by the port scheduling instruction and the linked list decomposition operation of the queue linked list information, so as to facilitate the dequeue processing module to accurately read the to-be-dequeued message data from the target sub-cache area, and then facilitate to decide which sub-cache area data to read according to the storage address information of the to-be-dequeued message data, thereby reducing the read conflict scenario of the shared cache and greatly reducing the probability of conflict when multiple cores read data in the shared cache at the same time.

[0085] In one possible embodiment, the dequeue processing module is also configured to generate dequeue information after reading the message data to be dequeued from the target sub-cache area corresponding to the target read pointer, and send the dequeue information and the second cache area ID to the pointer management resource pool so that the pointer management resource pool can reclaim the pointer corresponding to the second cache area ID.

[0086] This embodiment configures the dequeue processing module to generate dequeue information after reading the to-be-dequeued message data from the target sub-cache area corresponding to the target read pointer, and then sends the dequeue information and the second cache area ID to the pointer management resource pool, so that the pointer management resource pool can reclaim the pointer corresponding to the second cache area ID, thereby facilitating the release of the storage capacity of the storage address of the read message data after reading the message data in the target sub-cache area. The pointer management resource pool reclaims the pointer corresponding to the storage address of the read message data, so that the switching chip can write new data to the sub-cache area with the released storage capacity, thereby enabling the pointers of each sub-cache area in the shared cache area to be updated in real time, reducing the probability of read-write conflicts when multiple cores share shared queue resources.

[0087] In an implementable manner, the incoming message data includes at least one data packet, and the linked list management module includes a queue linked list management unit and a packet linked list management unit.

[0088] The enqueue processing module is further configured to divide the data packet into multiple data fragments based on the cache space size of the sub-cache area; determine the total number of data fragments corresponding to the data fragments, and allocate the total number of target idle pointers for the incoming message data, and write each of the data fragments into the idle sub-cache area corresponding to each target idle pointer one by one.

[0089] The packet linked list management unit is configured to determine the cache addresses corresponding to each data packet in the queue resource shared cache area based on the cache area ID corresponding to the idle sub-cache area where each data segment is written; and concatenate the address identifiers corresponding to the cache addresses corresponding to each data packet to obtain the cache address block information corresponding to each data packet to complete the linked list concatenation, wherein one cache address corresponds to a unique address identifier.

[0090] The queue linked list management unit is configured to update the linked list according to the cache address block information to generate queue linked list information.

[0091] In this embodiment, the cache address block information corresponding to a data packet can be used to indicate the cache address information of all data fragments divided by the data packet (i.e., the address identifiers corresponding to the cache addresses of all data fragments). For example, the cache address block information corresponding to data packet A can be used to indicate the cache address information of all data fragments divided by data packet A, and the cache address block information corresponding to data packet B can be used to indicate the cache address information of all data fragments divided by data packet B.

[0092] This embodiment is achieved by setting up a linked list management module including a queue linked list management unit and a packet linked list management unit, wherein the incoming message data includes at least one data packet, and this embodiment also divides the data packet into multiple data fragments according to the cache space size of the sub-cache area through the queue processing module, and then determines the total number of data fragments, and allocates the total number of target free pointers for the incoming message data, and then writes each data fragment into the idle sub-cache area corresponding to each target free pointer one by one, and then determines the cache addresses corresponding to each data packet in the queue resource shared cache area according to the cache area ID corresponding to the idle sub-cache area written to each data fragment through the packet linked list management unit, and then concatenates the address identifiers corresponding to the cache addresses corresponding to each data packet, and obtains the cache address block information corresponding to each data packet to complete the linked list concatenation, wherein a The cache address corresponds to a unique address identifier, and the queue list management unit then updates the list according to the cache address block information to generate queue list information, thereby accurately obtaining the queue list information that is dynamically updated based on dequeue processing or enqueue processing, so that the dequeue processing module can subsequently read the required message data from the designated storage location in the queue resource shared cache area based on the real-time updated queue list information, thereby making it possible to read and write without conflict when queue resources are shared, ensuring the high performance requirements of the network switching device (or network switching chip), reducing bandwidth loss, and finding a balance between the physical implementation and logical implementation of the network switching device, achieving the optimal solution for the performance cost and area of ​​the current multi-core forwarding architecture design, and effectively solving the performance loss problem introduced by the shared queue resource read and write conflict problem in the multi-core forwarding architecture of the network switching device.

[0093] Furthermore, in an practicable manner, the enqueue processing module is further configured to divide the data packet into a plurality of data fragments carrying reading order information.

[0094] The packet linked list management unit is further configured to concatenate the address identifiers corresponding to the cache addresses corresponding to each data packet according to the reading sequence information.

[0095] As those skilled in the art will appreciate, after a data packet is divided into multiple data fragments, each data fragment is concatenated to form a complete data packet, which often has certain concatenation order information. It is understandable that the reading order information of each data fragment in this embodiment corresponds to the concatenation order information.

[0096] This embodiment configures the enqueue processing module to divide the data packet into multiple data fragments carrying reading order information, and then configures the packet linked list management unit to concatenate the address identifiers corresponding to the cache addresses distributed corresponding to each data packet based on the reading order information, thereby facilitating concatenation of the multiple data fragments corresponding to each data packet in a specified concatenation order, and then accurately obtaining the cache address block information corresponding to each data packet, so as to accurately implement linked list concatenation.

[0097] Exemplarily, a kernel includes multiple enqueue processing modules, the number of the dequeue processing modules, the linked list management modules and the enqueue processing modules is the same, and each of the enqueue processing modules, each of the linked list management modules and each of the dequeue processing modules is connected one-to-one so that a kernel forms a multi-way read and write channel, wherein one read and write channel is composed of an enqueue processing module, a linked list management module and a dequeue processing module connected in sequence.

[0098] The embodiment of the present application is to configure a traffic management system to include multiple cores, and each core includes multiple enqueue processing modules, wherein the number of dequeue processing modules, linked list management modules and enqueue processing modules is the same, and one read-write channel is composed of an enqueue processing module, a linked list management module and a dequeue processing module connected in sequence, so that one core forms a multi-way read-write channel, and then each core can read and write data to the queue resource shared cache area based on the multi-way read-write channel, and combine the array-distributed queue resource shared cache area to realize a shared cache with multiple cross-inputs and multiple concurrent outputs. Compared with the common shared cache write-side stream-beating method, the flexibility of the multi-read and multi-write cache space can be greatly improved, the cache resource occupancy under multi-core processing can be optimized, the cache utilization rate can be improved, and the demand for simultaneous caching of multi-channel messages can be met, which is beneficial to reducing the latency and design difficulty of the multi-read and multi-write cache space, reducing the write path latency and the back-end layout and wiring pressure, and facilitating the miniaturization and low-power design of the switching chip.

[0099] Furthermore, in an practicable manner, the traffic management system further includes a plurality of exclusive cache areas, and each read and write channel is bound to a corresponding exclusive cache area.

[0100] The enqueue processing module is further configured to obtain an incoming message descriptor and determine whether the corresponding bound exclusive cache area is in an idle state; if so, allocate an idle pointer in the exclusive cache area to the incoming message data corresponding to the incoming message descriptor; if not, allocate an idle pointer in the queue resource shared cache area to the incoming message data; and use the allocated idle pointer as the target idle pointer.

[0101] Since each read and write channel has an independent corresponding bound exclusive cache area, there is basically no read and write conflict when reading and writing data in the exclusive cache area. In this embodiment, when all sub-caches in the exclusive cache area corresponding to each read and write channel are occupied, the message data is stored in the sub-caches with free addresses in the queue resource shared cache area, thereby further reducing the probability of read and write conflicts when each core reads the cache data at the same time, thereby effectively solving the performance loss problem introduced by the shared queue resource read and write conflict problem in the network switching equipment under the multi-core forwarding architecture.

[0102] Example 4

[0103] This embodiment is based on the above embodiments 1 to 3. For the same or similar contents as the above embodiments, please refer to the above introduction and no further details will be given. On this basis, in order to help understand the technical concept or technical principle of the above embodiments, specific embodiments 2 and 3 are listed.

[0104] The embodiments of the present application are mainly used in Ethernet switching devices. The traditional switching network and equipment are shown in Figure 1. In traditional Ethernet switching devices, if 4A Tbps switching network traffic is to be achieved, multiple 2A Tbps switching devices are required to complete networking and performance testing. Through the embodiments of the present application, a single independent 4A Tbps device can be used to complete high-performance and high-bandwidth traffic management, realizing the design requirements of ultra-high throughput of DC data centers, and at the same time effectively improving the forwarding delay of low-latency messages.

[0105] In this embodiment, the traffic management system completes the message discarding / forwarding process based on the congestion status of the outbound port, supports a multi-core multi-channel fully shared cache architecture, and supports multi-core multi-channel queue management functions. The components of the traffic management system are described as follows:

[0106] 1. Congestion avoidance subsystem: It mainly performs congestion avoidance based on the QOS scheduling effect and completes the judgment of discarding and forwarding messages in the queue resource sharing buffer;

[0107] 2. The queue management subsystem (including the enqueue processing module, linked list management module, and dequeue processing module) is mainly responsible for queue enqueue and dequeue management. It implements a multi-core and multi-channel exclusive cache + shared design for queue information. Queue information is read and written conflict-free according to {source pipeline, destination pipeline}, meeting performance requirements and eliminating bandwidth loss.

[0108] 3. The port scheduling subsystem schedules read commands according to the port and responds to the subsequent flow control;

[0109] 4. The central scheduler completes the QOS scheduling strategy specified by the user, and the scheduling results are applied to the queue management subsystem's dequeue control;

[0110] 5. The packet linked list management unit in the linked list management module: mainly realizes the message linked list (ie, packet linked list) serial relationship and performs the packet linked list whole packet detection function.

[0111] Furthermore, in order to more clearly illustrate the technical concept or technical principle of the embodiments of the present application, specific embodiment three is listed.

[0112] As shown in Figure 3, the shared linked list management implements the distribution and recovery of 4-read 4-write shared free pointers. It consists of 64 groups of 1r1w (one read and one write) fifos (First Input First Output) and a resource pool fifo (i.e., the pointer management resource pool mentioned above). It receives 4-way enqueue processing free pointer applications and 4 resource pool fifo applications corresponding to the inbound pipeline composed of 4 qmu_list_cores (queue linked list cores). The IDs of all full shared pointer fifo blocks constitute the resource pool fifo. Each time, up to 4 resource pool fifo applications obtain the corresponding number of shared pointer fifo codes from the resource pool fifo. The free pointer application needs to be obtained from the fifo corresponding to the code bound to the enqueue processing. After the data is dequeued, the free pointers recovered by the dequeue processing of the 4-way qmu_list_core (queue linked list core) are received and stored in the corresponding shared pointer fifo according to the code information carried by the recovered pointer until the shared pointer fifo is recovered.

[0113] When requesting free pointers, the free pointer management module prioritizes requesting from the exclusive pointer fifo. Once the exclusive pointer fifo is exhausted, it requests from the shared pointer fifo. Each enqueue processing module has an active flag reg to mark the bound shared pointer fifos that are available for use. The reg_active_bit supports 64 bits, corresponding to each of the 64 shared pointer fifos. When requesting free pointers during enqueueing, once a shared pointer fifo is bound to an enqueue processing module, the corresponding active flag reg is set to 1. Once the bound shared pointer fifo is exhausted, the shared pointer fifo is removed from the active flag reg, and the code for releasing the shared pointer fifo is returned to the shared pointer management module. When releasing a pointer during dequeueing, if the pointer is an exclusive pointer, the address is directly reclaimed to the exclusive pointer fifo. If the pointer is a shared pointer, the corresponding shared pointer fifo's reg_active_bit is 0, and the corresponding shared pointer fifo's state changes from empty to non-empty. The shared pointer fifo is then added to the active flag reg until the shared pointer fifo is fully reclaimed. Figure 4 shows the flow chart of requesting and reclaiming free pointers from the free pointer FIFO.

[0114] Furthermore, in order to more clearly illustrate the technical concept or technical principle of the embodiments of the present application, a fourth specific embodiment is listed.

[0115] As shown in Figure 5, a qmu_list_core (queue list core) has four linked list managers (i.e., the linked list management modules described above). Each inbound pipeline corresponds to a linked list manager, which has a set of linked list RAMs containing a head pointer (hp), a tail pointer (tp), an empty flag (empty), an enqueue block flag (cti), and a dequeue block flag (cto). The linked list manager performs read and write operations on the queue linked list RAM, receiving linked list read queue information requests from the enqueue and dequeue processes to read the corresponding RAM, and accepting linked list update requests from the enqueue and dequeue processes to write to the corresponding RAM. This eliminates read and write conflicts, ensures timely and accurate queue enqueue list creation and dequeue list update, and guarantees queue processing performance, ensuring high-performance, low-latency cut-through functionality.

[0116] It should be noted that the above specific embodiments are only used to help understand the technical concepts or technical principles of the embodiments of this application, and do not constitute a limitation of this application. More simple transformations based on the technical concepts should all be within the scope of protection of this application.

[0117] Example 5

[0118] Currently, DC data centers have increasingly stringent latency requirements. Traditionally, they collect and transmit entire packets, fragmenting them after receiving the message's EOP (End of Procedure) before directly transmitting them to the egress port for scheduling. This results in significant forwarding delays for long messages. To address this issue, egress scheduling must begin before complete fragments are collected. However, this approach cannot effectively guarantee the complete reading of the message's linked list or the correctness of the scheduled read commands, resulting in performance losses in data exchange. Therefore, achieving high-performance, low-latency cut-through functionality for messages of varying lengths becomes a core competitive advantage.

[0119] Based on this, the present application proposes another embodiment, and the contents identical or similar to the above embodiment can be referred to the above introduction, and will not be described in detail later. The packet linked list management unit is connected to the enqueue processing module and the dequeue processing module respectively.

[0120] The enqueue processing module is further configured to send the reading sequence information to the packet linked list management unit.

[0121] The packet linked list management unit is configured to determine an eop (End of Procedure) segment from each of the data segments based on the reading order information, mark the linked list pointer corresponding to the eop segment as valid, and mark the linked list pointers corresponding to other segments in each of the data segments except the eop segment as invalid.

[0122] The dequeue processing module is further configured to determine whether the linked list pointer corresponding to the target data slice is marked as valid each time a target data slice to be dequeued is read from the queue resource shared cache area; if so, continue to access the data slice corresponding to the next hop linked list pointer according to the queue linked list information; if not, scan the encapsulation information of the target data slice, and trigger access to the data slice of the next reading order corresponding to the target data slice according to the encapsulation information.

[0123] In this embodiment, those skilled in the art will understand that the eop fragment refers to the last data fragment in a data packet in a reading order, and may also be called a tail fragment.

[0124] The embodiment of the present application connects the packet linked list management unit to the enqueue processing module and the dequeue processing module respectively, wherein the enqueue processing module sends the reading order information to the packet linked list management unit, and then the packet linked list management unit determines the eop segment from each data segment based on the reading order information, marks the linked list pointer corresponding to the eop segment as valid, and marks the linked list pointers corresponding to other segments in each data segment except the eop segment as invalid, and then reads a target data segment to be dequeued from the queue resource shared buffer area through the dequeue processing module, and determines whether the linked list pointer corresponding to the target data segment is marked as valid; if so, continues to access the data segment corresponding to the next hop linked list pointer according to the queue linked list information; if not, scans the encapsulation information of the target data segment, and triggers access to the data segment of the next reading order corresponding to the target data segment according to the encapsulation information. , thereby realizing that for messages of different lengths, the data read command can be initiated without waiting for the arrival of the complete message, thereby realizing a high-performance and low-latency cut-through function. Compared with the traditional cut-through function, the message forwarding delay is significantly reduced, and the forwarding delay is insensitive to the packet length. At the same time, when determining whether the linked list pointer corresponding to the target data slice is marked as invalid, this embodiment can scan the encapsulation information of the target data slice, and trigger access to the next read order data slice corresponding to the target data slice according to the encapsulation information, thereby effectively ensuring that the linked list of the message is read completely and the scheduled read command is correct, avoiding the performance loss of data exchange, and thus effectively solving the performance loss problem introduced by the read-write conflict problem of shared queue resources under the multi-core forwarding architecture, and realizing a high-performance and low-latency cut-through function for messages of different lengths.

[0125] The embodiment of the present application designs a high-performance, high-bandwidth traffic management system in a centralized, high-performance, high-bandwidth traffic management chip multi-core forwarding architecture, achieves conflict-free reading and writing when queue resources are shared, ensures performance requirements, and implements high-performance, low-latency cut-through functions for different message lengths. It finds a balance between logical and physical implementations, solves the area / power consumption / heat dissipation problems encountered by ultra-high-bandwidth traffic management architectures, involves SPINE / TOR / DC switch scenarios, and enhances the core competitiveness of data communication equipment.

[0126] In one practicable manner, the traffic management system further includes a central scheduler, which is connected to the enqueue processing module.

[0127] The enqueue processing module is further configured to generate enqueue information after writing the incoming message data into the idle sub-buffer area corresponding to the target idle pointer, and send the enqueue information and the first buffer area ID to the central scheduler module.

[0128] The central scheduler is configured to perform QOS (Quality of Service) scheduling based on the enqueuing information and the first buffer area ID.

[0129] This embodiment configures the traffic management system to include a central scheduler, which is connected to an enqueue processing module, wherein the enqueue processing module is further configured to generate enqueue information after writing the incoming message data into the idle sub-buffer area corresponding to the target idle pointer, and then send the enqueue information and the first buffer area ID to the central scheduler module for QOS scheduling, thereby effectively realizing the dequeue processing of the qmu_dm queue.

[0130] Example 6

[0131] Based on the above embodiment of the present application, in another embodiment of the present application, the same or similar content as the above embodiment can be referred to the above introduction, and no further details will be given later. On this basis, in order to help understand the technical concept or technical principle of the above embodiment, a specific embodiment 6 is listed.

[0132] In order to achieve high-performance and low-latency cut-through function for messages of different lengths, the second key technical solution of the embodiment of the present application is as follows: packet linked list module (i.e., packet linked list management unit).

[0133] The cut-through path reuses the original traffic management data transmission path, and unfolds the packet after the qmu_list_core (queue list core) is out of the queue. At the same time, it identifies whether the next hop mark of the message list is valid to ensure that the message storage list is read correctly. For the half-packet that appears in the cut-through unfolding packet, after recording the iport (i.e., encapsulation information) corresponding to the packet, a scan trigger is performed to ensure that all subsequent incoming messages can be sent out. Compared with the traditional cut-through implementation, the data path structure is unified and the cache resource cost is low. After the embodiment of the present application improves the traditional cut-through, a high-performance and low-latency cut-through is obtained. As shown in Figure 6, Figure 6 is a schematic diagram of the structural comparison between the cut-through according to the embodiment of the present application and the traditional cut-through.

[0134] In this embodiment, the packet linked list management unit's functions are primarily divided into three parts: managing the packet linked list involved in packet concatenation, packet expansion, and packet loss; assisting in the enqueueing and dequeueing of data cache messages; and performing corresponding linked list management. Furthermore, whether dequeuing ordinary data messages (data packets) or recovering the addresses of discarded messages, the packet linked list module monitors the validity of the next-hop RAM pointer to implement cut-through protection. If the next-hop pointer read from the next-hop RAM is invalid, the next-hop RAM cannot be accessed again until the next-hop pointer is valid.

[0135] Furthermore, the specific data flow of the packet linked list module (ie, the packet linked list management unit) is as follows.

[0136] When a data packet is enqueued, the data is written into the data cache according to the ordinary message body bus and the packet header write-back bus. At the same time, the packet linked list module sub-port (source port) receives the wr_ptr pointer sent from the data cache to complete the storage address fragmentation and concatenation of the data message.

[0137] When a data packet is dequeued, it mainly interacts with the qmu_cmd_fifo (port scheduling subsystem) of the TM (Traffic Management) system, receives dequeued message read commands for different ports from the qmu_cmd_fifo (port scheduling subsystem), reads the corresponding data from the data cache and sends it out. The packet linked list is implemented using a multi-linked list n according to the port bandwidth performance. The qmu_cmd_fifo (port scheduling subsystem) needs to pass the packet header pointer, the packet body first fragment pointer and the packet body n-1 fragment address to perform the dequeuing table operation. After reading the next hop pointer from next_ram, it is returned to the qmu_cmd_fifo (port scheduling subsystem), and then sent by the qmu_cmd_fifo (port scheduling subsystem) to the cache management module. After reading the data packet from the cache management module, the cache module completes the pointer recovery of the message dequeued.

[0138] In this specific embodiment, in order to solve the performance loss introduced by the read and write conflict problem of shared queue resources under the multi-core forwarding architecture in the prior art, and the key technical difficulty of how to achieve high-performance and low-latency cut-through function for messages of different lengths, the embodiment of the present application provides a high-performance and high-bandwidth traffic management system, which realizes read and write conflict-free when queue resources are shared, ensures performance requirements, realizes high-performance and low-latency cut-through function for different message lengths, and finds the balance point between logical implementation and physical implementation, solves the area / power consumption / heat dissipation problems encountered by the ultra-high bandwidth traffic management architecture, and finally reduces the area by 36%, reduces power consumption, solves the local heat dissipation problem, involves SPINE / TOR / DC switch scenarios, and enhances the core competitiveness of data communication equipment.

[0139] Furthermore, for data packets that need to be discarded, the packet list mainly interacts with cgavd (congestion avoidance subsystem) and qmu_list (queue management subsystem). cgavd (congestion avoidance subsystem) sends packets with a drop mark (i.e. the above-mentioned discard mark) (including half-packets introduced by insufficient previous-level cache, packets with cache verification errors, and discarded packets determined by cgavd (congestion avoidance subsystem) congestion avoidance based on QOS policy, etc.) to the packet list module (i.e. the above-mentioned packet list management unit) for address recovery and release. The main reasons for packet loss in qmu_list (queue management subsystem) are queue clearing and queue aging. After receiving the packet loss pointer information from the above-mentioned module, the packet list module parses all the fragment pointer information of the data packet from next_ram and sends it to the cache management module for pointer recovery.

[0140] At the same time, whether dequeuing ordinary packets or retrieving the addresses of discarded packets, the packet list module needs to monitor the validity of the next-hop list pointer to implement cut-through protection. If the next-hop pointer read from the next-hop RAM (next_ram) is invalid, the next-hop RAM (next_ram) cannot be accessed again until the next-hop pointer read from the next-hop RAM (next_ram) is valid.

[0141] 1. The MAC input packet header enters head_buf (packet header buffer area), applies for a separate packet header area address, and the packet body enters MMU_buf (data shared cache). At the same time, it applies for the free address required for the packet body from the free address management module.

[0142] 2. When applying for the address bus, the packet body linked list is hung. Since there is a conflict when writing to the next hop ram (next_ram), it is necessary to handle the conflict before writing to the next hop ram (next_ram) to complete the packet stringing.

[0143] 3. After the packet header is parsed, the relevant descriptor information is unicasted to cgavd (congestion avoidance subsystem) for congestion judgment, and the multicast message is sent to the multicast replication module to complete multicast replication.

[0144] 4. If the cgavd (congestion avoidance subsystem) determines that it is a drop packet, the packet header descriptor is directly sent to the packet linked list module to expand the packet and recover the on-chip address. The traffic management system supports a total of 4 cgavd (congestion avoidance subsystems), and a maximum of 8 drop packets (4-way unicast + 4-way multicast) are generated in one shot. 16 err queues are used in the packet linked list module, and 1 cgavd (congestion avoidance subsystem) drop bus uses a ping-pong method to correspond to 2 err queues. Similarly, 1 qmu drop bus also uses a ping-pong method to correspond to 2 err, and the two are staggered in time slots. The main purpose of this design is to ensure that the drop packet triggered by a single source can also make full use of the upper 8 err queues. The principle is shown in Figure 7, which is a flow chart of the packet linked list idle address recovery processing logic according to an embodiment of the present application.

[0145] 5. After the central scheduler Schedule completes the scheduling, it obtains the packet information of the descriptor in qmu_list_core (queue list core) and sends it to qmu_cmd_fifo (port scheduling subsystem). After qmu_cmd_fifo (port scheduling subsystem) completes the packet header scheduling, it performs one-level scheduling (sp / dwrr) on the packet header address and the address scheduled by the packet body and sends it to the data cache module. At the same time, the packet body first slice address and the packet body n-1 slice address are sent to the packet list module for packet expansion.

[0146] 6. The packet list has a total of 8 normal packet display queues and 8 err packet display queues. A total of 16 bus groups are generated, of which 8 normal queues are sent to qmu_cmd_fifo (port scheduling subsystem) for packet body scheduling. The other 8 err queues directly recycle addresses. Because address recovery conflicts with address recovery after MMU reads data, 8 rcy_fifo buffers are required. Except for eop, other slices are sent out while reading the next hop RAM (next_ram) and writing it back to the queue head. Because reading the next hop RAM (next_ram) may cause conflict scenarios, when there are multiple queue conflicts, it is necessary to complete the conflict judgment according to a certain scheduling algorithm. This judgment is a process within the normal or err queue. SP scheduling is used between the normal and err queues, and the normal queue has a higher priority. The judgment process is shown in Figure 8, which is a flow diagram of packet list read and write conflict processing according to this embodiment.

[0147] In this embodiment, the next hop RAM (next_ram) read side result judgment processing module has two functions: one is to judge whether the next hop address read from the next hop RAM is valid, and the other is to analyze whether the address is the data packet EOP beat.

[0148] For ordinary queue addresses: whether the next hop address is to be sent to qmu_cmd_fifo (port scheduling subsystem) or the whole packet linked list header pointer is updated depends on whether the address is valid. If the linked list address is still the linked list information of the previous data packet, it means that the message has not completed the linked list concatenation. At this time, the address will not be sent to qmu_cmd_fifo (port scheduling subsystem) and the whole packet linked list header pointer will not be updated. In addition, whether the whole packet linked list header pointer is updated also depends on whether the next hop address is the eop beat of the data packet. If it is the eop beat, the next linked list address is read from the port command cache fifo.

[0149] Similarly, for discarded drop packets, the same processing method is used as for normal queue addresses. For normal queues and drop queues, RAM replication is used to support access to separate next_ram to avoid conflicts.

[0150] It is worth mentioning that after completing the above-mentioned first key technical solution and the second key technical solution, the embodiment of the present application can solve the performance loss problem introduced by read-write conflicts under multi-core queue resource sharing in a high-performance and high-bandwidth traffic management system, meet the performance design requirements, and at the same time, combine the different forwarding delays of messages of different lengths. Through the high-performance and low-latency cut-through function, a solution is provided for low-latency messages. Compared with the traditional cut-through function, the forwarding delay is reduced and the packet length is not perceived.

[0151] That is, in order to solve the performance loss problem introduced by the read and write conflict problem of shared queue resources under the multi-core forwarding architecture in the prior art, and how to achieve high-performance and low-latency cut-through function for messages of different lengths, the embodiment of the present application solves these problems by providing the above-mentioned high-performance and high-bandwidth traffic management technology system.

[0152] Beneficial effect 1 of the embodiment of the present application (the beneficial effect of the first key technical solution mentioned above): conflict-free reading and writing are achieved when queue resources are shared, ensuring performance requirements.

[0153] Beneficial effect 2 of the embodiment of the present application (the beneficial effect of the second key technical solution mentioned above): It realizes the high-performance and low-latency cut-through function of different message lengths, and finds the balance point between logical implementation and physical implementation, and solves the area / power consumption / heat dissipation problems encountered by the ultra-high bandwidth traffic management architecture. The final area is reduced by 36%, the power consumption is reduced, and the local heat dissipation problem is solved. It involves SPINE / TOR / DC switch scenarios, and enhances the core competitiveness of data communication equipment.

[0154] It should be noted that the above specific embodiments are only used to help understand the technical concepts or technical principles of the embodiments of this application, and do not constitute a limitation of this application. More simple transformations based on the technical concepts should all be within the scope of protection of this application.

[0155] Example 7

[0156] The present application also provides a method for flow management. FIG9 is a flow chart of the flow management method according to this embodiment. As shown in FIG9 , the method includes:

[0157] Step S10, obtaining an incoming message descriptor, determining a target idle pointer according to the incoming message descriptor, and writing the incoming message data corresponding to the incoming message descriptor into an idle sub-buffer area corresponding to the target idle pointer, wherein the idle sub-buffer area is a sub-buffer area in an idle state;

[0158] Step S20, performing linked list concatenation and linked list update according to the buffer area ID corresponding to the idle sub-buffer area where the incoming message data is written, to generate queue linked list information;

[0159] Step S30, receiving a port scheduling instruction, determining the outgoing message descriptor carried by the port scheduling instruction, and determining the target read pointer corresponding to the outgoing message descriptor according to the queue linked list information, and reading the message data to be dequeued from the target sub-cache area corresponding to the target read pointer.

[0160] The embodiment of the present application adopts a multi-core multiplexing queue resource shared cache area to perform multi-channel reading and writing of the data cached in the queue resource shared cache area, without the need for each core to set up an independent cache area, while reducing the cost of hardware and facilitating the centralized management of data reading and writing, saving the chip area / power consumption / heat dissipation, and a single core independently performs queue information enqueue and dequeue management, avoiding read and write conflicts when sharing queue resources. This embodiment abandons the traditional core stacking method under the multi-core forwarding architecture, and instead obtains the incoming message descriptor and determines the target idle pointer allocated to the incoming message descriptor, and writes the incoming message descriptor into the idle sub-cache area corresponding to the target idle pointer for enqueue processing. Then, the linked list is concatenated and updated for the storage location of the queued message data in the queue resource shared cache area to generate queue linked list information, so that the required message data can be read out at the specified storage location in the queue resource shared cache area according to the queue linked list information, thereby making it possible to read and write without conflict when the queue resources are shared, ensuring the high performance requirements of the network switching equipment (or network switching chip), reducing bandwidth loss, and finding a balance between the physical implementation and logical implementation of the network switching equipment, achieving the optimal solution for the performance cost and area of ​​the current multi-core forwarding architecture design, and effectively solving the performance loss problem introduced by the shared queue resource read and write conflict problem in the network switching equipment under the multi-core forwarding architecture.

[0161] It is worth mentioning that the embodiment of the present application provides a high-performance and high-bandwidth traffic management method, which can achieve conflict-free reading and writing when queue resources are shared, ensure performance requirements, find the balance point between logical implementation and physical implementation, and solve the problem that in traditional Ethernet switching equipment, multi-level switching equipment is needed to complete high-bandwidth networking and performance testing. Through the embodiment of the present application, a single independent device can be used to complete high-performance and high-bandwidth traffic management, realizing the design requirements of ultra-high throughput of DC data centers, and solving the area / power consumption / heat dissipation problems encountered by ultra-high bandwidth traffic management architectures. Finally, the area was reduced by 36%, power consumption was reduced, and local heat dissipation problems were solved. It involves SPINE / TOR / DC switch scenarios, and enhances the core competitiveness of data communication equipment.

[0162] In some embodiments, the method further comprises:

[0163] Step A10: generating an idle pointer request corresponding to the incoming message descriptor according to the incoming message descriptor;

[0164] Step A20: based on the idle pointer request, obtaining a target idle pointer from a preset pointer management resource pool;

[0165] Step A30: determining the free sub-buffer area corresponding to the target free pointer according to the target free pointer, and obtaining the first buffer area ID corresponding to the free sub-buffer area;

[0166] Step A40: Writing the message data corresponding to the incoming message descriptor into the idle sub-buffer corresponding to the target idle pointer according to the first buffer ID.

[0167] In some embodiments, after the step of writing the incoming message data into the idle sub-cache area corresponding to the target idle pointer, the method further includes: step B10, generating enqueuing information, and performing QOS scheduling based on the enqueuing information and the first cache area ID.

[0168] In some embodiments, the method further comprises:

[0169] Step C10, after determining the outgoing message descriptor carried by the port scheduling instruction, reading the queue linked list information, and performing a linked list decomposition operation on the queue linked list information to obtain a read pointer request corresponding to the outgoing message descriptor;

[0170] Step C20, based on the read pointer request, determining a target read pointer corresponding to the read pointer request;

[0171] Step C30, determining the target sub-cache area corresponding to the target read pointer, and obtaining the second cache area ID corresponding to the target sub-cache area;

[0172] Step C40: Read the message data to be dequeued from the target sub-cache area corresponding to the target read pointer according to the second cache area ID.

[0173] In some embodiments, after the step of reading the to-be-dequeued message data from the target sub-buffer area corresponding to the target read pointer, the method further includes:

[0174] Step D10: Generate dequeue information, and send the dequeue information and the second buffer area ID to the pointer management resource pool, so that the pointer management resource pool can reclaim the pointer corresponding to the second buffer area ID.

[0175] In some embodiments, the method further comprises:

[0176] Step E10: dividing the data packet into a plurality of data fragments according to the buffer space size of the sub-buffer; determining the total number of the data fragments, allocating the total number of target idle pointers for the incoming message data, and writing each of the data fragments into the idle sub-buffer corresponding to each of the target idle pointers;

[0177] Step E20, determining the corresponding cache addresses of each data packet in the queue resource shared cache area according to the cache area ID corresponding to the idle sub-cache area written into each data slice;

[0178] Step E30, concatenating the address identifiers corresponding to the cache addresses distributed corresponding to each data packet, respectively, to obtain cache address block information corresponding to each data packet to complete the linked list concatenation, wherein one cache address corresponds to one unique address identifier;

[0179] Step E40: Update the linked list according to the cache address block information to generate queue linked list information.

[0180] In some embodiments, the method further comprises:

[0181] Step F10, dividing the data packet into a plurality of data fragments carrying reading order information;

[0182] In step F20 , the address identifiers corresponding to the cache addresses distributed corresponding to each data packet are concatenated according to the read sequence information.

[0183] In some embodiments, the method further comprises:

[0184] Step G10: determining an eop segment from each of the data segments based on the read order information, marking a linked list pointer corresponding to the eop segment as valid, and marking linked list pointers corresponding to other segments in each of the data segments except the eop segment as invalid;

[0185] Step G20: each time a target data slice to be dequeued is read from the queue resource shared buffer area, determining whether the linked list pointer corresponding to the target data slice is marked as valid;

[0186] Step G30: If yes, continue accessing the data slice corresponding to the next-hop linked list pointer according to the queue linked list information;

[0187] Step G40: If not, scan the encapsulation information of the target data slice, and trigger access to the data slice in the next reading order corresponding to the target data slice according to the encapsulation information.

[0188] In some embodiments, the method further comprises:

[0189] Step H10: Obtain an incoming message descriptor and determine whether the exclusive buffer area bound to the current read / write channel is idle, wherein each read / write channel is bound to an exclusive buffer area.

[0190] Step H20: If yes, allocate a free pointer in an exclusive buffer area for the incoming message data corresponding to the incoming message descriptor;

[0191] Step H30: If not, allocate an idle pointer in the queue resource shared buffer area for the incoming message data;

[0192] Step H40: Use the allocated free pointer as the target free pointer.

[0193] In some embodiments, the method further comprises:

[0194] Step I10: obtaining message data to be processed and performing QOS scheduling on the message data to be processed;

[0195] Step I20: The to-be-processed message data after QOS scheduling is used as the inbound message data.

[0196] In some embodiments, the method further comprises:

[0197] Step J10, identifying the message data to be discarded stored in the queue resource shared buffer area, and marking the message data to be discarded with a discard identifier;

[0198] Step J20, identifying the message data with the discard flag stored in the queue resource shared buffer area as the message data to be discarded;

[0199] Step J30, reclaiming the target cache address corresponding to the cache sub-area that caches the message data to be discarded, and generating message discard information;

[0200] Step J40: Send the message discard information and the third cache area ID of the cache sub-area corresponding to the target cache address to the pointer management resource pool, so that the pointer management resource pool can reclaim the pointer corresponding to the third cache area ID.

[0201] In some embodiments, the step of receiving a port scheduling instruction includes:

[0202] Step K10, obtaining a data read operation request;

[0203] Step K20: Generate a port scheduling instruction according to the data read operation request.

[0204] The traffic management method provided in the embodiments of the present application, when applied to the traffic management system of any of the aforementioned embodiments, can resolve the performance loss problem introduced by read-write conflicts in shared queue resources in network switching devices in a multi-core forwarding architecture in the related art. Compared with the prior art, the beneficial effects of the traffic management method provided in the embodiments of the present application are the same as those of the traffic management system provided in the aforementioned embodiments, and the other technical features of the traffic management method are substantially the same as those disclosed in the aforementioned embodiments, and are not further described here.

[0205] In some possible implementations, the steps of the traffic management method according to this embodiment may be implemented by corresponding modules of the traffic management system in any of the above embodiments. For example, steps S10, S20, and S30 may be implemented by the enqueue processing module, linked list management module, and dequeue processing module in any of the above embodiments, respectively.

[0206] Example 8

[0207] The embodiment of the present application also provides a chip, which is a switching chip. Please refer to Figure 10, which is a hardware structure diagram of a chip provided in an embodiment of the present application. As shown in Figure 10, the chip may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004 and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Optionally, the user interface 1003 may include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (RAM) memory, or a stable non-volatile memory (NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0208] Those skilled in the art will appreciate that the structure shown in FIG10 does not limit the chip and may include more or fewer components than shown, or combine certain components, or arrange the components differently. As shown in FIG10 , the memory 1005 , which is a computer-readable storage medium, may include an operating system, a data storage module, a network communication module, a user interface module, and a traffic management program.

[0209] In the chip shown in Figure 10, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in this embodiment can be set in the chip, and the chip calls the traffic management program stored in the memory 1005 through the processor 1001, and executes the traffic management system provided in any of the above embodiments.

[0210] The terminal proposed in this embodiment and the terminal applied to the traffic management system proposed in the above embodiment belong to the same inventive concept. The technical details not described in detail in this embodiment can be referred to any of the above embodiments, and this embodiment has the same beneficial effects as executing the traffic management system.

[0211] Embodiment 9

[0212] An embodiment of the present invention provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the traffic management method in the above embodiment.

[0213] The computer-readable storage medium provided in the embodiment of the present invention can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0214] The computer-readable storage medium may be included in a chip, or may exist independently without being incorporated into a chip.

[0215] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the chip, the chip: obtains an incoming message descriptor, and determines a target idle pointer based on the incoming message descriptor, and writes the incoming message data corresponding to the incoming message descriptor into an idle sub-buffer corresponding to the target idle pointer, wherein the idle sub-buffer is a sub-buffer in an idle state; performs linked list concatenation and linked list update according to the buffer area ID corresponding to the idle sub-buffer where the incoming message data is written, and generates queue linked list information; receives a port scheduling instruction, determines the outgoing message descriptor carried by the port scheduling instruction, and determines the target read pointer corresponding to the outgoing message descriptor based on the queue linked list information, and reads the message data to be dequeued from the target sub-buffer corresponding to the target read pointer.

[0216] Traffic management program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0217] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions and operations of the systems, methods and traffic management program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the boxes can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified functions or operations, or can be implemented using a combination of dedicated hardware and computer instructions.

[0218] The modules involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0219] The computer-readable storage medium provided in this application stores computer-readable program instructions for executing the aforementioned traffic management method, which can address the performance loss caused by read / write conflicts in shared queue resources in network switching devices in a multi-core forwarding architecture. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this embodiment of the present invention are the same as those of the traffic management method in the aforementioned embodiment, and are not further elaborated here.

[0220] Example 10

[0221] An embodiment of the present invention further provides a traffic management program product, including a traffic management program. When the traffic management program is executed by a processor, the steps of the traffic management method described above are implemented.

[0222] The traffic management program product provided in this application can address the performance loss caused by read / write conflicts in shared queue resources in multi-core forwarding architectures of network switching devices in related technologies. Compared with the prior art, the beneficial effects of the traffic management program product provided in this embodiment of the present invention are the same as those of the traffic management method provided in the above-mentioned embodiment, and will not be elaborated here.

[0223] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0224] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0225] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course, by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a chip to execute the methods described in each embodiment of the present application.

[0226] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A traffic management system, comprising a plurality of cores, and a queue resource shared buffer area for each core to perform multi-channel reading and writing, wherein the queue resource shared buffer area comprises a plurality of sub-buffer areas, and the core comprises an enqueue processing module, a linked list management module and an outqueue processing module connected in sequence, wherein: The enqueue processing module is configured to obtain an incoming message descriptor, determine a target idle pointer according to the incoming message descriptor, and write the incoming message data corresponding to the incoming message descriptor into an idle sub-buffer area corresponding to the target idle pointer, wherein the idle sub-buffer area is a sub-buffer area in an idle state; The linked list management module is configured to perform linked list concatenation and linked list update according to the buffer area ID corresponding to the idle sub-buffer area where the incoming message data is written, and generate queue linked list information; The dequeue processing module is configured to receive a port scheduling instruction, determine the outgoing message descriptor carried by the port scheduling instruction, and determine the target read pointer corresponding to the outgoing message descriptor according to the queue linked list information, and read the to-be-dequeued message data from the target sub-buffer area corresponding to the target read pointer.

2. The flow management system according to claim 1, wherein: The kernel further includes an idle pointer management module and a cache management module, both of which are connected to the queue processing module, wherein: The enqueue processing module is configured to send the idle pointer application corresponding to the incoming message descriptor to the idle pointer management module after acquiring the incoming message descriptor; The idle pointer management module is configured to obtain a target idle pointer from a preset pointer management resource pool in response to the idle pointer application, and send the target idle pointer to the enqueue processing module; The enqueue processing module is further configured to send the target idle pointer to the cache management module; The cache management module is configured to determine the idle sub-cache area corresponding to the target idle pointer according to the target idle pointer, and send the first cache area ID corresponding to the idle sub-cache area to the enqueue processing module; The queue processing module is further configured to process the incoming message according to the first buffer area ID. The message data corresponding to the descriptor is written into the idle sub-buffer area corresponding to the target idle pointer.

3. The flow management system according to claim 2, wherein: The traffic management system further includes a central scheduler, which is connected to the queue processing module, wherein: The enqueue processing module is further configured to generate enqueue information after writing the incoming message data into the idle sub-buffer area corresponding to the target idle pointer, and send the enqueue information and the first buffer area ID to the central scheduler module; The central scheduler is configured to perform QOS scheduling based on the enqueue information and the first buffer area ID.

4. The flow management system according to claim 2, wherein: The idle pointer management module and the cache management module are also connected to the dequeue processing module, wherein: The dequeue processing module is configured to read the queue linked list information from the linked list management module after determining the outgoing message descriptor corresponding to the port scheduling instruction, and perform a linked list decomposition operation on the queue linked list information to obtain a read pointer application corresponding to the outgoing message descriptor; The idle pointer management module is further configured to send a target read pointer corresponding to the read pointer application to the dequeue processing module in response to the read pointer application; The dequeue processing module is further configured to send a target read pointer to the cache management module; The cache management module is further configured to determine a target sub-cache area corresponding to the target read pointer, and send a second cache area ID corresponding to the target sub-cache area to the dequeue processing module; The dequeue processing module is further configured to read the to-be-dequeued message data from the target sub-cache area corresponding to the target read pointer according to the second cache area ID.

5. The flow management system according to claim 4, wherein: The dequeue processing module is also configured to generate dequeue information after reading the to-be-dequeued message data from the target sub-cache area corresponding to the target read pointer, and send the dequeue information and the second cache area ID to the pointer management resource pool so that the pointer management resource pool can recycle the pointer corresponding to the second cache area ID.

6. The flow management system according to claim 1, wherein: The inbound message data includes at least one data packet, and the linked list management module includes a queue linked list management unit and a packet linked list management unit, wherein: The enqueue processing module is further configured to divide the data packet into a plurality of data fragments according to the cache space size of the sub-cache area; determine the total number of corresponding data fragments, allocate the total number of target idle pointers for the incoming message data, and write each of the data fragments into the idle sub-cache area corresponding to each of the target idle pointers one by one; The packet linked list management unit is configured to determine the cache addresses corresponding to each data packet in the queue resource shared cache area according to the cache area ID corresponding to the idle sub-cache area written into each data slice; concatenate the address identifiers corresponding to the cache addresses corresponding to each data packet, respectively, to obtain the cache address block information corresponding to each data packet to complete the linked list concatenation, wherein one cache address corresponds to one unique address identifier; The queue linked list management unit is configured to update the linked list according to the cache address block information to generate queue linked list information.

7. The flow management system according to claim 6, wherein: The enqueue processing module is further configured to divide the data packet into a plurality of data fragments carrying reading order information; The packet linked list management unit is further configured to concatenate the address identifiers corresponding to the cache addresses corresponding to each data packet according to the reading sequence information.

8. The flow management system according to claim 7, wherein: The packet linked list management unit is connected to the queue entry processing module and the queue exit processing module respectively, wherein: The queue processing module is further configured to send the reading sequence information to the packet linked list management unit; The packet linked list management unit is configured to determine the eop segment from each of the data segments according to the reading order information, mark the linked list pointer corresponding to the eop segment as valid, and mark the linked list pointers corresponding to other segments in each of the data segments except the eop segment as invalid; The dequeue processing module is also configured to determine whether the linked list pointer corresponding to the target data slice is marked as valid each time a target data slice to be dequeued is read from the queue resource shared cache area; if so, continue to access the data slice corresponding to the next-hop linked list pointer according to the queue linked list information; if not, scan the encapsulation information of the target data slice, and trigger access to the data slice of the next reading order corresponding to the target data slice according to the encapsulation information.

9. The flow management system according to claim 1, wherein: A kernel includes multiple enqueue processing modules, the number of the dequeue processing modules, the linked list management modules and the enqueue processing modules is consistent, and each of the enqueue processing modules, each of the linked list management modules and each of the dequeue processing modules are connected one by one so that a kernel forms a multi-way read and write channel, wherein one read and write channel is composed of an enqueue processing module, a linked list management module and a dequeue processing module connected in sequence.

10. The traffic management system according to claim 9, further comprising a plurality of exclusive cache areas, each read / write channel being bound to an exclusive cache area, wherein: The enqueue processing module is further configured to obtain an incoming message descriptor and determine whether the corresponding bound exclusive buffer area is in an idle state; if so, allocate an idle pointer in the exclusive buffer area to the incoming message data corresponding to the incoming message descriptor; If not, an idle pointer in the queue resource shared buffer area is allocated to the incoming message data; and the allocated idle pointer is used as the target idle pointer.

11. The flow management system according to any one of claims 2 to 10, wherein: The traffic management system further includes a congestion avoidance subsystem, which is connected to the queue processing module, wherein: The congestion avoidance subsystem is configured to obtain the message data to be processed, perform QOS scheduling on the message data to be processed, and send the message data to be processed after QOS scheduling to the queue processing module; The queue processing module is further configured to use the to-be-processed message data after QOS scheduling as the inbound message data.

12. The flow management system according to claim 11, wherein: The congestion avoidance subsystem is connected to the dequeue processing module, and the dequeue processing module is further configured to identify the message data to be discarded stored in the queue resource sharing buffer area; mark the message data to be discarded with a discard mark; The congestion avoidance subsystem is further configured to identify the message data with the discard mark stored in the queue resource sharing buffer area as the message data to be discarded, and recycle the cached message data to be discarded. The target cache address corresponding to the cache sub-area of ​​the message data, and generating message discard information; The dequeue processing module is further configured to send the message discard information and the third cache area ID of the cache sub-area corresponding to the target cache address to the pointer management resource pool, so that the pointer management resource pool can recycle the pointer corresponding to the third cache area ID.

13. The flow management system according to any one of claims 1 to 10, wherein: The traffic management system further includes a port scheduling subsystem, which is also connected to the dequeue processing module, wherein: The port scheduling subsystem is configured to obtain a data read operation request, generate a port scheduling instruction according to the data read operation request, and send the port scheduling instruction to the dequeue processing module.

14. A traffic management method, comprising: Obtaining an incoming message descriptor, and determining a target idle pointer according to the incoming message descriptor, and writing the incoming message data corresponding to the incoming message descriptor into an idle sub-buffer area corresponding to the target idle pointer, wherein the idle sub-buffer area is a sub-buffer area in an idle state; According to the buffer area ID corresponding to the idle sub-buffer area where the incoming message data is written, link lists are concatenated and updated to generate queue link list information; Receive a port scheduling instruction, determine the outgoing message descriptor carried by the port scheduling instruction, and determine the target read pointer corresponding to the outgoing message descriptor according to the queue linked list information, and read the to-be-dequeued message data from the target sub-buffer area corresponding to the target read pointer.

15. A chip comprising the traffic management system according to any one of claims 1 to 13.

16. A computer-readable storage medium, wherein: The computer-readable storage medium stores a traffic management program, and when the traffic management program is executed by the processor, the steps of the traffic management method according to claim 14 are implemented.

Citation Information

Patent Citations

  • Method and apparatus for managing queue storage space

    CN101605100A

  • Port congestion management method and device

    CN105812285A

  • Queue management method and apparatus

    CN106302238A

  • Queue management method and device and data communication equipment

    CN110046049A

  • Message storage method, message inquequing / dequequing method and storage scheduling device

    CN112822126A

Cited By

  • Access request processing method and electronic equipment

    CN119065861A

  • Access request processing method and electronic device

    CN119065861B

  • Model calling method and related equipment

    CN119179579A

  • Message processing method, device, equipment, network card and computer program product

    CN119276790A

  • On-chip cache sharing method and switching chip

    CN119342014A