Bandwidth allocation method, device and system and electronic equipment

By setting up switching components between the transmission channels of the expansion card and using loop circuits to automatically identify bandwidth, the adaptive problem of server PCIe slot bandwidth allocation is solved, achieving more efficient resource utilization and simplified motherboard design.

CN120675880APending Publication Date: 2025-09-19INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510934277.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

In existing technologies, the bandwidth allocation method for server PCIe slots lacks adaptability, resulting in poor compatibility of Riser cards between different server versions and manufacturers, serious resource waste, and a large maintenance workload.

Method used

By setting a switch between the first and last transmission channels of the expansion card, and using a loop circuit to automatically identify the bandwidth, adaptive allocation of PCIe slot bandwidth is achieved, simplifying firmware circuit design and improving development efficiency.

Benefits of technology

It enables adaptive allocation of server PCIe slot bandwidth, eliminating the need to confirm expansion card models in advance, simplifying motherboard layout, saving hardware resources, reducing circuit complexity, improving production efficiency, and breaking the convention restrictions between different versions and manufacturers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120675880A_ABST
    Figure CN120675880A_ABST
Patent Text Reader

Abstract

The invention discloses a bandwidth allocation method, device and system and electronic equipment, and relates to the technical field of server interface control. Acquiring state information corresponding to the expansion card; the expansion card comprises a plurality of expansion slots; a switch component is arranged between the head transmission channel and the tail transmission channel of each expansion slot; the common port of each switch component is connected with the first transmission channel of the corresponding expansion slot, and the normally closed port of each switch component is connected with the tail transmission channel of the corresponding expansion slot. And when the state information meets the expansion card change condition, the common port of each switch component is controlled to be communicated with the normally closed port, and at the moment, each expansion slot forms a loop. And determining the bandwidth corresponding to each root port according to the transmission channel receiving the same test data in the expansion slot position corresponding to each root port. And after bandwidth allocation of all the root ports is completed, the common port and the normally-closed port of each switch component are controlled to be disconnected. The adaptive allocation of the PCIe slot bandwidth of the server is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of server interface control, and in particular to a bandwidth allocation method, device, system and electronic device. Background Art

[0002] PCIe (Peripheral Component Interconnect Express) is a high-speed serial computer expansion card standard primarily used to connect central processing units (CPUs) and various expansion cards, such as graphics cards, sound cards, and network adapters. PCIe utilizes a point-to-point interconnect, with each device connected via an independent link and enjoying exclusive bandwidth. The wide variety of server models and the high level of customization required by customers have led to a complex and diverse array of server CPU PCIe port connectivity. The connections between CPU PCIe ports and expansion cards (risers) vary from motherboard to motherboard, and the PCIe port allocation within riser cards also varies. Traditional bandwidth identification solutions rely on each company customizing its own bandwidth allocation table. When a riser card is manufactured, it is assigned a unique, fixed bandwidth allocation code. When the server is powered on, the CPU retrieves the bandwidth allocation code from the riser card and allocates bandwidth according to predefined rules.

[0003] A drawback of the current bandwidth allocation method is that different companies develop different bandwidth allocation tables, significantly limiting the industry's adaptability of riser cards and preventing resource and technology sharing. Currently, bandwidth allocation tables are limited by server technology variations, requiring different bandwidth allocation tables for different server versions. Consequently, each riser card is compatible with only a single server version, creating significant barriers to riser card compatibility across server versions and resulting in wasted resources. Adding or reducing the number of riser cards or changing the riser card type within a server requires simultaneously modifying the BIOS software to match the current riser card, which inevitably increases maintenance workload.

[0004] It can be seen that how to achieve adaptive allocation of server PCIe slot bandwidth is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0005] The present application provides a bandwidth allocation method, device, system and electronic device to at least solve the problem in the related art that bandwidth cannot be adaptively allocated.

[0006] This application provides a bandwidth allocation method, including:

[0007] Obtaining status information corresponding to an expansion card; wherein the expansion card includes multiple expansion slots; a switch component is provided between a first transmission channel and a last transmission channel of each expansion slot; a common port of each switch component is connected to the first transmission channel of its corresponding expansion slot, and a normally closed port of each switch component is connected to the last transmission channel of its corresponding expansion slot;

[0008] When the status information satisfies the expansion card change condition, the common port of each switch component is controlled to be connected to the normally closed port, so that the first transmission channel and the last transmission channel of each expansion slot form a loop;

[0009] Determining the bandwidth corresponding to each root port based on a transmission channel receiving the same test data in an expansion slot corresponding to each root port; wherein each root port has at least one corresponding expansion slot;

[0010] After bandwidth allocation is completed for all root ports, the common ports of each switch component are controlled to be disconnected from the normally closed ports.

[0011] The present application also provides a bandwidth allocation device, comprising an acquisition unit, a first control unit, a determination unit, and a second control unit;

[0012] an acquisition unit, configured to acquire status information corresponding to an expansion card; wherein the expansion card includes a plurality of expansion slots; a switch component is provided between a first transmission channel and a last transmission channel of each expansion slot; a common port of each switch component is connected to the first transmission channel of its corresponding expansion slot, and a normally closed port of each switch component is connected to the last transmission channel of its corresponding expansion slot;

[0013] The first control unit is configured to control the common port of each switch component to be connected to the normally closed port when the status information satisfies the expansion card change condition, so that the first transmission channel and the last transmission channel of each expansion slot form a loop;

[0014] a determining unit, configured to determine a bandwidth corresponding to each root port based on a transmission channel receiving the same test data in an expansion slot corresponding to each root port; wherein each root port has at least one corresponding expansion slot;

[0015] The second control unit is used to control the common port and the normally closed port of each switch component to be disconnected after completing bandwidth allocation of all root ports.

[0016] The present application also provides a bandwidth allocation system, comprising a basic input / output system, an expansion card connected to a mainboard slot, a plurality of switch components, and an integrated chip; wherein the expansion card comprises a plurality of expansion slots; a switch component is provided between the first transmission channel and the last transmission channel of each expansion slot; the common port of each switch component is connected to the first transmission channel of its corresponding expansion slot, and the normally closed port of each switch component is connected to the last transmission channel of its corresponding expansion slot;

[0017] The basic input / output system is configured to obtain status information corresponding to the expansion card; if the status information satisfies the expansion card change condition, send a loopback connection instruction to the integrated chip; determine the bandwidth corresponding to each root port based on the transmission channel receiving the same test data in the expansion slot corresponding to each root port; wherein each root port has at least one corresponding expansion slot; and after completing bandwidth allocation for all root ports, send a loopback disconnection instruction to the integrated chip;

[0018] The universal input / output interface of the integrated chip is connected to the controlled end pins of all the switch components, and is used to transmit a low-level signal to the controlled end pins of each switch component when receiving a loopback connection instruction sent by the basic input / output system; and transmit a high-level signal to the controlled end pins of each switch component when receiving a loopback disconnection instruction sent by the basic input / output system;

[0019] The switch component is used to control the common port to be connected to the normally closed port when receiving a low-level signal transmitted by the integrated chip, so that the first transmission channel and the last transmission channel of the expansion slot form a loop; and to control the common port to be disconnected from the normally closed port when receiving a high-level signal transmitted by the integrated chip.

[0020] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned bandwidth allocation methods when executing the computer program.

[0021] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned bandwidth allocation methods are implemented.

[0022] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned bandwidth allocation methods when executed by a processor.

[0023] The status information corresponding to the expansion card is obtained through the present application; wherein, the expansion card includes multiple expansion slots; a switch component is set between the first transmission channel and the last transmission channel of each expansion slot; the common port of each switch component is connected to the first transmission channel of its corresponding expansion slot, and the normally closed port of each switch component is connected to the last transmission channel of its corresponding expansion slot. When the status information meets the expansion card change condition, it means that the expansion card has been adjusted or modified and the bandwidth needs to be re-determined. At this time, the basic input and output system can control the common port of each switch component to be connected to the normally closed port, so that the first transmission channel and the last transmission channel of each expansion slot form a loop. After the loop is formed, if test data is sent to the first transmission channel, the test data can be detected in the last transmission channel. Therefore, according to the transmission channel that receives the same test data in the expansion slot corresponding to each root port, the bandwidth corresponding to each root port can be determined; wherein, each root port has at least one expansion slot corresponding to it. After completing the bandwidth allocation of all root ports, the common port of each switch component is controlled to be disconnected from the normally closed port. In this technical solution, a loopback circuit is used to automatically identify bandwidth, enabling adaptive allocation of server PCIe slot bandwidth. This eliminates the need to confirm the expansion card model in advance, and eliminates the need to maintain the basic input / output system's software program due to changes in the expansion card. This solution is highly versatile. Furthermore, the use of switch components to implement an automatic loopback circuit for the expansion slot simplifies the firmware circuit, making the motherboard layout more streamlined, saving motherboard space, reducing circuit complexity, and improving development and production efficiency. Furthermore, it breaks the agreed-upon restrictions between different versions of servers and between different manufacturers, eliminating the need to redevelop firmware to adapt the server model to its PCIe topology for any configuration and any topology, achieving the same effect as universal firmware with bandwidth allocation functionality. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0025] Figure 1 A flow chart of a bandwidth allocation method provided in an embodiment of the present application;

[0026] Figure 2 A schematic diagram of component connections for implementing an automatic loopback circuit provided in an embodiment of the present application;

[0027] Figure 3 A diagram showing the internal structure of a single-pole double-throw switch chip provided in an embodiment of the present application;

[0028] Figure 4 A schematic diagram of the structure of a bandwidth allocation device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0030] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0031] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0032] The embodiments of the present application provide a bandwidth allocation method, which is described in detail in conjunction with the execution flow of the bandwidth allocation method.

[0033] Figure 1 A flow chart of a bandwidth allocation method provided in an embodiment of the present application includes:

[0034] S101: Acquire status information corresponding to the expansion card.

[0035] The expansion card includes multiple expansion slots.

[0036] Each expansion slot can contain multiple transmission channels (lanes). The number of transmission channels varies between expansion slots. The bandwidth matching each expansion slot can be determined based on the number of transmission channels it contains.

[0037] For example, the PCIe x1 slot contains one set of transmission channels, with a corresponding theoretical maximum bandwidth of 1GB / s, which is suitable for devices with low data transmission requirements; the PCIe x4 slot contains four sets of transmission channels, with a corresponding theoretical maximum bandwidth of 4GB / s, which is suitable for devices with medium bandwidth requirements; the PCIe x8 slot contains eight sets of transmission channels, with a corresponding theoretical maximum bandwidth of 8GB / s, which is suitable for devices with higher requirements for data transmission speed; the PCIe x16 slot contains 16 sets of transmission channels, with a corresponding theoretical maximum bandwidth of 16GB / s, which is widely used to connect high-performance graphics cards.

[0038] Each transmission channel group includes HSIp(n) and HSIn(n) for signal reception, and HSOp(n) and HSOn(n) for signal transmission. HSIp(n) represents the positive input of the differential transmission line, HSIn(n) represents the negative input of the differential transmission line, HSOp(n) represents the positive output of the differential transmission line, and HSOn(n) represents the negative output of the differential transmission line. The "n" in the brackets is the serial number of the differential transmission line.

[0039] Taking into account actual applications, if the first transmission channel of the expansion slot can be connected to the last transmission channel, so that data is transmitted to the first transmission channel, the data can be detected in the last transmission channel, thereby determining the number of transmission channels contained in the expansion slot, and based on the number of transmission channels contained in the expansion slot, the required allocated bandwidth can be determined.

[0040] Therefore, in an embodiment of the present application, in order to realize the loop connection between the first transmission channel and the last transmission channel of the expansion slot, a switch component can be set between the first transmission channel and the last transmission channel of each expansion slot; the common port of each switch component is connected to the first transmission channel of its corresponding expansion slot, and the normally closed port of each switch component is connected to the last transmission channel of its corresponding expansion slot.

[0041] The status information corresponding to the expansion card is used to indicate whether the expansion card has been adjusted or modified. If the expansion card has been adjusted or modified, the bandwidth needs to be reallocated. If the expansion card has not been adjusted or modified, the bandwidth allocation can be based on the last time.

[0042] In actual applications, when the server is powered on for the first time or the chassis cover is opened, it means that the expansion card has been adjusted or modified. Therefore, the status information corresponding to the expansion card may include power status information and chassis cover status information.

[0043] In actual applications, the server power status query command can be used to obtain the current power status information of the server when the server is powered on; the sensor information list command can be used to obtain the chassis cover status information of the server.

[0044] During the boot process, the Basic Input Output System (BIOS) uses custom Intelligent Platform Management Interface (IPMI) commands to obtain status codes from the Baseboard Management Controller (BMC), indicating whether the server is being powered on for the first time and whether the chassis cover has been opened. This helps determine whether the riser card has been adjusted or modified.

[0045] In actual applications, an identification switch can be set at the open position of the chassis cover. The identification switch includes but is not limited to a push-type limit switch. The limit switch is connected to and receives control from the BMC. The IPMI command communicates with the BMC on the server to perform management operations on the limit switch.

[0046] The limit switch can be set to the open position of the chassis cover. The BIOS can use the sensor information list command to obtain the status of the server's limit switch. In specific implementations, a custom IPMI command word can be used to obtain server limit switch status information using the ipmitoolsensor tool command. The "ipmitool sensor list" command lists all sensor information on the server. This information is read by the BIOS to determine whether the server chassis cover has been opened.

[0047] To obtain power status information, you can use the power status query (ipmitool power) command to obtain the server's power status. For example, use "ipmitool power status" to obtain the server's current power status. The server's current power status is read by the BIOS and used to determine whether the server is being powered on for the first time.

[0048] S102: When the status information satisfies the expansion card change condition, the common port of each switch component is controlled to be connected to the normally closed port, so that the first transmission channel and the last transmission channel of each expansion slot form a loop.

[0049] The expansion card change condition may include whether the power status information is the first power-on status and whether the chassis cover status information is the intrusion status.

[0050] In actual applications, after obtaining the current power status information and chassis cover status information of the server, it can be determined whether the power status information is the first power-on or whether the chassis cover status information is an intrusion state.

[0051] If the power status information indicates the first power-on or the chassis cover status information indicates the intrusion status, it indicates that the number or model of expansion cards has been changed. In this case, the common port of each switch component can be controlled to connect to the normally closed port, so that the first transmission channel and the last transmission channel of the expansion slot form a loop.

[0052] In an embodiment of the present application, based on the power status information and the chassis cover status information, it is possible to identify whether the server is powered on for the first time and whether the chassis cover has been opened, thereby accurately determining whether the expansion card has been adjusted or modified.

[0053] S103: Determine the bandwidth corresponding to each root port according to the transmission channel receiving the same test data in the expansion slot corresponding to each root port.

[0054] Each root port (PCIe RootPort) has at least one corresponding expansion slot.

[0055] The method for determining the bandwidth of each root port is similar. In the embodiment of the present application, any one root port among all the root ports, ie, the target root port, is taken as an example for description.

[0056] The BIOS can send test data to the first transmission channel of the target expansion slot corresponding to the target root port and monitor all transmission channels with unallocated bandwidth in the target root port; wherein the target expansion slot is the expansion slot corresponding to the target root port; in the initial state, the first transmission channel is the primary transmission channel.

[0057] When the target transmission channel receives the test data, the first bandwidth corresponding to the target root port can be determined based on the number of transmission channels between the first transmission channel and the target transmission channel. The next transmission channel adjacent to the target transmission channel is used as the latest first transmission channel. The test data is sent back to the first transmission channel of the target expansion slot corresponding to the target root port, and all transmission channels with unallocated bandwidth in the target root port are monitored until all transmission channels of the target root port are identified.

[0058] Each root port can contain 16 transmission lanes, designated lanes 1 through 16. Each root port can connect to one or more expansion slots. In practical applications, the BIOS can first send specified data, such as "Lane1_Send," to the HSOp and HSOn ports of the first transmission lane (lane 1) of the expansion slot connected to the first root port. The BIOS then monitors the HSIp and HSIn ports of lanes 1 through 16. Assuming the Nth lane receives the data "Lane1_Send," the first bandwidth, xN, is allocated to that root port. If the first lane identified is x16, the bandwidth identification process for the next PCIe Root Port proceeds. If the first lane identified is x1, the x1 bandwidth allocation for lane 1 is recorded. Then, specified data, such as "Lane2_Send," is sent to the HSOp and HSOn ports of lane 2. The BIOS monitors the HSIp and HSIn ports of lanes 2 through 16, and so on until all lanes of the root port have been identified. The BIOS then proceeds to identify the bandwidth of the next PCIe Root Port.

[0059] Table 1 is a list of bandwidths of each root port on dual motherboards

[0060]

[0061] Table 1 uses a dual motherboard configuration, each with four root ports, as an example. The four root ports on CPU0 are CPU0 PE0, CPU0 PE1, CPU0 PE2, and CPU0 PE3; the four root ports on CPU1 are CPU1 PE0, CPU1 PE1, CPU1 PE2, and CPU1 PE3. In Table 1, x4 represents a bandwidth of 4 GB / s, x8 represents a bandwidth of 8 GB / s, and x16 represents a bandwidth of 16 GB / s. For example, if the bandwidth of CPU0 PE0 is set to "x8x8," the first slot of CPU0's PE0 port is allocated x8 (8 GB / s), and the second slot is allocated 8 GB / s.

[0062] S104: After bandwidth allocation of all root ports is completed, the common ports and normally closed ports of each switch component are controlled to be disconnected.

[0063] After bandwidth allocation is completed for all root ports, the loopback connections of the expansion slots can be disconnected. At this time, the BIOS can control the common ports of the switch components to be disconnected from the normally closed ports.

[0064] As can be seen from the above technical solution, the status information corresponding to the expansion card is obtained; wherein the expansion card includes multiple expansion slots; a switch component is set between the first transmission channel and the last transmission channel of each expansion slot; the common port of each switch component is connected to the first transmission channel of its corresponding expansion slot, and the normally closed port of each switch component is connected to the last transmission channel of its corresponding expansion slot. When the status information meets the expansion card change condition, it means that the expansion card has been adjusted or modified and the bandwidth needs to be re-determined. At this time, the basic input and output system can control the common port of each switch component to connect with the normally closed port, so that the first transmission channel and the last transmission channel of each expansion slot form a loop. After the loop is formed, if test data is sent to the first transmission channel, the test data can be detected in the last transmission channel. Therefore, based on the transmission channel that receives the same test data in the expansion slot corresponding to each root port, the bandwidth corresponding to each root port can be determined; wherein, each root port has at least one corresponding expansion slot. After the bandwidth allocation of all root ports is completed, the common port of each switch component is controlled to be disconnected from the normally closed port. In this technical solution, a loopback circuit is used to automatically identify bandwidth, enabling adaptive allocation of server PCIe slot bandwidth. This eliminates the need to confirm the expansion card model in advance, and eliminates the need to maintain the basic input / output system's software program due to changes in the expansion card. This solution is highly versatile. Furthermore, the use of switch components to implement an automatic loopback circuit for the expansion slot simplifies the firmware circuit, making the motherboard layout more streamlined, saving motherboard space, reducing circuit complexity, and improving development and production efficiency. Furthermore, it breaks the agreed-upon restrictions between different versions of servers and between different manufacturers, eliminating the need to redevelop firmware to adapt the server model to its PCIe topology for any configuration and any topology, achieving the same effect as universal firmware with bandwidth allocation functionality.

[0065] In this embodiment of the present application, the switch component can be a single-pole double-throw (SPDT) switch, such as the TS5A3159 chip. The TS5A3159 is deployed between a standard PCIe slot on the motherboard and a standard PCIe slot on an expansion card to establish an automatic loopback circuit. For ease of distinction, the standard PCIe slot on the motherboard can be referred to as a motherboard slot, and the standard PCIe slot on the expansion card can be referred to as an expansion slot.

[0066] Figure 2 A schematic diagram of component connections for implementing an automatic loopback circuit provided in an embodiment of the present application is provided. Figure 2 The example in the figure is an expansion slot. The expansion slot can contain multiple transmission channels. Figure 2Only the first and last transmission channels are shown. The TS5A3159's serial communication (COM) port connects to the HSOp(n) of the first transmission channel, the normally closed port (NC) connects to the HSIp(n) of the last transmission channel, and the TS5A3159's controlled (IN) port connects to a general-purpose input / output (GPIO) port on the integrated chip (Platform Controller Hub PCH). The central processing unit (CPU) connects to the PCH via a proprietary bus protocol (Direct Media Interface, DMI), and the PCH connects to the TS5A3159's IN port via a GPIO.

[0067] Each expansion slot is connected to a corresponding switch component, and the controlled end (IN) pins of all switch components are connected to the general input and output ports of the same integrated chip.

[0068] Figure 3 This is a diagram of the internal structure of a single-pole double-throw switch chip provided in an embodiment of the present application. The single-pole double-throw switch chip includes six ports: a normally open port (NO), a ground port (GND), a normally closed port (NC), a common port (COM), a power port (V+), and a controlled port (IN). The COM port of the single-pole double-throw switch is connected to the HSOp (n) of the first transmission channel of the expansion slot, and the NC port of the single-pole double-throw switch is connected to the HSIp (n) of the last transmission channel of the expansion slot. When the IN port receives a high-level signal, the COM port connects to the NO port. When the IN port receives a low-level signal, the COM port connects to the NC port, and the first and last transmission channels of the expansion slot form a loop.

[0069] The embodiment of the present application is based on the design of a simplified solution for automatic identification and allocation of server CPU PCIe bandwidth implemented by a single-pole double-throw switch chip, and designs a slot bandwidth loopback auxiliary circuit. The bandwidth adaptive allocation design of the CPU PCIe port and the BIOS automatic bandwidth identification program are realized by the controlled loopback of the first lane and the last lane of the slot. Each expansion slot only uses a single-pole double-throw switch chip to realize the automatic identification and allocation of server CPU PCIe bandwidth, without the need to confirm the riser card model in advance, and there is no need to maintain the BIOS software program due to the change of the riser card. It is a general development, which greatly improves the efficiency of research and development and saves hardware resources. The design of the server bandwidth allocation circuit is simplified, avoiding the use of a large number of GPIO or PCA9555 GPIO expansion chips and their hybrid designs. It also simplifies the GPIO level reading program, realizes the unified standard circuit and BIOS firmware program design of the server CPU PCIe bandwidth allocation design, and the automatic identification capability of the PCIE slot automatic loopback circuit, so that technicians no longer need to pay attention to the changes in the BIOS software program caused by changes in the load equipment, reducing the maintenance cost of the BIOS software program.

[0070] After determining the bandwidth associated with each root port based on the transmission channel receiving the same test data in the expansion slot corresponding to each root port, the bandwidth associated with each root port can be stored in a non-volatile data storage area. Specifically, the BIOS can generate a bandwidth allocation table based on the bandwidth identified for each PCIe Root Port and store it in the non-volatile data storage area (NVRAM) of the BIOS flash memory (FLASH) chip. Subsequently, the BIOS is instructed to read the bandwidth allocation table from this storage area to complete bandwidth allocation.

[0071] If the status information does not meet the expansion card change conditions, it means that the expansion card has not been adjusted or modified. In this case, the bandwidth corresponding to each root port can be directly read from the non-volatile data storage area. According to the bandwidth corresponding to each root port, the corresponding bandwidth is allocated to each root port. The bandwidth corresponding to each root port can be stored in the form of a bandwidth allocation table.

[0072] Combined with the expansion card change conditions described above, including whether the power status information is the first power-on and whether the chassis cover status information is in the intrusion state, if the power status information is neither the first power-on nor the chassis cover status information is in the intrusion state, it indicates that the BIOS has completed bandwidth identification and stored the bandwidth allocation table. The PCIe topology configuration has not changed. In this case, there is no need to start the automatic loopback circuit to re-identify the bandwidth. The BIOS directly reads the bandwidth data recorded in the NVRAM bandwidth allocation table in the FLASH chip and directly allocates bandwidth to each CPU RootPort.

[0073] By storing the bandwidth corresponding to each root port in the form of a bandwidth allocation table, the bandwidth data recorded in the bandwidth allocation table can be directly read when the expansion card is not adjusted or modified, so as to realize bandwidth allocation for each root port of the motherboard. There is no need to set up a loopback circuit to re-acquire the bandwidth each time, which improves the bandwidth allocation effect.

[0074] Taking into account the possibility that the switch component connected to each expansion slot may be abnormal, resulting in a failure in setting the loopback circuit, therefore, in an embodiment of the present application, after sending test data to the first transmission channel of the target expansion slot corresponding to the target root port, it is possible to determine whether there is a target transmission channel that receives the test data within a preset time.

[0075] The value of the preset time can be set according to actual needs and is not limited here.

[0076] If there is no target transmission channel receiving the test data within the preset time, it indicates that there is a problem with the loopback circuit of the target expansion slot. In this case, a prompt message indicating that the loopback of the target expansion slot is abnormal may be displayed.

[0077] In this embodiment, a detection mechanism is implemented to determine whether the target transmission channel has received test data within a preset time period, allowing for timely detection of loopback anomalies. By displaying prompts, administrators can promptly replace or repair abnormal switch components, ensuring proper bandwidth allocation.

[0078] Figure 4 A schematic structural diagram of a bandwidth allocation device provided in an embodiment of the present application includes an acquisition unit 41, a first control unit 42, a determination unit 43, and a second control unit 44;

[0079] An acquisition unit 41 is configured to acquire status information corresponding to an expansion card; wherein the expansion card includes a plurality of expansion slots; a switch component is provided between the first transmission channel and the last transmission channel of each expansion slot; a common port of each switch component is connected to the first transmission channel of its corresponding expansion slot, and a normally closed port of each switch component is connected to the last transmission channel of its corresponding expansion slot;

[0080] The first control unit 42 is configured to control the common port of each switch component to connect to the normally closed port when the status information satisfies the expansion card change condition, so that the first transmission channel and the last transmission channel of each expansion slot form a loop;

[0081] a determining unit 43 configured to determine a bandwidth corresponding to each root port based on a transmission channel receiving the same test data in an expansion slot corresponding to each root port; wherein each root port has at least one corresponding expansion slot;

[0082] The second control unit 44 is configured to control the common port of each switch component to be disconnected from the normally closed port after bandwidth allocation of all root ports is completed.

[0083] In some embodiments, the acquisition unit includes a power status acquisition subunit and a chassis cover status acquisition subunit;

[0084] The power status acquisition subunit is used to obtain the current power status information of the server by using the server power status query command when the server is powered on;

[0085] The chassis cover status acquisition subunit is used to obtain the chassis cover status information of the server using the sensor information list command.

[0086] In some embodiments, the first control unit is used to determine whether the power status information is the first power-on or whether the chassis cover status information is an intrusion state; when the power status information is the first power-on or the chassis cover status information is an intrusion state, the common port of each switch component is controlled to be connected to the normally closed port.

[0087] In some embodiments, the chassis cover status acquisition subunit is used to obtain status information of the upper limit switch of the server using a sensor information list command; wherein the limit switch is set in the open position of the chassis cover.

[0088] In some embodiments, the determining unit includes a sending subunit, a listening subunit, a bandwidth determining subunit, and an acting subunit;

[0089] a sending subunit, configured to send test data to a first transmission channel of a target expansion slot corresponding to a target root port;

[0090] The monitoring subunit is configured to monitor all transmission channels of unallocated bandwidth in the target root port; wherein the target root port is any root port among all the root ports; the target expansion slot is the expansion slot corresponding to the target root port; and in an initial state, the first transmission channel is the primary transmission channel;

[0091] a bandwidth determination subunit, configured to determine, when the target transmission channel receives the test data, a first bandwidth corresponding to the target root port based on the number of transmission channels included between the first transmission channel and the target transmission channel;

[0092] As a subunit, it is used to use the next transmission channel adjacent to the target transmission channel as the latest first transmission channel, and trigger the sending subunit to execute the operation steps of sending test data to the first transmission channel of the target expansion slot corresponding to the target root port, and monitoring all transmission channels with unallocated bandwidth in the target root port until all transmission channels of the target root port are identified.

[0093] In some embodiments, further comprising a storage unit;

[0094] The storage unit is used to store the bandwidth corresponding to each root port in a non-volatile data storage area.

[0095] In some embodiments, further comprising a reading unit and a distributing unit;

[0096] A reading unit, configured to read the bandwidth corresponding to each root port from a non-volatile data storage area when the status information does not meet the expansion card change condition;

[0097] The allocation unit is configured to allocate corresponding bandwidth to each root port according to the bandwidth corresponding to each root port.

[0098] For the description of the features in the embodiment corresponding to the bandwidth allocation device, reference can be made to the relevant description of the embodiment corresponding to the bandwidth allocation method, which will not be described in detail here.

[0099] As can be seen from the above technical solution, the status information corresponding to the expansion card is obtained; wherein the expansion card includes multiple expansion slots; a switch component is set between the first transmission channel and the last transmission channel of each expansion slot; the common port of each switch component is connected to the first transmission channel of its corresponding expansion slot, and the normally closed port of each switch component is connected to the last transmission channel of its corresponding expansion slot. When the status information meets the expansion card change condition, it means that the expansion card has been adjusted or modified and the bandwidth needs to be re-determined. At this time, the basic input and output system can control the common port of each switch component to connect with the normally closed port, so that the first transmission channel and the last transmission channel of each expansion slot form a loop. After the loop is formed, if test data is sent to the first transmission channel, the test data can be detected in the last transmission channel. Therefore, based on the transmission channel that receives the same test data in the expansion slot corresponding to each root port, the bandwidth corresponding to each root port can be determined; wherein, each root port has at least one corresponding expansion slot. After the bandwidth allocation of all root ports is completed, the common port of each switch component is controlled to be disconnected from the normally closed port. In this technical solution, a loopback circuit is used to automatically identify bandwidth, enabling adaptive allocation of server PCIe slot bandwidth. This eliminates the need to confirm the expansion card model in advance, and eliminates the need to maintain the basic input / output system's software program due to changes in the expansion card. This solution is highly versatile. Furthermore, the use of switch components to implement an automatic loopback circuit for the expansion slot simplifies the firmware circuit, making the motherboard layout more streamlined, saving motherboard space, reducing circuit complexity, and improving development and production efficiency. Furthermore, it breaks the agreed-upon restrictions between different versions of servers and between different manufacturers, eliminating the need to redevelop firmware to adapt the server model to its PCIe topology for any configuration and any topology, achieving the same effect as universal firmware with bandwidth allocation functionality.

[0100] An embodiment of the present application further provides a bandwidth allocation system, comprising a basic input / output system, an expansion card connected to a mainboard slot, a plurality of switch components, and an integrated chip; wherein the expansion card comprises a plurality of expansion slots; a switch component is provided between a first transmission channel and a last transmission channel of each expansion slot; a common port of each switch component is connected to a first transmission channel of its corresponding expansion slot, and a normally closed port of each switch component is connected to a last transmission channel of its corresponding expansion slot;

[0101] The basic input / output system is configured to obtain status information corresponding to the expansion card; if the status information satisfies the expansion card change condition, send a loopback connection instruction to the integrated chip; determine the bandwidth corresponding to each root port based on the transmission channel receiving the same test data in the expansion slot corresponding to each root port; wherein each root port has at least one corresponding expansion slot; and after completing bandwidth allocation for all root ports, send a loopback disconnection instruction to the integrated chip;

[0102] The universal input / output interface of the integrated chip is connected to the controlled end pins of all the switch components, and is used to transmit a low-level signal to the controlled end pins of each switch component when receiving a loopback connection instruction sent by the basic input / output system; and transmit a high-level signal to the controlled end pins of each switch component when receiving a loopback disconnection instruction sent by the basic input / output system;

[0103] The switch component is used to control the common port to be connected to the normally closed port when receiving a low-level signal transmitted by the integrated chip, so that the first transmission channel and the last transmission channel of the expansion slot form a loop; and to control the common port to be disconnected from the normally closed port when receiving a high-level signal transmitted by the integrated chip.

[0104] The description of the features in the embodiment corresponding to the bandwidth allocation system can refer to the relevant description of the embodiment corresponding to the bandwidth allocation method, and will not be repeated here.

[0105] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned bandwidth allocation method embodiments.

[0106] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned bandwidth allocation method embodiments when running.

[0107] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0108] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned bandwidth allocation method embodiments are implemented.

[0109] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned bandwidth allocation method embodiments are implemented.

[0110] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0111] The above describes in detail the bandwidth allocation method, device, system, and electronic device provided by this application. This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is intended only to facilitate understanding of the method and core concepts of this application. It should be noted that those skilled in the art may make various improvements and modifications to this application without departing from the principles of this application, and such improvements and modifications also fall within the scope of protection of the claims of this application.

Claims

1. A bandwidth allocation method, characterized in that: include: Obtaining status information corresponding to an expansion card; wherein the expansion card includes multiple expansion slots; a switch component is provided between a first transmission channel and a last transmission channel of each expansion slot; a common port of each switch component is connected to the first transmission channel of its corresponding expansion slot, and a normally closed port of each switch component is connected to the last transmission channel of its corresponding expansion slot; When the status information satisfies the expansion card change condition, controlling the common port of each switch component to be connected to the normally closed port, so that the first transmission channel and the last transmission channel of each expansion slot form a loop; Determining the bandwidth corresponding to each root port based on a transmission channel receiving the same test data in an expansion slot corresponding to each root port; wherein each root port has at least one corresponding expansion slot; After bandwidth allocation of all the root ports is completed, the common port and the normally closed port of each switch component are controlled to be disconnected.

2. The bandwidth allocation method according to claim 1, wherein: Get the status information corresponding to the expansion card, including: When the server is powered on, use the server power status query command to obtain the current power status information of the server; The sensor information list command is used to obtain the chassis cover status information of the server.

3. The bandwidth allocation method according to claim 2, wherein: When the state information satisfies the expansion card change condition, controlling the common port of each switch component to be connected to the normally closed port includes: Determine whether the power status information indicates that the computer is powered on for the first time or whether the chassis cover status information indicates an intrusion status; When the power supply status information indicates that the computer is powered on for the first time or the chassis cover status information indicates that the computer is in an intrusion state, the common port of each switch component is controlled to be connected to a normally closed port.

4. The bandwidth allocation method according to claim 2, wherein: Using the sensor information list command to obtain the chassis cover status information of the server includes: The sensor information list command is used to obtain the status information of the upper limit switch on the server; wherein, the limit switch is set in the open position of the chassis cover.

5. The bandwidth allocation method according to claim 1, wherein: Determine the bandwidth of each root port based on the transmission channel receiving the same test data in the expansion slot corresponding to each root port, including: Send test data to a first transmission channel of a target expansion slot corresponding to a target root port, and monitor all transmission channels of the target root port with unallocated bandwidth; wherein the target root port is any one of all the root ports; the target expansion slot is the expansion slot corresponding to the target root port; in an initial state, the first transmission channel is the primary transmission channel; When the target transmission channel receives the test data, determining a first bandwidth corresponding to the target root port according to the number of transmission channels included between the first transmission channel and the target transmission channel; The next transmission channel adjacent to the target transmission channel is used as the latest first transmission channel, and test data is sent back to the first transmission channel of the target expansion slot corresponding to the target root port, and all transmission channels with unallocated bandwidth in the target root port are monitored until all transmission channels of the target root port are identified.

6. The bandwidth allocation method according to claim 1, wherein: After determining the bandwidth corresponding to each root port based on the transmission channel receiving the same test data in the expansion slot corresponding to each root port, the method further includes: The bandwidth corresponding to each root port is stored in the non-volatile data storage area.

7. The bandwidth allocation method according to claim 6, wherein: Also includes: When the state information does not meet the expansion card change condition, reading the bandwidth corresponding to each root port from the non-volatile data storage area; According to the bandwidth corresponding to each root port, the corresponding bandwidth is allocated to each root port.

8. A bandwidth allocation device, characterized in that: comprising an acquiring unit, a first control unit, a determining unit, and a second control unit; The acquisition unit is configured to acquire status information corresponding to an expansion card; wherein the expansion card includes a plurality of expansion slots; a switch component is provided between a first transmission channel and a last transmission channel of each expansion slot; a common port of each switch component is connected to the first transmission channel of its corresponding expansion slot, and a normally closed port of each switch component is connected to the last transmission channel of its corresponding expansion slot; The first control unit is configured to control the common port of each switch component to be connected to the normally closed port when the status information satisfies the expansion card change condition, so that the first transmission channel and the last transmission channel of each expansion slot form a loop; The determining unit is configured to determine the bandwidth corresponding to each root port based on a transmission channel receiving the same test data in an expansion slot corresponding to each root port; wherein each root port has at least one corresponding expansion slot; The second control unit is configured to control the common port of each switch component to be disconnected from the normally closed port after completing bandwidth allocation for all the root ports.

9. A bandwidth allocation system, characterized in that: The system comprises a basic input / output system, an expansion card connected to a mainboard slot, multiple switch components, and an integrated chip; wherein the expansion card comprises multiple expansion slots; a switch component is provided between the first transmission channel and the last transmission channel of each expansion slot; the common port of each switch component is connected to the first transmission channel of its corresponding expansion slot, and the normally closed port of each switch component is connected to the last transmission channel of its corresponding expansion slot; The basic input / output system is configured to obtain status information corresponding to the expansion card; send a loopback connection instruction to the integrated chip if the status information satisfies an expansion card change condition; determine the bandwidth corresponding to each root port based on a transmission channel receiving the same test data in the expansion slot corresponding to each root port; wherein each root port has at least one corresponding expansion slot; and send a loopback disconnection instruction to the integrated chip after bandwidth allocation is completed for all the root ports; The universal input / output interface of the integrated chip is connected to the controlled-end pins of all the switch components, and is configured to transmit a low-level signal to the controlled-end pins of each switch component when receiving the loopback connection instruction sent by the basic input / output system; and transmit a high-level signal to the controlled-end pins of each switch component when receiving the loopback disconnection instruction sent by the basic input / output system; The switch component is used to control the common port and the normally closed port to be connected when receiving a low-level signal transmitted by the integrated chip, so that the first transmission channel and the last transmission channel of the expansion slot form a loop; and to control the common port and the normally closed port to be disconnected when receiving a high-level signal transmitted by the integrated chip.

10. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the bandwidth allocation method according to any one of claims 1 to 7 when executing the computer program.