A VOQ dynamic mapping method of a CXL switch chip

By using a dynamic mapping method in the CXL switching chip, the head-of-line blocking and deadlock problems caused by insufficient VOQ quantity are solved, realizing a high-performance and low-cost CXL switching chip design that is adaptable to the PCB layout design of different server manufacturers.

CN123164077APending Publication Date: 2026-11-24BEIJING SHUDU INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202611352395.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

In ultra-large-scale port designs, existing CXL switching chips suffer from insufficient VOQs, leading to head-of-line congestion and protocol deadlock. They are also unable to adapt to the PCB layout designs of different server manufacturers and lack dynamic congestion adaptation capabilities, resulting in performance degradation and high costs.

Method used

A dynamic mapping method is adopted. An initial mapping relationship table is established through power-on self-test. The hierarchy is divided according to port role, traffic direction and device type. The normalized bandwidth level is calculated and the VOQ mapping is dynamically adjusted through real-time indicators to avoid cross-level and cross-type sharing and realize dynamic remapping of VOQ.

Benefits of technology

It effectively avoids head-of-line blocking and protocol deadlock, improves the concurrent performance of the CXL switching chip, reduces chip cost and power consumption, enhances adaptability to different PCB layouts, and ensures high availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123164077A_ABST
    Figure CN123164077A_ABST
Patent Text Reader

Abstract

This invention provides a dynamic VOQ mapping method for a CXL switching chip, comprising the following steps: S1: In a CXL switching chip with m physical ports, an initial mapping table is established during power-on self-test. Based on the port's role and traffic direction in the CXL topology, the ports are divided into four fixed levels L0 / L1 / L2 / L3. Ports at different levels cannot share the same VOQ. S2: Based on the current link establishment rate and width of each CXL switching chip port, the normalized bandwidth NBW is calculated, and the target ports are divided into five levels from high to low according to the NBW, thereby constraining the number of shared VOQs and cross-level constraints. S3: The device protocol type is defined according to the device function, and the sharing of VOQs by the target ports is defined based on the device protocol type. S4: During initialization, an independent multicast dedicated VOQ set is forcibly allocated. S5: The VOQ mapping is dynamically adjusted according to real-time indicators to achieve VOQ remapping. Real-time indicators include real-time traffic indicators and real-time congestion indicators. The triggering mechanisms for VOQ remapping include congestion, uneven traffic, resource reclamation, link degradation, and hot-plugging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a heterogeneous computing mapping method, and more particularly to a VOQ dynamic mapping method for a CXL switching chip. Background Technology

[0002] With the surge in demand for high-performance computing, artificial intelligence, and big data analytics in modern data centers, heterogeneous computing architectures are gradually becoming the industry mainstream. In heterogeneous computing systems, the Compute Express Link (CXL) protocol, with its high bandwidth, low latency, and memory consistency, has become a key interconnect standard connecting CPUs (Central Processing Units) with peripherals such as accelerators, memory expansion modules, and smart network interface cards (NICs). In a typical server hardware physical architecture, each CXL device is plugged into a corresponding slot on the printed circuit board (PCB) of the server motherboard. To achieve interconnection and resource pooling between multiple CXL devices, the system typically introduces a CXL switching chip. Each CXL device connection occupies one CXL switching chip port. Assuming the CXL switching chip has m ports, it can connect m CXL devices on the motherboard. CXL devices come in various types, mainly including: RC (root node), devices supporting the CXL.io protocol, devices supporting the CXL.mem protocol, and devices supporting the CXL.cache protocol.

[0003] In the internal microarchitecture design of the CXL switching chip, Virtual Output Queue (VOQ) technology is widely used to solve the head-of-line (HOL) congestion problem in network switching. The core idea of ​​the VOQ architecture is to maintain an independent buffer queue for each destination port on the receiving side (Rx) for each sending side (Tx). The greatest benefit of using the VOQ architecture is that when congestion occurs at a destination port, the congestion only back-pushes onto the specific VOQ corresponding to that destination port, without affecting packets sent to other non-congested destination ports, thus achieving physical and logical isolation of traffic between ports within the chip. Theoretically, the more VOQs a CXL switching chip has, the higher the traffic isolation between ports, and the more significant the overall throughput and non-blocking performance gains.

[0004] However, in the design of CXL switching chips with a very large number of ports, the implementation of VOQ requires a large amount of high-speed on-chip static random access memory (SRAM) resources and complex scheduling and control logic. As the number of ports continues to increase, if one or more dedicated VOQs are allocated to each port, the chip area will grow exponentially, and the resulting chip manufacturing cost, power consumption, and heat dissipation pressure will reach unbearable limits. Therefore, for a CXL switching chip with a very large number of ports, due to limited on-chip resources, the actual number of VOQs n that can be implemented inside the chip is often much smaller than the number of chip ports m (i.e., n < m). In this case, packets from multiple destination ports will inevitably be forced to be mapped to the same VOQ for buffering. This mechanism of multiple ports sharing the same VOQ has a drawback: it is highly susceptible to head-of-line blocking (HOL). Once a congested low-speed target port occurs, it will block packets from a previously unobstructed high-speed target port in the same VOQ, causing ports to block each other. This not only prevents the high-concurrency performance benefits of the VOQ architecture from being realized, but also makes it impossible to achieve true non-blocking switching, severely reducing the overall throughput of the system.

[0005] Simply mapping target ports to VOQs statically is inflexible when dealing with the complex server hardware ecosystem. This is because CXL switching chips and individual CXL devices are often integrated on the same server PCB motherboard, and the physical motherboard slots for each CXL device are fixed. However, server manufacturers (such as Inspur, Dell, and HP) often have different PCB motherboard routing and layout designs. This results in the CXL switching chip port numbers corresponding to the same type of CXL device varying significantly across different manufacturers' server motherboards. Due to this fragmentation of hardware topology, the industry cannot establish a fixed, static mapping table of "CXL ports to CXL switching chip VOQs." Using a static mapping scheme from target port to VOQ would result in the same CXL switching chip performing well on a motherboard from manufacturer A, but causing severe HOL congestion or channel deadlock on a motherboard from manufacturer B due to topology mismatch. This high customization cost and poor topology adaptability constitute a bottleneck for the successful productization and commercialization of existing technologies.

[0006] Regarding the queue mapping and congestion control issues of CXL switching chips, the industry has explored some related technologies. However, these solutions all exhibit significant limitations when faced with the complex topology and asymmetric bandwidth unique to the CXL protocol. The existing technical solutions are as follows:

[0007] (1) A queue scheduling method and apparatus are provided in patent number CN202110345016.6 (authorization announcement number CN113179226B). This patent mainly targets queue scheduling of traditional Ethernet switching chips and proposes a queue sharing mapping method based on packet priority to alleviate congestion problems under limited queue resources. However, the drawback of this solution is that it does not take into account the unique tree-like topology hierarchy (such as RC nodes, uplink nodes, downlink nodes, etc.) characteristics of the CXL architecture. If it is rigidly applied to CXL switching chips, it will cause traffic at different levels (such as uplink ports and downlink ports) to share the same VOQ, thereby causing CXL routing dependency loops and resulting in serious protocol-level deadlock. Since Ethernet and CXL have fundamental differences in transaction dependency, this prior art cannot solve the deadlock-free scheduling problem in the CXL environment.

[0008] (2) Patent No. CN202210496095.5 (Authorization Announcement No. CN115473862B) provides a method and system for avoiding head-of-line blocking of multicast packets in switching chips. This patent focuses on solving the HOL phenomenon caused by multicast packets to unicast packets, treating all unicast target ports as homogeneous nodes and ignoring the huge differences in device types in the CXL switching system (such as T1, T2, and T3 type devices). In the CXL system, T3 type devices have more than ten sub-channels, and their traffic complexity and burstiness are far greater than those of T1 type devices. If VOQ is blindly shared without distinguishing CXL protocol types, low-complexity traffic will be blocked by high-complexity traffic. In addition, this solution does not have the ability to sense dynamic changes in link bandwidth and cannot cope with the bandwidth mismatch problem when CXL ports are reduced from G5 (Gen5) to G4 (Gen4).

[0009] (3) Patent No. US20120106564A1 discloses a "Method for switching data and structure for switching data". This patent proposes a data exchange structure based on a static configuration table. Its biggest limitation is the fixed mapping relationship. In the CXL ecosystem, due to the different PCB layouts of various server manufacturers and the fact that CXL devices support hot-plugging, port status and topology are dynamically changing. This Huawei patent solution lacks runtime real-time statistical analysis and dynamic adaptive remapping mechanisms. When micro-bursts occur in the network or ports are removed, it cannot dynamically split or merge VOQ resources, resulting in SRAM resource waste and long-term unresolved local congestion, which cannot meet the high availability requirements of the CXL server system. Summary of the Invention

[0010] This invention provides a dynamic VOQ mapping method for CXL switching chips, addressing various shortcomings of existing technologies such as head-of-queue (HOL) blocking due to static queue mapping, deadlock easily caused by ignoring CXL topology hierarchy, inability to adapt to heterogeneous PCB layout designs from different manufacturers, and lack of dynamic congestion adaptation capabilities. The method aims to solve the following problems:

[0011] (1) Under the hardware constraint that the total number of VOQs n of the CXL switching chip is less than the total number of physical ports m, how to design a mapping method that can automatically sense the server PCB topology and CXL device attributes (level, bandwidth, protocol type) to avoid CXL protocol dependency deadlock and head-of-line blocking (HOL) problems caused by improper sharing of VOQs;

[0012] (2) Overcome the problem of port connection fragmentation caused by different PCB traces on server motherboards. This invention aims to replace the traditional static mapping of hard-wired connections with a dynamic table building mechanism during power-on self-test, so that the same CXL switching chip can intelligently adapt to the motherboard layout of different server manufacturers, thereby reducing the system customization cost;

[0013] (3) During system operation, when sudden traffic causes local congestion, extremely uneven traffic distribution, port link speed reduction or device hot-plugging and other dynamic events, how to realize millisecond-level dynamic remapping (splitting, merging and reallocation) of VOQ resources through hardware statistical mechanism, so as to maximize the utilization of SRAM resources and ensure that the CXL switching chip is in the best performance state of high concurrency and non-blocking.

[0014] The technical solution is as follows:

[0015] A method for dynamic VOQ mapping of a CXL switching chip includes the following steps:

[0016] S1: In a CXL switching chip with m physical ports, an initial mapping table is established during power-on self-test. Based on the role of the port in the CXL topology and the direction of traffic, the ports are divided into four fixed levels L0 / L1 / L2 / L3. Ports at different levels cannot share the same VOQ.

[0017] S2: Calculate the normalized bandwidth NBW based on the current link establishment rate and width of each CXL switching chip port, and divide the destination ports of the CXL messages received by the source port into five levels from high to low according to the NBW, so as to realize the constraint on the number of VOQ sharing and cross-level constraint.

[0018] S3: Based on the CXL device type defined by the CXL protocol and the CXL protocol types that the CXL device type is compatible with, define the sharing of the target port to VOQ based on the device protocol type; the CXL device types are divided into T1 / T2 / T3, T1 type devices are compatible with CXL.io and CXL.cache protocols; T2 type devices are compatible with CXL.io, CXL.cache, and CXL.mem protocols; T3 type devices are compatible with CXL.io and CXL.mem protocols;

[0019] S4: During initialization, a separate multicast-dedicated VOQ set is forcibly allocated;

[0020] S5: Dynamically adjust VOQ mapping based on real-time metrics to achieve VOQ remapping; real-time metrics include real-time traffic metrics and real-time congestion metrics; the triggering mechanisms for VOQ remapping include congestion, uneven traffic distribution, resource reclamation, link degradation, and hot-plugging.

[0021] The specific operation of VOQ remapping includes: for VOQ[a] that meets the above conditions for triggering VOQ remapping, find an available VOQ[b] in the idle VOQ pool, remove the mapping relationship between the target port with the highest packet enqueue rate in VOQ[a] and VOQ[a], and then remap the target port to VOQ[b]. All subsequent CXL packets destined for the target port are written to VOQ[b] and no longer written to VOQ[a].

[0022] Furthermore, in step S1, the four fixed levels are as follows:

[0023] As the root layer, L0 is the port that connects to the RC node. The traffic direction of this layer is defined as uplink traffic, that is, from the CXL device to the root node. L0 has an exclusive principle. Any traffic sent to L0 port must exclusively occupy one or more VOQs and no other port is allowed to share VOQs with this path.

[0024] Layer L1 serves as the uplink layer, connecting upwards to the ports of the cascaded CXL switching chip above it, with the traffic direction also being uplink.

[0025] Layer L2 acts as the downlink layer, connecting to ports of lower-level terminal devices. Traffic flow is downlink, from the root node to the CXL device. After removing the VOQs exclusively allocated to Layer L0, the remaining VOQ resources are distributed proportionally or evenly across layers L1, L2, and L3 based on their respective port allocation ratios.

[0026] Layer 3 is a peer-to-peer layer, meaning it connects horizontally to ports of the same level CXL switching chip, and the traffic direction is bidirectional. Layer 3 enjoys the principle of peer isolation, and Layer 3 ports cannot be mapped to the same VOQ.

[0027] Furthermore, in step S2, the normalized bandwidth is calculated based on the current link establishment rate and width of each CXL switching chip port. The normalization calculation formula is: NBW = rate coefficient × width coefficient.

[0028] Furthermore, in step S2, based on NBW, the bandwidth level of the target port is divided into 5 levels from high to low:

[0029] S level: NBW = 1.0;

[0030] Grade A: 0.5 ≤ NBW < 1.0;

[0031] Grade B: 0.25 ≤ NBW < 0.5;

[0032] Grade C: 0.1 ≤ NBW < 0.25;

[0033] Grade D: NBW < 0.1.

[0034] Furthermore, in step S3, the CXL protocol defines three protocol types—T1, T2, and T3—based on device functionality. T2 type devices are compatible with CXL.io, CXL.cache, and CXL.mem protocols simultaneously; T1 type devices are compatible with both CXL.io and CXL.cache protocols; and T3 type devices are compatible with both CXL.io and CXL.mem protocols. A mapping method is defined based on the CXL device type present on the port, as described in the following steps:

[0035] S31: T2 type devices need to be isolated independently, and the ports of T2 type devices should be forcibly assigned to dedicated VOQs;

[0036] S32: T1 type devices can only share VOQ with other T1 type devices;

[0037] S33: T3 type devices can only share VOQ with other T3 type devices.

[0038] Furthermore, in step S5, the process for real-time traffic metric statistics includes the following steps:

[0039] S501: When a message arrives at the RX side, parse the destination port and VOQ number;

[0040] S502: The hardware counter samples in real time based on a time window. The hardware counter maintains three types of real-time traffic metrics for each VOQ:

[0041] Total enqueue rate: the sum of the packet write rates of all ports sharing this VOQ;

[0042] The independent inbound rate of each target port;

[0043] Traffic distribution uniformity: obtained by calculating the standard deviation of the rates of each port within the same VOQ;

[0044] S503: Update the VOQ status register;

[0045] The process of real-time congestion metric statistics includes the following steps:

[0046] S511: Real-time monitoring of VOQ queues;

[0047] S512: Through periodic sampling and event capture, the hardware maintains congestion status indicators for each VOQ simultaneously.

[0048] VOQ occupancy: The percentage of the current queue depth relative to the total allocated depth of this VOQ;

[0049] Back pressure frequency: The number of times downstream back pressure flow control is triggered per unit time;

[0050] Average queuing delay: The number of clock cycles a message resides in the VOQ;

[0051] S513: Update the VOQ congestion status register.

[0052] Furthermore, in step S5, for congestion-triggered VOQ remapping, the triggering condition is continuous VOQ congestion, and the congestion determination condition is when the occupancy rate of a certain VOQ is greater than the occupancy rate threshold and the duration exceeds the time threshold.

[0053] For VOQ remapping triggered by uneven traffic, the triggering condition is severe traffic imbalance. The condition for determining uneven traffic is that among multiple ports sharing the same VOQ, the ratio of the highest traffic port to the lowest traffic port is greater than the balancing threshold, and the duration exceeds the time threshold.

[0054] For resource reclamation triggering VOQ remapping, the triggering condition is that the VOQ has a long-term low load. The resource reclamation judgment condition is when the occupancy rate of a certain VOQ is less than the extremely low threshold and the duration exceeds the time threshold.

[0055] Furthermore, in step S5, for link degradation triggering VOQ remapping, the triggering condition is a sudden change in the port link rate and bandwidth reported by the physical layer of the CXL port.

[0056] For hot-plugging to trigger VOQ remapping, the triggering condition is the occurrence of a port hot-plug event.

[0057] Furthermore, for S-level ports, VOQ must be exclusively used and sharing is prohibited;

[0058] For Class A ports, a maximum of two Class A ports are allowed to share one VOQ.

[0059] For Class B ports, a maximum of 4 Class B ports are allowed to share 1 VOQ;

[0060] For Class C ports, a maximum of 8 Class C ports are allowed to share 1 VOQ;

[0061] For Class D ports, a maximum of 16 Class D ports are allowed to share 1 VOQ;

[0062] Cross-level sharing is prohibited: A-level ports cannot share VOQ with B-level or lower ports.

[0063] Furthermore, in step S4, during system initialization, a dedicated set of multicast-only VOQs is forcibly allocated from the total number of VOQ resources n. These multicast-only VOQs do not overlap with any VOQs on unicast ports.

[0064] The VOQ dynamic mapping method of the CXL switching chip has the following advantages over the aforementioned shortcomings of existing technologies, such as rigid static mapping, easy occurrence of HOL head-of-line blocking and protocol deadlock, and lack of bandwidth adaptability:

[0065] (1) Solving the resource constraint problem of the chip: Through the coordinated work of steps S2 (bandwidth grading) and S5 (dynamic adaptive remapping), even when the number of VOQs n is much smaller than the number of ports m, it is still possible to achieve near-ideal full concurrency performance. This not only significantly saves the valuable SRAM area inside the chip, but also reduces the chip manufacturing cost and operating power consumption;

[0066] (2) Reduce the risk of CXL protocol deadlock: Through steps S1 (port hierarchical isolation) and S3 (protocol type and sub-channel isolation), this invention cuts off the circular dependencies that may be generated by CXL packets (such as the 15 sub-channels of the T3 device) at the physical mapping level. By strictly separating uplink and downlink and different device types, this system can maintain "deadlock-free" safe operation in complex multi-channel concurrent scenarios.

[0067] (3) Eliminating head-of-line congestion: This invention prohibits sharing VOQ across bandwidth levels (step S2), avoiding the risk of low-speed links dragging down high-speed links. In conjunction with step S5, when local HOL congestion is detected, high-frequency traffic sources are automatically stripped, enabling the switching chip to achieve non-blocking throughput most of the time.

[0068] (4) Improved flexibility of PCB board design and routing: Compared with the traditional fixed VOQ mapping scheme with hard-wired wiring, the dynamic detection table building mechanism of this scheme at power-on allows the same switching chip to flexibly adapt to the PCB routing design of various server manufacturers. Attached Figure Description

[0069] Figure 1This is a schematic diagram of the PCB port connection topology of the CXL switching chip;

[0070] Figure 2 This is a diagram illustrating port layering isolation to avoid deadlock during VOQ mapping;

[0071] Figure 3 This is a diagram illustrating tiered bandwidth sharing for ports;

[0072] Figure 4 This is a schematic diagram of the mapping between device protocol type and sub-channel characteristics;

[0073] Figure 5 This is a flowchart illustrating the real-time traffic metric statistics process;

[0074] Figure 6 This is a flowchart illustrating the real-time congestion metric statistics process;

[0075] Figure 7 This is a schematic diagram of the process of congestion triggering VOQ remapping;

[0076] Figure 8 This is a schematic diagram of the process by which uneven traffic triggers VOQ remapping;

[0077] Figure 9 This is a flowchart illustrating the process of resource recycling triggering VOQ remapping;

[0078] Figure 10 This is a schematic diagram of the process of VOQ remapping triggered by link degradation;

[0079] Figure 11 This is a flowchart illustrating the process of hot-plugging triggering VOQ remapping;

[0080] Figure 12 This is a flowchart illustrating an embodiment of the VOQ dynamic mapping method for the CXL switching chip. Detailed Implementation

[0081] This technical solution provides a VOQ dynamic mapping method for CXL switching chips, combined with Figure 12 As shown, it includes the following steps:

[0082] S1: In a CXL switching chip with m physical ports, an initial mapping table is established during power-on self-test. Based on the port's role and traffic direction in the CXL topology, the ports are divided into 4 fixed levels L0 / L1 / L2 / L3. Ports at different levels cannot share the same VOQ.

[0083] like Figure 1As shown, in a CXL switching chip with m physical ports, each physical port contains an independent input side (Tx side, i.e., the transmitting side) and a receiving side (Rx side, i.e., the input side). On the Rx side of each physical port, n VOQs (where n < m) are instantiated in the on-chip SRAM. Due to the VOQ architecture, the VOQs queue independently and do not block each other.

[0084] In server hardware, the PCB (Printed Circuit Board) motherboard contains CXL switching chips and multiple fixed CXL slots. Each CXL slot is directly connected to the physical ports of the CXL switching chip via PCB traces.

[0085] During the server power-on initialization phase: When entering POST (Power On Self Test), the Baseboard Management Controller (BMC) or the host will detect the topology information based on the presence of CXL devices in each slot on the PCB motherboard. At this time, the internal logic of the switching chip establishes an initial mapping table from "CXL switching chip target port" to "VOQ number". The target port is defined as follows: when a CXL message is sent from a CXL device to a source port of a switching chip directly connected to it, the source port obtains the port of the switching chip to which the message should be forwarded by parsing the message header information.

[0086] like Figure 2 As shown, when establishing VOQ mapping relationships, port hierarchical isolation is implemented to avoid deadlock. In the CXL protocol, messages have strict transactional dependencies (e.g., response messages depend on request messages). If circular dependencies exist in the routing path, it will lead to system deadlock. Therefore, based on the port's role and traffic direction in the CXL topology, ports are strictly hierarchically layered to avoid circular dependency deadlocks caused by VOQ sharing.

[0087] 1.1: Port hierarchy classification;

[0088] The system divides all connected destination ports into four fixed levels according to their hierarchical attributes in the CXL topology:

[0089] L0 layer (Root layer): This is the port that connects to the RC node. The traffic direction of this layer is defined as uplink traffic (from the CXL device to the root node).

[0090] L1 layer (upstream layer): This is the port that connects to the CXL switching chip cascaded to the next higher level. The traffic direction is also upstream (from the CXL device to the root node).

[0091] Layer 2 (Downlink Layer): This is the port that connects to the next lower-level terminal device. The traffic direction is downlink (from the root node to the CXL device).

[0092] Layer 3 (Peer-to-Peer): This refers to ports that are horizontally connected to the same level of CXL switching chip. Traffic flow is bidirectional.

[0093] 1.2: Cross-layer isolation;

[0094] Ports at different layers cannot share the same VOQ. Since traffic flows in different directions at different layers, if they are mapped to the same VOQ, when the L2 layer is congested, it will put back pressure on the VOQ, which will then block L1 layer packets mixed in the same VOQ. This cross-layer back pressure will immediately form a routing dependency loop, triggering a deadlock across the entire CXL system.

[0095] 1.3: L0 Layer Exclusive Principle;

[0096] The L0 (Root) port is the critical data path for the entire CXL system. Any traffic destined for an L0 port must exclusively occupy one or more VOQs. No other port (even if it is also at L0, there may be multiple Roots) is allowed to share a VOQ with this critical path, in order to ensure that the system's highest priority interrupts and system memory access are not disturbed.

[0097] 1.4: Layer 3 peer-to-peer isolation;

[0098] L3 (peer-to-peer) ports cannot be mapped to the same VOQ. This is because micro-loops can easily form between peer ports through lateral traffic, requiring physical isolation.

[0099] 1.5: The principle of equal distribution;

[0100] After removing the number of VOQs that need to be exclusively occupied, such as L0 layer, the remaining VOQ resources are allocated equally or proportionally among the layers according to the port ratio occupied by L1, L2, and L3.

[0101] S2: Calculate the normalized bandwidth NBW based on the current link establishment rate and width of each CXL switching chip port, and divide the target ports into five levels from high to low according to the NBW to achieve constraints on the number of VOQ sharing and cross-level constraints.

[0102] like Figure 3 As shown, the bandwidth capabilities (link speed and link width) between ports differ significantly. If high-speed ports and low-speed ports share a VOQ, the high-speed ports will inevitably be hampered by the low queuing release rate of the low-speed ports, leading to a severe HOL (House-of-Order) phenomenon. Therefore, tiered sharing based on port bandwidth is implemented, including the following steps:

[0103] S21: Normalized bandwidth calculation;

[0104] Calculate the normalized bandwidth (NBW) based on the current link establishment rate and width of each CXL switching chip port. Set the coefficient for the highest rate (e.g., Gen 5) to 1, the coefficient for half-rate (e.g., Gen 4) to 0.5, and the coefficient for 1 / 4 rate (e.g., Gen 3) to 0.25; set the coefficient for the highest width (e.g., x16) to 1, the coefficient for half-width (x8) to 0.5, and the coefficient for 1 / 4 width (x4) to 0.25. The normalization calculation formula is: NBW = Rate coefficient × Width coefficient.

[0105] S22: Bandwidth Classification;

[0106] According to NBW, target ports are divided into 5 levels from high to low:

[0107] S level: NBW = 1.0;

[0108] Grade A: 0.5 ≤ NBW < 1.0;

[0109] Grade B: 0.25 ≤ NBW < 0.5;

[0110] Grade C: 0.1 ≤ NBW < 0.25;

[0111] Grade D: NBW < 0.1.

[0112] S23: Implement constraints and cross-level constraints for the number of shared VOQs;

[0113] Due to their extremely high data throughput, S-level ports must be exclusively used for VOQ and cannot be shared.

[0114] For Class A ports, a maximum of two Class A ports are allowed to share one VOQ.

[0115] For Class B ports, a maximum of 4 Class B ports are allowed to share 1 VOQ.

[0116] For Class C ports, a maximum of 8 Class C ports are allowed to share 1 VOQ.

[0117] For Class D ports, a maximum of 16 Class D ports are allowed to share 1 VOQ.

[0118] Cross-level sharing is prohibited: A-level ports cannot share VOQ with B-level or lower ports.

[0119] This constraint eliminates the HOL congestion problem caused by "high speed being dragged down by low speed" due to excessive bandwidth differences from the hardware architecture.

[0120] S3: Define the device protocol type according to the device function, and define the sharing of the target port to VOQ based on the device protocol type;

[0121] Based on device functionality, the CXL protocol defines three core protocol types (T1, T2, and T3). The message complexity varies depending on the type. T2 type devices are compatible with CXL.io, CXL.cache, and CXL.mem protocols simultaneously; T1 type devices are compatible with both CXL.io and CXL.cache protocols; and T3 type devices are compatible with both CXL.io and CXL.mem protocols. The mapping method is defined based on the CXL device type present on the port, as described in the following steps:

[0122] S31: T2 type devices need to be isolated independently, and the ports of T2 type devices should be forcibly assigned to dedicated VOQs;

[0123] When a CXL device in a directly connected slot to a target port is identified as a T2 type device (compatible with CXL.io, CXL.cache, and CXL.mem protocols), that target port exclusively uses the VOQ. This device is compatible with up to 15 CXL protocol transmission sub-channels, specifically including: P, NP, CPL, D2H Req, D2H Resp, D2H Data, H2D, H2D Resp, H2D Data, M2S Req, M2S RwD, M2S BIRsp, S2M NDR, S2M DRS, and S2M BISnp. These protocol sub-channels have inherent dependencies; if they are mixed with other types of devices in the queue, it can easily cause timing disorders and channel congestion between sub-channels. Therefore, ports of T2 type devices are forcibly assigned a dedicated VOQ.

[0124] S32: T1 type devices can only share VOQ with other T1 type devices;

[0125] When the device is a T1 type device (compatible with both CXL.io and CXL.cache protocols), the device is compatible with 9 CXL protocol transmission sub-channels, specifically including: P, NP, CPL, D2H Req, D2H Resp, D2H Data, H2D, H2D Resp, and H2D Data. This target port can only share VOQ with other T1 type devices, and the number of shared channels is constrained by step S2.

[0126] S33: T3 type devices can only share VOQ with other T3 type devices;

[0127] When the device is a T3 type device (compatible with both CXL.io and CXL.mem protocols), the device is compatible with 9 CXL protocol transmission sub-channels, specifically including: P, NP, CPL, M2S Req, M2S RwD, M2S BIRsp, S2M NDR, S2M DRS, and S2M BISnp. This target port can only share VOQ with other T3 type devices, and the number of shared channels is constrained by step S2.

[0128] In summary, different types of ports cannot share VOQ. Due to the asymmetry in the number of sub-channels and traffic characteristics of different types of ports, cross-sharing can easily lead to the blocking of packets of a certain type of unique channel by the sudden traffic of another type, causing a logical deadlock.

[0129] S4: During initialization, a separate multicast-dedicated VOQ set is forcibly allocated;

[0130] To prevent broadcast / multicast traffic from consuming excessive buffer space and starving unicast traffic during replication, the system, during initialization, forcibly allocates a dedicated set of multicast-only VOQs from the total number of VOQ resources, n. These multicast-only VOQs do not overlap with any unicast port's VOQs, thus ensuring unicast performance.

[0131] S5: By embedding a state machine, VOQ mapping is dynamically adjusted according to real-time indicators to achieve VOQ remapping. Real-time indicators include real-time traffic indicators and real-time congestion indicators. The triggering mechanisms for VOQ remapping include congestion, uneven traffic, resource reclamation, link degradation, and hot-plugging.

[0132] The specific operation of VOQ remapping includes: for VOQ[a] that meets the above conditions for triggering VOQ remapping, find an available VOQ[b] in the idle VOQ pool, remove the mapping relationship between the target port with the highest packet enqueue rate in VOQ[a] and VOQ[a], and then remap the target port to VOQ[b]. All subsequent CXL packets destined for the target port are written to VOQ[b] and no longer written to VOQ[a].

[0133] In chip design, the state machine is the core module for controlling sequential logic. A state machine is a sequential circuit composed of a finite number of states, state transition logic, and output logic. It uses clock signals to drive state transitions, coordinating the timing relationship between data flow and control signals, and managing the phased behavior of data flow and resource allocation. Implementing VOQ dynamic remapping through an embedded state machine utilizes the state machine to monitor network congestion in real time and automatically triggers a queue resource reallocation strategy based on preset conditions. The embedded state machine is integrated into the flow management module of the switching chip, adjacent to the VOQ queue controller.

[0134] During server operation, business traffic is dynamic and bursty, and CXL devices are subject to hot-swapping and link state transitions. This invention embeds a state machine in the hardware to dynamically adjust VOQ mapping based on real-time metrics.

[0135] The process of real-time traffic metric statistics includes the following steps:

[0136] S501: When a message arrives at the RX side, parse the destination port and VOQ number;

[0137] S502: Real-time sampling is performed based on a time window using a hardware counter. The hardware counter maintains three types of real-time traffic indicators for each VOQ: the hardware counter records the number of packets and the payload size flowing through the VOQ within a specified time window, and the state machine senses the real-time traffic indicators in the VOQ by reading the hardware counter.

[0138] Total enqueue rate: the sum of the packet write rates of all ports sharing this VOQ;

[0139] The independent inbound rate of each target port;

[0140] Traffic distribution uniformity: obtained by calculating the standard deviation of the rates of each port within the same VOQ;

[0141] S503: Update the VOQ status register.

[0142] The process of real-time congestion metric statistics includes the following steps:

[0143] S511: Real-time monitoring of VOQ queues;

[0144] S512: Through periodic sampling and event capture, the hardware maintains congestion status indicators for each VOQ simultaneously.

[0145] VOQ occupancy: The percentage of the current queue depth relative to the total allocated depth of this VOQ;

[0146] Back pressure frequency: The number of times downstream back pressure flow control is triggered per unit time;

[0147] Average queuing delay: The number of clock cycles a message resides in the VOQ;

[0148] S513: Update the VOQ congestion status register.

[0149] For congestion-triggered VOQ remapping, the triggering condition is persistent VOQ congestion. The congestion determination condition is when the occupancy rate of a certain VOQ exceeds a occupancy threshold (e.g., 85%, configurable by registers), and the duration exceeds a time threshold (also configurable by registers). This includes the following steps:

[0150] S521: Real-time monitoring of VOQ status;

[0151] S522: When the congestion determination condition is met, perform a split-and-remap operation; the split-and-remap operation is as follows:

[0152] S5221: Search for available VOQs in the idle VOQ pool;

[0153] S5222: Strip the target port with the highest enqueue rate in the congested VOQ;

[0154] S5223: Assign this port to a separate VOQ to complete the split and relieve the pressure on the original VOQ.

[0155] For VOQ remapping triggered by traffic imbalance, the triggering condition is severe traffic imbalance. The traffic imbalance determination condition is that among multiple ports sharing the same VOQ, the rate ratio of the highest-traffic port to the lowest-traffic port is greater than the balancing threshold (configurable by registers), and the duration exceeds a time threshold. This includes the following steps:

[0156] S531: Real-time monitoring of VOQ status;

[0157] S532: When the uneven flow determination condition is met, a split and remapping operation is performed; the split and remapping operation is as follows:

[0158] S5321: Strip the target port with the highest enqueue rate in the congested VOQ;

[0159] S5322: Remap the high-traffic port to a separate VOQ, or migrate it to a low-load VOQ with very low current occupancy;

[0160] S5323: Update the VOQ status register and restore flow balancing.

[0161] For resource reclamation to trigger VOQ remapping, the triggering condition is a prolonged period of low VOQ load. The resource reclamation determination condition is when the VOQ occupancy rate is less than an extremely low threshold (configurable by registers), and the duration exceeds a time threshold. This includes the following steps:

[0162] S541: Real-time monitoring of VOQ status;

[0163] S542: The resource recycling criteria are met; proceed with the merged recycling operation. The merged recycling operation is as follows:

[0164] S5421: Perform eligibility checks to determine if there are other low-load VOQs of the same layer, type, and bandwidth; if not, maintain the status quo, preserve the original mapping relationship, and do not reclaim the VOQ.

[0165] S5422: If it exists, merge the target port in the low-load VOQ into other low-load VOQs of the same level, type and bandwidth level;

[0166] S5423: Release the VOQ resource into the idle pool for use by high-load ports, and update the VOQ status register.

[0167] For VOQ remapping triggered by link degradation, the triggering condition is a sudden change in the port link rate and bandwidth reported by the CXL port physical layer (e.g., due to excessively high bit error rate, the port is reduced from G5 to G4, or from x16 to x8). This includes the following steps:

[0168] S551: Real-time monitoring of the physical layer status of the CXL port;

[0169] S552: The link degradation trigger condition is met, and a remapping operation is performed. The remapping operation includes the following steps:

[0170] S5521: Hardware-triggered interrupt, notifying background processing logic;

[0171] S5522: Recalculate the normalized bandwidth level of the port and reallocate a reasonable shared VOQ to prevent it from consuming too many resources.

[0172] When the downgraded normalized bandwidth needs to fall to a lower bandwidth level, it will be reallocated.

[0173] If the normalized bandwidth after degradation does not need to fall to a lower bandwidth level, then the mapping is maintained; if the normalized bandwidth level after degradation remains unchanged, then the mapping is maintained.

[0174] S5523: Update the physical port mapping table to prevent it from consuming too many resources after being downgraded.

[0175] For hot-plugging triggering VOQ remapping, the triggering condition is a port hot-plugging event (such as a new CXL device being inserted into the slot, or an existing device being forcibly removed). This includes the following steps:

[0176] S561: Real-time monitoring of the physical and interrupt status of the CXL slot;

[0177] S562: Hot-plug trigger condition met, execute remapping operation; remapping operation includes the following steps:

[0178] S5621: Perform change type determination and pause global traffic (temporary buffering) based on the newly added or reduced target port.

[0179] S5622: Re-execute the static allocation process from steps S1 to S4, and restore traffic after completing the global mapping table refresh.

[0180] In step S5, when performing the dynamic remapping operation, the hardware must follow a safe sequence of "pause-drain-update": first, pause the reception of incoming traffic on the affected port, drain the residual packets in the original VOQ, then update the VOQ mapping table, and finally resume reception. This ensures that there will be no packet out-of-order delivery or packet loss during the remapping process.

[0181] When performing the above dynamic remapping operation, the updated mapping rules need to be re-executed in steps S1-S4. All the above mapping relationships and state machine thresholds are implemented through the hardware configuration registers of each port within the CXL switching chip:

[0182] (1) The chip provides standard I2C, I3C and PCIe VDM (Vendor Defined Message) interfaces to the outside world;

[0183] (2) The server host or BMC can read monitoring indicators such as VOQ occupancy rate and blocking count in real time through these interfaces;

[0184] (3) The host can also write to the register to overwrite the automatic mapping result and achieve the highest level of manual tuning configuration.

[0185] Definitions of abbreviations and key terms in this technical solution:

[0186] CXL: Compute Express Link, an open industry-standard interconnect technology primarily used for high-bandwidth, low-latency connections between processors, memory extensions, and accelerators;

[0187] VOQ: Virtual Output Queue, a queue buffering mechanism implemented on the input side of a switching chip to separate packets destined for different ports.

[0188] HOL: Head of Line; (This likely refers to a situation where the head of the queue is blocked.)

[0189] RC: Root Complex, the root node device that interfaces the processor with the CXL / PCIe topology;

[0190] PCB: Printed Circuit Board;

[0191] POST: Power On Self Test, the initialization and hardware testing process performed by the BIOS or underlying firmware after the computer system is powered on;

[0192] BMC: Baseboard Management Controller;

[0193] Tx / Rx: Transmit / Receive, sending side / receiving side;

[0194] T1 / T2 / T3: Type 1, Type 2, and Type 3 devices, three types of devices defined in the CXL protocol. Type 1 mainly supports CXL.io and CXL.cache, Type 2 supports CXL.io, CXL.cache, and CXL.mem, and Type 3 supports CXL.io and CXL.mem.

[0195] S2M: Subordinate to Master, from memory to memory access initiator;

[0196] M2S: Master to Subordinate, from memory access initiator to memory;

[0197] D2H: Device to Host;

[0198] H2D: Host to Device;

[0199] NDR: No Data Response;

[0200] DRS: Data Response, a response carrying data;

[0201] RSP: Response;

[0202] REQ: Request;

[0203] RWD: Request with Data;

[0204] DATA: Data, listening data;

[0205] BISnp: Back-Invalidate Snoop;

[0206] BIRsp: Back-Invalidate Response;

[0207] SW: Switch, CXL switching chip;

[0208] EP: End Point, CXL terminal equipment.

Claims

1. A method for dynamic VOQ mapping of a CXL switching chip, comprising the following steps: S1: In a CXL switching chip with m physical ports, an initial mapping table is established during power-on self-test. Based on the role of the port in the CXL topology and the direction of traffic, the ports are divided into four fixed levels L0 / L1 / L2 / L3. Ports at different levels cannot share the same VOQ. S2: Calculate the normalized bandwidth NBW based on the current link establishment rate and width of each CXL switching chip port, and divide the destination ports of the CXL messages received by the source port into five levels from high to low according to the NBW, so as to realize the constraint on the number of VOQ sharing and cross-level constraint. S3: Based on the CXL device type defined by the CXL protocol and the CXL protocol types that the CXL device type is compatible with, define the sharing of the target port to VOQ based on the device protocol type; the CXL device types are divided into T1 / T2 / T3, T1 type devices are compatible with CXL.io and CXL.cache protocols; T2 type devices are compatible with CXL.io, CXL.cache, and CXL.mem protocols; T3 type devices are compatible with CXL.io and CXL.mem protocols; S4: During initialization, a separate multicast-dedicated VOQ set is forcibly allocated; S5: Dynamically adjust VOQ mapping based on real-time metrics to achieve VOQ remapping; real-time metrics include real-time traffic metrics and real-time congestion metrics; the triggering mechanisms for VOQ remapping include congestion, uneven traffic distribution, resource reclamation, link degradation, and hot-plugging. The specific operation of VOQ remapping includes: for VOQ[a] that meets the above conditions for triggering VOQ remapping, find an available VOQ[b] in the idle VOQ pool, remove the mapping relationship between the target port with the highest packet enqueue rate in VOQ[a] and VOQ[a], and then remap the target port to VOQ[b]. All subsequent CXL packets destined for the target port are written to VOQ[b] and no longer written to VOQ[a].

2. The VOQ dynamic mapping method for the CXL switching chip according to claim 1, characterized in that: In step S1, the four fixed levels are as follows: As the root layer, L0 is the port that connects to the RC node. The traffic direction of this layer is defined as uplink traffic, that is, from the CXL device to the root node. L0 has an exclusive principle. Any traffic sent to L0 port must exclusively occupy one or more VOQs and no other port is allowed to share VOQs with this path. Layer L1 serves as the uplink layer, connecting upwards to the ports of the cascaded CXL switching chip above it, with the traffic direction also being uplink. The L2 layer acts as the downlink layer, connecting to the ports of the next-level terminal devices. The traffic direction is downlink, from the root node to the CXL device. After removing the number of VOQs exclusively occupied by L0 layer, the remaining VOQ resources are allocated equally or proportionally among the layers according to the port ratio occupied by L1, L2, and L3. Layer 3 is a peer-to-peer layer, meaning it connects horizontally to ports of the same level CXL switching chip, and the traffic direction is bidirectional. Layer 3 enjoys the principle of peer isolation, and Layer 3 ports cannot be mapped to the same VOQ.

3. The VOQ dynamic mapping method for the CXL switching chip according to claim 1, characterized in that: In step S2, the normalized bandwidth is calculated based on the current link establishment rate and width of each CXL switching chip port. The normalization calculation formula is: NBW = rate coefficient × width coefficient.

4. The VOQ dynamic mapping method for the CXL switching chip according to claim 1, characterized in that: In step S2, based on NBW, the bandwidth level of the target port is divided into 5 levels from high to low: S level: NBW = 1.0; Grade A: 0.5 ≤ NBW < 1.0; Grade B: 0.25 ≤ NBW < 0.5; Grade C: 0.1 ≤ NBW < 0.25; Grade D: NBW < 0.

1.

5. The VOQ dynamic mapping method for the CXL switching chip according to claim 1, characterized in that: In step S3, the CXL protocol defines three protocol types—T1, T2, and T3—based on device functionality. T2 type devices are compatible with CXL.io, CXL.cache, and CXL.mem protocols simultaneously; T1 type devices are compatible with both CXL.io and CXL.cache protocols; and T3 type devices are compatible with both CXL.io and CXL.mem protocols. A mapping method is defined based on the CXL device type present on the port, as described in the following steps: S31: T2 type devices need to be isolated independently, and the ports of T2 type devices should be forcibly assigned to dedicated VOQs; S32: T1 type devices can only share VOQ with other T1 type devices; S33: T3 type devices can only share VOQ with other T3 type devices.

6. The VOQ dynamic mapping method for the CXL switching chip according to claim 1, characterized in that: Step S5, the process for real-time traffic metric statistics, includes the following steps: S501: When a message arrives at the RX side, parse the destination port and VOQ number; S502: The hardware counter samples in real time based on a time window. The hardware counter maintains three types of real-time traffic metrics for each VOQ: Total enqueue rate: the sum of the packet write rates of all ports sharing this VOQ; The independent inbound rate of each target port; Traffic distribution uniformity: obtained by calculating the standard deviation of the rates of each port within the same VOQ; S503: Update the VOQ status register; The process of real-time congestion metric statistics includes the following steps: S511: Real-time monitoring of VOQ queues; S512: Through periodic sampling and event capture, the hardware maintains congestion status indicators for each VOQ simultaneously. VOQ occupancy: The percentage of the current queue depth relative to the total allocated depth of this VOQ; Back pressure frequency: The number of times downstream back pressure flow control is triggered per unit time; Average queuing delay: The number of clock cycles a message resides in the VOQ; S513: Update the VOQ congestion status register.

7. The VOQ dynamic mapping method for the CXL switching chip according to claim 1, characterized in that: In step S5, the congestion-triggered VOQ remapping is triggered when the VOQ is continuously congested, and the congestion determination condition is when the occupancy rate of a certain VOQ is greater than the occupancy rate threshold and the duration exceeds the time threshold. For VOQ remapping triggered by uneven traffic, the triggering condition is severe traffic imbalance. The condition for determining uneven traffic is that among multiple ports sharing the same VOQ, the ratio of the highest traffic port to the lowest traffic port is greater than the balancing threshold, and the duration exceeds the time threshold. For resource reclamation triggering VOQ remapping, the triggering condition is that the VOQ has a long-term low load. The resource reclamation judgment condition is when the occupancy rate of a certain VOQ is less than the extremely low threshold and the duration exceeds the time threshold.

8. The VOQ dynamic mapping method for the CXL switching chip according to claim 1, characterized in that: In step S5, the triggering condition for VOQ remapping triggered by link degradation is a sudden change in the port link rate and bandwidth reported by the physical layer of the CXL port. For hot-plugging to trigger VOQ remapping, the triggering condition is the occurrence of a port hot-plug event.

9. The VOQ dynamic mapping method for the CXL switching chip according to claim 4, characterized in that: For S-level ports, VOQ must be exclusively used and sharing is prohibited; For Class A ports, a maximum of two Class A ports are allowed to share one VOQ. For Class B ports, a maximum of 4 Class B ports are allowed to share 1 VOQ; For Class C ports, a maximum of 8 Class C ports are allowed to share 1 VOQ; For Class D ports, a maximum of 16 Class D ports are allowed to share 1 VOQ; Cross-level sharing is prohibited: A-level ports cannot share VOQ with B-level or lower ports.

10. The VOQ dynamic mapping method for the CXL switching chip according to claim 1, characterized in that: In step S4, during system initialization, a separate set of dedicated multicast VOQs is forcibly allocated from the total number of VOQ resources n. These dedicated multicast VOQs do not overlap with any VOQs on unicast ports.

Citation Information

Patent Citations

  • A queue scheduling method and apparatus

    CN113179226B

  • Method and system for avoiding blockage of switch chip broadcast packet queue head

    CN115473862A

  • Methods and systems for avoiding head-of-line blocking of multicast packets in switching chips

    CN115473862B

  • Method for switching data and structure for switching data

    US20120106564A1