Search

CN-120881023-B - Dynamic resource management method and device and electronic equipment

CN120881023BCN 120881023 BCN120881023 BCN 120881023BCN-120881023-B

Abstract

The disclosure provides a dynamic resource management method, a dynamic resource management device and electronic equipment. The method comprises the steps of obtaining a flow control state of a source port, obtaining a corresponding resource management threshold based on the flow control state, judging the resource usage of a shared pool and the resource usage of the source port based on the resource management threshold so as to obtain the resource usage state of the source port in real time, and carrying out dynamic resource management based on the flow control state and the resource usage state of the source port. The resource management mechanism with multiple threshold combinations is adopted, so that the variable flow scene requirements can be automatically adapted, and the resource utilization rate is improved.

Inventors

  • DENG XIANGYUN

Assignees

  • 景略半导体(上海)有限公司

Dates

Publication Date
20260512
Application Date
20250624

Claims (7)

  1. 1. A method of dynamic resource management, the method comprising: Acquiring a flow control state of a source port; The method comprises the steps of acquiring a corresponding resource management threshold based on a flow control state, wherein the resource management threshold comprises a port management threshold, a shared pool management threshold and a destination port queue management threshold, the port management threshold comprises an independent resource threshold, a non-congestion threshold, a congestion threshold and a port resource discarding threshold which are sequentially increased, the shared pool management threshold comprises a primary congestion release threshold, a primary congestion opening threshold, a secondary congestion release threshold and a secondary congestion opening threshold which are sequentially increased, and the destination port queue management threshold comprises a queue resource discarding threshold, wherein the non-congestion threshold, the congestion threshold and the shared pool management threshold are converted along with the conversion of the flow 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, wherein the method comprises the steps of executing first judgment on the resource usage amount of the shared pool and the resource usage amount of the source port based on the exclusive resource threshold, the primary congestion relief threshold and the primary congestion opening threshold; Dynamic resource management based on the flow control state and the resource usage state of the source port, comprising: When the flow control state is closed, if the resource use state of the source port is congestion and the resource use amount of the destination port queue reaches a queue resource discarding threshold, discarding the data received by the destination port queue; And when the flow control state is on, if the resource use state of the source port is congestion, the source port sends a pause frame signal to the upstream equipment so as to inform the upstream equipment to stop sending data.
  2. 2. The method of claim 1, wherein when the resource usage of the source port is increasing, the performing the first determination comprises: If the resource usage of the source port exceeds the single-shared resource threshold and the resource usage of the shared pool exceeds the first-level congestion opening threshold, the first judgment is passed; If the resource usage amount of the source port does not exceed the single-shared resource threshold or the resource usage amount of the shared pool does not exceed the first-level congestion opening threshold, the first judgment is failed, and the resource usage state of the source port is obtained to be non-congestion.
  3. 3. The method of claim 1, wherein when the resource usage of the source port is decreasing, the performing the first determination comprises: if the resource usage of the source port exceeds the single-shared resource threshold and the resource usage of the shared pool exceeds the primary congestion relief threshold, the first judgment is passed; If the resource usage amount of the source port does not exceed the single-shared resource threshold or the resource usage amount of the shared pool does not exceed the primary congestion relief threshold, the first judgment is failed, and the resource usage state of the source port is obtained to be non-congestion.
  4. 4. The method of claim 1, wherein when the resource usage of the source port is increasing, the performing the second determination comprises: If the resource usage amount of the source port exceeds the single-shared resource threshold and the resource usage amount of the shared pool exceeds the secondary congestion opening threshold, acquiring the resource usage state of the source port as congestion; If the resource usage amount of the source port exceeds the congestion threshold and the resource usage amount of the shared pool exceeds the first-level congestion opening threshold, acquiring the resource usage state of the source port as congestion; If the resource usage amount of the source port does not exceed the congestion threshold and the resource usage amount of the shared pool does not exceed the secondary congestion opening threshold, acquiring that the resource usage state of the source port is non-congestion; And if the resource usage amount of the source port exceeds the congestion threshold and the resource usage amount of the shared pool does not exceed the primary congestion opening threshold, acquiring that the resource usage state of the source port is non-congestion.
  5. 5. The method of claim 1, wherein when the resource usage of the source port is decreasing, the performing the second determination comprises: If the resource usage amount of the source port exceeds the single-shared resource threshold and the resource usage amount of the shared pool exceeds the secondary congestion release threshold, acquiring the resource usage state of the source port as congestion; If the resource usage amount of the source port exceeds the non-congestion threshold and the resource usage amount of the shared pool exceeds the primary congestion release threshold, acquiring the resource usage state of the source port as congestion; If the resource usage amount of the source port does not exceed the non-congestion threshold and the resource usage amount of the shared pool does not exceed the secondary congestion release threshold, acquiring that the resource usage state of the source port is non-congestion; and if the resource usage amount of the source port exceeds the non-congestion threshold and the resource usage amount of the shared pool does not exceed the primary congestion relief threshold, acquiring the resource usage state of the source port as non-congestion.
  6. 6. The method of dynamic resource management according to claim 1, characterized in that the method comprises: And if the upstream equipment does not respond to the pause frame signal, discarding the data received by the source port when the resource usage of the source port reaches a port resource discarding threshold.
  7. 7. A dynamic resource management device, the device comprising: the first acquisition module is used for acquiring the flow control state of the source port; The second acquisition module is used for acquiring a corresponding resource management threshold based on the flow control state, wherein the resource management threshold comprises a port management threshold, a shared pool management threshold and a destination port queue management threshold, the port management threshold comprises an independent resource threshold, a non-congestion threshold, a congestion threshold and a port resource discarding threshold which are sequentially increased, the shared pool management threshold comprises a primary congestion release threshold, a primary congestion opening threshold, a secondary congestion release threshold and a secondary congestion opening threshold which are sequentially increased, and the destination port queue management threshold comprises a queue resource discarding threshold, wherein the non-congestion threshold, the congestion threshold and the shared pool management threshold are converted along with the conversion of the flow control state; The judging module is used for judging the resource usage amount of the 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 comprises the steps of executing first judgment on the resource usage amount of the shared pool and the resource usage amount of the source port based on the exclusive resource threshold, the primary congestion relief threshold and the primary congestion opening threshold; a management module, configured to perform dynamic resource management based on the flow control state and the resource usage state of the source port, including: When the flow control state is closed, if the resource use state of the source port is congestion and the resource use amount of the destination port queue reaches a queue resource discarding threshold, discarding the data received by the destination port queue; And when the flow control state is on, if the resource use state of the source port is congestion, the source port sends a pause frame signal to the upstream equipment so as to inform the upstream equipment to stop sending data.

Description

Dynamic resource management method and device and electronic equipment Technical Field The disclosure belongs to the field of communication, and relates to a dynamic resource management method, a dynamic resource management device and electronic equipment. Background The port traffic scene of the Ethernet switching chip is complex and various, and extremely high requirements are put on the design and the function of the chip. In one aspect, the types of port traffic are rich, including but not limited to data transmission, voice communication, video streaming, and the like. For example, in an enterprise network, ports in an office area may carry a large amount of file transfer and office software communication traffic, which has a relatively high bandwidth requirement but relatively low delay sensitivity, while ports in a conference room may need to support high-definition video conferences, where delay and packet loss rate requirements are extremely high to ensure smoothness and clarity of the conference. On the other hand, the dynamic change of port flow is also very significant. During certain periods, port traffic may be in low regime, while during peak traffic periods or special events, traffic may increase dramatically. For example, during a school network lesson, the port traffic of a teaching building may be dominated by access to multimedia teaching resources, while during a rest between lessons, students may use the network to play online games or social media interactions, both traffic types and scales may change. Therefore, in order to realize that multiple traffic scenarios can be supported, the ethernet switching chip needs to be able to dynamically adapt to corresponding resource management according to the traffic scenarios, so as to ensure that the network can operate efficiently and stably in various port traffic scenarios. Disclosure of Invention The disclosure aims to provide a dynamic resource management method, a dynamic resource management device and electronic equipment, which are used for solving the technical problem of how to realize dynamic resource management. In a first aspect, an embodiment of the present disclosure provides a dynamic resource management method, including: Acquiring a flow control state of a source port; acquiring a corresponding resource management threshold based on the flow control state; judging the resource usage amount of the shared pool and the resource usage amount of the source port based on the resource management threshold so as to acquire the resource usage state of the source port in real time; And performing dynamic resource management based on the flow control state and the resource use state of the source port. In an embodiment of the disclosure, the resource management threshold includes a port management threshold, a shared pool management threshold, and a destination port queue management threshold; The port management threshold comprises an unshared resource threshold, a non-congestion threshold, a congestion threshold and a port resource discarding threshold which are sequentially increased; The shared pool management threshold comprises a first-level congestion release threshold, a first-level congestion start threshold, a second-level congestion release threshold and a second-level congestion start threshold which are sequentially increased; the destination port queue management threshold comprises a queue resource discarding threshold, wherein the non-congestion threshold, the congestion threshold and the shared pool management threshold are converted along with the conversion of the flow control state. In an embodiment of the present disclosure, determining the resource usage of the shared pool and the resource usage of the source port based on the resource management threshold includes: executing first judgment on the resource usage of a shared pool and the resource usage of the source port based on the single-shared resource threshold, the first-level congestion relief threshold and the first-level congestion opening threshold; If the first judgment is passed, continuing to execute a second judgment based on the port management threshold and the shared pool management threshold so as to acquire the resource use state of the source port; and if the first judgment is not passed, acquiring that the resource use state of the source port is non-congestion. In an embodiment of the disclosure, when the resource usage of the source port is increasing, the performing the first determination includes: If the resource usage of the source port exceeds the single-shared resource threshold and the resource usage of the shared pool exceeds the first-level congestion opening threshold, the first judgment is passed; If the resource usage amount of the source port does not exceed the single-shared resource threshold or the resource usage amount of the shared pool does not exceed the first-level congestion opening threshold, the first judgment is faile