Packet processing method and system based on full-shared cache array, device and medium
By combining a fully shared cache array and a two-level linked list management unit, the problems of memory access conflicts and low linked list management efficiency in 102.4T-class switches are solved, enabling 64B minimum packet line-rate forwarding in high-density port configuration, improving cache utilization and reducing forwarding latency.
Patent Information
- Application Number
- CN202611404757.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-10
- Publication Date
- 2026-11-24
AI Technical Summary
Existing 102.4T-class switches, in high-density port configurations, suffer from insufficient shared cache banks, leading to memory access conflicts and low linked list management efficiency, thus failing to meet the 64B minimum packet line-rate forwarding requirements.
It adopts a fully shared cache array architecture, combined with a two-level linked list management unit and a Bank round-robin scheduling memory access control unit. Through the dynamic scheduling of the global free linked list pool and the port private free linked list, it realizes the precise allocation and reclamation of cache blocks, ensuring that the same Bank only processes a single write operation in any clock cycle, thus avoiding memory access conflicts.
It achieves full-port 64B minimum packet line-rate transmission and reception at 102.4Tbps throughput, improves cache utilization by 40%, reduces small packet forwarding latency by 25%, completely solves memory access conflicts and linked list update bottlenecks, and is suitable for high-density interconnection scenarios of AI Scale-Up clusters.
Smart Images

Figure CN123164082A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of switch chip technology, and relates to a packet processing method, system, device and medium based on a fully shared buffer array. Background Technology
[0002] With the large-scale deployment of AI large-scale model computing clusters, data center switches have entered the era of ultra-high throughput of 102.4Tbps. Single chips support high-density port configurations such as 128×800G and 64×1.6T, mainly used in scale-up horizontal interconnection scenarios for computing nodes. This scenario is characterized by extremely dense bursts of 64B small packets, ultra-high frequency packet read and write, and out-of-order concurrent traffic across the entire domain, which places stringent requirements on the switch's packet buffer line-speed capability, memory access efficiency, and resource scheduling capability.
[0003] The existing caching solution for 102.4T-class switches has the following drawbacks, failing to meet the line-rate forwarding requirement for 64B minimum packets:
[0004] Access conflicts lead to small packet line-speed loss: The number of traditional shared cache banks is insufficient. Under ultra-high throughput, the concurrent reading and writing of massive 64B small packets can easily lead to conflicts where multiple ports compete for the same bank resources, resulting in read / write blocking, packet backpressure, and inability to maintain full line-speed forwarding. This is the core root cause of the small packet performance bottleneck of ultra-high throughput switches.
[0005] Inefficient linked list management cannot match ultra-high speed: Traditional single-level free linked list architecture, in ultra-high concurrency scenarios of 102.4T, the linked list is updated frequently, the pointer read and write latency is high, and the allocation and reclamation of free blocks are stuttered, which cannot meet the nanosecond-level line-speed scheduling requirements of 64B small packets; at the same time, static partitioned caching cannot achieve global resource sharing, and the cache utilization rate is extremely low in the burst scenario of scale-up multi-port.
[0006] Existing high-throughput switches suffer from issues such as shared cache access conflicts and low efficiency in linked list management. Summary of the Invention
[0007] This application provides a message processing method, system, device, and medium based on a fully shared cache array to solve the problems of shared cache access conflicts and low linked list management efficiency in existing ultra-high throughput switches.
[0008] Firstly, this application provides a message processing method based on a fully shared cache array, applied to a fully shared cache array containing a set number of independent banks, comprising: receiving multi-port message enqueue read / write requests, and allocating valid cache block pointers to each port message based on a two-level linked list management unit; the two-level linked list management unit includes a global free linked list pool and a port-private free linked list; using a bank round-robin scheduling memory access control unit according to a round-robin scheduling strategy, writing the valid cache block pointers and corresponding port message data into the corresponding bank; the bank round-robin scheduling memory access control unit evenly hashes and distributes concurrent write requests to a set number of independent banks based on a round-robin time-sharing scheduler, ensuring that the same bank within any clock cycle... k only handles single write operations; the message queue management unit attaches the cache block pointer to the tail of the corresponding outgoing port message queue linked list to perform message dequeue forwarding; after the message dequeue forwarding is completed, the corresponding cache block pointer is recycled to the port's private free linked list. If the current occupied entries in the port's private free linked list reach a preset high-water mark threshold, writing to the local area stops, and the pointers to be recycled are accumulated to a preset batch number and then written to the global free linked list in batches; wherein, the global shared cache pool has no port static cache partitions, all ports and all services share the same physical cache pool, the global free linked list only supports batch read and write and prohibits single pointer random access, and the port private free linked list is implemented by a register array to achieve a synchronized first-in-first-out queue.
[0009] In one implementation of the first aspect, receiving multi-port packet enqueue read / write requests and allocating valid cache block pointers to each port packet based on a two-level linked list management unit includes: responding to the port packet enqueue read / write request by initiating a cache block allocation request to the two-level linked list management unit; based on the cache block allocation request, firstly querying the current level of the current port's private free list; if the current level of the current port's private free list is not empty, directly reading a cache block pointer from the current port's private free list to allocate a valid cache block pointer to the current port packet, and setting the private free list... The read pointer is incremented; if the current water level of the current port's private free list is empty, the cache block allocation request for the current packet is temporarily suspended, and a batch read request is initiated to the global free list pool. After reading a batch of cache block pointers and loading them into the current port's private free list, the cache block allocation request is responded to and a valid cache block pointer is allocated to the current port packet; the water level of the current port's private free list is continuously monitored. When the number of free pointers is lower than the preset low water level threshold, the background pipeline initiates a batch pre-fill asynchronously in advance, loading the batch pointers from the global free list pool into the port's private free list.
[0010] In one implementation of the first aspect, the allocation of valid cache block pointers to each port packet based on a two-level linked list management unit further includes: preferentially allocating valid cache block pointers from the port's private free list, and replenishing free cache block pointers in batches from the global free list pool when a hit fails; wherein, the global free list stores all free cache block pointers not occupied by the port in the fully shared cache array, and is a batch first-in-first-out pool composed of multi-bank independent SRAM arrays, supporting only batch reads and batch writes; the port's private free list stores a preset number of free cache block pointers, and is a synchronous first-in-first-out queue implemented by each port's independent register array, undertaking the majority of packet allocation and recycling operations, and all operations only access on-chip registers, without consuming global linked list SRAM bandwidth.
[0011] In one implementation of the first aspect, the Bank round-robin scheduling memory access control unit writes the valid cache block pointer and the corresponding port packet data into the corresponding Bank according to the round-robin scheduling strategy. This includes: if the current port packet data is less than or equal to the fixed granularity of a single cache block, writing the allocated valid cache block pointer into the corresponding port packet data, and obtaining the packet data written to the valid cache block pointer; using the Bank round-robin scheduling memory access control unit, writing the packet data written to the valid cache block pointer into the corresponding Bank according to the round-robin scheduling strategy, with each Bank storing packet fragments at a fixed granularity; if the current port packet data is greater than the fixed granularity of a single cache block, fragmenting the current port packet data into multiple packet data fragments, allocating valid cache block pointers to each packet data fragment based on a two-level linked list management unit, and distributing the valid cache block pointers and the corresponding packet data fragments into the corresponding Banks; and when packets are dequeued, reading and reassembling the packets sequentially according to the valid cache block pointers of each packet data fragment. The Bank round-robin scheduling memory access control unit has a built-in round-robin time-sharing scheduler that performs uniform hash distribution of the valid cache block pointers and corresponding port message data of all ports, and evenly distributes the valid cache block pointers and corresponding port message data of concurrent ports to a set number of Banks, ensuring that the same Bank processes only a single read and write operation within any clock cycle; the Bank round-robin scheduling memory access control unit adopts a fixed-granularity round-robin mapping mechanism for scenarios with dense small packets.
[0012] In one implementation of the first aspect, the fully shared cache array is evenly divided into 2432 physically independent SRAM Banks. All Banks are uniformly addressed to form a unified 3.8GB shared cache pool for the whole machine. All Banks have consistent capacity, depth, read and write timing. The depth of a single Bank is 262144 entries, the granularity of a single cache block is 64B, and each Bank has an independent read and write port.
[0013] In one implementation of the first aspect, the method further includes: real-time monitoring of the occupancy level of the global idle list pool and the burst traffic intensity of each port by a micro-burst water level adaptive control unit; dynamically adjusting the pre-allocated resource limit of each port's private idle list based on the occupancy level of the global idle list pool and the burst traffic intensity of each port; when a burst of traffic is detected in a port's private idle list in the Scale-Up cluster, temporarily expanding the resource quota of that port's private idle list to improve its cache block pre-caching capability; when a port's private idle list is detected to be idle, reclaiming the idle cache blocks exceeding the basic quota in that port's private idle list to the global idle list pool to expand the global shared resource pool; and achieving dynamic balanced allocation of global idle list pool resources among the ports through the above dynamic control.
[0014] In one implementation of the first aspect, after the packet dequeueing and forwarding are completed, the corresponding cache block pointer is recycled to the local port's private free list. If the current occupied entries in the local port's private free list reach a preset high-water mark threshold, writing to the local list stops, and the pointers to be recycled are accumulated to a preset batch size and then written to the global free list in batches. This includes: after the packet is dequeued, read, and forwarded to the output port, a cache block release request is initiated, carrying the pointers to be recycled, and priority is given to recycling the block pointers to the local private free list corresponding to the current port; if the current occupied entries in the current port's private free list are lower than the high-water mark threshold, the pointers to be recycled are written to the current port's private free list, and the write pointer of the current port's private free list is incremented, recycling is completed, and the global free list is not accessed; if the current occupied entries in the current port's private free list reach the high-water mark threshold, writing to the current port's private free list stops, and after accumulating a batch of pointers to be recycled, they are written to the global free list in batches; after receiving the batch of pointers to be recycled, the global free list stores them in the global free list pool, completing the recycling of idle resources of the entire machine.
[0015] Secondly, this application provides a message processing system based on a fully shared cache array, applied to a fully shared cache array containing a set number of independent banks, including: a cache block allocation module, configured to receive multi-port message enqueue read / write requests, and allocate valid cache block pointers to each port message based on a two-level linked list management unit; the two-level linked list management unit includes a global free linked list pool and a port-private free linked list; a round-robin scheduling module, configured to use a Bank round-robin scheduling memory access control unit to write the valid cache block pointers and corresponding port message data to the corresponding Bank according to a round-robin scheduling strategy; the Bank round-robin scheduling memory access control unit distributes concurrent write requests evenly to a set number of independent banks based on a round-robin time-sharing scheduler, ensuring that the same Bank within any clock cycle... Only single write operations are processed; the message dequeue forwarding module is configured to have the message queue management unit attach the cache block pointer to the tail of the corresponding outgoing port message queue linked list to perform message dequeue forwarding; the cache block recycling module is configured to recycle the corresponding cache block pointer to the port's private free list after the message dequeue forwarding is completed. If the number of currently occupied entries in the port's private free list reaches a preset high-water mark threshold, writing to the local cache will stop, and the pointers to be recycled will be accumulated to a preset batch number and then written to the global free list in batches; wherein, the global shared cache pool has no port static cache partitions, all ports and all services share the same physical cache pool, the global free list only supports batch read and write and prohibits single pointer random access, and the port private free list is implemented by a register array to achieve a synchronized first-in-first-out queue.
[0016] Thirdly, this application provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program stored in the memory, so that the electronic device performs the message processing method based on a fully shared buffer array as described above.
[0017] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described message processing method based on a fully shared cache array.
[0018] As described above, the message processing method, system, device, and medium based on a fully shared buffer array described in this application have the following beneficial effects:
[0019] This application receives read / write requests for multi-port packets and allocates valid cache block pointers to each port packet based on a two-level linked list management unit. The two-level linked list management unit includes a global free linked list pool and a port-private free linked list. A Bank round-robin scheduling memory access control unit writes the valid cache block pointers and corresponding port packet data to the corresponding Bank according to a round-robin scheduling strategy. The Bank round-robin scheduling memory access control unit distributes concurrent write requests evenly to a set number of independent Banks based on a round-robin time-sharing scheduler, ensuring that the same Bank processes only a single write operation within any clock cycle. The packet queue management unit attaches the cache block pointers to the tail of the corresponding outgoing port packet queue linked list to perform packet dequeue forwarding. After packet dequeue forwarding is completed, the corresponding cache block pointers are recycled to the port-private free linked list. If the current occupied entries in the port-private free linked list reach a preset high-water mark threshold, writing to the local area stops, and pointers to be recycled are accumulated to a preset batch size before being written to the global free linked list in batches. This application solves the problems of 64B small packet line-speed blocking, shared cache access conflict, linked list update bottleneck, and inability to balance throughput and latency in existing 102.4T ultra-large switches through four core innovations: accurate theoretical bandwidth modeling, multi-bank symmetric sharding conflict-free memory access, hierarchical dynamic linked list scheduling, and unified shared cache pool across the entire chip.
[0020] This application designs a cache quantization model: by accurately deriving cache bandwidth, number of banks, and cache depth through overall throughput, small packet PPS, and burst duration, it overcomes the drawbacks of traditional empirical design and achieves the optimal balance of performance, area, and power consumption; by designing a bank-symmetric sharding conflict-free memory access architecture: by distributing ultra-high cache bandwidth evenly across multiple banks, it completely solves the problems of memory access conflicts and line-rate loss for 64B small packets under 102.4T ultra-high throughput, reducing the memory access conflict rate to 0; by designing a unified shared cache without partitions across the entire chip: abandoning the traditional port static cache quota, it dynamically schedules resources across the entire domain, perfectly adapting to random micro-bursts and traffic imbalance scenarios in AI Scale-Up clusters, and significantly improving cache utilization; by designing a global + port dual-level idle linked list mechanism: it solves the bottleneck of linked list update latency under ultra-high PPS concurrency, achieves nanosecond-level cache block allocation and reclamation, and stably supports 152G+ PPS small packet line-rate forwarding; by designing 64B-granularity precise resource management: it fully matches the minimum Ethernet packet specification, eliminates resource fragmentation, and ensures ultimate forwarding performance in extreme small packet scenarios. Attached Figure Description
[0021] Figure 1 The diagram shows a hardware application scenario of the message processing method based on a fully shared cache array as described in the embodiments of this application.
[0022] Figure 2The diagram shown is a flowchart illustrating the message processing method based on a fully shared buffer array as described in an embodiment of this application.
[0023] Figure 3 The diagram shown is a schematic of the theoretical calculation model of the 64B line-rate cache described in the embodiments of this application.
[0024] Figure 4 The diagram shown is a schematic of the zero-conflict Bank round-robin access timing described in an embodiment of this application.
[0025] Figure 5 The diagram shown is a schematic diagram of the two-level free list and cache block management described in the embodiments of this application.
[0026] Figure 6 The diagram shown is a schematic representation of the message processing system based on a fully shared cache array as described in an embodiment of this application.
[0027] Figure 7 The diagram shown is a structural schematic of the electronic device described in an embodiment of this application. Detailed Implementation
[0028] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0029] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0030] The existing 102.4T-class switch caching solution has several fatal flaws and cannot meet the line-rate forwarding requirement of 64B minimum packets:
[0031] 1. Access conflicts lead to small packet line-speed loss: The number of traditional shared cache banks is insufficient. Under ultra-high throughput, the concurrent reading and writing of massive 64B small packets can easily lead to conflicts where multiple ports compete for the same bank resources, resulting in read and write blocking, packet back pressure, and inability to maintain full line-speed forwarding. This is the core root cause of the small packet performance bottleneck of ultra-high throughput switches.
[0032] 2. Lack of theoretical basis for cache depth design: Existing solutions mostly use empirical values to configure cache depth, without quantitative modeling based on 102.4T overall throughput, 64B minimum packet frame interval, and micro-burst duration. This results in problems such as insufficient depth leading to burst packet loss or depth redundancy causing waste of chip area.
[0033] 3. Inefficient linked list management cannot match ultra-high speed: The traditional single-level free linked list architecture has frequent linked list updates, high pointer read and write latency, and stuttering free block allocation and reclamation under ultra-high concurrency scenarios of 102.4T, which cannot meet the nanosecond-level line-speed scheduling requirements of 64B small packets; at the same time, static partitioned caching cannot achieve global resource sharing, and the cache utilization rate is extremely low under the burst scenario of scale-up multi-port.
[0034] 4. Poor Scale-Up Interconnect Adaptability: Scale-Up networking of computing power clusters has the characteristics of random micro-bursts and uneven traffic across all ports. Traditional static port caching quota mechanisms are prone to resource starvation, such as some ports running out of cache and others having idle cache, which cannot guarantee the stability of cluster interconnection.
[0035] The current 102.4T-class switches urgently need a Packet Buffer architecture and linked list management solution that can be theoretically designed with quantifiable features, no memory access conflicts, supports 64B full line speed, shares resources across the entire chip, and is adapted to ultra-high throughput scale-up scenarios.
[0036] The following embodiments of this application provide a packet processing method, system, device, and medium based on a fully shared cache array, which solves the problems of 64B small packet line-speed blocking, shared cache access conflicts, linked list update bottlenecks, and the inability to balance throughput and latency in existing 102.4T ultra-large switches.
[0037] This application discloses a 64B minimum packet line-rate full-chip shared cache architecture and linked list management method for 102.4Tbps ultra-high throughput scale-up interconnect switches, belonging to the field of high-performance data center switching chip cache design technology. Addressing the industry pain points of existing 102.4T ultra-high throughput switches, such as 64B small packet line-rate blocking, shared cache access conflicts, linked list update bottlenecks, and the inability to balance throughput and latency, this application proposes a multi-bank symmetric sharded shared cache hardware architecture, a time-sharing conflict-free memory access mechanism, a hierarchical idle linked list dynamic management scheme, and a complete theoretical modeling and calculation system for bandwidth and cache depth.
[0038] Based on a system-wide bidirectional throughput of 102.4Tbps, this application precisely derives the total cache bandwidth, number of Bank shards, single-Bank cache depth, and linked list storage resource specifications required to meet the line rate of a minimum 64B packet. Through uniform partitioning of the physical cache array, cross-Bank round-robin read / write, and dynamic scheduling of hierarchical idle linked lists (global pool + port private pool), it completely solves the memory access conflicts and line rate loss issues caused by dense bursts of small packets under ultra-high throughput. Simultaneously, it adopts a unified shared cache pool architecture across the entire chip, with no port-based static cache partitioning, maximizing cache utilization and adapting to high-density interconnection of AI computing power clusters at scale-up levels and ultra-large-scale micro-burst traffic scenarios.
[0039] Through theoretical derivation and hardware simulation verification, this architecture can stably support full-port 64B minimum packet line-rate transmission and reception at a total throughput of 102.4Tbps, with no packet backpressure or packet loss. Compared with traditional static partitioned caching and shared caching architecture with few banks, the cache utilization rate is improved by more than 40%, the small packet forwarding latency is reduced by 25%, and the memory access conflict rate is reduced to 0. It is perfectly adapted to ultra-high density 800G / 1.6T port scale-up networking scenarios and has extremely high engineering feasibility and creativity.
[0040] Figure 1 The diagram shows a hardware application scenario of a message processing method based on a fully shared buffer array as described in an embodiment of this application. Figure 1 As shown, this application provides a 102.4Tbps switch 64B line-speed fully shared cache architecture, which is a unified shared cache pool for the entire chip + multi-bank symmetrical sharding + round-robin conflict-free memory access + hierarchical linked list scheduling architecture. There are no static cache partitions on any ports. All ports and all services share the same physical cache pool. It is specially adapted to scale-up global burst traffic. The whole system includes five major hardware units, including: global shared cache bank array unit, bank round-robin scheduling memory access control unit, 64B granular cache block management unit, dual-level idle linked list manager (global + port hierarchical idle linked list management unit), and micro-burst water level adaptive control unit.
[0041] 1. Globally Shared Cache Bank Array Unit
[0042] It consists of 2432 physically independent SRAM banks evenly distributed, with all banks having the same capacity, depth, and read / write timing. Each bank has a depth of 262,144 entries and a single cache granularity of 64B. All banks are uniformly addressed, forming a unified 3.8GB shared cache pool for the entire system. Each bank has an independent read / write port, supporting parallel concurrent access and eliminating memory access conflicts at the hardware level.
[0043] 2. Bank Round-Robin Scheduling Deposit Control Unit
[0044] It has a built-in 1GHz round-robin time-sharing scheduler that performs uniform hash distribution on all inbound port write requests and outbound port read requests, spreading concurrent read and write requests evenly across 2432 banks, ensuring that only a single read or write operation is processed in the same bank within any clock cycle; for 64B small packet-intensive scenarios, a fixed-granularity round-robin mapping mechanism is adopted to avoid request clustering and achieve zero-conflict line-speed memory access.
[0045] 3. 64B Granularity Cache Block Management Unit
[0046] The minimum buffer allocation granularity is uniformly set to 64B, which fully matches the minimum Ethernet packet size. Large packets larger than 64B are automatically fragmented, stored, dequeued, and reassembled. Small packets of 64B have a dedicated single buffer block to avoid resource fragmentation and ensure the ultimate line-speed performance of small packet forwarding.
[0047] 4. Global + Port-based Hierarchical Idle List Management Unit
[0048] Abandoning the traditional single-level linked list architecture, a two-level architecture is adopted, consisting of a global idle linked list pool and a private cache linked list pool for each port: the global linked list uniformly manages the 64B idle cache blocks of the entire machine, while the port's private linked list pre-caches the idle blocks required by the local port; in high-concurrency small packet scenarios, allocation is prioritized from the private linked list, and when there is insufficient idle space, it is quickly scheduled to supplement from the global linked list, which greatly reduces the linked list access latency and meets the extreme concurrency requirements of 152G+ PPS.
[0049] 5. Micro-sudden water level adaptive control unit
[0050] Real-time monitoring of global cache usage and burst traffic intensity on each port allows for dynamic adjustment of the pre-allocated resource limits of each port's linked list. For sudden bursts of traffic on ports in Scale-Up clusters, the linked list resources are temporarily expanded, and idle ports have their free blocks reclaimed to the global pool, achieving dynamic balancing of global cache resources.
[0051] Figure 1 The diagram shows the complete hardware architecture of the message processing method based on a fully shared cache array, as described in this application. It includes a 2432-bank shared cache array, a bank round-robin memory access control unit, a 64B granularity management unit, a two-level linked list management unit, and a micro-burst level control unit. On the left are all-port message enqueue read / write requests, which are evenly distributed to each independent bank through round-robin scheduling, achieving conflict-free parallel writing. The two-level linked list unit is responsible for the rapid allocation, mounting, and recycling of 64B cache blocks, supporting ultra-high concurrency small packet scheduling. On the right is the message dequeue read path, completing cache data reading, reassembly, and forwarding, achieving full-line-speed message processing. The overall architecture has no static port partitioning, dynamically shares cache resources across the entire domain, and is suitable for scale-up ultra-large cluster interconnection scenarios.
[0052] This application provides a 64B line-speed fully shared cache architecture and linked list management method for a 102.4Tbps switch. Through four core innovations—precise theoretical bandwidth modeling, conflict-free memory access via multi-bank symmetrical sharding, hierarchical dynamic linked list scheduling, and a unified shared cache pool across the entire chip—it achieves: stable support for 64B minimum packet line-speed transmission and reception across all ports at 102.4Tbps throughput, with zero memory access conflicts and zero line-speed data loss; quantitative calculation of total cache bandwidth, number of banks, and single-bank cache depth based on a traffic model, balancing optimal performance and chip area; a globally unified shared cache architecture without static port partitioning, maximizing adaptability to unbalanced burst traffic in scale-up clusters; and a hierarchical idle linked list mechanism to achieve nanosecond-level cache block allocation and reclamation, matching the needs of ultra-high-density small packet concurrent scheduling.
[0053] The technical solutions in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0054] Figure 2 The diagram shown is a flowchart illustrating the packet processing method based on a fully shared buffer array as described in an embodiment of this application. Figure 2 As shown, this embodiment provides a message processing method based on a fully shared cache array, which is applied to a fully shared cache array containing a set number of independent banks, and includes the following steps S100 to S400.
[0055] Step S100: Receive multi-port packet enqueue read / write requests, and allocate valid cache block pointers to each port packet based on the two-level linked list management unit; the two-level linked list management unit includes a global free linked list pool and a port-private free linked list.
[0056] Step S200: Using the Bank round-robin scheduling memory access control unit, the effective cache block pointer and the corresponding port message data are written to the corresponding Bank according to the round-robin scheduling strategy; the Bank round-robin scheduling memory access control unit distributes concurrent write requests evenly to a set number of independent Banks based on the round-robin time-sharing scheduler, ensuring that the same Bank only processes a single write operation in any clock cycle.
[0057] Step S300: The message queue management unit attaches the cache block pointer to the tail of the corresponding outgoing port message queue linked list to perform message dequeue forwarding.
[0058] Step S400: After the message is dequeued and forwarded, the corresponding cache block pointer is recycled to the private free list of this port. If the current occupied entries in the private free list of this port reach the preset high watermark threshold, writing to the local area is stopped, and the pointers to be recycled are accumulated to the preset batch number and then written to the global free list in batches.
[0059] The global shared cache pool has no static cache partitions for any ports, and all ports and all services share the same physical cache pool. The global free list only supports batch read and write and prohibits single pointer random access. The port private free list is implemented as a synchronous first-in-first-out queue by a register array.
[0060] This application provides a 64B line-speed fully shared cache architecture and linked list management method for a 102.4Tbps switch. Through four core innovations—precise theoretical bandwidth modeling, conflict-free memory access via multi-bank symmetrical sharding, hierarchical dynamic linked list scheduling, and a unified shared cache pool across the entire chip—it achieves: stable support for 64B minimum packet line-speed transmission and reception across all ports at 102.4Tbps throughput, with zero memory access conflicts and zero line-speed data loss; quantitative calculation of total cache bandwidth, number of banks, and single-bank cache depth based on a traffic model, balancing optimal performance and chip area; a globally unified shared cache architecture without static port partitioning, maximizing adaptability to unbalanced burst traffic in scale-up clusters; and a hierarchical idle linked list mechanism to achieve nanosecond-level cache block allocation and reclamation, matching the needs of ultra-high-density small packet concurrent scheduling.
[0061] To achieve a minimum packet line speed of 64B, this application establishes a complete mathematical model for the design of the 102.4T switch buffer. All hardware parameters are derived theoretically, which is completely different from the design based on traditional experience in the existing technology. Figure 3 The diagram shown is a schematic representation of the theoretical calculation model for the 64B line-rate cache described in an embodiment of this application. Figure 3 The theoretical calculation model for the 64B line-speed cache is as follows:
[0062] 1. Basic parameter definition
[0063] Total switching capacity: 102.4Tbps = 102400Gbps
[0064] Minimum forwarding packet length: 64 bytes (Ethernet standard minimum packet)
[0065] Ethernet frame gap: 12 bytes + 8 bytes preamble = 20 bytes
[0066] Actual bus carrying length for a 64B small packet: 64 + 20 = 84 bytes
[0067] 2. Calculation of 64B line speed packet rate
[0068] Single Gbps bandwidth 64B small packet line speed packet rate:
[0069] PPS_1G = 1×10^9 / (84×8) = 1.488M PPS
[0070] Theoretical maximum concurrent small packets for the entire machine: 102.4Tbps
[0071] Total_PPS = 102400 × 1.488M = 152.3712G PPS
[0072] That is, the entire machine needs to process 152.3 billion 64B packets per second, and the caching system must support this extreme concurrent read and write speed.
[0073] 3. Calculation of total cache bandwidth requirements
[0074] The message input and output to the buffer are bidirectional read and write operations. Each small packet needs to complete one write and one read operation. The effective bandwidth utilization coefficient of the buffer is taken as 2.0.
[0075] With a single packet data size of 64B, deduce the total physical bandwidth required for the cache:
[0076] Buffer_BW = Total_PPS × 64B × 8bit × 2 = 156.256Tbps
[0077] Conclusion: The physical bandwidth of the caching system must be ≥156.256Tbps to support the 64B line speed of the entire 102.4T system.
[0078] 4. Calculation of the optimal number of banks (core function without memory access conflicts)
[0079] Switching chip core operating clock: 1GHz (industrial mainstream ultra-high-speed cache clock)
[0080] Maximum throughput of single-bank SRAM at 1GHz clock speed: 8B / cycle = 64Gbps
[0081] Minimum number of conflict-free banks = Total cache bandwidth / Single bank bandwidth
[0082] Bank_Num = 156.256T / 64G = 2400
[0083] To meet the requirements of symmetrical distribution, timing convergence, and neat hardware routing, we take 2432 banks upwards (integer multiples of 32, to adapt to pipeline alignment).
[0084] This application adopts a 2432-bank symmetric sharding architecture to achieve multi-port read and write without bank conflicts at any time and eliminate small packet blocking 100%.
[0085] 5. Calculation of Single Bank Cache Depth and Total Cache Capacity
[0086] Typical micro-burst duration for AI Scale-Up: 200us (maximum burst window of cluster traffic)
[0087] Average bandwidth per bank: 156.256T / 2432 = 64Gbps
[0088] 200us sudden order placement maximum data volume in the Bank:
[0089] Depth_Data = 64Gbps × 200us / 8 = 1.6MB
[0090] Calculate the cache depth of a single bank using 64B as the minimum cache block size:
[0091] Bank_Depth = 1.6MB / 64B = 262144 Entry
[0092] Total shared cache capacity for the entire system = 2432 × 1.6MB = 3.8GB
[0093] This capacity is precisely matched to the 102.4T whole machine's 200us ultra-large micro burst, with no redundancy waste and no burst packet loss.
[0094] Based on the aforementioned mathematical model for 102.4T switch cache design, this application designs a fully shared cache array. The fully shared cache array consists of 2432 physically independent SRAM banks evenly divided into segments. All banks have completely identical capacity, depth, and read / write timing. A single bank has a depth of 262,144 entries and a single cache granularity of 64B. All banks are uniformly addressed by physical addresses, forming a unified 3.8GB shared cache pool for the entire machine. Each bank has an independent read / write port, supporting parallel concurrent access and eliminating high-throughput memory access conflicts at the hardware level.
[0095] In one embodiment of this application, receiving multi-port packet enqueue read / write requests and allocating valid buffer block pointers to each port packet based on a two-level linked list management unit includes:
[0096] Step S110: In response to the port packet enqueue read / write request, initiate a cache block allocation request to the two-level linked list management unit;
[0097] Step S120: Based on the cache block allocation request, first query the current water level of the current port's private free list;
[0098] Step S130: If the current water level of the private free list of the current port is not empty, then directly read a buffer block pointer from the private free list of the current port to allocate a valid buffer block pointer for the current port packet, and increment the read pointer of the private free list.
[0099] Step S140: If the current water level of the private free list of the current port is empty, the cache block allocation request of the current packet is temporarily suspended, and a batch read request is initiated to the global free list pool. After reading the batch cache block pointers and loading them into the private free list of the current port, the cache block allocation request is responded to and a valid cache block pointer is allocated to the current port packet.
[0100] Step S150: Continuously monitor the water level of the current port's private free list. When the number of free pointers is lower than the preset low water level threshold, the background pipeline asynchronously initiates batch pre-filling in advance, loading batch pointers from the global free list pool into the port's private free list.
[0101] In one embodiment of this application, the allocation of valid cache block pointers to each port packet based on the two-level linked list management unit further includes: preferentially allocating valid cache block pointers from the port's private free linked list, and batch scheduling and supplementing free cache block pointers from the global free linked list pool when a hit fails.
[0102] The global free list stores pointers to all free cache blocks not occupied by ports in the fully shared cache array. It is a batch first-in-first-out pool composed of multi-bank independent SRAM arrays and only supports batch reads and batch writes.
[0103] The port-private free list stores a preset number of free cache block pointers. It is a synchronous first-in-first-out queue implemented by an independent register array for each port, which undertakes the majority of packet allocation and recycling operations. All operations only access on-chip registers and do not consume global linked list SRAM bandwidth.
[0104] In some embodiments, the inherent bottlenecks of existing linked list technology are analyzed as follows: the maximum load of the entire machine is 152.37 GPPS for all 64-byte small packets, and each packet's lifecycle requires one free block allocation and one cache block reclamation; if a traditional single-level global free linked list solution is adopted:
[0105] Each message triggers 1 linked list read (allocation) + 1 linked list write (reclaim), total access rate:
[0106]
[0107] The cache block pointer width is 32 bits, and the theoretical bandwidth required for linked list storage is:
[0108]
[0109] A single SRAM or a global linked list with a small number of banks cannot support this bandwidth at all, and the linked list read / write path will become a fatal line-speed bottleneck for the Packet Buffer system.
[0110] If only multi-bank sharding and hash shuffling are performed on the global linked list, all packets still need to access external SRAM, and the bandwidth pressure cannot be fundamentally eliminated.
[0111] To address this, this application proposes a two-level distributed linked list architecture consisting of a port-private free list and a global free list. The core idea is to place high-frequency, message-granular allocation / reclaim operations in a distributed register FIFO (without requiring external SRAM access); and only when local port resources are insufficient / overflowing, to exchange free pointers using batch granularity and the global linked list, transforming massive random single-pointer accesses into low-frequency batch accesses, thereby reducing the global linked list storage bandwidth requirements from the root.
[0112] In some embodiments, the basic data of the linked list is defined as follows:
[0113] 1. Cache block pointer BLK_PTR
[0114] Storage format: {BANK_ID[11:0], BLOCK_ADDR[17:0]}, total 30 bits, hardware storage aligned to 32 bits;
[0115] BANK_ID: Number of 2432 SRAM Banks (0~2431); BLOCK_ADDR: Address of a 64B cache block entry within a single Bank.
[0116] 2. Minimum scheduling granularity
[0117] Message granularity: 1 message occupies 1 64B buffer block;
[0118] Local linked list operation granularity: single pointer (allocation / reclaim completed in a single cycle);
[0119] Forced granularity of global linked list interaction: Batch (in this embodiment, Batch = 64 pointers, and the hardware logic prohibits single pointer access to the global linked list).
[0120] In some embodiments, the two-level linked list hardware configuration includes a port-private free linked list and a global free linked list.
[0121] 1. Port-Private Free List (Port-FL)
[0122] Deployment method: Each physical port is independently configured with a set of register arrays to achieve synchronous FIFO, without using external SRAM; resources between ports are completely independent, and there is no arbitration conflict in access.
[0123] Hardware specifications: Private FIFO depth per port PRI_FIFO_DEPTH = 128;
[0124] Core function: Caches a certain number of free buffer block pointers and undertakes the majority of packet allocation and reclamation operations; all operations only access on-chip registers and do not consume global linked list SRAM bandwidth.
[0125] Water level threshold definition:
[0126] Warning: Low water level LOW_WATER = 32: Insufficient local free pointers, triggering an asynchronous pre-fill request in the background;
[0127] Overflowing high water level HIGH_WATER = 112: Too many pointers are reclaimed locally. After exceeding the threshold, they overflow in batches and are returned to the global linked list.
[0128] 2. Global Free List (Global-FL)
[0129] Deployment method: A batch FIFO pool consisting of multiple independent SRAM arrays of banks stores pointers to all free cache blocks that are not occupied by ports in the entire machine;
[0130] Access constraints (hardware-enforced rules): Only batch reads and batch writes are supported, and random access by single pointers at any message granularity is prohibited;
[0131] Core function: As a shared resource pool for the whole machine, it replenishes free pointers in batches for the private linked lists of each port, and receives batch pointers returned from the overflow of the private linked lists of ports.
[0132] In one embodiment of this application, the Bank round-robin scheduling memory access control unit writes the valid cache block pointer and the corresponding port message data into the corresponding Bank according to the round-robin scheduling strategy, including the following steps S210 to S230.
[0133] Step S210: If the current port packet data is less than or equal to the fixed granularity of a single buffer block, write the allocated valid buffer block pointer into the corresponding port packet data and obtain the packet data written to the valid buffer block pointer.
[0134] Step S220: Using the Bank round-robin scheduling memory access control unit, the message data that writes the valid cache block pointer is written to the corresponding Bank according to the round-robin scheduling strategy. Each Bank stores message fragments with a fixed granularity.
[0135] Step S230: If the current port packet data is larger than the fixed granularity of a single cache block, the current port packet data is fragmented into multiple packet data fragments. Based on the two-level linked list management unit, a valid cache block pointer is allocated to each packet data fragment. The valid cache block pointer and the corresponding packet data fragment are written to the corresponding Bank. When the packet is dequeued, the packet is read and reassembled in sequence according to the valid cache block pointer of each packet data fragment.
[0136] The Bank round-robin scheduling memory access control unit has a built-in round-robin time-sharing scheduler that performs uniform hash distribution of the valid cache block pointers and corresponding port message data of all ports, and evenly distributes the valid cache block pointers and corresponding port message data of concurrent ports to a set number of Banks, ensuring that the same Bank processes only a single read and write operation within any clock cycle; the Bank round-robin scheduling memory access control unit adopts a fixed-granularity round-robin mapping mechanism for scenarios with dense small packets.
[0137] In one embodiment of this application, the fully shared cache array is evenly divided into 2432 physically independent SRAM banks. All banks are uniformly addressed to form a unified 3.8GB shared cache pool for the whole machine. All banks have consistent capacity depth read and write timing. The depth of a single bank is 262144 entries, the granularity of a single cache block is 64B, and each bank has an independent read and write port.
[0138] Figure 4 The diagram shown illustrates the zero-conflict Bank round-robin access timing as described in an embodiment of this application. Figure 4 As shown, this application utilizes a Bank round-robin scheduling memory access control unit to write the valid cache block pointer and corresponding port packet data into the corresponding Bank according to a round-robin scheduling strategy. The Bank round-robin scheduling memory access control unit has a built-in 1GHz round-robin time-sharing scheduler that performs uniform hash distribution on all inbound port write requests and outbound port read requests, evenly distributing concurrent read and write requests across 2432 Banks, ensuring that only a single read and write operation is processed in the same Bank within any clock cycle; for 64B small packet-intensive scenarios, a fixed-granularity round-robin mapping mechanism is adopted to avoid request clustering and achieve zero-conflict line-rate memory access.
[0139] In one embodiment of this application, the method further includes the following steps S510 to S540.
[0140] Step S510: The micro-burst water level adaptive control unit monitors the occupied water level of the global idle linked list pool and the burst flow intensity of each port in real time.
[0141] Step S520: Based on the occupancy level of the global idle list pool and the burst traffic intensity of each port, dynamically adjust the pre-allocated resource limit of the private idle list of each port.
[0142] Step S530: When a sudden surge of traffic is detected in the private free list of a certain port in the Scale-Up cluster, the resource quota of the private free list of that port is temporarily expanded to improve its cache block pre-caching capability.
[0143] Step S540: When it is detected that a port's private free list is in an idle state, the free cache blocks in the port's private free list that exceed the basic quota are reclaimed to the global free list pool to expand the global shared resource pool.
[0144] Step S550: The global idle linked list pool resources are dynamically and evenly distributed among the ports through the above dynamic adjustment.
[0145] Figure 5 This diagram illustrates the two-level free list and cache block management as described in an embodiment of this application. Figure 5 As shown, in some embodiments, the complete process of cache block allocation (message enqueueing path) is as follows:
[0146] 1. When the Ingress port receives a message, it sends a cache block allocation request to the linked list management unit;
[0147] 2. Hardware first queries the current water level of this port's Port-FL (port-private free list):
[0148] Case A: Port-FL is not empty → Read 1 BLK_PTR (cache block pointer) directly from the local FIFO register to complete the allocation; the local FIFO read pointer increments; the entire process does not access the global SRAM and consumes no external bandwidth.
[0149] Scenario B: Port-FL is empty → the current packet allocation request is temporarily suspended; the background state machine initiates a batch read request to Global-FL (global free list) (reading Batch=64 pointers at a time); after the batch pointers are loaded into Port-FL, the packet allocation request is responded to again;
[0150] 3. After obtaining a valid BLK_PTR, send the pointer along with the message data to the Bank round-robin scheduling unit and write it into the corresponding SRAM Bank;
[0151] 4. The message queue management unit attaches the BLK_PTR to the tail of the corresponding outgoing port message queue linked list.
[0152] Optimize the pre-fill mechanism:
[0153] Continuously monitor the Port-FL water level. When the number of idle pointers is lower than LOW_WATER, without waiting for the local FIFO to be completely exhausted, the background pipeline asynchronously initiates batch pre-filling in advance to eliminate waiting bubbles in message allocation and ensure uninterrupted line speed.
[0154] In one embodiment of this application, after the message is dequeued and forwarded, the corresponding cache block pointer is recycled to the local port private free list. If the current occupied entries in the local port private free list reach a preset high watermark threshold, writing to the local list is stopped, and the pointers to be recycled are accumulated to a preset batch number and then written to the global free list in batches, including the following steps S410 to S440.
[0155] Step S410: After the message is dequeued and forwarded to the output port, initiate a buffer block release request, carrying a pointer to the block to be reclaimed, and first try to reclaim the block pointer to the local private free list corresponding to the current port.
[0156] Step S420: If the current occupied entries in the current port's private free list are lower than the high watermark threshold, write the pointer of the block to be reclaimed to the current port's private free list and increment the write pointer of the current port's private free list. Reclaiming is completed without accessing the global free list.
[0157] Step S430: If the number of currently occupied entries in the private free list of the current port reaches the high watermark threshold, stop writing to the private free list of the current port. After accumulating a full batch of pointers to be reclaimed, write them to the global free list in batches.
[0158] Step S440: After receiving a batch of pointers to be reclaimed, the global idle list stores them in the global idle list pool, completing the reclamation of idle resources of the entire machine.
[0159] like Figure 5 As shown, in some embodiments, the complete process of cache block reclamation (packet dequeueing and forwarding completed) is as follows:
[0160] 1. The message is dequeued, read, and forwarded to the port; the Egress logic initiates a cache block release request, carrying the BLK_PTR to be reclaimed;
[0161] 2. Prioritize reclaiming BLK_PTR to this port (Port-FL):
[0162] Case A: Port-FL currently occupied entries < HIGH_WATER → pointer is written to the local register FIFO, write pointer increments; reclamation complete, global linked list not accessed;
[0163] Scenario B: Port-FL reaches high watermark threshold → stops writing to local FIFO; after accumulating a batch of 64 pointers to be reclaimed, writes are made to Global-FL in batches.
[0164] 3. After receiving a batch of pointers, the global linked list stores them in the SRAM linked list pool to complete the reclamation of idle resources of the whole machine.
[0165] In some embodiments, this application uses the bandwidth quantization effect as an example, as follows.
[0166] Setting typical steady-state operating conditions for the project: Port private linked list local allocation / reclaim hit rate Batch=64.
[0167] Only 1% of the packet traffic will trigger global linked list batch interaction; each batch operation can process 64 pointer operations corresponding to packets at once.
[0168] Global linked list equivalent access speed:
[0169] Bandwidth required for global linked list SRAM:
[0170]
[0171] Compared to the 9.75Tbps bandwidth requirement of a traditional single-level linked list, the bandwidth requirement is reduced by three orders of magnitude; ordinary on-chip SRAM can easily meet the timing requirements, completely eliminating the speed bottleneck of the linked list path.
[0172] In some embodiments, this application establishes a fault and consistency protection mechanism (functional safety enhancement), as follows:
[0173] Pointer validity check: During allocation / reclaim, verify whether BANK_ID and BLOCK_ADDR are within the valid range to intercept illegal pointers;
[0174] Linked list overflow / underflow protection: Hardware adds latching logic to prohibit reading from an empty FIFO and writing from a full FIFO;
[0175] Background linked list inspection: During business idle time slots, traverse the two-level linked list, count the total number of idle pointers, verify whether "the sum of global idle pointers + the sum of private idle pointers of all ports" equals the total number of idle cache blocks of the whole machine, and detect broken links, duplicate pointer reclamation, and memory leaks.
[0176] This application establishes a two-level distributed storage isolation mechanism: high-frequency operations at the packet granularity level are placed in a port-independent FIFO register to avoid high-frequency random access to external SRAM; the global linked list only handles batch resource scheduling; a hardware-forced batch access isolation mechanism: the hardware state machine restricts the global linked list to only support batch reads and writes, eliminating massive single-pointer random access under the impact of small packets; a dual-watermark asynchronous pre-filling + overflow return mechanism: using high and low watermark warnings, the background replenishes idle resources in advance to avoid pipeline bubbles in the packet allocation path and ensure continuous line speed for 64B small packets; and mathematically eliminates the bandwidth bottleneck: reducing the linked list access bandwidth requirement from nearly 10Tbps to 1.5Gbps, solving the hardware limit that traditional linked list architecture cannot overcome in ultra-high concurrency scenarios of 150G+ PPS.
[0177] This application pioneers a quantitative design model for 64B line-rate cache in 102.4T-level switches: by accurately deriving cache bandwidth, number of banks, and cache depth through overall throughput, small packet PPS, and burst duration, it overcomes the drawbacks of traditional empirical design and achieves an optimal balance between performance, area, and power consumption. This application innovatively designs a 2432-bank symmetrical sharding conflict-free memory access architecture: by evenly distributing ultra-high cache bandwidth across multiple banks, it completely solves the problems of memory access conflicts and line-rate data loss under 102.4T ultra-high throughput of 64B small packets, reducing the memory access conflict rate to 0. This application innovatively designs a unified shared cache across the entire chip without partitions: abandoning the traditional static port cache quotas, it dynamically schedules resources across the entire domain, perfectly adapting to random micro-bursts and traffic imbalance scenarios in AI Scale-Up clusters, significantly improving cache utilization. This application innovatively designs a global + port dual-level idle linked list mechanism: solving the bottleneck of linked list update latency under ultra-high PPS concurrency, achieving nanosecond-level cache block allocation and reclamation, and stably supporting 152G+ PPS small packet line-rate forwarding. This application innovatively designs 64B granularity precise resource management: it fully matches the minimum Ethernet packet size, eliminates resource fragmentation, and ensures ultimate forwarding performance in extreme small packet scenarios.
[0178] The protection scope of the message processing method based on a fully shared buffer array described in this application is not limited to the execution order of the steps listed in this embodiment. Any solution implemented by adding, deleting, or replacing steps in the prior art based on the principles of this application is included within the protection scope of this application.
[0179] This application also provides a message processing system based on a fully shared cache array. The message processing system based on a fully shared cache array can implement the message processing method based on a fully shared cache array described in this application. However, the implementation apparatus of the message processing method based on a fully shared cache array described in this application includes, but is not limited to, the structure of the message processing system based on a fully shared cache array listed in this embodiment. All structural modifications and substitutions of the prior art made in accordance with the principles of this application are included within the protection scope of this application.
[0180] Figure 6 The diagram shown is a schematic representation of the message processing system based on a fully shared buffer array as described in an embodiment of this application. Figure 6 As shown, this embodiment provides a message processing system based on a fully shared cache array, which is applied to a fully shared cache array containing a set number of independent banks. The message processing system 100 based on the fully shared cache array includes: a cache block allocation module 110, a round-robin scheduling module 120, a message dequeue forwarding module 130, and a cache block recycling module 140.
[0181] The cache block allocation module 110 is configured to receive multi-port packet enqueue read / write requests and allocate valid cache block pointers to each port packet based on a two-level linked list management unit; the two-level linked list management unit includes a global free linked list pool and a port-private free linked list.
[0182] The round-robin scheduling module 120 is configured to use the Bank round-robin scheduling memory access control unit to write the valid cache block pointer and the corresponding port message data into the corresponding Bank according to the round-robin scheduling strategy; the Bank round-robin scheduling memory access control unit distributes concurrent write requests evenly to a set number of independent Banks based on the round-robin time-sharing scheduler, ensuring that the same Bank only processes a single write operation in any clock cycle.
[0183] The message dequeue forwarding module 130 is configured to have the message queue management unit attach the cache block pointer to the tail of the corresponding outgoing port message queue linked list to perform message dequeue forwarding.
[0184] The cache block reclamation module 140 is configured to reclaim the corresponding cache block pointer to the local port's private free list after the packet dequeue forwarding is completed. If the number of currently occupied entries in the local port's private free list reaches a preset high-water mark threshold, writing to the local list will stop, and the pointers to be reclaimed will be accumulated to a preset batch number and then written to the global free list in batches.
[0185] The global shared cache pool has no static cache partitions for any ports, and all ports and all services share the same physical cache pool. The global free list only supports batch read and write and prohibits single pointer random access. The port private free list is implemented as a synchronous first-in-first-out queue by a register array.
[0186] It should be noted that the functions or operations of the cache block allocation module 110, the round-robin scheduling module 120, the message dequeue forwarding module 130, and the cache block recycling module 140 described in this application embodiment correspond one-to-one with the steps in the message processing method based on the fully shared cache array described above, so they will not be repeated here.
[0187] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, or methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or modules or units may be electrical, mechanical, or other forms.
[0188] The modules / units described as separate components may or may not be physically separate. The components shown as modules / units may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules / units can be selected to achieve the objectives of the embodiments of this application, depending on actual needs. For example, the functional modules / units in the various embodiments of this application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0189] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0190] like Figure 7As shown in the figure, this embodiment provides an electronic device, which includes a memory and a processor.
[0191] The memory is used to store computer programs;
[0192] The processor is used to execute the computer program stored in the memory, so that the electronic device performs the message processing method based on the fully shared buffer array described above.
[0193] Figure 7 This is a schematic block diagram of the electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 700 includes at least one processor 710, a memory 720, at least one network interface 730, and a user interface 750. The various components in the device are coupled together via a bus system 740. It is understood that the bus system 740 is used to implement communication between these components. In addition to a data bus, the bus system 740 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 7 The general will label all buses as bus systems.
[0194] The user interface 750 may include a monitor, keyboard, mouse, trackball, clicker, button, touchpad, or touchscreen.
[0195] It is understood that memory 720 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM) or programmable read-only memory (PROM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable categories of memory.
[0196] In this embodiment, the memory 720 is used to store various types of data to support the operation of the electronic device 700. Examples of this data include any executable program that operates on the electronic device 700, such as the operating system 721 and application programs 722. The operating system 721 contains various system programs, such as the framework layer, core library layer, driver layer, etc., used to implement various basic services and handle hardware-based tasks. The application program 722 may contain various applications, such as a media player, browser, etc., used to implement various application services. The message processing based on the fully shared buffer array provided in this embodiment can be included in the application program 722.
[0197] The methods disclosed in the embodiments of this application can be applied to processor 710, or implemented by processor 710. Processor 710 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 710 or by instructions in the form of software. The processor 710 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 710 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. General-purpose processor 710 may be a microprocessor or any conventional processor, etc. The steps of the accessory optimization method provided in the embodiments of this application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in memory. The processor reads the information in the memory and combines it with its hardware to complete the steps of the aforementioned method.
[0198] In an exemplary embodiment, the electronic device 700 may be used by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), or complex programmable logic devices (CPLDs) to perform the aforementioned method.
[0199] This application also provides a computer-readable storage medium. Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing a processor. The program can be stored in a computer-readable storage medium, which is a non-transitory medium, such as random access memory, read-only memory, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof. The storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state drive (SSD)).
[0200] This application embodiment may also provide a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in this application embodiment are generated. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0201] When the computer program product is executed by a computer, the computer performs the method described in the foregoing method embodiments. The computer program product can be a software installation package; when the foregoing method is required, the computer program product can be downloaded and executed on the computer.
[0202] In summary, the message processing method, system, device, and medium based on a fully shared buffer array described in this application have the following beneficial effects:
[0203] This application receives read / write requests for multi-port packets and allocates valid cache block pointers to each port packet based on a two-level linked list management unit. The two-level linked list management unit includes a global free linked list pool and a port-private free linked list. A Bank round-robin scheduling memory access control unit writes the valid cache block pointers and corresponding port packet data to the corresponding Bank according to a round-robin scheduling strategy. The Bank round-robin scheduling memory access control unit distributes concurrent write requests evenly to a set number of independent Banks based on a round-robin time-sharing scheduler, ensuring that the same Bank processes only a single write operation within any clock cycle. The packet queue management unit attaches the cache block pointers to the tail of the corresponding outgoing port packet queue linked list to perform packet dequeue forwarding. After packet dequeue forwarding is completed, the corresponding cache block pointers are recycled to the port-private free linked list. If the current occupied entries in the port-private free linked list reach a preset high-water mark threshold, writing to the local area stops, and pointers to be recycled are accumulated to a preset batch size before being written to the global free linked list in batches. This application solves the problems of 64B small packet line-speed blocking, shared cache access conflict, linked list update bottleneck, and inability to balance throughput and latency in existing 102.4T ultra-large switches through four core innovations: accurate theoretical bandwidth modeling, multi-bank symmetric sharding conflict-free memory access, hierarchical dynamic linked list scheduling, and unified shared cache pool across the entire chip.
[0204] This application designs a cache quantization model: by accurately deriving cache bandwidth, number of banks, and cache depth through overall throughput, small packet PPS, and burst duration, it overcomes the drawbacks of traditional empirical design and achieves the optimal balance of performance, area, and power consumption; by designing a bank-symmetric sharding conflict-free memory access architecture: by distributing ultra-high cache bandwidth evenly across multiple banks, it completely solves the problems of memory access conflicts and line-rate loss for 64B small packets under 102.4T ultra-high throughput, reducing the memory access conflict rate to 0; by designing a unified shared cache without partitions across the entire chip: abandoning the traditional port static cache quota, it dynamically schedules resources across the entire domain, perfectly adapting to random micro-bursts and traffic imbalance scenarios in AI Scale-Up clusters, and significantly improving cache utilization; by designing a global + port dual-level idle linked list mechanism: it solves the bottleneck of linked list update latency under ultra-high PPS concurrency, achieves nanosecond-level cache block allocation and reclamation, and stably supports 152G+ PPS small packet line-rate forwarding; by designing 64B-granularity precise resource management: it fully matches the minimum Ethernet packet specification, eliminates resource fragmentation, and ensures ultimate forwarding performance in extreme small packet scenarios.
[0205] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.
[0206] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A message processing method based on a fully shared buffer array, characterized in that, Applied to a fully shared cache array containing a specified number of independent banks, including: It receives read and write requests for enqueuing messages from multiple ports and allocates valid cache block pointers to each port message based on a two-level linked list management unit; the two-level linked list management unit includes a global free linked list pool and a port-private free linked list. The Bank round-robin scheduling memory access control unit writes the valid cache block pointer and the corresponding port message data into the corresponding Bank according to the round-robin scheduling strategy; the Bank round-robin scheduling memory access control unit distributes concurrent write requests evenly to a set number of independent Banks based on the round-robin time-sharing scheduler, ensuring that the same Bank only processes a single write operation in any clock cycle; The message queue management unit attaches the cache block pointer to the tail of the corresponding outgoing port message queue linked list to perform message dequeue forwarding; After the message is dequeued and forwarded, the corresponding cache block pointer is recycled to the port's private free list. If the number of currently occupied entries in the port's private free list reaches the preset high watermark threshold, writing to the local list stops, and the pointers to be recycled are accumulated to the preset batch number and then written to the global free list in batches.
2. The method according to claim 1, characterized in that, It receives multi-port packet enqueue read / write requests and allocates valid buffer block pointers to each port packet based on a two-level linked list management unit, including: In response to the port packet enqueue read / write request, a cache block allocation request is initiated to the two-level linked list management unit; Based on the cache block allocation request, the current water level of the current port's private free list is queried first; If the current water level of the private free list of the current port is not empty, then read a buffer block pointer directly from the private free list of the current port to allocate a valid buffer block pointer for the current port packet, and increment the read pointer of the private free list. If the current water level of the private free list of the current port is empty, the cache block allocation request of the current packet is temporarily suspended, and a batch read request is sent to the global free list pool. After reading the batch cache block pointers and loading them into the private free list of the current port, the cache block allocation request is responded to and a valid cache block pointer is allocated to the current port packet. The system continuously monitors the water level of the current port's private free list. When the number of free pointers falls below the preset low water level threshold, the background pipeline asynchronously initiates batch pre-filling, loading a batch of pointers from the global free list pool into the port's private free list.
3. The method according to claim 1, characterized in that, The two-level linked list management unit allocates valid buffer block pointers to packets on each port and also includes: Prioritize allocating valid cache block pointers from the port's private free list; if a hit fails, batch schedule and replenish free cache block pointers from the global free list pool. The global free list stores pointers to all free cache blocks not occupied by ports in the fully shared cache array. It is a batch first-in-first-out pool composed of multi-bank independent SRAM arrays and only supports batch reads and batch writes. The port-private free list stores a preset number of free cache block pointers. It is a synchronous first-in-first-out queue implemented by an independent register array for each port, which undertakes the majority of packet allocation and recycling operations. All operations only access on-chip registers and do not consume global linked list SRAM bandwidth.
4. The method according to claim 1, characterized in that, The memory access control unit utilizes a Bank round-robin scheduling strategy to write the valid cache block pointer and corresponding port packet data into the corresponding Bank, including: If the current port packet data is less than or equal to the fixed granularity of a single buffer block, write the allocated valid buffer block pointer into the corresponding port packet data and obtain the packet data written into the valid buffer block pointer; The Bank round-robin scheduling memory access control unit writes the message data that is written to the valid cache block pointer into the corresponding Bank according to the round-robin scheduling strategy. Each Bank stores message fragments with a fixed granularity. If the current port packet data is larger than the fixed granularity of a single cache block, the current port packet data is fragmented into multiple packet data fragments. Based on the two-level linked list management unit, a valid cache block pointer is allocated to each packet data fragment. The valid cache block pointers and the corresponding packet data fragments are written to the corresponding Bank. When the packet is dequeued, the packet is read and reassembled in sequence according to the valid cache block pointers of each packet data fragment. The Bank round-robin scheduling memory access control unit has a built-in round-robin time-sharing scheduler that performs uniform hash distribution of the valid cache block pointers and corresponding port message data of all ports, and evenly distributes the valid cache block pointers and corresponding port message data of concurrent ports to a set number of Banks, ensuring that the same Bank processes only a single read and write operation within any clock cycle; the Bank round-robin scheduling memory access control unit adopts a fixed-granularity round-robin mapping mechanism for scenarios with dense small packets.
5. The method according to claim 1, characterized in that, The fully shared cache array consists of 2432 physically independent SRAM banks that are evenly divided. All banks are uniformly addressed to form a unified 3.8GB shared cache pool. All banks have consistent capacity, depth, read and write timings. The depth of a single bank is 262,144 entries, the granularity of a single cache block is 64B, and each bank has an independent read and write port.
6. The method according to claim 1, characterized in that, The method further includes: The micro-burst water level adaptive control unit monitors the occupied water level of the global idle linked list pool and the burst flow intensity of each port in real time. Based on the occupancy level of the global idle list pool and the burst traffic intensity of each port, the pre-allocated resource limit of the private idle list of each port is dynamically adjusted. When a sudden surge of traffic is detected in the private free list of a port in the Scale-Up cluster, the resource quota of the private free list of that port is temporarily increased to improve its cache block pre-caching capability. When a port’s private free list is detected to be idle, the free cache blocks in the port’s private free list that exceed the basic quota are reclaimed to the global free list pool to expand the global shared resource pool. The above dynamic adjustment achieves a dynamic and balanced allocation of global idle linked list pool resources among various ports.
7. The method according to claim 1, characterized in that, After message dequeueing and forwarding are completed, the corresponding cache block pointer is reclaimed to the local port's private free list. If the number of currently occupied entries in the local port's private free list reaches a preset high-water mark threshold, writing to the local list stops, and the pointers to be reclaimed are accumulated to a preset batch size before being written to the global free list in batches, including: After the message is dequeued and forwarded to the output port, a cache block release request is initiated, carrying a pointer to the block to be reclaimed. Priority is given to reclaiming the block pointer to the local private free list corresponding to the current port. If the current occupied entries in the current port's private free list are below the high watermark threshold, then the pointer to the block to be reclaimed is written to the current port's private free list, and the write pointer of the current port's private free list is incremented. The reclamation is completed without accessing the global free list. If the number of currently occupied entries in the private free list of the current port reaches the high watermark threshold, writing to the private free list of the current port will stop. After accumulating a full batch of pointers to be reclaimed, the entries will be written to the global free list in batches. After receiving a batch of pointers to be reclaimed, the global free list stores them in the global free list pool, thus completing the reclamation of idle resources across the entire machine.
8. A message processing system based on a fully shared buffer array, characterized in that, Applied to a fully shared cache array containing a specified number of independent banks, including: The cache block allocation module is configured to receive read / write requests for enqueued multi-port packets and allocate valid cache block pointers to each port packet based on a two-level linked list management unit; the two-level linked list management unit includes a global free linked list pool and a port-private free linked list. The round-robin scheduling module is configured to use the Bank round-robin scheduling memory access control unit to write the valid cache block pointer and the corresponding port message data into the corresponding Bank according to the round-robin scheduling strategy; the Bank round-robin scheduling memory access control unit distributes concurrent write requests evenly to a set number of independent Banks based on the round-robin time-sharing scheduler, ensuring that the same Bank only processes a single write operation in any clock cycle; The message dequeue forwarding module is configured to have the message queue management unit attach the cache block pointer to the tail of the corresponding outgoing port message queue linked list to perform message dequeue forwarding; The cache block reclamation module is configured to reclaim the corresponding cache block pointer to the local port's private free list after the packet dequeue forwarding is completed. If the number of currently occupied entries in the local port's private free list reaches a preset high-water mark threshold, writing to the local list will stop, and the pointers to be reclaimed will be accumulated to a preset batch number and then written to the global free list in batches.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing a computer program stored in the memory to cause the electronic device to perform the message processing method based on a fully shared buffer array as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the message processing method based on a fully shared cache array as described in any one of claims 1 to 7.
