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

By adopting the multi-core multiplexed queue resource sharing cache area in network switching devices, the problem of read and write conflicts of shared queue resources under the multi-core forwarding architecture is solved, high performance and low bandwidth loss are achieved, and the area and power consumption of the chip are reduced. and heat dissipation.

CN118900254APending Publication Date: 2024-11-05SANECHIPS TECH CO LTD

Patent Information

Application Number
CN202310481763.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

Under the multi-core forwarding architecture, read and write conflicts of shared queue resources of network switching devices lead to performance losses, and traditional core stacking methods lead to chip area, power consumption and heat dissipation problems becoming design bottlenecks.

Method used

The multi-core multiplexed queue resource sharing buffer area is adopted, and the incoming message descriptor is obtained through the incoming processing module and written to the free sub-buffer area. The linked list management module conducts linked list and updates, and the dequeue processing module reads based on the queue linked list information. Message data avoids read and write conflicts, reduces hardware costs and saves area/power consumption/heat dissipation.

Benefits of technology

It realizes read and write conflict-free when sharing queue resources, ensures high performance requirements of network switching devices, reduces bandwidth losses, finds the optimal solution to the performance cost and area of ​​multi-core forwarding architecture design, and solves the introduction of read and write conflicts of shared queue resources Performance loss issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118900254A_ABST
    Figure CN118900254A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic management system and method, a chip and a computer readable storage medium, and belongs to the technical field of communication. The method comprises the following steps: acquiring an inbound message descriptor, determining a target idle pointer according to the inbound message descriptor, and writing inbound message data corresponding to the inbound message descriptor into an idle sub-cache region corresponding to the target idle pointer; according to the cache region ID corresponding to the idle sub-cache region written into the message data, linked list concatenation and linked list updating are carried out, and queue linked list information is generated; and determining a port scheduling pointer used for commanding a correspondingly carried outbound message descriptor, determining a target read pointer corresponding to the outbound message descriptor according to the queue chain table information, and reading the message data to be outbound from the target sub-cache region corresponding to the target read pointer. According to the method and the device, high-performance and low-delay queue resource sharing can be realized, and the problem of performance loss introduced by a read-write conflict problem of shared queue resources in a multi-core forwarding architecture is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] 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

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

[0003] The main purpose of the present application is to provide a traffic management system, method, chip and computer-readable storage medium, which aims to solve the performance loss problem introduced by the read and write conflict of shared queue resources in the network switching equipment under the multi-core forwarding architecture in the related technology.

[0004] To achieve the above-mentioned purpose, an embodiment of the present application provides a traffic management system, which includes multiple cores and a queue resource shared cache area for each core to perform multi-channel reading and writing, 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 idle pointer allocated to the incoming message descriptor, and write the incoming message descriptor into an idle sub-buffer area corresponding to the target idle pointer for enqueue processing, 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 inbound 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 for dequeue processing.

[0005] In addition, an embodiment of the present application further provides a traffic management method, the 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.

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

[0007] In addition, an embodiment of the present application further provides a computer-readable storage medium, on which a traffic management program is stored, and when the traffic management program is executed by a processor, the steps of the traffic management method as described above are implemented.

[0008] The embodiment of the present application discloses a traffic management system, including multiple cores, and a queue resource sharing cache area for each core to perform multi-channel reading and writing, the queue resource sharing 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, and determine a target idle pointer according to the incoming message descriptor, and write the incoming message data into an idle sub-cache area corresponding to the target idle 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 according to the cache area ID corresponding to the idle sub-cache area where the incoming message descriptor is written, and generate queue linked list information; the dequeue processing module is configured to receive a port scheduling instruction, determine an outgoing message descriptor corresponding to the port scheduling instruction, and determine a 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-cache area corresponding to the target read pointer for dequeue processing.

[0009] 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 a cache area independently for each core, 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 entry and exit management, avoiding read and write conflicts when sharing queue resources. The embodiment of the present application abandons the core stacking method under the traditional multi-core forwarding architecture, and instead obtains the inbound message descriptor through the kernel's enqueue processing module, determines the target idle pointer allocated to the inbound message descriptor, and writes the inbound message descriptor into the idle sub-cache area corresponding to the target idle pointer for enqueue processing. Then, the linked list management module performs linked list concatenation and linked list update for the storage location of the queued message data in the queue resource shared buffer area, and generates queue linked list information, so that the dequeue processing module can read the required message data at the specified storage location in the queue resource shared buffer 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 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 of the network switching device under the multi-core forwarding architecture. 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 drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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] Figure 1 This is a schematic diagram of the application environment of the Ethernet switching device in the embodiment of the present application; Figure 2 This is a structural block diagram of the queue management subsystem in an embodiment of the present application; Figure 3 A schematic diagram of a shared idle pointer data stream in an embodiment of the present application; Figure 4 A flowchart of the application and recovery of the free pointer FIFO; Figure 5 A schematic diagram of reading and writing a queue linked list according to an embodiment of the present application; Figure 6 This is a schematic diagram comparing the structures of the cut_through of the embodiment of the present application and the traditional cut_through; Figure 7 This is a flowchart of the packet linked list free address recovery processing logic in the embodiment of the present application; Figure 8 A schematic diagram of the process of handling packet linked list read and write conflicts in an embodiment of the present application; Fig. 9 This is a flow chart of an embodiment of the traffic management method of the present application; Fig.10 This is a schematic diagram of the structure of the chip involved in the embodiment of the present application.

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

[0013] 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.

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

[0015] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0016] In this application, unless otherwise clearly specified and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0017] In addition, in this application, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. 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.

[0018] Embodiment 1 At present, centralized chip high-performance and high-bandwidth traffic management systems usually use multi-core architecture to improve chip processing capabilities. However, the requirements for power consumption / area / heat dissipation / performance / latency are gradually increasing. How to achieve high-performance and low-latency cut-through functions and how to solve the performance loss introduced by read-write conflicts when sharing multi-core and multi-channel queue resources are key technologies.

[0019] The centralized chip high-performance and high-bandwidth traffic management system is mainly used in Ethernet switching equipment. In order to alleviate the growing bandwidth application demand in data centers (DCs), operator networks and other traffic-intensive high-performance computing environments, a multi-core architecture is usually used to improve chip processing capabilities. Faced with the market demand for ultra-high throughput of 5G and data center products, chip area / power consumption / heat dissipation / latency / performance and other issues have become design bottlenecks. How to achieve full sharing of queue resources in a multi-core forwarding architecture under ideal circumstances and ultimately find the optimal solution suitable for the current design implementation cost and area is a common problem in the current industry.

[0020] There are two main application scenarios for DC low latency: 1) AI (Artificial Intelligence) and distributed storage: The expansion of new AI algorithms and data has led to the expansion of AI GPUs (Graphics Processing Units) and storage, which has put forward new requirements for network carrying (low latency, no packet loss). It is mainly used for HPC (High Performance Computing) / AI cluster (GNU cluster) / HFT (High Frequency Trading), etc.

[0021] 2) Pod deployment, mainly for GPU server clusters / X86 computing clusters / storage clusters, and there is a lot of network traffic between clusters.

[0022] Network latency is part of the E2E (end to end) latency. Many new protocols are created to reduce latency. The traditional TCP (Transmission Control Protocol) protocol has a latency of tens of microseconds (including kernel context switching of 5 to 10 microseconds, message copying / encapsulation, etc.). RDMA (Remote Direct Memory Access) replaces TCP. RDMA is a retransmission mechanism of GON (group of unint), which has low tolerance for packet loss and requires lossless network transmission. At the same time, many other protocols are also doing similar work, such as Google's QUIC (Quick UDP Internet Connection) which replaces TCP for WEB (World Wide Web). Among them, long tail latency is a problem of large-scale distributed systems, mainly caused by JITTER (jitter) of latency. In a system, it is assumed that most service calls respond within 10ms, but 1% of the latency is 1s. If a user request is only processed 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 one in ten thousand probability of encountering a response delay of more than one second on a single server, if the service scale reaches 2,000 instances, it will be observed that almost one in five user requests will take more than one second. For messages that require low latency, the JITTER should be reduced. At the same time, the length of the message will also affect the forwarding delay. For example, for a 9,000B message, it takes 17us to receive a complete message. If the linked list of the message is not concatenated, that is, the reading and forwarding of the message is initiated, data transmission errors will occur.

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

[0024] However, on 12.8T / 51.2T high-performance switching devices, applications face the following challenges: In a multi-core forwarding architecture, the traditional core stacking method is used, and issues such as area / power consumption / heat dissipation become design bottlenecks. How to find a balance between physical implementation and logical implementation, share queue resources among multiple cores as much as possible, and resolve performance losses caused by multi-core shared read and write conflicts have become new problems and challenges.

[0025] 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-cache areas. 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 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 (IDentity, identity identification number) corresponding to the idle sub-buffer area where the inbound message data is written, and generate queue linked list information; In this embodiment, the packet linked list is concatenated according to the buffer area ID, and after the queue entry condition is met, the queue linked list information is generated.

[0026] The dequeue processing module is configured to receive a port scheduling instruction, determine an outgoing message descriptor corresponding to the port scheduling instruction, and determine a 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.

[0027] The application scenarios of the traffic management system of the embodiment of the present application can be SPINE, Leaf, TOR (TOP of Rank) or DC (Data Center) switch scenarios. The embodiment of the present application relates to a high-performance and high-bandwidth traffic management system, which is applied to the technical fields of cache sharing / queue management / low-latency cut_through, etc.

[0028] Exemplarily, the traffic management system further includes a port scheduling subsystem, which is further 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.

[0029] 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 a cache area independently for each core, 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 entry and exit management, avoiding read and write conflicts when sharing queue resources. The embodiment of the present application abandons the core stacking method under the traditional multi-core forwarding architecture, and instead obtains the inbound message descriptor through the kernel's enqueue processing module, determines the target idle pointer allocated to the inbound message descriptor, and writes the inbound message descriptor into the idle sub-cache area corresponding to the target idle pointer for enqueue processing. Then, the linked list management module performs linked list concatenation and linked list update for the storage location of the queued message data in the queue resource shared buffer area, and generates queue linked list information, so that the dequeue processing module can read the required message data at the specified storage location in the queue resource shared buffer 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 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 of the network switching device under the multi-core forwarding architecture.

[0030] It is worth mentioning that the embodiment of the present application provides a high-performance and high-bandwidth traffic management system, 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, and the design requirements of ultra-high throughput of DC data centers are realized, which solves the problems of area / power consumption / heat dissipation encountered by ultra-high bandwidth traffic management architecture. Finally, the 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.

[0031] 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, 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 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.

[0032] 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 idle sub-buffer area corresponding to the target idle pointer. It can be understood by those skilled in the art that the first buffer area ID can be used to indicate the address information of the idle sub-buffer area corresponding to the target idle pointer, so that the subsequent queue processing module can write the message data corresponding to the inbound message descriptor into the idle sub-buffer area corresponding to the target idle pointer according to the first buffer area ID.

[0033] In this embodiment, the kernel is set to include 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, wherein the idle pointer management module responds to the idle pointer request sent by the enqueue processing module, queries the idle sub-cache area with an idle address from the preset pointer management resource pool, and then sends the pointer corresponding to the idle sub-cache area as the target idle pointer to the enqueue processing module, and then the enqueue processing module sends the target idle pointer to the cache management module, and the cache management module determines the idle sub-cache area corresponding to the target idle pointer based on the target idle pointer, and sends the first cache area ID corresponding to the idle sub-cache area to the enqueue processing module, and the enqueue processing module writes the message data corresponding to the incoming message descriptor into the idle sub-cache area corresponding to the target idle pointer according to the first cache area ID, so as to facilitate the decision of which sub-cache area to write according to the use of the idle pointers in the pointer management resource pool, realize uniform data distribution, reduce the write conflict scenario of the shared cache, reduce the location storage randomness when storing message data, and thus greatly reduce the probability of conflict when multiple cores write data to the shared cache at the same time.

[0034] Exemplarily, 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 (Quality of Service) 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 entry processing module is also configured to use the to-be-processed message data after QOS scheduling as the inbound message data, thereby effectively realizing the dequeue processing of the qmu_dm queue.

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

[0036] Further, 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 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 identifier stored in the queue resource sharing buffer area as the message data to be discarded, reclaim the target buffer address corresponding to the buffer sub-area that caches the message data to be discarded, and generate 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.

[0037] In this embodiment, the discard flag can be used to indicate whether the message data is the message data to be discarded. The third cache area ID refers to the cache area ID of the cache sub-area corresponding to the target cache address. It can be understood by those skilled in the art that the third cache area ID can be used to indicate the address information of the cache address corresponding to the message data to be discarded.

[0038] In this embodiment, the congestion avoidance subsystem is connected to the dequeue processing module, and the dequeue processing module identifies the message data to be discarded stored in the shared cache area of ​​the queue resources, marks the message data to be discarded with a discard mark, and then identifies the message data with the discard mark stored in the shared cache area of ​​the queue resources as the message data to be discarded by 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, and 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. A pool is provided for the pointer management resource pool to recycle the pointer corresponding to the third buffer area ID, so as to facilitate clearing 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 enabling the pointers of each sub-buffer area in the shared buffer area to be updated in real time, and the message data is evenly stored according to the real-time pointer information of each sub-buffer area, thereby reducing the probability of conflict when the message data is written into the shared buffer.

[0039] Embodiment 2 Based on the first embodiment of the present application, in another embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and no further description will be given later. On this basis, in order to help understand the technical concept or technical principle of embodiment 1, a specific embodiment 1 is listed, 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 queue management subsystem in the traffic management system solves the key problem of multi-core and multi-channel read and write conflicts. The design solution is as follows: qmu_list is the queue management subsystem.

[0040] like Figure 2 As shown in the figure, the qmu_list queue management subsystem 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, 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_ 5), where the queue list core supports 4 channels, including qmu_em (i.e. the above-mentioned queue 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).

[0041] Specifically, MUX (multiplexer): according to the incoming pipe packet information of 4-way cgavd (congestion avoidance subsystem), it sends the packet information to the corresponding linked list processing core; qmu_em (queue processing module): Each qmu_list_core (queue list core) has 4 qmu_ems, corresponding to the 4 pipeline inputs after MUX allocation. After each qmu_em (queue processing) receives the cgavd (congestion avoidance subsystem) packet information allocated by 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 queue block mark (cti). If a new free pointer is needed, an free pointer application is initiated to the free pointer management module. After obtaining the free address, a PD (Packet Descriptor, packet description) information write operation, and combine the queue list information to perform the linked list concatenation operation, update the next pointer, and send the queue list update write operation to the linked list management module. The queue list update includes updating the head pointer (hp), tail pointer (tp), empty mark (empty) and queue block mark (cti), and sends the queue information (including the queue completion valid signal and the queue completion queue number) to the Schedule (central scheduler) scheduler module; link_ram (linked list management module): Each qmu_list_core (queue linked list core, that is, the above-mentioned kernel) contains 4 link_rams, which receive the linked list RAM (random access memory) read and write requests from qmu_em (entry processing module) and qmu_dm (departure processing module), and update the corresponding RAM information, including the head pointer (hp), tail pointer (tp), empty mark (empty), enqueue block mark (cti) and dequeue block mark (cto).

[0042] qmu_dm (dequeue processing module): Each qmu_list_core (queue list core) contains a qmu_dm, which receives the scheduling results of Schedule (central scheduler) and performs list decompression operations. Each qmu_list_core (queue list core) has a total of 4 linked lists. qmu_dm reads the 4-way linked list information, and RR (Round Robin) selects one of them for decompression operation, updates the corresponding RAM of the 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 Schedule (central scheduler), cgavd (congestion avoidance subsystem), plm (packet list management unit) and qmu_cmd_fifo (port scheduling subsystem), and releases the idle pointer.

[0043] idle_list_man (idle pointer management module): Each qmu_list_core (queue list core) contains 1 idle_list_man, which provides idle pointer allocation and 1 qmu_dm idle pointer recovery for the 4-way qmu_em of the qmu_list_core (queue list core). Each idle pointer management contains 4 exclusive pointer fifos, which correspond to the 4 qmu_em of the qmu_list_core (queue list core); when each qmu_em in the qmu_list_core (queue list core) applies for an idle pointer, it is preferred to obtain it from the corresponding exclusive pointer fifo. When the exclusive pointer fifo is exhausted, it is necessary to obtain an 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; men_man (cache management module): Each qmu_list_core (queue list core) contains a men_man, which receives the read and write packet information and read and write next hop requests of 4 qmu_em and 1 qmu_dm in the qmu_list_core (queue list core). Each cache management contains 4 exclusive packet information caches and 4 next exclusive caches, which correspond to the 4 qmu_ems one by one. When making packet information and next list read and write requests, it can distinguish whether it is a read and write exclusive area cache or a shared area cache according to the storage location. If the read and write is a shared area cache, a read and write request is initiated to the shared cache management; share_idle_list (i.e. shared idle pointer): receives the application and recovery of idle pointer management from 4 qmu_list_cores (queue list cores), which consists of 64 shared pointer fifos. When receiving an idle pointer application, it selects a shared pointer fifo code from the resource pool fifo for the application enqueue processing. The idle pointer released by the enqueue processing is sent to the corresponding shared pointer fifo block. If the fifo block is full after recovery, the fifo code is recovered to the resource pool fifo.

[0044] share_mem (i.e. shared cache): receives packet cache information and next cache from 4 qmu_list_cores (queue list cores), consisting of 64 shared packet information caches and next caches, corresponding one to one with 64 shared pointer fifos; The queue entry process of qmu_list (queue management subsystem) is as follows: MUX sends the packet information to the corresponding qmu_list_core (queue list core) according to the port information in the packet information. qmu_em (queue entry processing module) 0~3 in qmu_list_core (queue list core) receives the packet information of the corresponding pipeline allocated by MUX, initiates the pre-application of the shared pointer, obtains the allocated shared pointer from the idle pointer management module, reads the relevant queue list information, and performs the hanging list operation. According to the queue list information, if a new idle pointer needs to be applied, it is first obtained from the exclusive pointer fifo. If it is exhausted, it is obtained from the pre-application pointer fifo. After obtaining the idle pointer, a write command is generated and sent to the cache management module. The cache management module confirms that it is exclusive according to the storage location, and directly writes the packet information into the exclusive cache RAM. If it is shared, it is updated to the shared cache management. At the same time, it receives the next update, completes the hanging list operation and updates each RAM in the list management. Finally, the corresponding queue entry information (including the effective signal of the completion of the queue and the queue number of the completion of the queue) is generated to Schedule (central scheduler); 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 list core, that is, the above-mentioned kernel, which will not be repeated later). 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 way from the four queue 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, obtains the next information from the cache management, and performs the dequeue operation. The cache management module confirms that it is exclusive based on the storage location of next, and reads it directly from the exclusive cache RAM. If it is shared, it reads it from the shared cache management, and updates the corresponding linked list management RAM to read the packet information. The cache management module directly reads the packet information from the exclusive cache RAM if it is 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 real 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, the 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.

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

[0046] Embodiment 3 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 refer to the above introduction, and will not be repeated later. On this basis, 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 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.

[0047] 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 can be understood by those skilled in the art that the second buffer area ID can be used to indicate the address information of the free 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 (that is, 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.

[0048] In this embodiment, the idle pointer management module and the cache management module are 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 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, and 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-buffer area corresponding to the target read pointer according to the second buffer area ID, thereby determining the target sub-buffer 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 solution operation of the queue linked list information, so that the dequeue processing module can accurately read the to-be-dequeued message data from the target sub-buffer area, and then decide which sub-buffer area to read the data 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.

[0049] In a possible implementation, the dequeue processing module is also configured to generate dequeue information after reading the to-be-dequeued message data from the target sub-buffer area corresponding to the target read pointer, 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.

[0050] This embodiment sets 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 recycle 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 recycles 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.

[0051] In an implementable manner, 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 data fragments, allocate the total number of target idle pointers to 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.

[0052] 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 segments divided by the data packet (i.e., the address identifiers corresponding to the cache addresses of all data segments). For example, the cache address block information corresponding to data packet A can be used to indicate the cache address information of all data segments 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 segments divided by data packet B.

[0053] In this embodiment, a linked list management module is set up to include a queue linked list management unit and a packet linked list management unit, wherein the incoming message data includes at least one data packet. In this embodiment, the enqueue processing module divides the data packet into multiple data fragments according to the cache space size of the sub-cache area, 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. Then, the packet linked list management unit 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 into each data fragment, 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 then the queue linked list management unit updates the linked list according to the cache address block information to generate queue linked list information, thereby accurately obtaining the queue linked 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 at a specified storage location in the queue resource shared cache area according to the real-time updated queue linked list information, so 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 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-write conflict problem of the network switching device under the multi-core forwarding architecture.

[0054] Furthermore, in an implementable manner, 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.

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

[0056] This embodiment sets the enqueue processing module to divide the data packet into multiple data fragments carrying reading order information, and then sets the packet linked list management unit to concatenate the address identifiers corresponding to the cache addresses distributed corresponding to each data packet according to the reading order information, thereby facilitating concatenation of the multiple data fragments corresponding to each data packet in accordance with a specified concatenation order, thereby accurately obtaining the cache address block information corresponding to each data packet, and accurately realizing linked list concatenation.

[0057] 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 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.

[0058] In the embodiment of the present application, a traffic management system is configured 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 the array-distributed queue resource shared cache area is combined to realize a shared cache with multiple cross-inputs and multiple concurrent outputs. Compared with the common shared cache write-side stream beat method, the flexibility of the multi-read and multi-write cache space can be greatly improved, the cache resource occupancy under multi-core processing is optimized, and the cache utilization rate is 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.

[0059] Furthermore, in an practicable manner, the traffic management system further includes a plurality of exclusive cache areas, each read / write channel is bound to an exclusive cache area, wherein: The enqueue processing module is also 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, allocate an idle pointer in the queue resource shared buffer area to the incoming message data; and use the allocated idle pointer as the target idle pointer.

[0060] Since each read-write channel has an independent corresponding bound exclusive cache area, there is basically no read-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-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-write conflicts when each core reads cache data at the same time, thereby effectively solving the performance loss problem introduced by the shared queue resource read-write conflict problem in the network switching equipment under the multi-core forwarding architecture.

[0061] Embodiment 4 Based on the above embodiment of the present application, in another embodiment of the present application, the same or similar contents as the above embodiment can be referred to the above introduction, and no further description 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 2 is listed, please refer to Figure 1 : The embodiments of the present application are mainly applied in Ethernet switching equipment. Conventional switching networks and equipment such as Figure 1 As shown, in traditional Ethernet switching devices, if 4A Tbps switching network traffic is to be achieved, multiple 2ATbps switching devices are required to complete the networking and performance testing. Through the embodiments of the present application, a single independent 4ATbps 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, the forwarding delay of low-latency messages is effectively improved.

[0062] In this embodiment, the traffic management system completes the message discarding / forwarding process according to the congestion of the outgoing port, supports the multi-core multi-channel cache full sharing architecture, and supports the multi-core multi-channel queue management function. The components of the traffic management system are described as follows: 1. Congestion avoidance subsystem: It mainly performs congestion avoidance based on the QOS scheduling effect and completes the judgment of message discarding and forwarding in the queue resource sharing cache; 2. The queue management subsystem (including the queue entry processing module, the linked list management module, and the queue exit processing module) is mainly used for queue entry and exit management. It implements a multi-core multi-channel cache exclusive + shared design for queue information. The queue information is read and written without conflict according to {source pipeline, destination pipeline}, meeting performance requirements and without bandwidth loss. 3. The port scheduling subsystem schedules read commands according to the port and responds to the subsequent flow control; 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; 5. The packet linked list management unit in the linked list management module: mainly realizes the message linked list concatenation relationship and performs the packet linked list whole packet detection function.

[0063] Further, in order to more clearly illustrate the technical concept or technical principle of the embodiment of the present application, a specific embodiment 3 is listed, please refer to Figure 3 : like Figure 3 As shown, the shared linked list management implements the distribution and recovery of 4-read 4-write shared free pointers, which consists of 64 groups of 1r1w (one read and one write) fifos (First Input First Output, first-in first-out queues) and a resource pool fifo (that is, the pointer management resource pool mentioned above). It receives 4-way queue processing free pointer applications and 4 resource pool fifo applications corresponding to the inbound pipe composed of 4 qmu_list_cores (queue linked list cores). The IDs of all full shared pointer fifo blocks form the resource pool fifo. Each time, a maximum of 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 queue 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 the coding information carried by the recovered pointer is stored in the corresponding shared pointer fifo until the shared pointer fifo is recovered.

[0064] When the free pointer management module obtains free pointers, it will first apply from the exclusive pointer fifo. After the exclusive pointer fifo is exhausted, it will apply from the shared pointer fifo. Each enqueue processing module has an active mark reg to mark the bound shared pointer fifo that can be used. reg_active_bit supports 64 bits, corresponding to 64 shared pointer fifos respectively. When applying for free pointers in the enqueue, after a shared pointer fifo is bound to an enqueue processing module, the corresponding active mark reg is added to 1. When the bound shared pointer fifo is exhausted, the shared pointer fifo is removed from the active mark reg, and the code of the shared pointer fifo is released and returned to the shared pointer management module; when the dequeue processing releases the pointer, if the exclusive pointer is released, the address is directly recovered to the exclusive pointer fifo. If the shared pointer is released, the corresponding shared pointer fifo's reg_active_bit=0, and the corresponding shared pointer fifo state changes from empty to non-empty, then the shared pointer fifo is added to the active mark reg until the shared pointer fifo is recovered. Figure 4 As shown, Figure 4 The figure is a flowchart of the application and recovery of the free pointer FIFO.

[0065] Further, in order to more clearly illustrate the technical concept or technical principle of the embodiment of the present application, a specific embodiment 4 is listed, please refer to Figure 5 : like Figure 5 As shown, a qmu_list_core (queue linked list core) has 4 linked list managements (i.e. the linked list management module mentioned above), each inbound pipe corresponds to a linked list management, and has a set of linked list RAMs, including a head pointer (hp), a tail pointer (tp), an empty tag (empty), an entry block tag (cti), and an exit block tag (cto). The linked list management completes the read and write operations of the queue linked list RAM, receives linked list read queue information requests from the entry and exit processing to read the corresponding RAM, and receives linked list update requests from the entry and exit processing to write the corresponding RAM, so as to achieve no read-write conflict problems, achieve the timeliness and accuracy of queue entry and exit update linked lists, ensure queue processing performance, and provide performance guarantee for the high-performance and low-latency cut_through function.

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

[0067] Embodiment 5 At present, DC data centers have gradually increased their requirements for latency. The traditional way of collecting whole packets for transmission is adopted. After receiving the EOP (End of Procedure) fragment of the message, it is directly transmitted to the egress port for scheduling. For long messages, there will be serious forwarding delays. If you want to solve this problem, you need to participate in egress scheduling before collecting complete fragments of the long message. However, at this time, it is impossible to effectively ensure that the linked list of the message is read completely and the scheduled read command is correct, resulting in performance loss of data exchange. Therefore, how to achieve high-performance and low-latency cut_through function for messages of different lengths has become the core competitiveness of the product.

[0068] Based on this, the present application proposes another embodiment. For the same or similar contents as the above embodiment, please refer to the above introduction and will not be repeated in the following. The packet 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 an eop (End of Procedure) segment from each of the data segments according to the reading order information, mark a linked list pointer corresponding to the eop segment as valid, and mark 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.

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

[0070] In the embodiment of the present application, a packet linked list management unit is connected to an enqueue processing module and a 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 then determines whether the linked list pointer corresponding to the target data segment is marked as valid; if so, continue to access the data segment 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 segment, and trigger access to the data segment of the next reading order corresponding to the target data segment according to the encapsulation information. , so that for messages of different lengths, the command to read data 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 not sensitive 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 then 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.

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

[0072] In an practicable manner, 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 (Quality of Service) scheduling based on the enqueue information and the first buffer area ID.

[0073] In this embodiment, the traffic management system is configured 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 an idle sub-buffer area corresponding to a 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.

[0074] Embodiment 6 Based on the above embodiment of the present application, in another embodiment of the present application, the same or similar contents as the above embodiment can be referred to the above introduction, and no further description 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 5 is listed: In order to realize the 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: a packet linked list module (ie, a packet linked list management unit).

[0075] 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 expansion packet, the iport (i.e., encapsulation information) corresponding to the packet is recorded, and then 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 small. After improving the traditional cut_through, the embodiment of the present application obtains a high-performance and low-latency cut_through. Figure 6 As shown, Figure 6 It is a schematic diagram comparing the structures of the cut_through of the embodiment of the present application and the traditional cut_through.

[0076] In this embodiment, the functions of the packet linked list management unit are mainly divided into three parts, including the management of the packet linked list involved in the string packet, the expansion packet and the packet loss, the auxiliary completion of the data cache message queue and the dequeue, and the corresponding linked list management. At the same time, whether it is the dequeue of the ordinary data message or the address recovery of the discarded message, the packet linked list module needs to monitor whether the next hop ram pointer is valid to realize the cut_through half packet protection function. When 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 read is valid. Then the next hop ram can be accessed again. Furthermore, the specific data flow of the packet linked list module (ie, the packet linked list management unit) is as follows: 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 receives the wr_ptr pointer sent from the data cache at the sub-port (source port) to complete the storage address segmentation and concatenation of the data message.

[0077] When the data packet is dequeued, it mainly interacts with the qmu_cmd_fifo (port scheduling subsystem) of the TM (Traffic Management) system, receives the dequeued message read commands of 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 to the cache management module by the qmu_cmd_fifo (port scheduling subsystem). After reading the data packet from the cache management module, the cache module completes the pointer recovery of the message dequeued.

[0078] In this specific embodiment, in order to solve the performance loss introduced by the read-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 achieves read-write conflict-free when queue resources are shared, ensures performance requirements, achieves 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, and solves the local heat dissipation problem, involving SPINE / TOR / DC switch scenarios, and improves the core competitiveness of data communication equipment.

[0079] Furthermore, for 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 drop marks (i.e. the above-mentioned discard mark) (including half-packets introduced by insufficient previous cache, packets with cache verification errors, 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.

[0080] At the same time, whether it is the dequeue of ordinary messages or the address recovery of discarded messages, the packet linked list module needs to monitor whether the next hop linked list pointer is valid to implement the cut_through protection function. When 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 is valid. Then the next hop ram (next_ram) can be accessed again.

[0081] 1. MAC inputs the packet header into head_buf (packet header buffer area), applies for a separate packet header area address, and the packet body into MMU_buf (data sharing cache), and at the same time applies for the free address required for the packet body from the free address management module.

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

[0083] 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.

[0084] 4. If the cgavd (congestion avoidance subsystem) determines that it is a drop packet, it will directly send the packet header descriptor 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 unicast + 4 multicast) will be 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 drop packets triggered by a single source can also make full use of the 8 err queues. The principle is as follows Figure 7 As shown, Figure 7 This is a flowchart of the packet linked list free address recovery processing logic in the embodiment of the present application.

[0085] 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 will perform one-level scheduling (sp / dwrr) on the packet header address and the address scheduled by the packet body and send 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 display.

[0086] 6. The packet linked list has a total of 8 normal packet display queues + 8 err packet display queues. A total of 16 groups of buses 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. Since the address recovery conflicts with the address recovery after mmu reads data, 8 rcy_fifo caches 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. Since there will be conflict scenarios when reading the next hop ram (next_ram), when there are multiple queue conflicts, it is necessary to complete the conflict judgment according to a certain scheduling algorithm. The judgment is a process within the normal or err queue. SP scheduling is used between the normal and err queues. The normal queue has a higher priority. The judgment process is as follows Figure 8 As shown, Figure 8 This is a schematic diagram of the process of handling packet linked list read and write conflicts in an embodiment of the present application.

[0087] 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 a data packet eop beat.

[0088] 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 an eop beat, the next linked list address is read from the port command cache fifo.

[0089] Similarly, for discarded drop messages: the processing method is the same as the normal queue address. For the processing of normal queues and drop queues, RAM replication is used to support access to separate next_ram to avoid conflicts.

[0090] 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 the read-write conflict under the multi-core queue resource sharing in the 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. 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 implement the 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.

[0091] Beneficial effect 1 of the embodiment of the present application (the beneficial effect of the first key technical solution mentioned above): it realizes conflict-free reading and writing when queue resources are shared, thereby ensuring performance requirements; Beneficial effect 2 of the embodiment of the present application (the beneficial effect of the second key technical solution mentioned above): a high-performance, low-latency cut_through function for different message lengths is realized, and a balance between logical and physical implementations is found, solving the area / power consumption / heat dissipation problems encountered by the ultra-high bandwidth traffic management architecture. The final area is reduced by 36%, power consumption is reduced, and local heat dissipation problems are solved, involving SPINE / TOR / DC switch scenarios, which enhances the core competitiveness of data communication equipment.

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

[0093] Embodiment 7 The present application also provides a method for flow management. Fig. 9 , Fig. 9 This is a flow chart of an embodiment of a traffic management method of the present application, the method comprising: Step S10, 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; 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; 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 to-be-dequeued message data from the target sub-buffer area corresponding to the target read pointer.

[0094] 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 a cache area independently for each core, 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 entry and exit management, avoiding read and write conflicts when sharing queue resources. The present embodiment abandons the traditional core stacking method under the multi-core forwarding architecture, but obtains the incoming message descriptor, 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 enqueuing. Then, the storage location of the queued message data in the queue resource shared buffer is linked and updated to generate queue linked list information, so that the message data required to be read can be read from the specified storage location in the queue resource shared buffer according to the queue linked list information, thereby making it possible to read and write without conflict when the queue resources are shared, thereby 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 of the network switching device under the multi-core forwarding architecture.

[0095] 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 of this performance. Through the embodiment of the present application, a single independent device can be used to complete high-performance and high-bandwidth traffic management, and the design requirements of ultra-high throughput of DC data centers are realized. The area / power consumption / heat dissipation problems encountered by the ultra-high bandwidth traffic management architecture are solved. Finally, the 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 improves the core competitiveness of data communication equipment.

[0096] In some embodiments, the method further comprises: Step A10, generating a free pointer request corresponding to the incoming message descriptor according to the incoming message descriptor; Step A20, based on the idle pointer application, obtaining a target idle pointer from a preset pointer management resource pool; Step A30, determining the idle sub-buffer area corresponding to the target idle pointer according to the target idle pointer, and obtaining the first buffer area ID corresponding to the idle sub-buffer area; 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.

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

[0098] In some embodiments, the method further comprises: Step C10, after determining the outgoing message descriptor corresponding to the port scheduling instruction, read the queue linked list information, 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; Step C20, based on the read pointer application, determining a target read pointer corresponding to the read pointer application; 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; Step C40, according to the second buffer area ID, read the to-be-dequeued message data from the target sub-buffer area corresponding to the target read pointer.

[0099] 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: Step D10, generating dequeue information, and sending the dequeue information and the second buffer area ID to the pointer management resource pool, so that the pointer management resource pool can recycle the pointer corresponding to the second buffer area ID.

[0100] In some embodiments, the method further comprises: Step E10, dividing the data packet into a plurality of data fragments according to the cache space size of the sub-cache area; 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-cache area corresponding to each of the target idle pointers one by one; Step E20, determining 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 where each data slice is written; Step E30, respectively concatenating the address identifiers corresponding to the cache addresses distributed 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 one unique address identifier; Step E40, updating the linked list according to the cache address block information to generate queue linked list information.

[0101] In some embodiments, the method further comprises: Step F10, dividing the data packet into a plurality of data fragments carrying reading order information; Step F20 , concatenating the address identifiers corresponding to the cache addresses corresponding to each data packet according to the read sequence information.

[0102] In some embodiments, the method further comprises: Step G10, determining an eop segment from each of the data segments according to 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; Step G20, each time a target data slice to be dequeued is read from the queue resource shared buffer area, it is determined whether the linked list pointer corresponding to the target data slice is marked as valid; Step G30: If yes, continue to access the data fragment corresponding to the next-hop linked list pointer according to the queue linked list information; Step G40: If not, scan the encapsulation information of the target data slice, and trigger access to the next data slice in the reading order corresponding to the target data slice according to the encapsulation information.

[0103] In some embodiments, the method further comprises: Step H10, obtaining an incoming message descriptor, and determining whether the exclusive buffer area bound to the current read / write channel is in an idle state, wherein each read / write channel is bound to an exclusive buffer area; Step H20: If yes, allocate a free pointer in an exclusive buffer area for the incoming message data corresponding to the incoming message descriptor; Step H30: if not, allocating a free pointer in the queue resource shared buffer area for the incoming message data; Step H40, using the allocated free pointer as the target free pointer.

[0104] In some embodiments, the method further comprises: Step I10, obtaining the message data to be processed, and performing QOS scheduling on the message data to be processed; Step I20, using the to-be-processed message data after QOS scheduling as the inbound message data.

[0105] In some embodiments, the method further comprises: 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 discarding identifier; Step J20, identifying the message data with the discard flag stored in the queue resource sharing buffer area as the message data to be discarded; 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; Step J40, sending 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.

[0106] In some embodiments, the step of receiving a port scheduling instruction includes: Step K10, obtaining a data read operation request; Step K20, generating a port scheduling instruction according to the data read operation request.

[0107] The traffic management method provided in the embodiment of the present application is applied to the traffic management system of any of the above embodiments, and can solve the performance loss problem introduced by the read-write conflict problem of shared queue resources in the network switching equipment under the multi-core forwarding architecture in the related technology. Compared with the prior art, the beneficial effects of the traffic management method provided in the embodiment of the present application are the same as the beneficial effects of the traffic management system provided in the above embodiments, and the other technical features in the traffic management method are basically the same as the features disclosed in the above embodiment methods, which will not be repeated here.

[0108] Embodiment 8 The present application also provides a chip, which is a switching chip. Fig.10 , Fig.10 The hardware structure diagram of a chip provided in one embodiment of the present application is shown in FIG. Fig.10 As shown, 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 (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0109] Those skilled in the art will understand that Fig.10 The structure shown in the figure does not constitute a limitation on the chip, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Fig.10 As shown, the memory 1005 as 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.

[0110] exist Fig.10In the chip shown, 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.

[0111] 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.

[0112] Embodiment 9 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.

[0113] The computer-readable storage medium provided in the embodiment of the present invention may 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 may 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 may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

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

[0115] 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 according to the incoming message descriptor, and writes 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; performs 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 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 according to the queue linked list information, and reads the message data to be dequeued from the target sub-buffer area corresponding to the target read pointer.

[0116] 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 separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of 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).

[0117] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, 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 may represent a module, a program segment, or a portion of a 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 may 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 with a dedicated hardware-based system that performs the specified functions or operations, or can be implemented with a combination of dedicated hardware and computer instructions.

[0118] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.

[0119] The computer-readable storage medium provided by the present application stores computer-readable program instructions for executing the above-mentioned traffic management method, which can solve the performance loss problem introduced by the read-write conflict problem of shared queue resources in the network switching device under the multi-core forwarding architecture in the related art. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment of the present invention are the same as the beneficial effects of the traffic management method of the above-mentioned embodiment, which will not be repeated here.

[0120] Embodiment 10 An embodiment of the present invention further provides a traffic management program product, including a traffic management program, wherein the traffic management program implements the steps of the above-mentioned traffic management method when executed by a processor.

[0121] The traffic management program product provided by the present application can solve the performance loss problem caused by the read-write conflict of shared queue resources in the network switching device under the multi-core forwarding architecture in the related art. Compared with the prior art, the beneficial effects of the traffic management program product provided by the embodiment of the present invention are the same as the beneficial effects of the traffic management method provided by the above embodiment, which will not be repeated here.

[0122] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

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

[0124] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially 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, disk, CD) as described above, including a number of instructions for a chip to execute the methods described in each embodiment of the present application.

[0125] The above are only preferred embodiments of the present application, and are not intended to 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, characterized in that: 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-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 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 inbound message data is written, and generate queue linked list information; The dequeue processing module is configured to receive a port scheduling instruction, determine an outgoing message descriptor corresponding to the port scheduling instruction, and determine a 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.

2. The flow management system according to claim 1, characterized in that: 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 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.

3. The flow management system according to claim 2, characterized in that: 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, characterized in that: 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 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, characterized in that: 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, characterized in that: 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, 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 data fragments, allocate the total number of target idle pointers to 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, characterized in that: 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, characterized in that: 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 an eop segment from each of the data segments according to the reading order information, mark a linked list pointer corresponding to the eop segment as valid, and mark 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, characterized in that: 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 flow management system according to claim 9, characterized in that: The traffic management system also includes a plurality of exclusive cache areas, each read / write channel is bound to an exclusive cache area, wherein: The enqueue processing module is also 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, allocate an idle pointer in the queue resource shared buffer area to the incoming message data; and use the allocated idle pointer as the target idle pointer.

11. The flow management system according to any one of claims 2 to 10, characterized in that: 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, characterized in that: 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 identifier stored in the queue resource sharing buffer area as the message data to be discarded, reclaim the target buffer address corresponding to the buffer sub-area that caches the message data to be discarded, and generate 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, characterized in that: 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, characterized in that: include: 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, characterized in that: Comprising the flow management system as claimed in any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that: 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, device and equipment for processing QoS service by multi-core CPU

    CN101272334A

  • Queue management method and apparatus

    CN106302238A

  • High-speed network data transmission method

    CN106850565A

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

    CN112822126A

  • Flow management chip control method, chip and storage medium

    CN113839879A

Cited By

  • On-chip cache sharing method and switching chip

    CN119342014A

  • Disk space management method and device, electronic equipment and storage medium

    CN119357200A

  • Data storage device, message storage method and message reading method

    CN120050250A

  • Multi-pipeline dynamic balanced centralized caching system and method

    CN121078125A

  • Return address prediction stack management method, device, equipment and program product

    CN122086478A