CXL Switch's Port Partitioning and Isolation Control Method Based on Virtual Level (VL)

CN122601618BActive Publication Date: 2026-11-03BEIJING HUSHENG HOLDING GROUP CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610982749.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-02
Publication Date
2026-11-03
Estimated Expiration
2046-07-02

AI Technical Summary

Technical Problem

The existing CXL switch port partitioning and isolation control scheme relies on external management entities, resulting in slow fault recovery, coarse port isolation granularity, and high port migration latency, making it difficult to meet the high availability and dynamic load balancing requirements of mission-critical scenarios.

Method used

By establishing a hierarchical mapping table in the CXL switch, dynamically updating the binding relationship between physical ports and virtual switch instances, configuring isolation domain identifiers, and employing a port autonomous migration state machine and a discrete hysteresis integrator, atomicity and fine-grained isolation of port migration are achieved, reducing dependence on external management entities.

Benefits of technology

It significantly reduces port migration latency from milliseconds to microseconds, improving system availability and fault recovery speed, achieving fine-grained traffic isolation and elastic scaling capabilities, and enhancing the system's high availability and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122601618B_ABST
    Figure CN122601618B_ABST
Patent Text Reader

Abstract

The application discloses a port partition and isolation control method based on a virtual level (VL) in a CXL switch. The CXL switch obtains port state and configuration information, establishes and maintains a hierarchical mapping table associated with physical ports, virtual ports and virtual switch instances. In response to a port migration request, a fast binding instruction is executed to dynamically update the binding relationship of the physical port to the target virtual switch instance in the hierarchical mapping table. An isolation domain identifier is configured for the port under the virtual switch instance, and in the CXL data packet forwarding process, the atomic execution of the port migration is controlled based on the preset migration trigger condition and the port autonomous migration state machine according to the isolation domain identifier encapsulated in the data packet. The hierarchical mapping table and the fast binding instruction reduce the port migration delay, the isolation domain identifier realizes the port-level fine-grained isolation, the port autonomous migration state machine guarantees the migration atomicity and the rollback ability, and the system availability and the elastic expansion capability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a port partitioning and isolation control method based on virtual hierarchy (VL) within a CXL switch, and particularly relates to the fields of computer interconnection and data center architecture technology. Background Technology

[0002] CXL (ComputeExpressLink), as an emerging high-speed interconnect protocol, is rapidly becoming the mainstream standard for interconnecting CPUs, accelerators, and memory pools in data centers. CXL switches, as the core switching devices in a CXL network, achieve logical isolation internally through the VirtualCXLSwitch mechanism. This involves dividing the network into multiple VCS instances, each with independent virtual downstream ports, virtual upstream ports, and virtual PCIe bridges, thereby achieving resource and traffic isolation between different VCSs. However, existing CXL switch port partitioning and isolation control schemes primarily rely on FabricManager for dynamic orchestration, which suffers from configuration dependence on external management entities and long fault recovery times. For example, when FM fails or communication is interrupted, the port partitioning configuration of the entire switch cannot be changed, making it difficult to meet the high availability requirements of mission-critical scenarios. Furthermore, existing VCSs use the entire virtual switch as the smallest isolation unit, with all ports within the same VCS sharing the same resource pool and access permissions. In scenarios where multiple tenants share the same physical port, fine-grained isolation between different ports within the same VCS cannot be achieved, posing risks of data leakage and resource contention. Furthermore, when physical ports need to be migrated between different VCSs, existing solutions require a complex FM orchestration process, resulting in port migration delays typically exceeding milliseconds. This makes it difficult to support dynamic load balancing and rapid failover scenarios, and there is a structural contradiction between static initialization and dynamic elastic scaling. Summary of the Invention

[0003] This invention provides a port partitioning and isolation control method based on Virtual Level (VL) within a CXL Switch, which overcomes the shortcomings of existing CXL switch port partitioning and isolation control, such as slow fault recovery due to reliance on external management entities, coarse port isolation granularity, and high port migration latency.

[0004] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0005] This invention discloses a port partitioning and isolation control method based on Virtual Level (VL) within a CXL Switch, comprising: the CXL switch acquiring port status and configuration information; based on the port status and configuration information, the CXL switch establishing and maintaining a hierarchical mapping table, the hierarchical mapping table being used to associate physical ports, virtual ports, and virtual switch instances; based on the hierarchical mapping table, the CXL switch responding to a port migration request by executing a fast binding instruction to dynamically update the binding relationship between physical ports and target virtual switch instances in the hierarchical mapping table; the CXL switch configuring isolation domain identifiers for ports under the virtual switch instances, and during CXL packet forwarding, verifying whether the communication between the source port and the destination port meets a preset isolation policy based on the isolation domain identifier encapsulated in the CXL packet; based on preset migration trigger conditions and a port autonomous migration state machine, the CXL switch controlling the atomic execution process of the port migration; and based on the updated hierarchical mapping table and the verified isolation policy, the CXL switch executing the forwarding of CXL packets between ports.

[0006] Furthermore, the hierarchical mapping table comprises three layers: a physical port mapping layer, which stores the mapping relationship between physical port identifiers and virtual port handles; a virtual port-VCS attribution layer, which stores the attribution relationship between the virtual port handle and the virtual switch instance identifier; and an isolation policy layer, which stores the association relationship between the virtual switch instance identifier and the isolation policy set.

[0007] Furthermore, the execution of the fast binding instruction includes: atomically updating the corresponding entries of the physical port mapping layer and the virtual port-VCS home layer in the hierarchical mapping table.

[0008] Furthermore, the isolation domain identifier is a 16-bit virtual hierarchical isolation domain identifier, which is encapsulated in the reserved field of the CXL transaction layer data packet in the form of a label; the verification includes: comparing whether the virtual hierarchical isolation domain identifiers associated with the source port and the destination port match the isolation policy.

[0009] Furthermore, the port autonomous migration state machine includes an initial state, a migration request state, a migration preparation state, and a migration commit state; the atomic execution process of controlling the port migration includes the transition of the state machine between the above states.

[0010] Furthermore, the port autonomous migration state machine employs a two-phase commit protocol to ensure the atomicity of the port migration.

[0011] Furthermore, the port autonomous migration state machine determines whether to trigger a migration request based on the output of the discrete hysteresis integrator; the discrete hysteresis integrator adjusts the offset of the migration trigger index for each sampling period. ,according to Multiply by a coefficient , Multiply by a coefficient The asymmetric cumulative integral is performed in a manner that... Greater than .

[0012] Furthermore, the integral value of the discrete hysteresis integrator The iterative formula is: ;when When, a migration request is triggered; when When, the integral value is cleared to zero. And maintain the initial state.

[0013] Furthermore, the migration triggering condition is implemented by comparing it with a dynamic threshold; the dynamic threshold The exponentially weighted moving average of the current migration metric Plus Double its weighted root mean square Calculated, i.e. .

[0014] Furthermore, the exponentially weighted moving average and exponentially weighted variance The recursive calculation formula is: , ,in, For the first Migration metrics for each sampling period This is the attenuation factor.

[0015] Furthermore, the update of the hierarchical mapping table adopts an event-driven model, including: calculating the port feature state vector for each sampling period. Compared to the previous cycle Change ;when At that time, As a difference entry, it is written into the update log of the hierarchical mapping table, where This is the preset accuracy threshold.

[0016] Furthermore, the amount of change The calculation method is as follows ,in The feature state vector The One component; when the average change over multiple consecutive sampling periods is below the low activity threshold. When the sampling interval is reached, it will automatically increase.

[0017] Furthermore, the method also includes: periodically collecting the timestamp of the most recent migration event recorded by the source virtual switch instance and the target virtual switch instance for the same port; and triggering a forced synchronization process based on the timestamp.

[0018] Furthermore, the process of triggering forced synchronization includes: calculating the average value of the timestamp difference between the source virtual switch instance and the target virtual switch instance within a sliding window. ;when At that time, the hierarchical mapping table is updated according to the one with the newer timestamp, wherein This is the fault tolerance threshold.

[0019] Furthermore, the CXL switch sets up a local snapshot register group within the physical port module. The local snapshot register group stores the virtual switch instance identifier and isolation domain identifier currently bound to the port. When the corresponding entry in the hierarchical mapping table is updated, the updated data is broadcast to the local snapshot register group of the corresponding port through synchronization logic.

[0020] This application provides a CXL switch port control device, comprising: a status acquisition module configured to acquire port status and configuration information of a CXL switch; a mapping table management module configured to establish and maintain a hierarchical mapping table based on the port status and configuration information, wherein the hierarchical mapping table is used to associate physical ports, virtual ports, and virtual switch instances; a fast binding execution module configured to execute a fast binding instruction based on the hierarchical mapping table in response to a port migration request, so as to dynamically update the binding relationship between physical ports and target virtual switch instances in the hierarchical mapping table; an isolation domain control module configured to configure isolation domain identifiers for ports under the virtual switch instance, and during CXL packet forwarding, verify whether the communication between the source port and the destination port meets a preset isolation policy based on the isolation domain identifier encapsulated in the CXL packet; a migration state machine module configured to control the atomic execution process of port migration based on preset migration trigger conditions and a port autonomous migration state machine; and a data forwarding module configured to execute the forwarding of CXL packets between ports based on the updated hierarchical mapping table and the verified isolation policy.

[0021] This application provides a CXL switching chip, including the aforementioned CXL switch port control device.

[0022] This application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a port partitioning and isolation control method based on virtual hierarchy (VL) within a CXL switch.

[0023] This application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a port partitioning and isolation control method based on virtual hierarchy (VL) within a CXL switch.

[0024] The beneficial effects achieved by this invention are as follows: By establishing and maintaining a hierarchical mapping table for associating physical ports, virtual ports, and virtual switch instances, and by executing a fast binding command in response to port migration requests to dynamically update the binding relationship between physical ports and target virtual switch instances in the hierarchical mapping table, port migration between different virtual switch instances can be achieved by updating only the mapping table entries. This eliminates the need to restart the entire virtual switch instance or rely on external management entities to complete complex orchestration processes, thereby significantly reducing port migration latency from milliseconds to microseconds. Furthermore, it enables basic port partitioning through static pre-configuration in the event of external management entity failure, significantly improving system availability and fault recovery speed. By configuring isolation domain identifiers for ports under virtual switch instances and verifying whether communication meets the preset isolation policy based on the isolation domain identifier encapsulated in the data packet during CXL packet forwarding, fine-grained traffic isolation between different ports within the same virtual switch instance is achieved, avoiding the risks of data leakage and resource contention when multiple tenants share ports. By controlling the atomic execution of port migration based on preset migration trigger conditions and a port autonomous migration state machine, physical ports can autonomously complete the migration without the full involvement of external management entities, ensuring the atomicity and rollback of the migration process and enhancing the system's elastic scalability and high availability. Furthermore, by introducing a discrete hysteresis integrator, the offset over multiple consecutive sampling periods is accumulated and integrated with asymmetric hysteresis, fundamentally suppressing frequent triggering and rollback of migration requests caused by instantaneous load fluctuations, thus enhancing the robustness of the migration state machine. By employing a dynamic threshold based on exponentially weighted moving average and sliding variance, the migration trigger conditions can adaptively scale according to the historical statistical characteristics of port load. In high-fluctuation environments, the threshold is automatically relaxed to avoid false triggers, while in low-fluctuation environments, the threshold is tightened for timely response, improving the intelligence of migration decisions. By using event-driven and incremental differential update modes to update the hierarchical mapping table, computational overhead is significantly reduced during the port state stabilization phase, while maintaining rapid response during state abrupt changes, optimizing the computing power utilization and real-time mapping performance of the switching chip. Attached Figure Description

[0025] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0026] Figure 1 This is a flowchart of the present invention. Detailed Implementation

[0027] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0028] Example 1

[0029] This invention is mainly applied to CXL high-speed interconnect switches in scenarios such as cloud computing data centers, AI computing power clusters, and heterogeneous computing resource pooling, aiming to optimize the control logic of port partitioning, isolation, and migration.

[0030] Before describing the specific solution of this invention, the core technical terms involved in the claims will first be explained:

[0031] Hierarchical mapping table: A data structure built inside the CXL switch to hierarchically associate "physical ports," "virtual ports," and "virtual switch instances." Its purpose is to provide the core mapping relationship query and update foundation for port partitioning, isolation, and migration.

[0032] Virtual switch instance: refers to a logically isolated virtual switching unit partitioned within a CXL physical switch using virtualization technology. Each instance has its own independent ports and resource views. In this application, it corresponds to the concept of VirtualCXLSwitch (VCS) in the CXL protocol.

[0033] Isolation Domain Identifier: An identifier assigned to a port to mark the isolation domain from which traffic originates in CXL packets. Based on a predefined isolation policy, this identifier is used for checksum verification to determine whether a packet is allowed to be forwarded between the source and destination ports.

[0034] Port Autonomous Migration State Machine: A logical state model used to control the migration process of physical ports between different virtual switch instances. It defines a series of states (such as initial state, migration request state, etc.) and the transition conditions and actions between states to complete the migration process atomically and autonomously, reducing dependence on external management entities.

[0035] Quick Binding Command: A specific command executed by the CXL switch. Its core function is to atomically update specific entries in the hierarchical mapping table (mainly the binding relationship between physical ports and virtual switch instances), thereby achieving a quick switch of port ownership.

[0036] like Figure 1 As shown, this application provides a port partitioning and isolation control method based on Virtual Level (VL) within a CXL Switch, including steps S101 to S106:

[0037] S101: This CXL switch obtains port status and configuration information;

[0038] S102: Based on port status and configuration information, the CXL switch establishes and maintains a hierarchical mapping table, which is used to associate physical ports, virtual ports and virtual switch instances;

[0039] S103: Based on the hierarchical mapping table, the CXL switch responds to a port migration request by executing a fast binding command to dynamically update the binding relationship between physical ports and target virtual switch instances in the hierarchical mapping table;

[0040] S104: The CXL switch configures isolation domain identifiers for ports under the virtual switch instance, and during the CXL packet forwarding process, verifies whether the communication between the source port and the destination port meets the preset isolation policy based on the isolation domain identifier encapsulated in the CXL packet.

[0041] S105: Based on preset migration trigger conditions and port autonomous migration state machine, the CXL switch controls the atomic execution process of port migration;

[0042] S106: Based on the updated hierarchical mapping table and the verified isolation policy, the CXL switch performs CXL packet forwarding between ports.

[0043] In this embodiment, the above steps work together to solve the problems of strong dependency on FabricManager (slow recovery), coarse-grained isolation within the VCS, and high port migration latency in existing technologies. Specifically, S102 and S103 constitute the core of dynamic mapping, enabling port migration without rebuilding the entire VCS. S104, based on the migration in S103, ensures fine-grained access control, achieving logical isolation of data flows within the VCS. S105 utilizes a state machine to enable the data update and policy verification processes upon which S103 and S104 depend to be executed automatically and atomically. Ultimately, through the synergy of these steps, a comprehensive technical effect of low-latency port migration, fine-grained security isolation, and highly available elastic scaling is achieved.

[0044] Take a specific application scenario of a multi-tenant AI computing cluster as an example. Assume that a physical port Port-A of a CXL switch is initially bound to VCS-1, serving tenant A's AI training task. S101 continuously acquires the status information of Port-A. The hierarchical mapping table established in S102 records the association between Port-A and VCS-1. When tenant B's inference task starts and requires more port resources, the load balancing service may issue a port migration request. The port autonomous migration state machine in S105 detects the trigger condition and controls the migration process. S103 executes a fast binding instruction, atomically updating the mapping entries in the hierarchical mapping table, rebinding Port-A to the target VCS-2. During the migration, S104 configures the VHID-B identifier for Port-A and encapsulates it with the data; at the same time, the isolation policy of Port-A in VCS-1 before the migration may still be partially retained after its migration to VCS-2, ensuring policy inheritance. Ultimately, based on the updated mapping, S106 ensures that AI inference traffic belonging to tenant B is correctly and securely forwarded to other ports within the same domain via Port-A within the VHID-B isolation domain, without accessing tenant A's resources. The entire migration process is completed in microseconds, without requiring full intervention from FabricManager.

[0045] In one embodiment, the aforementioned hierarchical mapping table comprises three layers: a physical port mapping layer, storing the mapping relationship between physical port identifiers and virtual port handles; a virtual port-VCS attribution layer, storing the attribution relationship between virtual port handles and virtual switch instance identifiers; and an isolation policy layer, storing the association relationship between virtual switch instance identifiers and isolation policy sets. This hierarchical design decouples the binding of physical ports to virtual switch instances into two mapping layers and stores isolation policies independently, ensuring that dynamic updates of port binding relationships (mainly at L0 and L1 layers) do not affect static or relatively stable isolation policies (L2 layer). Furthermore, based on the above principles, this three-layer structure enables the updating of port attribution without loading and verifying complex isolation rules, thereby effectively reducing the execution overhead and latency of fast binding commands and improving the speed of port migration.

[0046] In one embodiment, step S103 of executing the fast binding instruction mentioned above specifically includes: atomically updating the corresponding entries of the physical port mapping layer and the virtual port-VCS ownership layer in the hierarchical mapping table. This means that the core operation of the fast binding instruction is to update two or more associated records in the L0 layer (physical port identifier to virtual port handle) and the L1 layer (virtual port handle to VCSID). Since the isolation policy layer is relatively independent, its content is usually determined by static configuration or slow policy synchronization. Therefore, the scope of this atomic update operation can be limited to the first two layers, thereby ensuring the simplicity and low latency of the update process. Furthermore, based on the above principles, this method can guarantee the atomic completion of port migration operations, and only involves a small number of table entries during the update process, ensuring the determinism of migration latency (e.g., at the microsecond level), while reducing the risk of mapping table state chaos due to operation failure.

[0047] In one embodiment, or in other embodiments, regarding the isolation domain identifier and verification step S104 mentioned above, the isolation domain identifier is a 16-bit Virtual Hierarchical Isolation Domain Identifier (VHID), encapsulated as a tag in a reserved field of the CXL transaction layer data packet; the verification includes comparing whether the virtual hierarchical isolation domain identifiers associated with the source port and the destination port match the isolation policy. For example, the isolation policy may stipulate that ports within the same VHID are allowed to communicate, while ports with different VHIDs are denied communication. When forwarding data packets, the CXL switch not only routes according to the traditional VCS affiliation but also extracts the VHID tag from the data packet and compares it with the VHID configured for the destination port. Furthermore, based on the above principles, this method can achieve fine-grained control over traffic within the same Virtual Switch Instance (VCS). In traditional technology, traffic within a VCS is interconnected by default, but with the introduction of VHID, port-based isolation can be achieved, thereby supporting the division of multiple logical tenant domains within the same VCS, effectively avoiding data leakage and multi-tenant resource contention problems caused by coarse isolation.

[0048] In one embodiment, the aforementioned port autonomous migration state machine includes an initial state (INIT), a migration request state (MIGRATE_REQUEST), a migration prepare state (MIGRATE_PREPARE), and a migration commit state (MIGRATE_COMMIT). The atomic execution process controlling port migration includes the transitions between these states. The state machine runs stably in the INIT state, enters the MIGRATE_REQUEST state when the migration trigger condition is met, then negotiates and prepares resources through the MIGRATE_PREPARE state, and finally completes the atomic switch of the mapping relationship in the MIGRATE_COMMIT state. This entire state transition logic enables the port to autonomously manage its migration lifecycle. Furthermore, based on the above principles, this approach standardizes and automates the port migration process, reduces real-time dependence on the external FabricManager, and allows basic migration operations to be completed even when the FM fails, significantly improving the system's robustness and elastic scalability in distributed management scenarios.

[0049] In one embodiment, the port autonomous migration state machine mentioned above employs a two-phase commit protocol to ensure the atomicity of port migration. This protocol divides the migration into a PREPARE phase and a COMMIT phase. During the PREPARE phase, the port initiating the migration negotiates with the target virtual switch instance and reserves necessary resources (such as queue resources), but maintains the current mapping relationship unchanged. Only after receiving confirmation from the target does it enter the COMMIT phase, atomically updating the hierarchical mapping table and completing the port ownership switch. If the PREPARE phase fails, it rolls back to the initial state and releases the reserved resources. Furthermore, based on the above principles, the two-phase commit protocol effectively prevents a partially completed state where the source has released resources but the target has not yet received them, in cases of insufficient resources or negotiation failure. This ensures that the entire migration operation either succeeds completely or rolls back completely, guaranteeing system state consistency and improving system reliability in high-concurrency migration scenarios.

[0050] In one embodiment, or in other embodiments, for the aforementioned port autonomous migration state machine, the port autonomous migration state machine determines whether to trigger a migration request based on the output of the discrete hysteresis integrator; the offset of the migration trigger index for each sampling period by the discrete hysteresis integrator. ,according to Multiply by a coefficient , Multiply by a coefficient The asymmetric cumulative integral is performed in a manner that... Greater than This essentially assigns different integral weights to positive deviations (load increase) and negative deviations (load decrease), making it easier for the system to accumulate positive integrals to trigger migrations, and less likely to clear integrals and rollback due to brief negative fluctuations, thus suppressing frequent migration requests and rollbacks. Furthermore, combining the above principles, this approach can filter out instantaneous spikes, smooth load fluctuations, and reduce invalid state transitions in the migration state machine due to critical jitter, significantly improving the stability and robustness of migration triggering decisions and avoiding the additional overhead caused by system oscillations near thresholds. As a specific implementation method, the migration triggering metric can be port traffic utilization. Its offset Calculated as Where B is the baseline utilization rate; asymmetric hysteresis coefficient It can take the value 0.8. The value can be 0.2 to reflect the characteristic of "easy to trigger, difficult to release".

[0051] In one embodiment, for the aforementioned discrete hysteresis integrator, the integral value of the discrete hysteresis integrator... The iterative formula is: ;when When, a migration request is triggered; when When that happens, the integral value is reset to zero. And maintain the initial state. This formula explicitly defines the specific mathematical logic for integral accumulation and triggering. The integration process continuously reflects the "historical cumulative effect" of load deviation, rather than a single-point judgment. Positive threshold. To prevent migration triggered by minor perturbations; negative threshold. (Usually set to 0 or a negative value) provides a clear condition for zeroing the integral. Furthermore, combining the above principles, this integral model with hysteresis and upper / lower limits can effectively distinguish between normal fluctuations and persistent abnormal trends, ensuring that migration is only initiated when the load remains persistently high to a certain level, and that the migration tendency is cleared only after the load decreases and stabilizes. This provides the system with a more intelligent and robust load awareness capability, optimizing the selection of migration timing. As a specific implementation method, You can set a maximum points limit. 80%, for example when hour, ; It can be set to 0. (Integral value) The scope can be limited to Between, such as .

[0052] In one embodiment, regarding the aforementioned migration triggering condition, the migration triggering condition is determined by a dynamic threshold. Comparison implementation; this dynamic threshold The exponentially weighted moving average of the current migration metric Plus Double its weighted root mean square Calculated, i.e. Here This reflects the standard deviation of the indicator's fluctuation. According to statistical principles, the dynamic threshold... In fact, it is "mean + The standard deviation is expressed as "multiple standard deviations," which can adaptively adjust based on the port's historical load statistics. In high-fluctuation scenarios, the standard deviation... Larger The standard deviation is subsequently relaxed to avoid misjudging normal fluctuations as abnormal; in low-volatility scenarios, the standard deviation is smaller. The threshold is tightened, making it more sensitive to subtle changes deviating from the mean. Furthermore, based on the above principles, this dynamic threshold enables adaptive optimization of the migration trigger criterion, avoiding the tedious parameter tuning required for different ports and business modes when using a fixed threshold. This improves the migration state machine's adaptability to environmental changes and its intelligent decision-making level.

[0053] In one embodiment, the exponentially weighted moving average is used for the aforementioned dynamic threshold. and exponentially weighted variance The recursive calculation formula is: , ,in, For the first Migration metrics for each sampling period This is the decay factor. Exponential weighting, compared to a simple arithmetic mean, assigns higher weight to recent data, making... and It can respond more quickly to trend changes in indicators, such as a slow increase or decrease in load. Smaller This makes historical data have a lasting impact, and the estimation is smooth but slow to respond; larger... This makes it sensitive to the latest data and quick to respond, but the estimates may fluctuate greatly. Furthermore, combining the above principles, this recursive calculation method can achieve extremely low computational and storage overhead (only requiring the storage of the previous period's data). and Real-time maintenance of historical statistical characteristics of migration metrics provides an efficient statistical basis for generating dynamic thresholds, making it particularly suitable for implementation in resource-constrained switching chip logic. As a specific implementation method, migration metrics... This could be port queuing depth; attenuation factor. The value can be 0.1, which is the threshold multiplier. The possible value is 3.

[0054] In one embodiment, or in other embodiments, the hierarchical mapping table mentioned above is updated using an event-driven model, including: calculating the port feature state vector for each sampling period. Compared to the previous cycle Change ;when At that time, This is written as a difference entry to the update log of the hierarchical mapping table, where This method uses a preset precision threshold. It abandons the traditional fixed-period full write or polling, and only performs writes when the port's critical status (such as bandwidth utilization, error count, VHID tag, etc.) undergoes a "significant" change (i.e., ...). Only when the port state is stable will the update of the relevant entries in the hierarchical mapping table be triggered. Furthermore, based on the above principles, this event-driven model avoids a large number of meaningless repeated write operations to the hierarchical mapping table during the stable port state phase, thus significantly reducing the resource overhead of computing, storage, and bus bandwidth, while still ensuring timely data synchronization during state changes, optimizing the overall energy efficiency and performance of the system. As a specific implementation method, the feature state vector... The components may include port bandwidth utilization, error count, current VHID tag, etc.; changes It can be calculated by summing the absolute values ​​of the differences between the components, i.e. .

[0055] In one embodiment, regarding the aforementioned event-driven pattern and variables... The change The calculation method is as follows ,in This is the feature state vector The One component; when the average change over multiple consecutive sampling periods is below the low activity threshold. When the sampling interval is increased, the sampling interval is automatically increased. This calculation based on the Manhattan distance (L1 norm) is simple and efficient. With the introduction of an adaptive sampling interval adjustment mechanism, when a port is in a stable, low-activity state for a long period, the system can automatically reduce the sampling frequency (e.g., from 10ms to 100ms), further reducing computation and power consumption. When an increase in change or an update event is detected, the sampling frequency is restored to a higher frequency. Furthermore, combining the above principles, this adaptive sampling interval adjustment mechanism can achieve dynamic optimization of the system monitoring granularity. While ensuring rapid response to sudden state changes, it minimizes unnecessary monitoring overhead during stable periods, making it particularly suitable for scenarios with a large number of ports and most ports in idle or stable load conditions, thus improving the energy efficiency of the switching chip. As a specific implementation method, a low-activity threshold... It can be set to 0.001; the system can define the basic sampling interval. sparse sampling interval It dynamically switches based on the average change of the sliding window (e.g., 64 periods).

[0056] In one embodiment, for the aforementioned port migration, this method further includes a process to resolve state inconsistencies caused by asymmetric faults. Specifically, this involves periodically collecting the timestamp of the furthest migration event recorded by both the source and target virtual switch instances for the same port; and triggering a forced synchronization process based on this timestamp. While the atomicity of the migration process is guaranteed to the best of our ability, ACK loss or target response timeouts in the network can lead to the source VCS rolling back while the target VCS retains a "ghost state" of reserved resources, causing resource leakage. A post-hoc comparison mechanism based on timestamp differences can detect this inconsistency. Theoretically, the timestamps recorded by the source and target VCS for the same port migration event should be close. If the difference between them remains large due to asynchronous faults, it indicates a potential state divergence. Furthermore, combining the above principles, this post-hoc consistency self-healing method provides a fallback guarantee when the forward atomicity protocol fails. Through periodic state consistency checks and repairs, it automatically reclaims "ghost resources," ensuring the eventual consistency of the hierarchical mapping table and the VCS resource view, thereby enhancing the system's fault tolerance and long-term operational stability in unreliable network environments.

[0057] In one embodiment, for the aforementioned forced synchronization process, triggering the forced synchronization process includes: calculating the average of the timestamp differences between the source virtual switch instance and the target virtual switch instance within a sliding window. ;when At that time, the hierarchical mapping table is updated based on the more recent timestamp, where This is the fault tolerance threshold. This step provides a quantitative assessment and repair strategy for inconsistencies. Calculate the sliding window average. This is to smooth out occasional jitter in a single sampling. "Based on the newest timestamp" is a simple and effective conflict resolution rule, generally assuming that the party recording the newest timestamp is more likely to hold information closer to the latest and correct state (e.g., the party that successfully received but did not acknowledge). Furthermore, combining the above principles, this forced synchronization strategy based on statistical mean judgment and timestamp comparison can achieve automatic detection and intervention-free repair of residual inconsistent states after migration with low overhead, avoiding systemic resource exhaustion or strategy errors caused by the accumulation of inconsistent states, and ensuring the long-term health of the system in large-scale distributed port migration scenarios. As a specific implementation method, the sliding window size... A value of 4 to 8 can be used as the fault tolerance threshold. It can be determined based on network round-trip latency and processing latency, for example, set to 14 microseconds.

[0058] In one embodiment, for the aforementioned CXL switch, the CXL switch sets up a local snapshot register group within the physical port module. This local snapshot register group stores the virtual switch instance identifier and isolation domain identifier currently bound to the port. When the corresponding entry in the hierarchical mapping table is updated, the update data is broadcast to the local snapshot register group of the corresponding port through synchronization logic. This local snapshot register group (LSRS) serves as a local, fast-access copy of the global data of the hierarchical mapping table in main memory (such as SRAM). When a port needs to query its own VCS and VHID for packet forwarding, it can directly read the local LSRS (completed in a single cycle) without accessing the high-latency global hierarchical mapping table. When the hierarchical mapping table is updated by a fast binding instruction or configuration, the synchronization logic broadcasts the new mapping relationship to the LSRS of the relevant port to maintain data consistency. Furthermore, based on the above principles, this method of setting up a local snapshot register group can reduce the latency of the most frequent query operation (port self-query) from tens of clock cycles to a single cycle, greatly improving the efficiency of finding port affiliation and isolation policies on the packet forwarding path, thereby improving the overall forwarding performance and throughput of the CXL switch. As a specific implementation, this synchronization logic can complete the broadcast within a fixed delay (e.g., 2 clock cycles) after the hierarchical mapping table is updated, and uses a history rollback buffer to ensure rollback capability in case of update failure.

[0059] It should be noted that, in some optional implementations, to further accelerate port query mapping and improve reliability, the local snapshot register group within each physical port module can adopt a dual-mode redundancy structure (such as two parallel D flip-flops), outputting via majority voting to resist soft errors such as single-event flips. This valid flag is set after each successful broadcast update and cleared upon synchronization failure, triggering recovery from the history buffer to the previous valid snapshot. In other optional implementations, to further reduce blocking latency during port migration, a proactive prevention principle can be utilized. Specifically, a pair of physically independent shadow entries can be pre-allocated to each physical port in the HVPMT, located in different memory banks (e.g., SRAM Bank A and Bank B). Bank A stores the currently active entry, while Bank B is pre-allocated and pre-filled with target VCS information. Upon migration triggering, a fast nested instruction can simultaneously complete the writing of the complete mapping to Bank B and hardware switch a multiplexer, directing the port query to Bank B, achieving near-zero-wait atomic switching. This avoids the latency of waiting for target VCS resource confirmation in the migration preparation state. Furthermore, in some alternative implementations, to enhance the flexibility of the isolation strategy, the L2 isolation strategy layer can be implemented using a programmable content-addressable memory. Each entry contains a source / destination VHID comparison field, an action field, and a dynamic priority field. When the traffic of a VCS continuously exceeds a high threshold, the hardware can automatically trigger a policy degradation, for example, temporarily changing the strictly isolated action to controlled communication (but marking the audit bit), and reverting to normal operation after the traffic decreases. This achieves purely hardware-driven, dynamic isolation strategy adjustment without upper-layer software intervention, further improving the system's adaptability under high-load dynamic changes. In other alternative implementations, to achieve lower-overhead synchronization of isolation strategy and other information, the idle symbol period of the CXL link can be used to superimpose a small-amplitude modulated signal onto the common-mode voltage of its differential signal pair to carry management information (such as VHID updates). The receiving end recovers the Manchester-coded data stream through a differential common-mode extractor. This method achieves in-band synchronization with zero additional bandwidth occupation, but requires sophisticated analog circuit design and bit error rate control. Additionally, in some alternative implementations, in high-density scenarios with frequent port migrations, a dynamic game-theoretic cost-based allocation algorithm can be used to avoid VHID conflicts. The conflict cost of a VHID is calculated based on the current occupancy count within the VCS, while the time efficiency benefit is calculated based on its last release time. Soft selection is performed during allocation based on this combined probability, which can significantly reduce the probability of conflicts between simultaneously migrating ports, improving VHID reuse efficiency and migration success rate.In other alternative implementations, to reduce the risk of packet erroneous forwarding by evicting relevant routing caches before migration, a "migration tendency index" can be constructed as a virtual sensor based on physical quantities such as the existing transmit / receive rate difference of the port, error count increment, and temperature change rate through a non-linear weighted combination. When this index exceeds a dynamic threshold, it triggers the pre-marking (pending refresh) of relevant cache entries, preparing for actual migration. This can effectively reduce instantaneous forwarding errors caused by outdated cache entries.

[0060] This application also provides a CXL switch port control device. The device includes: a status acquisition module configured to acquire the port status and configuration information of the CXL switch; a mapping table management module configured to establish and maintain a hierarchical mapping table based on the port status and configuration information, the hierarchical mapping table being used to associate physical ports, virtual ports, and virtual switch instances; a fast binding execution module configured to execute a fast binding instruction based on the hierarchical mapping table in response to a port migration request, thereby dynamically updating the binding relationship between physical ports and target virtual switch instances in the hierarchical mapping table; an isolation domain control module configured to configure isolation domain identifiers for ports under the virtual switch instance, and during CXL packet forwarding, verify whether the communication between the source port and the destination port meets a preset isolation policy based on the isolation domain identifier encapsulated in the CXL packet; a migration state machine module configured to control the atomic execution process of the port migration based on preset migration trigger conditions and a port autonomous migration state machine; and a data forwarding module configured to execute the forwarding of CXL packets between ports based on the updated hierarchical mapping table and the verified isolation policy. The functions of each of the above modules correspond one-to-one with the corresponding steps in the aforementioned method embodiments, and together they achieve efficient, reliable, and fine-grained control of the CXL switch ports.

[0061] This application also provides a CXL switching chip. The CXL switching chip includes the aforementioned CXL switch port control device. By integrating this device onto the switching chip, the functionality of the above-described method can be embedded in hardware, achieving lower latency and more efficient port management.

[0062] This application also provides an electronic device. The electronic device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement a virtual hierarchy (VL) based port partitioning and isolation control method within a CXL switch. The electronic device can be a server, a switch, or any computing node equipped with a CXL interface.

[0063] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the CXL switch port control method described above. The storage medium can be any device containing storage media, such as ROM, RAM, disk, or optical disk.

[0064] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A port partitioning and isolation control method based on Virtual Level (VL) within a CXL Switch, characterized in that, include: CXL switch obtains port status and configuration information; Based on the port status and configuration information obtained by the CXL switch, the CXL switch establishes and maintains a hierarchical mapping table, which is used to associate physical ports, virtual ports and virtual switch instances. Based on the hierarchical mapping table, the CXL switch responds to the port migration request by executing a fast binding command to dynamically update the binding relationship between physical ports and target virtual switch instances in the hierarchical mapping table; The CXL switch configures isolation domain identifiers for the ports under the virtual switch instance, and during the CXL packet forwarding process, verifies whether the communication between the source port and the destination port meets the preset isolation policy based on the isolation domain identifier encapsulated in the CXL packet. Based on preset migration trigger conditions and port autonomous migration state machine, the CXL switch controls the atomic execution process of port migration; Based on the updated hierarchical mapping table and the verified isolation policy, the CXL switch performs CXL packet forwarding between ports; The port autonomous migration state machine includes an initial state, a migration request state, a migration preparation state, and a migration commit state; The atomic execution process of controlling the port migration includes the state machine transitions between the aforementioned states; The port autonomous migration state machine determines whether to trigger a migration request based on the output of the discrete hysteresis integrator. The offset of the migration trigger index for each sampling period by the discrete hysteresis integrator ,according to Multiply by a coefficient , Multiply by a coefficient The asymmetric cumulative integral is performed in a manner that... > ; The integral value of the discrete hysteresis integrator The iterative formula is: ;when When, a migration request is triggered; when When, the integral value is cleared to zero. And maintain the initial state.

2. The port partitioning and isolation control method based on Virtual Level (VL) within a CXL Switch according to claim 1, characterized in that, The hierarchical mapping table contains three levels: The physical port mapping layer stores the mapping relationship between physical port identifiers and virtual port handles; The Virtual Port-VCS Attribution Layer stores the attribution relationship between the virtual port handle and the virtual switch instance identifier; The isolation policy layer stores the association between the virtual switch instance identifier and the isolation policy set.

3. The port partitioning and isolation control method based on Virtual Level (VL) within a CXL Switch according to claim 2, characterized in that, The execution of the fast binding instruction includes: atomically updating the corresponding entries of the physical port mapping layer and the virtual port-VCS home layer in the hierarchical mapping table.

4. The port partitioning and isolation control method based on Virtual Level (VL) within a CXL Switch according to claim 2 or 3, characterized in that, The isolation domain identifier is a 16-bit virtual hierarchical isolation domain identifier, which is encapsulated in the reserved field of the CXL transaction layer data packet in the form of a tag; The verification includes comparing whether the virtual hierarchical isolation domain identifiers associated with the source port and the destination port match the isolation policy.

5. The port partitioning and isolation control method based on Virtual Level (VL) within a CXL Switch according to claim 1, characterized in that, The port autonomous migration state machine uses a two-phase commit protocol to ensure the atomicity of the port migration.

6. The port partitioning and isolation control method based on Virtual Level (VL) within a CXL Switch according to claim 1, characterized in that, The migration triggering condition is achieved by comparing it with a dynamic threshold. The dynamic threshold The exponentially weighted moving average of the current migration metric Plus Double its weighted root mean square Calculated, i.e. .

7. The port partitioning and isolation control method based on Virtual Level (VL) within a CXL Switch according to claim 6, characterized in that, The exponentially weighted moving average and exponentially weighted variance The recursive calculation formula is: , ,in, For the first Migration metrics for each sampling period This is the attenuation factor.

Citation Information

Patent Citations

  • Virtual cluster switching

    CN102986172A

  • Data center server resource allocation method and system based on dynamic load balancing

    CN121255450A