A bandwidth adjustment method, device, program product, medium and server
By monitoring the feedback signals of the transmission channel, dynamically compute bandwidth requirements and allocate bandwidth, the problem of insufficient flexibility and efficiency of bandwidth allocation methods in the prior art is solved, and efficient resource utilization and system performance improvement is achieved.
Patent Information
- Application Number
- CN202411481770.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-10-23
AI Technical Summary
The existing automatic bandwidth identification and allocation methods are insufficient in flexibility and efficiency, resulting in waste of resources and loss of CPU functionality, and the need to redevelop BIOS, BMC and CPLD firmware for new models or configurations.
By monitoring the feedback signals of each transmission channel, dynamically calculate and accurately allocate the required bandwidth, and using a loopback signal mechanism to realize real-time bandwidth requirements monitoring of PCIe expansion devices, avoiding the need for redevelopment of specific hardware and firmware.
It improves the flexibility and efficiency of bandwidth allocation, avoids resource waste, improves system performance, meets the needs of different expansion cards, and simplifies the adaptation of new expansion cards.
Smart Images

Figure CN119011406B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of resource allocation, and in particular to a bandwidth adjustment method, device, program product, medium and server. Background Art
[0002] Loopback cards are used to simulate network connections within the same computer, and are mainly used for software testing, local communications, proxy and firewall testing, teaching demonstrations, and network programming experiments. PCIe (Peripheral Component Interconnect Express) is a high-speed serial computer expansion card standard that provides high bandwidth and flexibility through serial bus and point-to-point interconnect technology.
[0003] Different versions of PCIe (such as 1.0, 2.0, 3.0, 4.0, 5.0) have different bit transfer rates and bandwidths, and the bandwidth is related to the number of lanes. Server motherboards usually use PCIe x8 and PCIe x16 slots to accommodate expansion cards with different bandwidth requirements. However, the bandwidth provided by the current CPU (Central Processing Unit) for these slots is a fixed maximum value, resulting in resource waste and CPU function loss when inserting low-bandwidth expansion cards.
[0004] Current methods for automatic bandwidth identification and allocation, such as using GPIO (General Purpose Input / Output) expansion chips or physical detection circuits, require adding a bandwidth allocation table to the detection program and allocating bandwidth by numerical matching, which not only increases development complexity but also reduces identification and allocation efficiency. In addition, these methods require redevelopment of BIOS (Basic Input / Output System), BMC (Baseboard Management Controller) and CPLD (Complex Programmable Logic Device) firmware when facing new models or configurations, and there are identification errors for expansion cards that are not in the table. It can be seen that the current bandwidth allocation methods are obviously insufficient in flexibility and efficiency.
[0005] Therefore, providing a bandwidth allocation method to improve the flexibility and efficiency of allocating bandwidth to expansion cards is a technical problem that those skilled in the art need to solve urgently. Summary of the invention
[0006] The purpose of the present invention is to provide a bandwidth adjustment method, device, program product, medium and server, which can dynamically calculate and accurately allocate the required bandwidth by monitoring the feedback signals of each transmission channel, avoid resource waste, improve system performance, effectively solve the current shortcomings of automatic bandwidth identification and allocation in flexibility and efficiency, and meet the needs of different expansion cards.
[0007] On the one hand, the present application provides a bandwidth adjustment method, wherein an expansion device is connected to an expansion slot via a loopback card, and the loopback card is used to perform a signal loopback. The bandwidth adjustment method includes: sending a preset type of loopback signal through a preset transmission channel, and the expansion slot includes multiple transmission channels, and the preset transmission channel is one of the multiple transmission channels; monitoring all the transmission channels, and determining the transmission channel that receives the feedback signal as the target transmission channel, and the target transmission channel feeds back the feedback signal according to the received loopback signal; calculating the first bandwidth requirement of the expansion slot according to the preset transmission channel and the target transmission channel, and allocating bandwidth to the expansion slot according to the calculated first bandwidth requirement.
[0008] The step of calculating the first bandwidth requirement of the expansion slot according to the preset transmission channel and the target transmission channel comprises: determining the number of transmission channels between the target transmission channel and the preset transmission channel according to the preset transmission channel and the target transmission channel; and determining the first bandwidth requirement of the expansion slot according to the number of transmission channels and the set bandwidth of each transmission channel of the expansion slot.
[0009] Among them, sending a preset type of loopback signal through a preset transmission channel includes: sending a preset type of loopback signal through the first transmission channel; determining a first bandwidth requirement of the expansion slot according to the number of transmission channels and the set bandwidth of each transmission channel of the expansion slot, including: determining a serial number identifier of the target transmission channel, and determining the bandwidth requirement of the expansion device according to the serial number identifier and the set bandwidth of a single transmission channel; the set bandwidths of multiple transmission channels of the expansion slot are equal, and the first bandwidth requirement is the product of the serial number identifier and the set bandwidth.
[0010] Among them, after determining the first bandwidth requirement of the expansion slot according to the number of transmission channels and the set bandwidth of each transmission channel of the expansion slot, it also includes: comparing the first bandwidth requirement with a preset bandwidth requirement, the preset bandwidth requirement being a pre-stored port bandwidth requirement; allocating bandwidth to the expansion slot according to the calculated first bandwidth requirement, including: if the first bandwidth requirement is the same as the preset bandwidth requirement, allocating bandwidth to the expansion slot according to the first bandwidth requirement or the preset bandwidth requirement; if the first bandwidth requirement is different from the preset bandwidth requirement, updating the preset bandwidth requirement to the first bandwidth requirement, and allocating bandwidth to the expansion slot according to the updated preset bandwidth requirement.
[0011] Before comparing the first bandwidth requirement with the preset bandwidth requirement, the method further includes: identifying the first bandwidth requirement and determining whether the first bandwidth requirement is identified; if the first bandwidth requirement is identified, entering the step of comparing the first bandwidth requirement with the preset bandwidth requirement; if the first bandwidth requirement is not identified, allocating bandwidth to the expansion slot according to the preset bandwidth requirement.
[0012] Among them, allocating bandwidth to the expansion slot according to the calculated first bandwidth requirement includes: when using the link training state machine to perform extended link training, enabling the link training state machine and entering an initial detection state; in the initial detection state, performing a signal loopback to obtain the first bandwidth requirement to allocate the first bandwidth requirement to the expansion slot.
[0013] The bandwidth adjustment method further includes: before using the link training state machine to perform extended link training, pre-setting the bandwidth state in the link training state machine; the bandwidth state interacts with the initial detection state; after calculating the first bandwidth requirement of the expansion slot according to the preset transmission channel and the target transmission channel, it also includes: filling the calculated first bandwidth requirement into the preset bandwidth state.
[0014] Before sending a preset type of loopback signal through a preset transmission channel, the method further includes: triggering the expansion device to transmit a self-test signal through its own transmission channel, and looping back the self-test signal through the transmission channel of the expansion slot; monitoring the transmission of the self-test signal in the loopback path to perform a loopback test on the expansion device; the loopback path is a loop composed of the transmission channel of the expansion device and the transmission channel of the expansion slot; determining a second bandwidth requirement of the expansion device according to a result of the loopback test; comparing the first bandwidth requirement with the second bandwidth requirement, and determining a target bandwidth requirement according to the comparison result; allocating bandwidth to the expansion slot according to the calculated first bandwidth requirement, including: allocating bandwidth to the expansion slot according to the determined target bandwidth requirement.
[0015] Among them, comparing the first bandwidth requirement and the second bandwidth requirement, and determining the target bandwidth requirement according to the comparison result, includes: judging whether the first bandwidth requirement and the second bandwidth requirement are equal; if they are equal, determining the first bandwidth requirement or the second bandwidth requirement as the target bandwidth requirement; if they are not equal, determining the second bandwidth requirement as the target bandwidth requirement.
[0016] The server includes a plurality of expansion slots, and at least one expansion slot corresponds to an expansion device; after calculating the first bandwidth requirement of the expansion slot according to the preset transmission channel and the target transmission channel, the method further includes: constructing a slot bandwidth table, wherein the slot bandwidth table stores the correspondence between the plurality of expansion slots and the plurality of the first bandwidth requirements; after determining the second bandwidth requirement of the expansion device according to the result of the loopback test, the method further includes: constructing a device bandwidth table, wherein the device bandwidth table stores the correspondence between the plurality of expansion devices and the plurality of the second bandwidth requirements; allocating bandwidth to the expansion slot according to the calculated first bandwidth requirement, including: enabling the expansion slot connected to the expansion device according to the comparison result of the slot bandwidth table and the device bandwidth table, and allocating bandwidth to each of the expansion slots connected to the expansion device.
[0017] Among them, monitoring the transmission of the self-test signal in the loop path to perform a loopback test on the extension device includes: accessing the configuration space of the extension device through a preset instruction; determining the state of a preset data bit from the configuration space, the state of the preset data bit being used to characterize whether loop support is enabled; determining whether the loopback test passes according to the state of the preset data bit; if the preset data bit is in a first state, determining that the loopback test passes, and entering a step of determining the second bandwidth requirement of the extension device according to the result of the loopback test, otherwise determining that the loopback test fails.
[0018] Wherein, determining the state of the preset data bit from the configuration space includes: obtaining the offset address of the consumer capability register from the configuration space; and reading the value of the consumer capability register according to the offset address of the consumer capability register.
[0019] Among them, determining whether the loopback test passes according to the state of the preset data bit includes: determining whether the loopback test passes according to the value of the consumer capability register; if the value read in the consumer capability register is 1, determining that the loopback test passes; if the value read in the consumer capability register is 0, determining that the loopback test fails.
[0020] An expansion card is arranged between the loopback card and the expansion slot; the expansion card expands the expansion slot into a plurality of sub-slots, and the plurality of sub-slots correspond to different bandwidths; the loopback card is connected to the expansion slot through the sub-slots.
[0021] Among them, when the number of the loopback cards is 2; the first loopback card is connected to the first slot supporting a single transmission channel, and the second loopback card is connected to any sub-slot except the first slot; the output positive electrode of the differential transmission line corresponding to the first loopback card is connected to the input positive electrode of the differential transmission line corresponding to the second loopback card, and the output negative electrode of the differential transmission line corresponding to the first loopback card is connected to the input negative electrode of the differential transmission line corresponding to the second loopback card.
[0022] The output positive electrode and the input negative electrode of the differential transmission line corresponding to the first loop card are connected through a first switch; the output negative electrode and the input positive electrode of the differential transmission line corresponding to the first loop card are connected through a second switch.
[0023] The bandwidth adjustment method further includes: when performing a loopback test on the first transmission channel, controlling the first switch to be closed and the second switch to be closed; when performing a loopback test on the transmission channels other than the first transmission channel, controlling the first switch to be opened and the second switch to be opened.
[0024] On the other hand, the present application provides a bandwidth adjustment device, including: a memory for storing a computer program; a processor for implementing the steps of the bandwidth adjustment method described above when executing the computer program.
[0025] On the other hand, the present application provides a computer program product, including a computer program / instruction, which implements the steps of the bandwidth adjustment method described above when executed by a processor.
[0026] On the other hand, the present application provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the bandwidth adjustment method described above are implemented.
[0027] On the other hand, the present application provides a server, comprising the bandwidth adjustment device described above.
[0028] The present invention provides a bandwidth adjustment method, device, program product, medium and server, which relate to the field of resource allocation and are used to solve the problem of insufficient flexibility and efficiency of current automatic bandwidth identification and allocation. In this solution, the real-time bandwidth demand monitoring of PCIe expansion devices is realized by using loopback signals. Unlike the current method that relies on a fixed bandwidth allocation table and a static detection circuit, this solution eliminates the need for redevelopment of specific hardware and firmware, making the adaptation of new expansion cards more convenient; at the same time, by monitoring the feedback signals of each transmission channel, the required bandwidth can be dynamically calculated and accurately allocated, avoiding resource waste, improving system performance, and effectively solving the current insufficient flexibility and efficiency of automatic bandwidth identification and allocation, meeting the needs of different expansion cards. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 A flow chart of a bandwidth adjustment method provided by the present invention;
[0031] Figure 2 A schematic diagram of a differential signal transmission line on each transmission channel provided by the present invention;
[0032] Figure 3 A state transition logic diagram of a link state machine provided by the present invention;
[0033] Figure 4 A schematic diagram of the connection between transmission channels provided by the present invention;
[0034] Figure 5 A schematic diagram of a bandwidth adjustment system provided by the present invention;
[0035] Figure 6 A schematic diagram of a bandwidth adjustment device provided by the present invention;
[0036] Figure 7 A schematic diagram of a non-volatile storage medium provided by the present invention. DETAILED DESCRIPTION
[0037] The core of the present invention is to provide a bandwidth adjustment method, device, program product, medium and server. By monitoring the feedback signals of each transmission channel, the required bandwidth can be dynamically calculated and accurately allocated, thereby avoiding resource waste and improving system performance. It can effectively solve the deficiencies in flexibility and efficiency of current automatic bandwidth identification and allocation and meet the needs of different expansion cards.
[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] On the one hand, if Figure 1 As shown, the present application provides a bandwidth adjustment method, wherein the expansion device is connected to the expansion slot via a loopback card, and the loopback card is used for signal loopback. The bandwidth adjustment method includes:
[0040] S11: Sending a loopback signal of a preset type through a preset transmission channel, where the extension device includes multiple transmission channels, and the preset transmission channel is one of the multiple transmission channels.
[0041] In this step, the principle of sending a preset type of loopback signal through a preset transmission channel mainly involves the transmission of the signal and the establishment of a loopback mechanism. First, a preset transmission channel is selected, which is one of the multiple transmission channels in the expansion device as the signal transmission source. The selection of the preset channel can be based on specific test requirements or system configuration. Next, a preset type of loopback signal is generated, which can be a specific data pattern used for bandwidth testing, performance evaluation, or troubleshooting. The signal is sent out through the preset transmission channel and is designed to be able to return to the transmitting channel in the internal loopback mechanism of the device. The loopback mechanism usually involves the configuration of hardware circuits to ensure that the signal flows smoothly on the internal path and is ultimately fed back to the corresponding receiving end. This feedback process is critical because it provides the necessary data basis for subsequent monitoring and bandwidth requirement calculations. Figure 2 As shown, Figure 2 The figure shows the differential signal transmission line on each transmission channel, where HSIp represents the positive input of the differential transmission line, HSIn represents the negative input of the differential transmission line, HSOp represents the positive output of the differential transmission line, HSOn represents the negative output of the differential transmission line, and the numbers in brackets are the serial numbers of the differential transmission lines.
[0042] In this way, the signal transmission status can be monitored in real time, and key information about bandwidth capacity and signal integrity can be obtained, providing a basis for subsequent bandwidth allocation decisions.
[0043] S12: All transmission channels are monitored, and a transmission channel receiving a feedback signal is determined as a target transmission channel, and the target transmission channel feeds back a feedback signal according to the received loopback signal.
[0044] In this step, all transmission channels are first monitored to determine which channels receive feedback signals. The core of this step is to monitor the transmission status of the signal in real time to facilitate the identification of the target transmission channel. The target transmission channel refers to the channel that can successfully feedback the signal, usually the channel directly associated with the preset transmission channel in the loopback test. By comparing the feedback of the loopback signal, the system can accurately identify which transmission channels can effectively transmit the signal. The identification process may involve the evaluation of parameters such as signal strength, delay and error rate to ensure that the selected target transmission channel can provide a stable connection. Once the target transmission channel is identified, the system can further obtain the performance data of the channel.
[0045] S13: Calculate a first bandwidth requirement of the expansion slot according to the preset transmission channel and the target transmission channel, and allocate bandwidth to the expansion slot according to the calculated first bandwidth requirement.
[0046] In this step, the principle of calculating the first bandwidth requirement of the expansion device according to the preset transmission channel and the target transmission channel involves an in-depth analysis of the signal transmission performance. First, the target transmission channel identified in step S12 is used, and this channel is determined by monitoring the loopback signal feedback. The system collects and analyzes the signal characteristics transmitted through the preset transmission channel and the target transmission channel, including parameters such as the transmission rate, delay, and packet loss rate of the signal. These parameters can reflect the actual bandwidth usage and network conditions. Then, according to the preset bandwidth standard or target, the collected data is compared with these standards to calculate the first bandwidth requirement required for the expansion slot. This process may involve complex algorithms and data processing to ensure accurate assessment of the actual bandwidth requirements. After obtaining the first bandwidth requirement, the corresponding bandwidth will be dynamically adjusted and allocated to the expansion slot according to the calculation results to achieve optimal resource utilization and maximize performance. This dynamic adjustment mechanism enables the system to flexibly respond to the needs of different devices and ensure stability and efficiency under various load conditions.
[0047] In summary, the bandwidth adjustment method provided by the present invention realizes real-time bandwidth demand monitoring of the PCIe expansion slot by utilizing the loopback signal. Unlike the current method that relies on a fixed bandwidth allocation table and a static detection circuit, this solution eliminates the need for redevelopment of specific hardware and firmware, making the adaptation of new expansion cards more convenient; at the same time, by monitoring the feedback signals of each transmission channel, the required bandwidth can be dynamically calculated and accurately allocated, avoiding resource waste, improving system performance, and effectively solving the deficiencies in flexibility and efficiency of current automatic bandwidth identification and allocation, meeting the needs of different expansion cards.
[0048] Based on the above embodiments:
[0049] In an optional embodiment, the first bandwidth requirement of the expansion slot is calculated according to the preset transmission channel and the target transmission channel, including: determining the number of transmission channels between the target transmission channel and the preset transmission channel according to the preset transmission channel and the target transmission channel; and determining the first bandwidth requirement of the expansion slot according to the number of transmission channels and the set bandwidth of each transmission channel of the expansion slot.
[0050] In this optional embodiment, the process of calculating the first bandwidth requirement of the expansion slot first involves identifying the number of transmission channels between the preset transmission channel and the target transmission channel. Determining this number is critical because it directly affects the allocation of overall bandwidth. Specifically, the system evaluates the connectivity and status of these channels to count the number of effective transmission channels. Next, based on the number of channels and their respective set bandwidths, the required first bandwidth requirement is calculated. The set bandwidth is usually based on the design specifications of each transmission channel, such as the bandwidth limit of each channel, which may be x1, x4, etc. After comprehensively considering the number of channels and the set bandwidth of each channel, these data are multiplied to obtain the total bandwidth requirement of the expansion slot.
[0051] This approach ensures that the expansion slot can dynamically adjust bandwidth allocation based on the actual connected channel conditions to optimize performance and improve resource utilization to meet different application requirements.
[0052] In an optional embodiment, sending a preset type of loopback signal through a preset transmission channel includes: sending a preset type of loopback signal through a first transmission channel; determining a first bandwidth requirement of the expansion slot according to the number of transmission channels and the set bandwidth of each transmission channel of the expansion slot, including: determining a serial number identifier of the target transmission channel, and determining the bandwidth requirement of the expansion device according to the serial number identifier and the set bandwidth of the single transmission channel; the set bandwidths of multiple transmission channels of the expansion slot are equal, and the first bandwidth requirement is the product of the serial number identifier and the set bandwidth.
[0053] In this optional embodiment, the process of sending a preset type of loopback signal through a preset transmission channel is to evaluate the bandwidth requirement of the expansion slot. First, a preset type of loopback signal is sent through the first transmission channel to activate the loopback mechanism and establish a signal transmission path. This process allows the system to monitor the transmission of the signal. Next, the first bandwidth requirement of the expansion slot is calculated based on the number of transmission channels and the set bandwidth of each transmission channel. In this process, the serial number identifier of the target transmission channel is determined, which helps the system determine the specific channel to be used, which is a key step in identifying the position of the channel among multiple channels. By combining the serial number identifier with the set bandwidth of a single transmission channel, the specific bandwidth requirement of the expansion device can be effectively calculated. If multiple transmission channels of the expansion slot have equal set bandwidths, the first bandwidth requirement can be quickly obtained by multiplying the serial number identifier with the set bandwidth.
[0054] This calculation method ensures that the system can flexibly adjust bandwidth allocation according to different channel configurations to optimize resource usage and improve system performance.
[0055] In an optional embodiment, after calculating the first bandwidth requirement of the expansion slot according to the preset transmission channel and the target transmission channel, it also includes: comparing the first bandwidth requirement with the preset bandwidth requirement, the preset bandwidth requirement is a pre-stored port bandwidth requirement; allocating bandwidth to the expansion slot according to the calculated first bandwidth requirement, including: if the first bandwidth requirement is the same as the preset bandwidth requirement, allocating bandwidth to the expansion slot according to the first bandwidth requirement or the preset bandwidth requirement; if the first bandwidth requirement is different from the preset bandwidth requirement, updating the preset bandwidth requirement to the first bandwidth requirement, and allocating bandwidth to the expansion slot according to the updated preset bandwidth requirement.
[0056] In this optional embodiment, after calculating the first bandwidth requirement of the expansion slot, the first bandwidth requirement is first compared with the pre-stored port bandwidth requirement to evaluate whether the current bandwidth allocation meets the preset standard. The preset bandwidth requirement is data set and stored by the system during the previous configuration process, which reflects the optimal working state and performance requirements of the device. When the calculated first bandwidth requirement is the same as the preset bandwidth requirement, the system will select one of them as the basis to allocate bandwidth to the expansion slot. This process ensures the consistency of bandwidth allocation and avoids unnecessary waste of resources.
[0057] However, when the calculated first bandwidth requirement is inconsistent with the preset bandwidth requirement, the system will update the preset bandwidth requirement to the new calculation result to better adapt to the current device requirements and network environment. Through this update mechanism, the system can reflect the actual performance requirements of the device in real time, thereby optimizing bandwidth allocation and improving system flexibility and efficiency. This dynamic adjustment mechanism ensures that the expansion slot can obtain the best bandwidth support under different workloads and configurations, thereby improving the performance and stability of the overall system.
[0058] In an optional embodiment, before comparing the first bandwidth requirement with the preset bandwidth requirement, the method further includes: identifying the first bandwidth requirement and determining whether the first bandwidth requirement is identified; if the first bandwidth requirement is identified, entering the step of comparing the first bandwidth requirement with the preset bandwidth requirement; if the first bandwidth requirement is not identified, allocating bandwidth to the expansion slot according to the preset bandwidth requirement.
[0059] In this optional embodiment, before comparing the calculated first bandwidth requirement with the preset bandwidth requirement, the calculated first bandwidth requirement needs to be identified first. The purpose of this step is to ensure that the calculation result can be successfully obtained and understood so as to make subsequent bandwidth allocation decisions.
[0060] When determining whether the calculated first bandwidth requirement is successfully identified, if the identification is successful, the comparison step will be entered to evaluate the difference between the current requirement and the preset requirement, and then make a reasonable bandwidth allocation. However, if the calculated first bandwidth requirement is not identified, the bandwidth will be directly allocated to the expansion device according to the preset bandwidth requirement. This situation may be caused by a variety of reasons, including but not limited to errors in the calculation process, unstable data transmission, signal interference and other technical problems. In addition, in some cases, it may not be possible to extract valid bandwidth requirement information from the current device status or input signal, such as when the device is in a faulty state or has not completed initialization.
[0061] The design of this mechanism ensures that in the absence of information, the system can still rely on the preset bandwidth requirements to perform basic bandwidth allocation, thereby maintaining the normal operation of the equipment.
[0062] In an optional embodiment, bandwidth is allocated to an expansion slot based on a calculated first bandwidth requirement, including: when using a link training state machine to perform extended link training, enabling the link training state machine and entering an initial detection state; in the initial detection state, performing a signal loopback to obtain a first bandwidth requirement to allocate the first bandwidth requirement to the expansion slot.
[0063] In an optional embodiment, the bandwidth adjustment method also includes: before using the link training state machine to perform extended link training, pre-setting the bandwidth state in the link training state machine; the bandwidth state and the initial detection state perform data interaction; after calculating the first bandwidth requirement of the expansion slot according to the preset transmission channel and the target transmission channel, it also includes: filling the calculated first bandwidth requirement into the preset bandwidth state.
[0064] In this optional embodiment, the core of the bandwidth adjustment method is to dynamically manage the bandwidth allocation of the expansion slot through the link training state machine. First, before starting the link training, the system pre-sets the bandwidth state, which is used to store the bandwidth information related to the expansion slot and interact with the initial detection state to quickly obtain the required data in the subsequent process. When the link training state machine is enabled and enters the initial detection state, the system will interact with the bandwidth state through signals, and then perform a signal loopback test to confirm the actual bandwidth requirement of the expansion slot, that is, the first bandwidth requirement. In this process, the system sends a signal from a preset transmission channel and returns it through a loopback mechanism to obtain feedback information to ensure the accuracy of bandwidth allocation. Once the first bandwidth requirement is calculated, the system will fill this information into the preset bandwidth state, so that the required bandwidth can be allocated to the expansion slot to ensure that system resources are reasonably used.
[0065] like Figure 3 As shown, the link state machine includes Figure 3 There are multiple states in the normal PCIe link training state transition process, which is initial detection state → polling state → configuration state → working state. The working state is the power state in which the PCIe link can work normally. The state related to PCIe link retraining is also called Recovery. Recovery is a very important link state. There are many factors that enter this state, such as changes in power state and changes in PCIe link rate. Power state related: The power state of the PCIe bus mainly consists of two parts. The first is the PCI-PM power management mechanism based on software control. The system software modifies the power management field in the register to make the PCIe device enter the D state: D0, D1, D2, D3. The second is the ASPM (Active State Power Management) power management mechanism based on hardware control. It is a link power management mechanism based on hardware autonomous control. The ASPM mechanism can only be started when the PCIe device is in the D0 state. In addition, the link states related to ASPM are L0s (low-power working state) and L1 (sleep state) (including L1.1 and L1.2). In addition, Figure 3Other states shown in (such as disabled state, hot reset state, loop state, recovery state, deep sleep state, etc.) have the same meanings as in the related art and will not be repeated in this application.
[0066] The design of this method not only improves the flexibility and real-time performance of bandwidth allocation, but also reduces the need for manual intervention, allowing the system to quickly adapt to changing bandwidth requirements under different working conditions.
[0067] In an optional embodiment, before sending a preset type of loopback signal through a preset transmission channel, it also includes: triggering the expansion device to transmit a self-test signal through its own transmission channel, and looping the self-test signal through the transmission channel of the expansion slot; monitoring the transmission of the self-test signal in the loopback path to perform a loopback test on the expansion device; the loopback path is a loop composed of the transmission channel of the expansion device and the transmission channel of the expansion slot; determining a second bandwidth requirement of the expansion device according to a result of the loopback test; comparing the first bandwidth requirement and the second bandwidth requirement, and determining a target bandwidth requirement according to the comparison result; allocating bandwidth to the expansion slot according to the calculated first bandwidth requirement, including: allocating bandwidth to the expansion slot according to the determined target bandwidth requirement.
[0068] In this optional embodiment, the bandwidth requirement of the expansion device is obtained and confirmed through a loopback test. First, the expansion device is triggered to send a self-test signal through its own transmission channel, and the signal is looped back through the transmission channel of the expansion slot to form a closed loop path. The loop is composed of the transmission channel of the expansion device and the transmission channel of the expansion slot, thereby ensuring that the self-test signal can be transmitted in a loop. In this process, the transmission of the self-test signal in the loopback path is continuously monitored to perform an effective loopback test on the expansion device. According to the test results, the second bandwidth requirement of the expansion device can be determined, that is, the bandwidth actually available in the loopback test.
[0069] Next, the first bandwidth requirement obtained is compared with the second bandwidth requirement to determine the target bandwidth requirement. This comparison process ensures that the system can dynamically adjust bandwidth allocation to adapt to actual conditions and changes in device performance. Once the target bandwidth requirement is determined, appropriate bandwidth is allocated to the expansion slot based on the calculated first bandwidth requirement, which can optimize resource utilization and ensure the performance of the expansion device during operation. At the same time, this process enhances the flexibility and adaptability of the system, enabling it to respond in real time to changes in bandwidth requirements under different working conditions.
[0070] In an optional embodiment, the first bandwidth requirement and the second bandwidth requirement are compared, and the target bandwidth requirement is determined according to the comparison result, including: determining whether the first bandwidth requirement and the second bandwidth requirement are equal; if they are equal, determining the first bandwidth requirement or the second bandwidth requirement as the target bandwidth requirement; if they are not equal, determining the second bandwidth requirement as the target bandwidth requirement.
[0071] In this optional embodiment, the target bandwidth requirement is determined by comparing the first bandwidth requirement and the second bandwidth requirement to optimize the bandwidth allocation of the extension device. First, it is determined whether the two are equal. If they are equal, it means that the bandwidth requirements are consistent under different measurement conditions, and one of the first bandwidth requirement or the second bandwidth requirement can be selected as the target bandwidth requirement, which can simplify the bandwidth allocation process and ensure that the allocated bandwidth is sufficient to meet the actual needs of the device.
[0072] If the two bandwidth requirements are not equal, it means that the bandwidth requirements of the expansion device under different test conditions are different. At this time, the system will prioritize the second bandwidth requirement as the target bandwidth requirement, reflecting the actual available bandwidth in the loopback test. This decision logic ensures the flexibility and adaptability of bandwidth allocation, enabling the system to dynamically adjust resources based on actual test feedback, thereby improving the overall performance and stability of the expansion device.
[0073] In an optional embodiment, the server includes multiple expansion slots, and at least one expansion slot corresponds to an expansion device; after calculating the first bandwidth requirement of the expansion slot according to a preset transmission channel and a target transmission channel, it also includes: constructing a slot bandwidth table, in which the corresponding relationship between multiple expansion slots and multiple first bandwidth requirements is stored; after determining the second bandwidth requirement of the expansion device according to the result of the loopback test, it also includes: constructing a device bandwidth table, in which the corresponding relationship between multiple expansion devices and multiple second bandwidth requirements is stored; allocating bandwidth to the expansion slot according to the calculated first bandwidth requirement, including: enabling the expansion slot connected to the expansion device according to the comparison result of the slot bandwidth table and the device bandwidth table, and allocating bandwidth to each expansion slot connected to the expansion device.
[0074] In this optional embodiment, the server implements effective bandwidth management of expansion slots and expansion devices by establishing a slot bandwidth table and a device bandwidth table. First, the slot bandwidth table records the first bandwidth requirement corresponding to each expansion slot, ensuring that the bandwidth allocation requirements of each slot can be clearly understood. Then, after the loopback test, the device bandwidth table records the second bandwidth requirement of each expansion device, thereby providing bandwidth data based on actual test feedback. This data structuring method allows the system to compare the slot bandwidth table and the device bandwidth table to determine whether each expansion slot meets the actual requirements of the expansion device connected to it.
[0075] In the bandwidth allocation process, by comparing the contents of the two tables, the expansion slots connected to the expansion devices are enabled and appropriate bandwidth is allocated to them. This design not only improves the utilization efficiency of bandwidth resources, but also optimizes device performance, ensuring that each expansion device can obtain the bandwidth it needs, avoiding resource waste and performance bottlenecks. In addition, this method also provides flexibility for possible future expansion, facilitating dynamic adjustments based on the introduction of new devices or changes in bandwidth requirements, thereby improving the adaptability and stability of the system.
[0076] In an optional embodiment, the transmission of the self-test signal in the loopback path is monitored to perform a loopback test on the extended device, including: accessing the configuration space of the extended device through a preset instruction; determining the state of a preset data bit from the configuration space, the state of the preset data bit being used to characterize whether loop support is enabled; determining whether the loopback test passes according to the state of the preset data bit; if the preset data bit is in a first state, determining that the loopback test passes, and entering a step of determining a second bandwidth requirement of the extended device according to the result of the loopback test, otherwise determining that the loopback test fails.
[0077] In this optional embodiment, by monitoring the transmission of the self-test signal in the loopback path, the extended device can be effectively tested for loopback. First, the configuration space of the extended device is accessed through preset instructions, and key configuration parameters can be read. These parameters include the state of a preset data bit, which is used to characterize whether loop support is enabled, reflecting the functional configuration of the device. When the preset data bit is detected to be in the first state, it means that the device has successfully enabled loop support, indicating that the loopback test has passed, and the next step is to determine the second bandwidth requirement of the extended device based on the test results. On the contrary, if the data bit does not reach the preset state, it indicates that the loopback test has failed, indicating that there may be a hardware failure or improper configuration.
[0078] The benefit of this approach is that it provides a systematic way to verify the functional integrity of the expansion device and ensure that it can loop back the signal normally. This not only helps to detect potential failures early and reduce unnecessary risks in subsequent operations, but also ensures that the device has stable performance in the network. In addition, by dynamically evaluating bandwidth requirements, the system can better adapt to the changing network environment, thereby improving the flexibility and efficiency of resource allocation and ensuring efficient operation of the network.
[0079] In an optional embodiment, the bandwidth adjustment method also includes: when the loopback test fails, recording the transmission failure information of the self-test signal; entering a safe mode, and limiting bandwidth usage in the safe mode; reporting the fault information to the administrator so that the administrator can repair the physical components and physical connections based on the fault information.
[0080] In this optional embodiment, when the loopback test fails, the transmission failure information of the self-test signal will be recorded. This step is critical because it provides valuable data for subsequent troubleshooting to help determine the root cause of the problem. Next, it will enter the safe mode to limit the use of bandwidth. This is done to avoid continuing data transmission in an unstable state, thereby protecting the integrity of the system and connection and preventing potential damage or data loss. In safe mode, the system will adopt a more conservative strategy to ensure that more serious problems will not be caused by improper bandwidth allocation. At the same time, fault information will be reported to the manager to ensure that relevant personnel can be informed of the occurrence of the problem in a timely manner. These fault information usually contain the specific circumstances of the failure of the self-test signal transmission. The manager can perform targeted maintenance based on this information to check the physical components and physical connections to ensure that the equipment can be restored to normal working condition.
[0081] This series of measures is designed to improve system reliability and maintenance efficiency and reduce potential downtime and losses.
[0082] In an optional embodiment, the transmission of the self-test signal in the loopback path is monitored to perform a loopback test, including: accessing the configuration space of the expansion device through a preset instruction; determining the state of a preset data bit from the configuration space, the state of the preset data bit being used to characterize whether loop support is enabled; determining whether the loopback test passes according to the state of the preset data bit; if the preset data bit is in a first state, determining that the loopback test passes, otherwise determining that the loopback test fails.
[0083] In this optional embodiment, a loopback test is performed by monitoring the transmission of a self-test signal in a loopback path, and the specific steps include accessing the configuration space of the extended device. The configuration space is a part of the device that contains the status and function settings of the device and can be read through preset instructions. In this process, the status of preset data bits is obtained from the configuration space, and the status of these data bits is used as an important indicator to determine whether the loop support is enabled. By checking these data bits, it can be determined whether the extended device has successfully enabled the loopback function. If the state of the preset data bit is the first state, the loopback test is deemed to have passed, which means that the self-test signal is successfully transmitted in the loopback path and the device has normal loop function; on the contrary, if the state of the preset data bit is not the first state, it is determined that the loopback test has not passed, indicating that there is a problem and further troubleshooting and repair may be required.
[0084] This testing mechanism effectively ensures that the device can pass the necessary verification before enabling loop support, thereby improving the reliability and stability of the system.
[0085] In an optional embodiment, determining the state of a preset data bit from the configuration space includes: obtaining an offset address of a consumer capability register from the configuration space; and reading a value of the consumer capability register according to the offset address of the consumer capability register.
[0086] In an optional embodiment, determining whether the loopback test passes according to the state of a preset data bit includes: determining whether the loopback test passes according to the value of a consumer capability register; if the value read in the consumer capability register is 1, determining that the loopback test passes; if the value read in the consumer capability register is 0, determining that the loopback test fails.
[0087] In this optional embodiment, the state of the preset data bit is determined from the configuration space of the extended device to evaluate the result of the loopback test. The specific steps are to first obtain the offset address of the consumer capability register, which is a register used to describe the device capabilities and supported functions. By accessing its offset address, the current value of the register can be read. Then, the value of the consumer capability register read is used to determine whether the loopback test is passed. If the read value is 1, this usually means that the device has enabled loopback support, and the system determines that the loopback test has passed, indicating that the self-test signal of the device can be successfully transmitted in the loopback path and the function is normal; on the contrary, if the read value is 0, it means that the device has not enabled loopback support, so it is determined that the loopback test has not passed, indicating that there may be a configuration error or hardware failure. Specifically, when the preset data bit is in the first state, the value in the consumer capability register is 1; when the preset data bit is in the second state, the value in the consumer capability register is 0.
[0088] This process ensures that the device has been rigorously verified before the loopback function is enabled, improving the reliability and stability of the system.
[0089] In an optional embodiment, an expansion card is arranged between the loopback card and the expansion slot; the expansion card expands the expansion slot into multiple sub-slots, and the multiple sub-slots correspond to different bandwidths; the loopback card is connected to the expansion slot through the sub-slots.
[0090] In this optional embodiment, an expansion card is set between the loopback card and the expansion slot. The main function of the expansion card is to subdivide the original expansion slot into multiple sub-slots, each of which has a different bandwidth configuration, such as x1, x2, x4, x8 and x16, etc. Through this design, the system can flexibly provide access for expansion devices with different bandwidth requirements, making full use of the flexibility of the PCIe architecture. The loopback card is connected to the expansion slot through these sub-slots, so that each expansion device can perform effective signal transmission and bandwidth allocation during self-test and functional testing, thereby improving the overall performance and efficiency of the system.
[0091] Specifically, the design of the loopback card can be formulated in different models according to different bandwidth requirements, such as five categories: x1 loopback card, x2 loopback card, x4 loopback card, x8 loopback card and x16 loopback card. Each loopback card connects the HSOp (positive output of the differential transmission line) and HSOn (negative output of the differential transmission line) of the first transmission channel (lane) with the HSIp (positive input of the differential transmission line) and HSIn (negative input of the differential transmission line) of the last channel to achieve an effective signal loopback function. This design allows stable signal transmission and accuracy of loopback testing under different bandwidth conditions.
[0092] Such a structure not only expands the connection capacity, but also enhances the flexibility of bandwidth management, providing users with higher scalability and adaptability.
[0093] In an optional embodiment, when the number of loopback cards is 2; the first loopback card is connected to the first slot supporting a single transmission channel, and the second loopback card is connected to any sub-slot except the first slot; the output positive electrode of the differential transmission line corresponding to the first loopback card is connected to the input positive electrode of the differential transmission line corresponding to the second loopback card, and the output negative electrode of the differential transmission line corresponding to the first loopback card is connected to the input negative electrode of the differential transmission line corresponding to the second loopback card.
[0094] In an optional embodiment, if Figure 4 As shown, the output positive electrode and the input negative electrode of the differential transmission line corresponding to the first loop card are connected through the first switch 11; the output negative electrode and the input positive electrode of the differential transmission line corresponding to the first loop card are connected through the first switch 12.
[0095] In an optional embodiment, the bandwidth adjustment method further includes: when performing a loopback test on the first transmission channel, controlling the first switch 11 to be closed and the first switch 12 to be closed; when performing a loopback test on other transmission channels except the first transmission channel, controlling the first switch 11 to be opened and the first switch 12 to be opened.
[0096] In this preferred embodiment, when the number of loopback cards is two, the first loopback card is used to be connected to the first slot supporting a single transmission channel, and the second loopback card is connected to other sub-slots. In order to perform bandwidth testing, when the first transmission channel is subjected to loopback testing, the first switch 11 and the first switch 12 are controlled to be closed so that the signal can flow in the loopback path, thereby verifying the transmission capacity of the channel. If the loopback signal is successfully looped back in the test, the bandwidth availability of the first transmission channel will be confirmed. And when other transmission channels except the first transmission channel are subjected to loopback testing, the first switch 11 and the first switch 12 are controlled to be disconnected to ensure that these channels are tested independently to avoid signal interference. In this way, the performance of each channel can be accurately evaluated to ensure that effective bandwidth allocation and adjustment are performed in the expansion device according to the actual bandwidth demand.
[0097] like Figure 4 As shown, the left gold finger is inserted into lane1, the HSOp on the left x1 gold finger is linearly connected to HSIn, and a first switch 11 is arranged on the connecting line; the HSOn on the left x1 gold finger is linearly connected to HSIp, and a first switch 12 is arranged on the connecting line; the HSOp on the left x1 gold finger is linearly connected to the HSIp on the right x1 gold finger, the HSOn on the left x1 gold finger is linearly connected to the HSIn on the right x1 gold finger, and the right x1 gold finger is inserted into one of lane2-lane16.
[0098] On the other hand, Figure 5 As shown, the present application provides a bandwidth adjustment system, wherein an expansion device is connected to an expansion slot via a loopback card, and the bandwidth adjustment system comprises: a signal sending unit 51, configured to send a preset type of loopback signal via a preset transmission channel, wherein the expansion device comprises a plurality of transmission channels, and the preset transmission channel is one of the plurality of transmission channels; a monitoring unit 52, configured to monitor all transmission channels, and determine the transmission channel receiving the feedback signal as the target transmission channel, wherein the target transmission channel feeds back the feedback signal according to the received loopback signal; a bandwidth allocation unit 53, configured to calculate the bandwidth requirement of the expansion device according to the preset transmission channel and the target transmission channel, and allocate bandwidth to the expansion device according to the calculated bandwidth requirement.
[0099] For an introduction to the bandwidth adjustment system, please refer to the above embodiments, and this application will not go into details here.
[0100] On the other hand, Figure 6 As shown, the present application provides a bandwidth adjustment device, including: a memory 61 for storing a computer program; a processor 62 for implementing the steps of the above-mentioned bandwidth adjustment method when executing the computer program. For the introduction of the bandwidth adjustment device, please refer to the above-mentioned embodiment, and the present application will not repeat it here.
[0101] On the other hand, the present application provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned bandwidth adjustment method when executed by a processor. For the introduction of the computer program product, please refer to the above-mentioned embodiment, and the present application will not repeat it here.
[0102] On the other hand, Figure 7 As shown, the present application provides a non-volatile storage medium 71, on which a computer program 72 is stored, and when the computer program 72 is executed by a processor, the steps of the above-mentioned bandwidth adjustment method are implemented. For the introduction of the non-volatile storage medium 71, please refer to the above-mentioned embodiment, and the present application will not repeat it here.
[0103] On the other hand, the present application provides a server, including the above-mentioned bandwidth adjustment device. For the introduction of the server, please refer to the above-mentioned embodiment, and the present application will not repeat it here.
[0104] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0105] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A bandwidth adjustment method, characterized in that: The expansion device is connected to the expansion slot via a loopback card, and the loopback card is used to perform signal loopback. The bandwidth adjustment method includes: Sending a loopback signal of a preset type through a preset transmission channel, wherein the expansion slot includes a plurality of transmission channels, and the preset transmission channel is one of the plurality of transmission channels; Monitoring all the transmission channels, and determining the transmission channel receiving the feedback signal as the target transmission channel, wherein the target transmission channel feeds back the feedback signal according to the received loopback signal; Calculating a first bandwidth requirement of the expansion slot according to the preset transmission channel and the target transmission channel, and allocating bandwidth to the expansion slot according to the calculated first bandwidth requirement; Calculating a first bandwidth requirement of the expansion slot according to the preset transmission channel and the target transmission channel includes: Determining the number of transmission channels between the target transmission channel and the preset transmission channel according to the preset transmission channel and the target transmission channel; A first bandwidth requirement of the expansion slot is determined according to the number of transmission channels and a set bandwidth of each transmission channel of the expansion slot.
2. The bandwidth adjustment method according to claim 1, characterized in that: Send a preset type of loopback signal through a preset transmission channel, including: Sending a loopback signal of a preset type through the first transmission channel; Determining a first bandwidth requirement of the expansion slot according to the number of transmission channels and a set bandwidth of each transmission channel of the expansion slot includes: Determine the serial number identifier of the target transmission channel, and determine the bandwidth requirement of the expansion device according to the serial number identifier and the set bandwidth of the single transmission channel; The set bandwidths of the multiple transmission channels of the expansion slot are equal, and the first bandwidth requirement is the product of the sequence number identifier and the set bandwidth.
3. The bandwidth adjustment method according to claim 1, characterized in that: After calculating the first bandwidth requirement of the expansion slot according to the preset transmission channel and the target transmission channel, the method further includes: Comparing the first bandwidth requirement with a preset bandwidth requirement, where the preset bandwidth requirement is a pre-stored port bandwidth requirement; Allocating bandwidth to the expansion slot according to the calculated first bandwidth requirement includes: If the first bandwidth requirement is the same as the preset bandwidth requirement, allocating bandwidth to the expansion slot according to the first bandwidth requirement or the preset bandwidth requirement; If the first bandwidth requirement is different from the preset bandwidth requirement, the preset bandwidth requirement is updated to the first bandwidth requirement, and bandwidth is allocated to the expansion slot according to the updated preset bandwidth requirement.
4. The bandwidth adjustment method according to claim 3, characterized in that: Before comparing the first bandwidth requirement with the preset bandwidth requirement, the method further includes: identifying the first bandwidth requirement, and determining whether the first bandwidth requirement is identified; If the first bandwidth requirement is identified, entering the step of comparing the first bandwidth requirement with a preset bandwidth requirement; If the first bandwidth requirement is not identified, bandwidth is allocated to the expansion slot according to the preset bandwidth requirement.
5. The bandwidth adjustment method according to claim 1, characterized in that: Allocating bandwidth to the expansion slot according to the calculated first bandwidth requirement includes: When using the link training state machine to perform extended link training, the link training state machine is enabled to enter the initial detection state; In the initial detection state, a signal loop is performed to obtain the first bandwidth requirement, so as to allocate the first bandwidth requirement to the expansion slot.
6. The bandwidth adjustment method according to claim 5, characterized in that: The bandwidth adjustment method further includes: Before using the link training state machine to perform extended link training, a bandwidth state is pre-set in the link training state machine; the bandwidth state performs data interaction with the initial detection state; After calculating the first bandwidth requirement of the expansion slot according to the preset transmission channel and the target transmission channel, the method further includes: The calculated first bandwidth requirement is filled into the preset bandwidth state.
7. The bandwidth adjustment method according to claim 1, characterized in that: Before sending a loopback signal of a preset type through a preset transmission channel, the method further includes: Triggering the expansion device to transmit a self-test signal through its own transmission channel, and looping back the self-test signal through the transmission channel of the expansion slot; Monitoring the transmission of the self-test signal in the loopback path to perform a loopback test on the expansion device; the loopback path is a loop composed of a transmission channel of the expansion device and a transmission channel of the expansion slot; Determining a second bandwidth requirement of the extension device according to a result of the loopback test; comparing the first bandwidth requirement and the second bandwidth requirement, and determining a target bandwidth requirement according to the comparison result; Allocating bandwidth to the expansion slot according to the calculated first bandwidth requirement includes: Bandwidth is allocated to the expansion slot according to the determined target bandwidth requirement.
8. The bandwidth adjustment method according to claim 7, characterized in that: Comparing the first bandwidth requirement with the second bandwidth requirement, and determining a target bandwidth requirement according to the comparison result, includes: Determining whether the first bandwidth requirement and the second bandwidth requirement are equal; If they are equal, determining the first bandwidth requirement or the second bandwidth requirement as the target bandwidth requirement; If they are not equal, the second bandwidth requirement is determined to be the target bandwidth requirement.
9. The bandwidth adjustment method according to claim 7, characterized in that: The server includes a plurality of expansion slots, and at least one expansion slot corresponds to an expansion device; After calculating the first bandwidth requirement of the expansion slot according to the preset transmission channel and the target transmission channel, the method further includes: Constructing a slot bandwidth table, wherein the slot bandwidth table stores a correspondence between a plurality of the expansion slots and a plurality of the first bandwidth requirements; After determining the second bandwidth requirement of the extension device according to the result of the loopback test, the method further includes: Constructing a device bandwidth table, wherein the device bandwidth table stores a correspondence between a plurality of the extension devices and a plurality of the second bandwidth requirements; Allocating bandwidth to the expansion slot according to the calculated first bandwidth requirement includes: The expansion slot connected to the expansion device is enabled according to the comparison result of the slot bandwidth table and the device bandwidth table, and bandwidth is allocated to each expansion slot connected to the expansion device.
10. The bandwidth adjustment method according to claim 7, characterized in that: Monitoring the transmission of the self-test signal in the loopback path to perform a loopback test on the extension device includes: Accessing the configuration space of the extended device through preset instructions; Determining a state of a preset data bit from the configuration space, the state of the preset data bit being used to indicate whether ring support is enabled; Determining whether the loopback test passes according to the state of the preset data bit; If the preset data bit is in the first state, it is determined that the loopback test has passed, and the step of determining the second bandwidth requirement of the extension device according to the result of the loopback test is entered; otherwise, it is determined that the loopback test has not passed.
11. The bandwidth adjustment method according to claim 10, characterized in that: Determining a state of a preset data bit from the configuration space includes: Obtaining an offset address of a consumer capability register from the configuration space; The value of the consumer capability register is read according to the offset address of the consumer capability register.
12. The bandwidth adjustment method according to claim 11, characterized in that: Determining whether the loopback test passes according to the state of the preset data bit includes: Determining whether the loopback test passes according to the value of the consumer capability register; If the value read in the consumer capability register is 1, it is determined that the loopback test passes; If the value read from the consumer capability register is 0, it is determined that the loopback test has failed.
13. The bandwidth adjustment method according to any one of claims 1 to 12, characterized in that: An expansion card is arranged between the loop card and the expansion slot; The expansion card expands the expansion slot into a plurality of sub-slots, and the bandwidths corresponding to the plurality of sub-slots are different; The loopback card is connected to the expansion slot through the sub-slot.
14. The bandwidth adjustment method according to claim 13, characterized in that: The number of the loop cards is 2; The first loopback card is connected to a first slot supporting a single transmission channel, and the second loopback card is connected to any sub-slot except the first slot; The output positive electrode of the differential transmission line corresponding to the first loop card is connected to the input positive electrode of the differential transmission line corresponding to the second loop card, and the output negative electrode of the differential transmission line corresponding to the first loop card is connected to the input negative electrode of the differential transmission line corresponding to the second loop card.
15. The bandwidth adjustment method according to claim 14, characterized in that: The output positive electrode and the input negative electrode of the differential transmission line corresponding to the first loopback card are connected via a first switch; The output negative electrode and the input positive electrode of the differential transmission line corresponding to the first loopback card are connected via a second switch.
16. The bandwidth adjustment method according to claim 15, characterized in that: The bandwidth adjustment method further includes: When performing a loopback test on the first transmission channel, controlling the first switch to be closed and the second switch to be closed; When a loopback test is performed on the transmission channels other than the first transmission channel, the first switch and the second switch are controlled to be opened.
17. A bandwidth adjustment device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the bandwidth adjustment method according to any one of claims 1 to 16 when executing a computer program.
18. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the bandwidth adjustment method according to any one of claims 1 to 16 are implemented.
19. A non-volatile storage medium, characterized in that: A computer program is stored on the non-volatile storage medium, and when the computer program is executed by the processor, the steps of the bandwidth adjustment method according to any one of claims 1 to 16 are implemented.
20. A server, characterized in that: Comprising the bandwidth adjustment device as claimed in claim 17.
Citation Information
Patent Citations
Testing method and device for equipment link loopback and medium
CN118170594A
PCIe device configuration method, apparatus and device, and readable storage medium
CN118295717A