Dynamic resource management method, apparatus and electronic device

By using a multi-threshold combination resource management mechanism, the resource allocation of Ethernet switching chips is dynamically adjusted, solving the resource management problem in diverse and dynamically changing port traffic scenarios, and achieving efficient and stable network performance.

CN120881023BActive Publication Date: 2026-05-12JLSEMI LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JLSEMI LTD
Filing Date
2025-06-24
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Ethernet switching chips struggle to achieve efficient and stable resource management when faced with diverse and dynamically changing port traffic scenarios, resulting in poor network performance.

Method used

A resource management mechanism with multiple thresholds is adopted. By obtaining the flow control status and resource usage status of the source port, the resource allocation is dynamically adjusted, including port management thresholds, shared pool management thresholds, and destination port queue management thresholds, so as to achieve dynamic control of resources.

Benefits of technology

Optimize resource allocation, balance resource utilization and performance requirements, improve resource utilization, adapt to changing traffic scenarios, and ensure efficient and stable network operation under various port traffic scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120881023B_ABST
    Figure CN120881023B_ABST
Patent Text Reader

Abstract

The present disclosure provides a dynamic resource management method, device and electronic equipment. The method comprises: acquiring a traffic control state of a source port; acquiring a corresponding resource management threshold based on the traffic control state; judging the resource usage amount of a shared pool and the resource usage amount of the source port based on the resource management threshold to acquire the resource usage state of the source port in real time; and performing dynamic resource management based on the traffic control state and the resource usage state of the source port. The present disclosure adopts a multi-threshold combined resource management mechanism, can automatically adapt to changing traffic scenario requirements, and improves resource usage rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure pertains to the field of communications and relates to a dynamic resource management method, apparatus, and electronic device. Background Technology

[0002] Ethernet switching chips face complex and diverse port traffic scenarios, placing extremely high demands on chip design and functionality. On one hand, port traffic types are diverse, including but not limited to data transmission, voice communication, and video streaming. For example, in enterprise networks, office area ports may carry a large amount of file transfer and office software communication traffic, which has high bandwidth requirements but relatively low sensitivity to latency. In contrast, conference room ports may need to support high-definition video conferencing, where latency and packet loss rates are extremely critical to ensure smooth and clear meetings. On the other hand, port traffic dynamics are also significant. Port traffic may be low at certain times, while it can surge during peak business periods or special events. For instance, in a school network, during class time, port traffic in teaching buildings may primarily consist of access to multimedia teaching resources, while during breaks, students may use the network for online games or social media interaction, resulting in changes in traffic type and scale. Therefore, to support diverse traffic scenarios, Ethernet switching chips need to dynamically adapt resource management according to the traffic scenario, ensuring efficient and stable network operation under various port traffic conditions. Summary of the Invention

[0003] The purpose of this disclosure is to provide dynamic resource management methods, apparatus and electronic devices for solving the technical problem of how to achieve dynamic resource management.

[0004] In a first aspect, embodiments of this disclosure provide a dynamic resource management method, the method comprising:

[0005] Get the flow control status of the source port;

[0006] Obtain the corresponding resource management threshold based on the flow control status;

[0007] Based on the resource management threshold, the resource usage of the shared pool and the resource usage of the source port are judged to obtain the resource usage status of the source port in real time.

[0008] Dynamic resource management is performed based on the flow control status and the resource usage status of the source port.

[0009] In one embodiment of this disclosure, the resource management threshold includes a port management threshold, a shared pool management threshold, and a destination port queue management threshold;

[0010] The port management thresholds include, in ascending order, a dedicated resource threshold, a non-congestion threshold, a congestion threshold, and a port resource discard threshold;

[0011] The shared pool management thresholds include a first-level congestion relief threshold, a first-level congestion activation threshold, a second-level congestion relief threshold, and a second-level congestion activation threshold, which increase sequentially.

[0012] The destination port queue management threshold includes a queue resource drop threshold; wherein, the non-congestion threshold, the congestion threshold, and the shared pool management threshold change with the transition of the flow control state.

[0013] In one embodiment of this disclosure, determining the resource usage of the shared pool and the resource usage of the source port based on the resource management threshold includes:

[0014] Based on the dedicated resource threshold, the first-level congestion relief threshold, and the first-level congestion activation threshold, a first judgment is made on the resource usage of the shared pool and the resource usage of the source port.

[0015] If the first judgment passes, the second judgment is then performed based on the port management threshold and the shared pool management threshold to obtain the resource usage status of the source port;

[0016] If the first judgment fails, the resource usage status of the source port is obtained as non-congested.

[0017] In one embodiment of this disclosure, when the resource usage of the source port increases, the execution of the first determination includes:

[0018] If the resource usage of the source port exceeds the dedicated resource threshold and the resource usage of the shared pool exceeds the first-level congestion activation threshold, then the first determination passes.

[0019] If the resource usage of the source port does not exceed the dedicated resource threshold or the resource usage of the shared pool does not exceed the first-level congestion activation threshold, then the first judgment fails, and the resource usage status of the source port is obtained as non-congested.

[0020] In one embodiment of this disclosure, when the resource usage of the source port is decreasing, the execution of the first determination includes:

[0021] If the resource usage of the source port exceeds the dedicated resource threshold and the resource usage of the shared pool exceeds the first-level congestion relief threshold, then the first determination passes.

[0022] If the resource usage of the source port does not exceed the dedicated resource threshold or the resource usage of the shared pool does not exceed the first-level congestion relief threshold, then the first judgment fails, and the resource usage status of the source port is obtained as non-congested.

[0023] In one embodiment of this disclosure, when the resource usage of the source port increases, the second determination includes:

[0024] If the resource usage of the source port exceeds the dedicated resource threshold and the resource usage of the shared pool exceeds the secondary congestion activation threshold, then the resource usage status of the source port is determined to be congested.

[0025] If the resource usage of the source port exceeds the congestion threshold and the resource usage of the shared pool exceeds the first-level congestion activation threshold, then the resource usage status of the source port is determined to be congested.

[0026] If the resource usage of the source port does not exceed the congestion threshold and the resource usage of the shared pool does not exceed the secondary congestion activation threshold, then the resource usage status of the source port is obtained as non-congested.

[0027] If the resource usage of the source port exceeds the congestion threshold and the resource usage of the shared pool does not exceed the first-level congestion activation threshold, then the resource usage status of the source port is obtained as non-congested.

[0028] In one embodiment of this disclosure, when the resource usage of the source port is decreasing, the second determination includes:

[0029] If the resource usage of the source port exceeds the dedicated resource threshold and the resource usage of the shared pool exceeds the secondary congestion relief threshold, then the resource usage status of the source port is determined to be congested.

[0030] If the resource usage of the source port exceeds the non-congestion threshold and the resource usage of the shared pool exceeds the first-level congestion relief threshold, then the resource usage status of the source port is obtained as congested.

[0031] If the resource usage of the source port does not exceed the non-congestion threshold and the resource usage of the shared pool does not exceed the secondary congestion relief threshold, then the resource usage status of the source port is obtained as non-congestion.

[0032] If the resource usage of the source port exceeds the non-congestion threshold and the resource usage of the shared pool does not exceed the first-level congestion relief threshold, then the resource usage status of the source port is obtained as non-congestion.

[0033] In one embodiment of this disclosure, dynamic resource management based on the flow control state and the resource usage state includes:

[0034] When the flow control state is off, if the resource usage state of the source port is congested and the resource usage of the destination port queue reaches the queue resource discard threshold, then the data received by the destination port queue is discarded.

[0035] When the flow control state is enabled, if the resource usage state of the source port is congested, the source port sends a pause frame signal to the upstream device to inform the upstream device to stop sending data.

[0036] In one embodiment of this disclosure, the method includes: if the upstream device does not respond to the pause frame signal, and when the resource usage of the source port reaches the port resource discard threshold, then discarding the data received by the source port.

[0037] Secondly, this disclosure provides a dynamic resource management device, the device comprising:

[0038] The first acquisition module is used to acquire the flow control status of the source port;

[0039] The second acquisition module is used to acquire the corresponding resource management threshold based on the flow control status;

[0040] The judgment module is used to judge the resource usage of the shared pool and the resource usage of the source port based on the resource management threshold, so as to obtain the resource usage status of the source port in real time.

[0041] The management module is used to perform dynamic resource management based on the flow control status and the resource usage status of the source port.

[0042] As described above, the dynamic resource management method, apparatus and electronic device of this disclosure have the following beneficial effects: This disclosure adopts a resource management mechanism with multiple threshold combinations, which can automatically adapt to the changing traffic scenario requirements, thereby optimizing resource allocation, balancing resource utilization and performance requirements, and improving resource utilization rate. Attached Figure Description

[0043] Figure 1a The diagram shown is an application illustration of the dynamic resource management method according to an embodiment of this disclosure.

[0044] Figure 1b The diagram shown is an application illustration of the dynamic resource management method according to an embodiment of this disclosure.

[0045] Figure 2 The diagram shown is a flowchart illustrating the dynamic resource management method according to an embodiment of this disclosure.

[0046] Figure 3a The diagram shown illustrates the port management thresholds according to an embodiment of this disclosure.

[0047] Figure 3b The diagram shown illustrates the shared pool management thresholds according to an embodiment of this disclosure.

[0048] Figure 3c The diagram shown illustrates the destination port queue management threshold according to an embodiment of this disclosure.

[0049] Figure 4 The diagram shown is a flowchart illustrating the dynamic resource management method according to an embodiment of this disclosure.

[0050] Figure 5 The diagram shown is a structural schematic of the dynamic resource management device according to an embodiment of this disclosure. Detailed Implementation

[0051] The following specific examples illustrate the implementation of this disclosure. Those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. This disclosure can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.

[0052] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. Therefore, the illustrations only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0053] The technical solutions of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0054] Figure 1a and Figure 1b This is a schematic diagram illustrating the application of the dynamic resource management method according to an embodiment of the present disclosure. For example... Figure 1aAs shown, an Ethernet switching chip has N ports. When a port acts as a data inlet, it is called a source port; when a port acts as a data outlet, it is called a destination port. The specific role of a port is dynamically determined by the direction of traffic. Each source port has allocated dedicated resources. In a traffic scenario, when the dedicated resources allocated to a source port are exhausted, the source port can preempt shared resources in the shared pool. When resources are released, the source port first releases the shared resources it has occupied, and then releases the dedicated resources it has occupied. That is, in reality, for each source port, the resources it can use include the allocated dedicated resources and the shared resources it has preempted. (Continue to refer to...) Figure 1b The destination port has N queues. These N destination port queues are a key mechanism for managing outgoing port traffic scheduling and are used to temporarily store data frames to be forwarded. Taking packet data as an example, after acquiring and parsing the packet data, the source port, destination port, and destination port queue to which the packet data belongs can be obtained. Based on this, the resource usage required by the packet data is included in the resource usage of the source port and the resource usage of the destination port queue, respectively. Among them, the resource usage of the source port includes dedicated resources and preempted shared resources. At this time, the dynamic resource management method of this embodiment can perform dynamic resource management based on the resource usage of the source port, the resource usage of the destination port queue, and the resource usage of the shared pool.

[0055] The following will describe in detail the principles and implementation methods of the dynamic resource management method, apparatus and electronic device of the present disclosure, so that those skilled in the art can understand the dynamic resource management method, apparatus and electronic device of the present disclosure without creative effort.

[0056] Figure 2 This is a flowchart illustrating a dynamic resource management method according to an embodiment of the present disclosure. Figure 2 As shown in the figure, this embodiment provides a dynamic resource management method, which includes steps S1 to S4.

[0057] S1, obtain the flow control status of the source port.

[0058] In some embodiments, the flow control state of the source port includes on and off. When the flow control state of the source port is on, it means that flow control is enabled, which is used to notify the sender to pause or slow down data transmission to prevent data loss, but it may increase data transmission latency. When the flow control state of the source port is off, data transmission is not paused or slowed down, which is beneficial for improving data transmission rate, but it is also prone to data loss. Therefore, different flow control states can meet different scenario requirements for different traffic scenarios, so to achieve dynamic resource management, it is necessary to first obtain the flow control state.

[0059] S2, obtain the corresponding resource management threshold based on the flow control status.

[0060] This disclosure employs a resource management mechanism combining multiple thresholds to adapt to varying traffic scenarios and improve resource utilization. In some embodiments, the resource management thresholds of this disclosure include port management thresholds, shared pool management thresholds, and destination port queue management thresholds.

[0061] Figure 3a This is a schematic diagram illustrating port management thresholds according to an embodiment of this disclosure. Figure 3a As shown, port management thresholds include, in ascending order, a dedicated resource threshold, a non-congestion threshold, a congestion threshold, and a port resource discard threshold. The non-congestion and congestion thresholds change with the flow control state to meet the different resource requirements when flow control is enabled and disabled. (Continue to refer to...) Figure 3a When the flow control state is off (flow control disabled), the non-congestion threshold and congestion threshold correspond to the thresholds when flow control is off; when the flow control state is on (flow control enabled), the non-congestion threshold and congestion threshold correspond to the thresholds when flow control is on. That is, the non-congestion threshold and congestion threshold will have different values ​​for different flow control states. Typically, the non-congestion threshold and congestion threshold when flow control is off will be greater than the non-congestion threshold and congestion threshold when flow control is on.

[0062] Furthermore, the port resource discard threshold is only enabled when flow control is enabled. That is, when flow control is enabled, data received by the port will be discarded when the port's resource usage reaches the port resource discard threshold.

[0063] Figure 3b This is a schematic diagram illustrating the shared pool management thresholds of an embodiment of this disclosure. For example... Figure 3b As shown, the shared pool management thresholds include a series of progressively increasing levels: Level 1 congestion relief threshold, Level 1 congestion activation threshold, Level 2 congestion relief threshold, and Level 2 congestion activation threshold. These shared pool management thresholds change in tandem with the flow control state; that is, the Level 1 congestion relief threshold, Level 1 congestion activation threshold, Level 2 congestion relief threshold, and Level 2 congestion activation threshold change according to the flow control state, thus meeting the different resource requirements when flow control is enabled and disabled. (Continue to refer to...) Figure 3bWhen the flow control state is off (flow control disabled), the Level 1 congestion relief threshold, Level 1 congestion activation threshold, Level 2 congestion relief threshold, and Level 2 congestion activation threshold correspond to the thresholds when flow control is off. When the flow control state is on (flow control enabled), the Level 1 congestion relief threshold, Level 1 congestion activation threshold, Level 2 congestion relief threshold, and Level 2 congestion activation threshold correspond to the thresholds when flow control is on. That is, the Level 1 congestion relief threshold, Level 1 congestion activation threshold, Level 2 congestion relief threshold, and Level 2 congestion activation threshold will have different values ​​for different flow control states. Typically, the shared pool management threshold when the flow control state is off is greater than the shared pool management threshold when the flow control state is on.

[0064] Figure 3c This is a schematic diagram illustrating the destination port queue management threshold of an embodiment of this disclosure. Figure 3c As shown, the destination port queue management threshold includes a queue resource discard threshold. In some embodiments, the queue resource discard threshold is enabled only when flow control is off. That is, when flow control is off, data received by the destination port queue will be discarded when the port's resource usage reaches the queue resource discard threshold.

[0065] S3, based on the resource management threshold, determine the resource usage of the shared pool and the resource usage of the source port to obtain the resource usage status of the source port in real time.

[0066] To achieve dynamic resource management, this embodiment of the disclosure obtains the resource usage of the shared pool and the resource usage of the source port in real time. For example, the resource usage of data is included in the resource usage of the source port and the queue usage of the destination port, respectively. Furthermore, the resource usage of the shared pool can also be obtained based on the resource usage of the source port. Then, the resource usage of the shared pool and the resource usage of the source port are judged based on the resource management thresholds provided in the above embodiment to obtain the resource usage status of the source port in real time. Figure 4 This is a flowchart illustrating a dynamic resource management method according to an embodiment of the present disclosure. Figure 4 As shown, obtaining the resource usage status of the source port in real time includes steps S31 to S33.

[0067] S31, perform a first judgment on the resource usage of the shared pool and the resource usage of the source port based on the dedicated resource threshold, the first-level congestion relief threshold and the first-level congestion activation threshold.

[0068] In practice, different resource management thresholds are selected for resource management during the process of increasing or decreasing resource usage at the source port. In some embodiments, for the source port, during the process of increasing resource usage, a congestion threshold is used to indicate that the resource usage of the source port has increased to the point of reaching a congested state; while during the process of decreasing resource usage, a non-congestion threshold is used to indicate that the resource usage of the source port has decreased to the point of reaching a non-congested state, that is, the congestion state is relieved.

[0069] Similarly, for a shared pool, during the process of increasing resource usage, the Level 1 congestion threshold is used to indicate that the resource usage of the shared pool has increased to the level 1 congestion state, and the Level 2 congestion threshold is used to indicate that the resource usage of the shared pool has increased to the level 2 congestion state; while during the process of decreasing resource usage, the Level 1 congestion relief threshold is used to indicate that the resource usage of the shared pool has decreased to the level 1 congestion state, and the Level 2 congestion relief threshold is used to indicate that the resource usage of the shared pool has decreased to the level 2 congestion state.

[0070] Furthermore, when the resource usage of the source port exceeds the dedicated resource threshold, the resource usage of the source port and the resource usage of the shared pool actually increase or decrease synchronously. Therefore, in this embodiment of the present disclosure, when performing the first judgment, it distinguishes whether the resource usage of the source port is increasing or decreasing, and then combines this with the corresponding resource management threshold.

[0071] In some embodiments, when the resource usage of the source port increases, the first determination includes: if the resource usage of the source port exceeds the dedicated resource threshold and the resource usage of the shared pool exceeds the first-level congestion threshold, then the first determination passes; if the resource usage of the source port does not exceed the dedicated resource threshold or the resource usage of the shared pool does not exceed the first-level congestion threshold, then the first determination fails, and the resource usage status of the source port is determined to be non-congested. That is, when the resource usage of the source port increases, the first determination is considered to pass only when the resource usage of the source port exceeds the dedicated resource threshold (i.e., the source port has exhausted its dedicated resources and needs to preempt shared resources), and the resource usage of the shared pool exceeds the first-level congestion threshold (i.e., the shared pool resources enter a first-level congestion state). In this case, further determination of whether congestion occurs is required. If only the resource usage of the source port exceeds the dedicated resource threshold, or only the resource usage of the shared pool exceeds the first-level congestion threshold, or neither exceeds the threshold, then it is considered that there are still sufficient resources available, and the resource usage status of the source port is directly obtained as non-congested.

[0072] In some embodiments, when the resource usage of the source port is decreasing, the first determination includes: if the resource usage of the source port exceeds the dedicated resource threshold and the resource usage of the shared pool exceeds the first-level congestion relief threshold, then the first determination passes; if the resource usage of the source port does not exceed the dedicated resource threshold or the resource usage of the shared pool does not exceed the first-level congestion relief threshold, then the first determination fails, and the resource usage status of the source port is determined to be non-congested. That is, when the resource usage of the source port is decreasing, the first determination is considered to pass only when the resource usage of the source port exceeds the dedicated resource threshold, i.e., the source port has exhausted its dedicated resources and needs to preempt shared resources, and the resource usage of the shared pool exceeds the first-level congestion relief threshold, i.e., the shared pool resources are still in a first-level congestion state. In this case, further determination of whether congestion exists is required. If only the resource usage of the source port exceeds the dedicated resource threshold, or only the resource usage of the shared pool exceeds the first-level congestion relief threshold, or neither exceeds the threshold, then it is considered that there are still sufficient resources available, and the resource usage status of the source port is directly obtained as non-congested. S32, if the first judgment passes, then the second judgment is performed based on the port management threshold and the shared pool management threshold to obtain the resource usage status of the source port.

[0073] As mentioned above, after the first judgment is passed, the resource usage status of the source port needs to be further determined by combining the resource usage of the source port and the resource usage of the shared pool. Similarly, in performing the second judgment in this embodiment, the resource usage of the source port is distinguished as either increasing or decreasing, and correspondingly combined with the resource management threshold.

[0074] In some embodiments, when the resource usage of the source port increases, performing the second determination includes:

[0075] If the resource usage of the source port exceeds the dedicated resource threshold and the resource usage of the shared pool exceeds the level 2 congestion threshold, then the resource usage status of the source port is determined to be congested; that is, regardless of whether the resource usage of the source port increases to the point of congestion, as long as the resource usage of the shared pool increases to the point of level 2 congestion, the resource usage status of the source port is considered to be congested.

[0076] If the resource usage of the source port exceeds the congestion threshold and the resource usage of the shared pool exceeds the first-level congestion threshold, then the resource usage status of the source port is determined to be congested; that is, when the resource usage of the source port increases to the congested state and the resource usage of the shared pool increases to the first-level congestion state, then the resource usage status of the source port is considered to be congested.

[0077] If the resource usage of the source port does not exceed the congestion threshold and the resource usage of the shared pool does not exceed the secondary congestion threshold, then the resource usage status of the source port is determined to be non-congested; that is, when the resource usage of the source port does not increase to the congested state and the resource usage of the shared pool does not increase to the secondary congestion state, the resource usage status of the source port is considered to be non-congested.

[0078] If the resource usage of the source port exceeds the congestion threshold and the resource usage of the shared pool does not exceed the Level 1 congestion threshold, then the resource usage status of the source port is determined to be non-congested. That is, when the resource usage of the source port increases to a congested state, but the resource usage of the shared pool does not increase to a Level 1 congestion state, the resource usage status of the source port is considered to be non-congested.

[0079] When the resource usage of the source port decreases, the second determination includes:

[0080] If the resource usage of the source port exceeds the dedicated resource threshold and the resource usage of the shared pool exceeds the secondary congestion relief threshold, then the resource usage status of the source port is determined to be congested; that is, regardless of whether the resource usage of the source port has decreased to the state of decongestion relief, as long as the resource usage of the shared pool has not decreased to the state of decongestion relief, the resource usage status of the source port is considered to be congested.

[0081] If the resource usage of the source port exceeds the non-congestion threshold and the resource usage of the shared pool exceeds the first-level congestion relief threshold, then the resource usage status of the source port is determined to be congested; that is, if the resource usage of the source port has not yet decreased to the state of decongestion relief and the resource usage of the shared pool has not yet decreased to the state of decongestion relief, then the resource usage status of the source port is considered to be congested.

[0082] If the resource usage of the source port does not exceed the non-congestion threshold and the resource usage of the shared pool does not exceed the secondary congestion relief threshold, then the resource usage status of the source port is obtained as non-congestion; that is, when the resource usage of the source port decreases to the decongestion relief state and the resource usage of the shared pool decreases to the decongestion relief state, then the resource usage status of the source port is considered to be non-congestion.

[0083] If the resource usage of the source port exceeds the non-congestion threshold and the resource usage of the shared pool does not exceed the Level 1 congestion relief threshold, then the resource usage status of the source port is determined to be non-congestion. That is, when the resource usage of the source port has not yet decreased to the level of congestion relief, and the resource usage of the shared pool has decreased to the level of Level 1 congestion relief, the resource usage status of the source port is considered non-congestion.

[0084] S33, if the first judgment fails, the resource usage status of the source port is obtained as non-congested.

[0085] As mentioned above, if the first judgment fails, the resource usage status of the source port is directly obtained as non-congested.

[0086] This disclosure, through the setting of resource management thresholds, not only ensures that each port has a certain amount of dedicated resources, thus not affecting normal traffic usage in non-congested states, but also, based on whether resource usage is increasing or decreasing, comprehensively considers the resource usage of the shared pool and the resource usage at the source port level to determine the resource usage status of the source port. When there are few ports, a single source port can occupy more shared resources; conversely, when there are many ports, each source port reduces its contention for shared resources, improving resource utilization. In other words, this disclosure, through a combination of multiple threshold management measures, can support diverse traffic scenario requirements.

[0087] S4. Perform dynamic resource management based on the flow control status and the resource usage status of the source port.

[0088] This disclosure embodiment monitors the resource usage status of the shared pool, the resource usage status of the source port, and the resource usage status of the destination port queue in real time, and obtains the current resource usage status based on resource management thresholds. Subsequently, this disclosure embodiment performs dynamic resource management based on the flow control status and resource usage status to automatically optimize resource allocation and adapt to diverse traffic scenarios. In some embodiments, dynamic resource management based on the flow control status and the resource usage status includes:

[0089] When the flow control state is off, if the resource usage of the source port is congested and the resource usage of the destination port queue reaches the queue resource discard threshold, then the data received by the destination port queue is discarded. This can release the queue space occupied by data in a timely manner.

[0090] When the flow control state is enabled, if the resource usage state of the source port is congested, the source port sends a pause frame signal to the upstream device to inform the upstream device to stop sending data. In this case, the source port does not discard the received data.

[0091] Furthermore, if the upstream device does not respond to the pause frame signal, the data received by the source port will be discarded when the resource usage of the source port reaches the port resource discard threshold. This prevents the upstream device from continuously sending data without responding to the pause frame signal, which could lead to excessive resource consumption by the abnormal port and affect the resource usage of other ports.

[0092] This disclosure combines the resource usage status of the source port (resource port resource usage) and the resource usage of the destination port queue to determine whether to discard data, thereby supporting diverse traffic scenario requirements. For example, a high-speed source port broadcasts to multiple destination ports with different speeds, and each port can achieve line-speed forwarding. As another example, multiple source ports forward to a single destination port, and the traffic from each source port can be received evenly. The dynamic resource management method of this disclosure can improve resource utilization while ensuring port line-speed.

[0093] The scope of protection of the dynamic resource management method of this disclosure is not limited to the execution order of the steps listed in this embodiment. Any solution implemented by adding, subtracting or replacing steps in the prior art based on the principles of this disclosure is included within the scope of protection of this disclosure.

[0094] Figure 5 This is a schematic diagram illustrating the structure of a dynamic resource management device 100 according to an embodiment of the present disclosure. Figure 5 As shown, this embodiment provides a dynamic resource management device, including:

[0095] The first acquisition module 1010 is used to acquire the flow control status of the source port.

[0096] The second acquisition module 1020 is used to acquire the corresponding resource management threshold based on the flow control status.

[0097] The judgment module 1030 is used to judge the resource usage of the shared pool and the resource usage of the source port based on the resource management threshold, so as to obtain the resource usage status of the source port in real time.

[0098] The management module 1040 is used for dynamic resource management based on the flow control status and the resource usage status of the source port.

[0099] It should be noted that the principles of the first acquisition module 1010, the second acquisition module 1020, the judgment module 1030 and the management module 1040 in this embodiment are the same as the steps of the dynamic resource management method in the above embodiments, so they will not be repeated here.

[0100] In the several embodiments provided in this disclosure, it should be understood that the disclosed apparatus or method can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or modules or units may be electrical, mechanical, or other forms.

[0101] The modules / units described as separate components may or may not be physically separate. The components shown as modules / units may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules / units can be selected to achieve the objectives of the embodiments of this disclosure, depending on actual needs. For example, the functional modules / units in the various embodiments of this disclosure may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0102] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.

[0103] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.

[0104] The above embodiments are merely illustrative of the principles and effects of this disclosure and are not intended to limit this disclosure. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this disclosure. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this disclosure should still be covered by the claims of this disclosure.

Claims

1. A dynamic resource management method, characterized in that, The method includes: Get the flow control status of the source port; Based on the flow control state, corresponding resource management thresholds are obtained; wherein, the resource management thresholds include port management thresholds, shared pool management thresholds, and destination port queue management thresholds; the port management thresholds include, in ascending order, a dedicated resource threshold, a non-congestion threshold, a congestion threshold, and a port resource discard threshold; the shared pool management thresholds include, in ascending order, a first-level congestion relief threshold, a first-level congestion activation threshold, a second-level congestion relief threshold, and a second-level congestion activation threshold; the destination port queue management thresholds include a queue resource discard threshold; wherein, the non-congestion threshold, the congestion threshold, and the shared pool management threshold change with the transition of the flow control state; The resource usage of the shared pool and the resource usage of the source port are judged based on the resource management thresholds to obtain the resource usage status of the source port in real time. This includes: performing a first judgment on the resource usage of the shared pool and the resource usage of the source port based on the dedicated resource threshold, the first-level congestion relief threshold, and the first-level congestion activation threshold; if the first judgment passes, then a second judgment is performed based on the port management threshold and the shared pool management threshold to obtain the resource usage status of the source port; if the first judgment fails, then the resource usage status of the source port is obtained as non-congested. Dynamic resource management based on the flow control status and the resource usage status of the source port includes: When the flow control state is off, if the resource usage state of the source port is congested and the resource usage of the destination port queue reaches the queue resource discard threshold, then the data received by the destination port queue is discarded. When the flow control state is enabled, if the resource usage state of the source port is congested, the source port sends a pause frame signal to the upstream device to inform the upstream device to stop sending data.

2. The dynamic resource management method according to claim 1, characterized in that, When the resource usage of the source port increases, the first determination includes: If the resource usage of the source port exceeds the dedicated resource threshold and the resource usage of the shared pool exceeds the first-level congestion activation threshold, then the first determination passes. If the resource usage of the source port does not exceed the dedicated resource threshold or the resource usage of the shared pool does not exceed the first-level congestion activation threshold, then the first judgment fails, and the resource usage status of the source port is obtained as non-congested.

3. The dynamic resource management method according to claim 1, characterized in that, When the resource usage of the source port is decreasing, the first determination includes: If the resource usage of the source port exceeds the dedicated resource threshold and the resource usage of the shared pool exceeds the first-level congestion relief threshold, then the first determination passes. If the resource usage of the source port does not exceed the dedicated resource threshold or the resource usage of the shared pool does not exceed the first-level congestion relief threshold, then the first judgment fails, and the resource usage status of the source port is obtained as non-congested.

4. The dynamic resource management method according to claim 1, characterized in that, When the resource usage of the source port increases, the second determination includes: If the resource usage of the source port exceeds the dedicated resource threshold and the resource usage of the shared pool exceeds the secondary congestion activation threshold, then the resource usage status of the source port is determined to be congested. If the resource usage of the source port exceeds the congestion threshold and the resource usage of the shared pool exceeds the first-level congestion activation threshold, then the resource usage status of the source port is determined to be congested. If the resource usage of the source port does not exceed the congestion threshold and the resource usage of the shared pool does not exceed the secondary congestion activation threshold, then the resource usage status of the source port is obtained as non-congested. If the resource usage of the source port exceeds the congestion threshold and the resource usage of the shared pool does not exceed the first-level congestion activation threshold, then the resource usage status of the source port is obtained as non-congested.

5. The dynamic resource management method according to claim 1, characterized in that, When the resource usage of the source port decreases, the second determination includes: If the resource usage of the source port exceeds the dedicated resource threshold and the resource usage of the shared pool exceeds the secondary congestion relief threshold, then the resource usage status of the source port is determined to be congested. If the resource usage of the source port exceeds the non-congestion threshold and the resource usage of the shared pool exceeds the first-level congestion relief threshold, then the resource usage status of the source port is obtained as congested. If the resource usage of the source port does not exceed the non-congestion threshold and the resource usage of the shared pool does not exceed the secondary congestion relief threshold, then the resource usage status of the source port is obtained as non-congestion. If the resource usage of the source port exceeds the non-congestion threshold and the resource usage of the shared pool does not exceed the first-level congestion relief threshold, then the resource usage status of the source port is obtained as non-congestion.

6. The dynamic resource management method according to claim 1, characterized in that, The method includes: If the upstream device does not respond to the pause frame signal, the data received by the source port will be discarded when the resource usage of the source port reaches the port resource discard threshold.

7. A dynamic resource management device, characterized in that, The device includes: The first acquisition module is used to acquire the flow control status of the source port; The second acquisition module is used to acquire the corresponding resource management thresholds based on the flow control state; wherein, the resource management thresholds include port management thresholds, shared pool management thresholds, and destination port queue management thresholds; the port management thresholds include, in ascending order, a dedicated resource threshold, a non-congestion threshold, a congestion threshold, and a port resource discard threshold; the shared pool management thresholds include, in ascending order, a first-level congestion relief threshold, a first-level congestion activation threshold, a second-level congestion relief threshold, and a second-level congestion activation threshold; the destination port queue management thresholds include a queue resource discard threshold; wherein, the non-congestion threshold, the congestion threshold, and the shared pool management threshold change with the transition of the flow control state; The judgment module is used to judge the resource usage of the shared pool and the resource usage of the source port based on the resource management threshold, so as to obtain the resource usage status of the source port in real time. This includes: performing a first judgment on the resource usage of the shared pool and the resource usage of the source port based on the dedicated resource threshold, the first-level congestion relief threshold, and the first-level congestion activation threshold; if the first judgment passes, then performing a second judgment based on the port management threshold and the shared pool management threshold to obtain the resource usage status of the source port; if the first judgment fails, then obtaining the resource usage status of the source port as non-congested. The management module is used for dynamic resource management based on the flow control status and the resource usage status of the source port, including: When the flow control state is off, if the resource usage state of the source port is congested and the resource usage of the destination port queue reaches the queue resource discard threshold, then the data received by the destination port queue is discarded. When the flow control state is enabled, if the resource usage state of the source port is congested, the source port sends a pause frame signal to the upstream device to inform the upstream device to stop sending data.