Link state checking method and device, electronic equipment and nonvolatile storage medium
By obtaining and comparing status parameter information during PCIe device link status detection, the PCIe device fault source is accurately located, which solves the problem of misjudgment and failure to locate faults in the existing technology, improves detection accuracy and fault repair efficiency, and ensures server stable operation.
Patent Information
- Application Number
- CN202411037137.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-10-22
AI Technical Summary
The existing technology is prone to misjudgment when detecting the link status of PCIe devices and cannot accurately locate the fault source, affecting the efficiency of troubleshooting and repair.
By obtaining the status parameter information of each device during the PCIe resource initialization process, and based on the comparison results of the target status parameter information of adjacent two-level PCIe devices, the link status and fault source are determined, and the status identification results and fault source location information are generated. The link status detection results.
It improves the accuracy of PCIe link status detection, accurately locates the source of faults, reduces the probability of false alarms, simplifies the fault repair process, and ensures stable operation and business continuity of the server.
Smart Images

Figure CN118819987A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of servers, and in particular to a link status checking method, device, electronic equipment and non-volatile storage medium. Background Art
[0002] The stability and reliability of the server are the basis for ensuring business continuity in data centers and cloud computing environments. PCIe (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard) is a high-speed communication device that connects high-performance devices inside the server with external devices. Once it fails, it will affect the performance of the server.
[0003] In order to ensure the efficient and stable operation of the services running on the server, the related technology evaluates whether the operating status of the PCIe device is working in the expected normal state. When the PCIe device is detected to have a reduced speed or bandwidth, an alarm message will be immediately generated and pushed to the baseboard management controller. However, this method not only leads to misjudgment, but also the alarm information cannot accurately locate the faulty device, which is not conducive to troubleshooting and repairing.
[0004] In view of this, improving the detection accuracy of the PCIe link status and accurately locating the fault source are technical problems that technical personnel in this field need to solve.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The present invention provides a link status checking method, device, electronic device and non-volatile storage medium, which effectively improve the PCIe link status detection accuracy and can accurately locate the fault source.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0008] The present invention provides a link status checking method, comprising:
[0009] During the PCIe resource initialization process, the state parameter information of each PCIe device is obtained; the state parameter information includes the current parameter value of each state parameter in the current connection state and the corresponding maximum allowable value of the parameter;
[0010] If the current parameter value of the target state parameter of the current-level PCIe device is less than the corresponding maximum allowable value of the parameter, then obtaining the corresponding target state parameter information of the previous-level PCIe device of the current-level PCIe device;
[0011] Determine the link status of the two adjacent levels of PCIe devices according to the comparison result of the target status parameter information of the two adjacent levels of PCIe devices;
[0012] According to the link status and the hardware connection relationship between two adjacent levels of PCIe devices, a link status detection result including a status identification result and fault source location information is generated.
[0013] In a first exemplary implementation, a link status detection result including a status identification result and fault source location information is generated according to the link status and the hardware connection relationship between two adjacent PCIe devices, including:
[0014] If a bandwidth reduction fault occurs in the current-level PCIe device, the fault source location information is determined according to the hardware connection relationship between the two adjacent levels of PCIe devices, and a link state detection result including a bandwidth reduction fault identification result and the fault source location information is generated;
[0015] If a speed reduction fault occurs in a link between two adjacent PCIe devices, the fault source location information is determined according to the hardware connection relationship between the two adjacent PCIe devices, and a link status detection result including a speed reduction fault identification result and the fault source location information is generated.
[0016] In a second exemplary implementation, after determining the link status of two adjacent levels of PCIe devices, the method further includes:
[0017] If it is determined that the upper-level PCIe device of the current-level PCIe device has a bandwidth allocation failure problem according to the link status of the two adjacent levels of PCIe devices, the cause of the bandwidth allocation failure is determined according to the bandwidth allocation scheme input source of the upper-level PCIe device;
[0018] Based on the bandwidth allocation failure cause, generating a link status detection result including the bandwidth allocation problem and the bandwidth allocation failure cause;
[0019] The bandwidth allocation failure cause includes an error in identifying the type of the upper-level PCIe device.
[0020] In a third exemplary implementation, the current parameter value is a link speed of a current connection state, the maximum allowable parameter value is a maximum supported link speed, and the link state of two adjacent PCIe devices is determined based on a comparison result of target state parameter information of two adjacent PCIe devices, including:
[0021] If the link speed of the current connection state of the target PCIe device at the current level is less than its corresponding maximum supported link speed;
[0022] When the link speed of the current connection state of the upper-level PCIe device of the target PCIe device is equal to the corresponding maximum supported link speed, it is determined that the link state between the target PCIe device and the upper-level PCIe device is normal;
[0023] When the link speed of the current connection state of the upper-level PCIe device of the target PCIe device is less than its corresponding maximum supported link speed, it is determined that a speed reduction failure occurs in the link between the target PCIe device and its upper-level PCIe device.
[0024] In a fourth exemplary implementation, before the current parameter value of the target state parameter of the current-level PCIe device is less than the corresponding maximum allowable parameter value, the method further includes:
[0025] In the process of checking each PCIe device from the bottom layer to the top layer, if the device type corresponding to the current PCIe device is the first type of PCIe device type, and the current PCIe device has no connected device, then the link status of the current PCIe device is not checked;
[0026] The first type of PCIe device types include root ports, PCIe bridges, and switch downstream ports.
[0027] In a fifth exemplary implementation, after the device type corresponding to the current PCIe device is the first type of PCIe device type, the method further includes:
[0028] Pre-storing physical link information in a baseboard management controller; the physical link information is a correspondence between a physical slot number of the first type of PCIe device and a connector pin position and a hardware board where the device is located;
[0029] If the device type corresponding to the current PCIe device is a connection device, and the current PCIe device has a link failure or a bandwidth allocation failure, the target connector connected to the current PCIe device and the corresponding target hardware board are determined according to the physical link information, and the target connector and the target hardware board are fault location information.
[0030] In a sixth exemplary implementation, the current parameter value is a link bandwidth value of a current connection state, the maximum allowable parameter value is a maximum supported link bandwidth value, and the link state of two adjacent PCIe devices is determined based on a comparison result of target state parameter information of two adjacent PCIe devices, including:
[0031] In the process of checking each PCIe device from the bottom layer to the top layer, for a target PCIe device whose current-level PCIe device is not a first-class PCIe device type, if a link bandwidth value of a current connection state of the target PCIe device is less than a corresponding maximum supported link bandwidth value;
[0032] If the link bandwidth value of the current connection state of the upper-level PCIe device of the target PCIe device is equal to its corresponding maximum supported link bandwidth value, then the link state of the upper-level PCIe device of the target PCIe device is normal;
[0033] If the link bandwidth value of the current connection state of the upper-level PCIe device of the target PCIe device is less than its corresponding maximum supported link bandwidth value, compare the maximum supported link bandwidth value of the target PCIe device with the maximum supported link bandwidth value of the upper-level PCIe device of the target PCIe device;
[0034] If the maximum link bandwidth value supported by the target PCIe device is less than or equal to the maximum link bandwidth value supported by the upper-level PCIe device of the target PCIe device, the link status of the target PCIe device is a bandwidth reduction fault;
[0035] If the maximum link bandwidth value supported by the target PCIe device is greater than the maximum link bandwidth value supported by the upper-level PCIe device of the target PCIe device, the link status of the upper-level PCIe device of the target PCIe device is a bandwidth allocation failure;
[0036] The first type of PCIe device types include root ports, PCIe bridges, and switch downstream ports.
[0037] Another aspect of the present invention provides a link status checking device, comprising:
[0038] A data acquisition module, used to acquire the status parameter information of each PCIe device during the PCIe resource initialization process; the status parameter information includes the current parameter value of each status parameter in the current connection state and the corresponding maximum allowable value of the parameter;
[0039] An adjacent link data acquisition module, configured to acquire corresponding target state parameter information of a previous-level PCIe device of the current-level PCIe device if the current parameter value of the target state parameter of the current-level PCIe device is less than the corresponding maximum allowable parameter value;
[0040] A link status detection module is used to determine the link status of two adjacent PCIe devices according to the comparison result of the target status parameter information of two adjacent PCIe devices;
[0041] The fault identification and location module is used to generate a link status detection result including a status identification result and fault source location information according to the link status and the hardware connection relationship between two adjacent PCIe devices.
[0042] The present invention also provides an electronic device, comprising a processor, wherein the processor is used to implement the steps of the link status checking method as described in any of the preceding items when executing a computer program stored in a memory.
[0043] Finally, the present invention also 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 link status checking method as described in any of the preceding items are implemented.
[0044] The advantage of the technical solution provided by the present invention is that when an abnormal link status of a PCIe device is detected, the link status of its upper-level device is checked to identify whether the abnormality is a real fault or a normal configuration, and whether the PCIe device has a speed reduction or bandwidth reduction problem can be accurately diagnosed, thereby improving the accuracy of identifying PCIe performance degradation and effectively reducing the probability of false alarms. When a fault actually occurs, the fault source location information can be quickly and accurately generated through the physical connection relationship between adjacent PCIe devices, and the faulty component can be accurately located, effectively simplifying the production line or customer's rapid maintenance and fault recovery process for the server, reducing the difficulty of fault repair, and facilitating the rapid recovery of the server's normal operating state, effectively ensuring the stable operation of the server and the continuity of business.
[0045] In addition, the present invention also provides a corresponding implementation device, electronic device and non-volatile storage medium for the link status checking method, which further makes the method more practical, and the device, electronic device and non-volatile storage medium have corresponding advantages.
[0046] The technical features mentioned above, the technical features to be mentioned below, and the technical features shown separately in the drawings can be arbitrarily combined with each other, as long as the combined technical features are not contradictory. All feasible feature combinations are technical contents clearly recorded in this article. Any of the multiple sub-features contained in the same sentence can be applied independently, and does not have to be applied together with other sub-features. It should be understood that the above general description and the detailed description below are only exemplary and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. 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.
[0048] Figure 1 A flowchart of a link status checking method provided by the present invention;
[0049] Figure 2 A schematic diagram of a link bandwidth checking method provided by the present invention;
[0050] Figure 3 A schematic diagram of a link speed checking method provided by the present invention;
[0051] Figure 4 A schematic diagram of the connection relationship of adjacent PCIe devices in an exemplary application scenario provided by the present invention;
[0052] Figure 5 A structural diagram of a specific implementation of the link status checking device provided by the present invention;
[0053] Figure 6 A structural diagram of a specific implementation of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0054] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Among them, the terms "first", "second", "third", "fourth", etc. in the specification and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations of the two are intended to cover non-exclusive inclusions. The term "exemplary" means "used as an example, embodiment or illustrative". Any embodiment described here as "exemplary" is not necessarily interpreted as being superior or better than other embodiments.
[0055] PCIe, as a hardware device that expands and improves server performance and functions, provides servers with network connection, storage control, graphics acceleration, data encryption, interface expansion and other functions through its high-speed transmission, flexible configuration, multi-protocol support and support for high-performance devices. When PCIe fails, the data transmission rate of the server will drop sharply, the device will not be recognized or the communication will be interrupted, and even the business running on the server will be interrupted and data will be lost.
[0056] In order to ensure the stability and reliability of the server, improve the overall utilization efficiency of the server, and ensure the efficient and stable operation of the business, it is necessary to detect the link status of the PCIe. The relevant technology uses the BIOS (Basic Input Output System) to compare the linkwidth value in the link status register of the PCIe device and the link width value in the link capability register, as well as the link speed value in the linkstatus register and the link speed value in the link capability register to evaluate the operating status of the PCIe device. If the comparison result shows that the PCIe device slows down or reduces the bandwidth, the BIOS immediately generates a warning message and pushes this information to the baseboard management controller so that the out-of-band monitoring system can understand and respond to changes in the operating status of the PCIe device in real time, thereby ensuring the stability and reliability of the server.
[0057] However, judging whether the PCIe device is working in the expected normal state may cause unnecessary alarms in special cases, causing unnecessary interference to the out-of-band monitoring system and poor user experience. For example, when the maximum link speed supported by the RootPort is lower than the maximum link speed supported by the PCIe device, if the RootPort supports a maximum of 16 GT / s and the PCIe device supports a maximum of 32 GT / s, it is normal for the PCIe device to fail to reach its maximum supported link speed under this configuration. However, the related technology will misjudge that the PCIe device has slowed down and push the speed reduction alarm to the baseboard management controller, which will cause unnecessary interference to the out-of-band monitoring system. Furthermore, when the PCIe device has a real speed reduction or bandwidth reduction alarm, the alarm information pushed by the BIOS to the baseboard management controller, including the PCIe device BDF (Bus, Device, Function) number, such simple alarm information, cannot help the baseboard management controller accurately locate the specific faulty device or cable, affecting the efficiency of troubleshooting and repair. For example, when the PCIe bandwidth allocated by the Root Port is lower than the maximum supported bandwidth of the connected PCIe device, the PCIe device will not be able to link at maximum performance, significantly affecting its performance and not conducive to high-speed operation of the server business. The alarm information generated by the relevant technology only contains the problem of bandwidth reduction of the PCIe device, and cannot accurately locate the root cause of the bandwidth reduction, which increases the difficulty of fault repair and is not conducive to quickly restoring the normal operation of the server.
[0058] In view of this, when the present invention detects an abnormal link status of a PCIe device, it identifies whether the abnormality is a real fault or a normal configuration by checking the link status of its upper-level device, thereby improving the accuracy of link status detection. When a fault actually occurs, the fault source location information can be quickly and accurately generated through the physical connection relationship between adjacent PCIe devices, and the faulty component can be accurately located, which can effectively ensure the stable operation of the server and the continuity of business. After introducing the technical scheme of the present invention, various non-limiting embodiments of the present invention are described in detail below. In order to better illustrate the present invention, numerous specific details are given in the specific embodiments below. Those skilled in the art should understand that the present invention can also be implemented without these specific details. In other examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present invention.
[0059] First see Figure 1 , Figure 1 A flowchart of a link status checking method provided in this embodiment may include the following contents:
[0060] S101: During the PCIe resource initialization process, status parameter information of each PCIe device is obtained.
[0061] In this embodiment, during the PCIe resource initialization process, the BIOS will traverse each PCIe device, the so-called PCIe device is a device connected through a PCIe bus or communicating based on the PCIe protocol, and obtain key link status information of each PCIe device. For the convenience of description, this step is defined as status parameter information, and the status parameter information includes the current parameter value of each status parameter in the current connection state and the corresponding maximum allowable value of the parameter. The current parameter value is the link status parameter value at the acquisition time, and the maximum allowable value of the parameter is the maximum supported value of the corresponding link status parameter. For example, the link status information can be represented by link bandwidth and link speed. Accordingly, the link status parameter value can be status.width (link bandwidth of the current connection state) or status.speed (link speed of the current connection state), and the maximum allowable value of the parameter corresponding to status.width (link bandwidth of the current connection state) is capability.width (maximum supported link bandwidth), and the maximum allowable value of the parameter corresponding to status.speed (link speed of the current connection state) is capability.speed (maximum supported link speed).
[0062] S102: If the current parameter value of the target state parameter of the current-level PCIe device is less than the corresponding maximum allowable parameter value, obtain the corresponding target state parameter information of the previous-level PCIe device of the current-level PCIe device.
[0063] In this step, the target state parameter is the link state parameter of the currently judged PCIe device. Since the link state parameter includes multiple types, it is defined as the target state parameter for the convenience of description. If the current parameter value of the target state parameter of the current-level PCIe device is less than the corresponding maximum allowed value of the parameter, such as status.width (the link bandwidth of the current connection state) is less than capability.width (the maximum supported link bandwidth), that is, the actual link state of the PCIe device does not reach the maximum supported link state, then the suspected PCIe link is abnormal. In order to distinguish between normal configuration and fault conditions, this step will also obtain the numerical information of the link state parameter of the same type of the upper-level PCIe device of the currently judged PCIe device. If the link state detection is performed by traversing each PCIe device from the bottom layer to the top layer, the upper-level PCIe device is the PCIE device closer to the bottom layer, and the upper-level PCIe device is, for example, a Root Port or a switch downstream port (switch downstream port). If the link state detection is performed by traversing each PCIe device from the upper layer to the bottom layer, the upper-level PCIe device is the PCIE device closer to the upper layer.
[0064] S103: Determine the link status of the two adjacent levels of PCIe devices according to the comparison result of the target status parameter information of the two adjacent levels of PCIe devices.
[0065] When the BIOS detects in the previous step that the actual link status of the PCIe device does not reach the maximum supported link status, and obtains the actual link status and the maximum supported link status of the upper-level PCIe device, it compares the two to determine whether the reason why the device does not reach the maximum supported link status is a normal phenomenon or a link problem, so as to accurately distinguish between actual link failures and normal phenomena. Link status conditions include but are not limited to normal link status, link failures between the current-level PCIe device and the upper-level PCIe device such as speed reduction, and current-level PCIe device bandwidth reduction failure.
[0066] S104: Generate a link status detection result including a status identification result and fault source location information according to the link status and the hardware connection relationship between two adjacent PCIe devices.
[0067] Based on the link status of the previous step, if it is determined that a link failure has occurred, in order to further locate the source of the fault, this step obtains the hardware connection relationship between the two adjacent PCIe devices. Based on the hardware connection relationship and link status of the two adjacent PCIe devices, the source of the fault can be defined, and the link status detection result can be generated according to the fault type and the location of the fault source. At the same time, corresponding maintenance or repair suggestions can be given, such as using professional tools or custom scripts to detect the voltage, current, signal quality, data packet transmission, etc. of which board and which connector, and further identify the type of problem, such as signal attenuation, timing problems, protocol errors, hardware failures, etc. If the problem is caused by dust accumulation or loose connectors, it is recommended to clean and reconnect. For hardware failures or severe damage, it is recommended to replace the damaged parts or the entire device. If the problem is related to configuration parameters, such as improper PCIe power management settings, it is recommended to adjust the relevant parameters.
[0068] In the technical solution provided in this embodiment, when an abnormal PCIe device link status is detected, the link status of its upper-level device is checked to identify whether the abnormality is a real fault or a normal configuration. It can accurately diagnose whether the PCIe device has a speed reduction or bandwidth reduction problem, improve the accuracy of identifying PCIe performance degradation, and effectively reduce the probability of false alarms. When a fault actually occurs, the physical connection relationship between adjacent PCIe devices can quickly and accurately generate fault source location information, accurately locate the faulty component, effectively simplify the production line or customer's rapid maintenance and fault recovery process for the server, reduce the difficulty of fault repair, and facilitate the rapid restoration of the normal operating state of the server, effectively ensuring the stable operation of the server and business continuity.
[0069] In the above embodiment, there is no limitation on how to execute step S103. In this embodiment, an exemplary method for determining the link status of the PCIe device is provided. When the PCIe resource initialization is completed, this embodiment may adopt a method of checking from the bottom layer to the top layer, and perform status detection on the link status of each PCIe device from the link bandwidth and link rate. This embodiment may include the following steps:
[0070] Exemplarily, if the current parameter value is the link bandwidth value of the current connection state, and the maximum allowed value of the parameter is the maximum supported link bandwidth value, in the process of checking each PCIe device step by step from the bottom layer to the top layer, for the target PCIe device whose current-level PCIe device is not a first-class PCIe device type, if the link bandwidth value of the current connection state of the target PCIe device is less than its corresponding maximum supported link bandwidth value; if the link bandwidth value of the current connection state of the upper-level PCIe device of the target PCIe device is equal to its corresponding maximum supported link bandwidth value, then the link state of the upper-level PCIe device of the target PCIe device is normal; if the current connection state of the upper-level PCIe device of the target PCIe device is If the link bandwidth value of the target PCIe device is less than the corresponding maximum supported link bandwidth value, the maximum supported link bandwidth value of the target PCIe device is compared with the maximum supported link bandwidth value of the upper-level PCIe device of the target PCIe device; if the maximum supported link bandwidth value of the target PCIe device is less than or equal to the maximum supported link bandwidth value of the upper-level PCIe device of the target PCIe device, the link status of the target PCIe device is a bandwidth reduction failure; if the maximum supported link bandwidth value of the target PCIe device is greater than the maximum supported link bandwidth value of the upper-level PCIe device of the target PCIe device, the link status of the upper-level PCIe device of the target PCIe device is a bandwidth allocation failure.
[0071] This embodiment realizes the detection of whether the link bandwidth of two adjacent PCIe devices is faulty, that is, it determines whether the current PCIe device has a bandwidth reduction fault or the previous PCIe device has a bandwidth allocation fault or it is a normal phenomenon. The first type of PCIe device type is a PCIe device that may not be connected to the device. The first type of PCIe device type includes but is not limited to the root port, PCIe bridge and switch downstream port. If the currently detected PCIe device is not a first type of PCIe device type, the link status is directly detected.
[0072] When performing bandwidth fault detection for non-type 1 PCIe device types from the bottom up, refer to Figure 2, for the convenience of description, the current level PCIe device is defined as the nth level PCIe device, and the previous level PCIe device is the n-1th PCIe device. When it is detected that the status.width of a certain nth level PCIe device is less than its capability.width, the status.width and capability.width of the n-1th level PCIe device are obtained. By comparing the status.width and capability.width of the n-1th level PCIe device and the n-1th level PCIe device, it is possible to identify whether the n-1th level PCIe device is faulty or the -1th level PCIe device is normal: when the status.width of the n-1th level PCIe device is equal to its capability.width, it indicates that the n-1th level link is working normally, that is, the link status of the n-1th level PCIe device is normal. When the status.width of the n-1th level PCIe device is also less than its capability.width, it is determined that there is a fault. The process of identifying the fault point is as follows: compare the capability.width of the n-th level PCIe device with the capability.width of the n-1-th level PCIe device. If the capability.width of the n-th level PCIe device is less than or equal to the capability.width of the n-1-th level PCIe device, it is determined that the n-th level PCIe device has a fault. If the capability.width of the n-th level PCIe device is greater than the capability.width of the n-1-th level PCIe device, it is determined that there is a problem with the bandwidth allocation of the n-1-th level PCIe device.
[0073] Exemplarily, the current parameter value is the link speed of the current connection state, and the maximum allowable value of the parameter is the maximum supported link speed. If the link speed of the current connection state of the target PCIe device at the current level is less than its corresponding maximum supported link speed; when the link speed of the current connection state of the PCIe device at the upper level of the target PCIe device is equal to its corresponding maximum supported link speed, then it is determined that the link state between the target PCIe device and the upper level PCIe device is normal; when the link speed of the current connection state of the PCIe device at the upper level of the target PCIe device is less than its corresponding maximum supported link speed, then it is determined that a speed reduction failure occurs in the link between the target PCIe device and its upper level PCIe device.
[0074] This embodiment implements the detection of whether the link speed of two adjacent PCIe devices is faulty, that is, to determine whether the link between two adjacent PCIe devices is faulty or normal. When performing link fault detection on non-first-class PCIe devices from the bottom layer to the top layer, please refer to Figure 3For the sake of ease of description, the current PCIe device is still defined as the nth PCIe device, and the previous PCIe device is still the n-1th PCIe device. When the status.speed of a certain PCIe device at the nth level is less than the capability.speed, a fault is suspected, and the status.speed and capability.speed of the n-1th PCIe device are further compared. When the status.speed of the n-1th PCIe device is equal to the capability.speed, the link between the two adjacent PCIe devices is normal and fault-free. When the status.speed of the n-1th PCIe device is less than the capability.speed, the link between the two is decelerated.
[0075] From the above, it can be seen that when the BIOS of this embodiment detects that the actual link status of the PCIe device has not reached the maximum supported link status, it further checks the actual link status and the maximum supported link status of the upper-level PCIe device of the device to determine whether it is normal that the device has not reached the maximum supported link bandwidth or the maximum supported link rate or whether there is a bandwidth allocation anomaly or a link failure in the upper-level PCIe device. This can more accurately distinguish between an actual PCIe failure and a normal phenomenon, thereby improving the accuracy of PCIe link status detection.
[0076] It should be noted that there is no strict order of execution between the steps in the present invention. As long as they comply with the logical order, these steps can be executed simultaneously or in a certain preset order. Figure 1-Figure 3 This is just a schematic and does not mean that this is the only execution order.
[0077] In the above embodiment, there is no limitation on how to execute step S104. In this embodiment, an exemplary method for generating a link status detection result of a PCIe device is provided. This embodiment may include the following steps:
[0078] If the current-level PCIe device has a bandwidth reduction fault, the fault source location information is determined based on the hardware connection relationship between the two adjacent levels of PCIe devices, and a link status detection result including the bandwidth reduction fault identification result and the fault source location information is generated; if the link between the two adjacent levels of PCIe devices has a speed reduction fault, the fault source location information is determined based on the hardware connection relationship between the two adjacent levels of PCIe devices, and a link status detection result including the speed reduction fault identification result and the fault source location information is generated. If it is determined that the upper-level PCIe device of the current-level PCIe device has a bandwidth allocation fault problem based on the link status of the two adjacent levels of PCIe devices, the cause of the bandwidth allocation fault is determined based on the bandwidth allocation scheme input source of the upper-level PCIe device; based on the bandwidth allocation fault cause, a link status detection result including the bandwidth allocation problem and the bandwidth allocation fault cause is generated; wherein, the bandwidth allocation fault cause includes an error in identifying the corresponding type of the upper-level PCIe device.
[0079] For the convenience of description, the present embodiment also defines the current level PCIe device as the nth level PCIe device, and the previous level PCIe device as the n-1th PCIe device. When the link status of the two adjacent levels of PCIe devices is that the nth level PCIe device has a bandwidth reduction problem, it is determined that the nth level PCIe device has a fault, and the BIOS actively pushes the nth level PCIe device bandwidth reduction reminder warning information to the baseboard management controller. The BMC can determine the location of the nth level PCIe device according to the connection between the nth level PCIe device and the n-1th level PCIe device, and generate a link status detection result together with the fault location and the fault type. It can also provide corresponding maintenance suggestions for the production line or customers. The maintenance suggestions can be directly pushed to the pre-bound client, which may include the fault location and the fault type. If the link status of the two adjacent levels of PCIe devices is that the link has a speed reduction problem, the BISO will generate a link speed reduction fault for the abnormal phenomenon of the link between the n-1th level PCIe device and the nth level PCIe device, and send the link speed reduction fault to the BMC. When the BMC receives the link speed reduction fault reminder warning information, it can locate the fault location according to the connection relationship between the n-1th level PCIe device and the nth level PCIe device, and generate a maintenance suggestion for the fault location together with the fault type. If the link status of the two adjacent levels of PCIe devices is that there is a problem with the bandwidth allocation of the n-1th level PCIe device, the BMC obtains the input source of the bandwidth allocation plan of the n-1th level PCIe device, and locates the fault according to the input source of the bandwidth allocation plan of the n-1th level PCIe device. For example, if the input source of the bandwidth allocation plan is due to an incorrect type recognition of the n-1th level PCIe device, such as the n-1th level PCIe device itself is of X16 type, if it is recognized as X8 type, the allocated bandwidth will be reduced, then the fault source is the recognition problem of the n-1th level PCIe device, and a suggestion for re-identifying the device type of the n-1th level PCIe device can be generated.
[0080] As can be seen from the above, when this embodiment detects that the link status of a certain PCIe device is abnormal, the link status of the adjacent PCIe device is determined by checking the link status of the upper-level device, so that the real fault and the normal configuration can be distinguished, and when a fault occurs, it can accurately identify whether it is a speed reduction fault or a bandwidth reduction fault, and by judging the maximum supported link bandwidth of the PCIe device and the maximum supported link bandwidth of its upper-level PCIe device, the link fault and the upper-level device bandwidth allocation fault can be distinguished. The fault source is defined by the connection relationship between the adjacent two-level PCIe devices and the bandwidth allocation source of the PCIe device, thereby improving the efficiency of fault repair.
[0081] In order to further improve the efficiency of PCIe link detection, based on the above embodiments, the present invention further provides processing for special PCIe devices, which may include the following contents:
[0082] In the process of checking each PCIe device from the bottom layer to the top layer, if the device type corresponding to the current PCIe device is the first type of PCIe device type and the current PCIe device has no connected device, the link status of the current PCIe device is not checked.
[0083] In order to improve the detection efficiency of PCIe devices, considering that there is a type of PCIe device that is not connected to the device, there is no need to check its link status. Therefore, when traversing the PCIe devices for link detection, the detection of the link status of these PCIe devices can be ignored. Correspondingly, the detection of the type of PCIe devices can be increased. This embodiment defines that there may be PCIe devices that are not connected to the device as the first type of PCIe device type. The first type of PCIe device type includes but is not limited to the root port, PCIe bridge and switch downstream port. If the currently detected PCIe device is not the first type of PCIe device, a link status detection is performed on it. If the first type of PCIe device type belongs to the first type of PCIe device type, it needs to be further detected to determine whether it is connected to the device. If it is connected to the device, it needs to be detected for the link status. If it is not connected to the device, it does not need to be detected for the link status. In other words, before checking the link bandwidth and link rate of a PCIe device, first determine whether the PCIe device belongs to a Root Port, PCIe bridge or switch down stream port. If so, determine whether the device is connected. If not, ignore the link rate check and link bandwidth check of the PCIe device.
[0084] In this embodiment, physical link information is pre-stored in the baseboard management controller; the physical link information is the correspondence between the physical slot number of the first-class PCIe device and the connector pin position and the hardware board where it is located. When the first-class PCIe device type fails, that is, the device type corresponding to the current PCIe device belonging to the first-class PCIe device is connected to the device, and the current PCIe device has a link failure or a bandwidth allocation failure, the target connector connected to the current PCIe device and the corresponding target hardware board are determined according to the physical link information, and the target connector and the target hardware board are the fault location information.
[0085] For example, the BMC registers will pre-store the physical slot number values set by the Root Port, switch upstream port, and switch downstream port, the uniquely corresponding high-speed connector pins and the board information on which they are located. The board can be, for example, a network board, such as a network interface card (NIC) connecting a server to an external network, a storage board, such as a hard disk interface card (HBA) connecting a server to a storage device, or an expansion card, such as a PCIe expansion card used to provide additional I / O (input / output) functions or connect to other devices. When the Root Port, switch upstream port, and switch downstream port fail, the BMC determines the corresponding fault location information based on the PCIe speed reduction / bandwidth reduction fault reminder warning information sent by the BIOS.
[0086] As can be seen from the above, this embodiment sets a corresponding link status detection method and link fault location method for a characteristic PCIe device, thereby further improving the detection efficiency and maintenance efficiency of the PCIe link status.
[0087] Based on the above embodiments, in order to further ensure the accuracy and consistency of the PCIe link status check, the present invention further provides the following embodiments, which may include the following contents:
[0088] Before detecting the PCIe link status of PCIe devices from the bottom layer to the top layer, LTSSM (Link Training and Status State Machine) can be used to control and manage the data link on the PCIe bus. Link status and errors can be tracked in real time or by definition through a set of states to ensure the accuracy of link training and negotiation. In addition, the electrical characteristics of the PCIe link can be tested first, including but not limited to the verification of transmitter preset, signal integrity and jitter testing, etc., to ensure that the signal quality and link performance meet the requirements of the PCIe specification. Furthermore, the link training sequence message can also be used to complete operations such as bit locking, character locking, block alignment and channel number allocation to ensure signal synchronization and matching of devices at both ends of the link. Equalization test is performed on PCIe 3.0 or higher links to optimize signal parameters, increase data transmission rate while reducing bit error rate, and implement physical layer and logical layer tests at the same time. The analog characteristics of signal transmission and reception are determined through physical layer testing, and the protocol mechanism used to adjust electrical signals is determined through logical layer testing. The combination of the two ensures the comprehensiveness of link status inspection.
[0089] As can be seen from the above, this embodiment eliminates interference in the above manner before detecting the PCIe link status, thereby ensuring the accuracy and consistency of the PCIe link status check, thereby improving the overall performance and reliability of the system.
[0090] Finally, in order to make those skilled in the art more clearly understand the technical solution of the present invention, the present invention also provides an exemplary PCIe link status detection method, such as Figure 4 As shown, this embodiment detects the status of the PCIe link of the terminal device (ie EP) connected to the root port (ie Root Port) through the high-speed connectors J2 and J1. J1 and J2 are interconnected through the high-speed cable PCIe. The root port and the corresponding high-speed connector J1 are deployed on the board A, and the terminal device and the corresponding high-speed connector J2 are deployed on the board B. The bandwidth of the root port is allocated according to the sideband signal in the high-speed cable. For example, if the sideband signal is 00, the root port bandwidth is allocated to x16. If the sideband signal is 01, the port bandwidth is allocated to x8. The link status detection process between the two may include the following contents:
[0091] BIOS obtains the target status parameters of the root port: status.speed is 8 GT / s, capability.speed is 8GT / s, status.width is x8, and capability.width is x8. BIOS obtains the target status parameters of the terminal device: status.speed is 8 GT / s, capability.speed is 8 GT / s, status.width is x8, and capability.width is x16. By comparison, it can be seen that the link speed of the terminal device is normal, and the link bandwidth is lower than the maximum supported x16. Continue to compare the maximum supported link bandwidth of the root port and find that the capability.width of the terminal device is greater than the capability.width of the root port, then it is determined that there is a problem with the bandwidth allocation of the root port. BMC receives the bandwidth reduction problem pushed by BIOS and generates the root port BDF bandwidth reduction alarm information and bandwidth allocation error reminder alarm information based on the link relationship pre-stored in its register. Further, according to the physical slot number set by the root port (corresponding to the high-speed connector J1), the BMC alarm information prompts to check the J1 connector and the connected board.
[0092] As can be seen from the above, this embodiment can solve the problem of misjudgment and inability to locate the source of the fault in the related technology, and achieve accurate detection of the PCIe link status and location of the source of the fault.
[0093] The present invention also provides a corresponding device for the link status check method, which further makes the method more practical. Among them, the device can be described from the perspective of functional modules and hardware respectively. The link status check device provided by the present invention is introduced below. The device is used to implement the link status check method provided by the present invention. In this embodiment, the link status check device may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to complete the link status check method disclosed in Example 1. The program module referred to in this embodiment refers to a series of computer program instruction segments that can complete specific functions, which is more suitable for describing the execution process of the link status check device in the storage medium than the program itself. The following description will specifically introduce the functions of each program module of this embodiment. The link status check device described below and the link status check method described above can be referenced to each other.
[0094] From the perspective of functional modules, see Figure 5 , Figure 5 The structure diagram of the link status checking device provided in this embodiment in a specific implementation manner, the device may include:
[0095] The data acquisition module 501 is used to acquire the status parameter information of each PCIe device during the PCIe resource initialization process; the status parameter information includes the current parameter value of each status parameter in the current connection state and the corresponding maximum allowable value of the parameter;
[0096] The adjacent link data acquisition module 502 is used to acquire the corresponding target state parameter information of the previous level PCIe device of the current level PCIe device if the current parameter value of the target state parameter of the current level PCIe device is less than the corresponding maximum allowable value of the parameter;
[0097] The link status detection module 503 is used to determine the link status of two adjacent PCIe devices according to the comparison result of the target status parameter information of two adjacent PCIe devices;
[0098] The fault identification and location module 504 is used to generate a link status detection result including a status identification result and fault source location information according to the link status and the hardware connection relationship between two adjacent PCIe devices.
[0099] For example, in some implementations of this embodiment, the fault identification and location module 504 may also be used to:
[0100] If a bandwidth reduction fault occurs in the current-level PCIe device, the fault source location information is determined according to the hardware connection relationship between the two adjacent levels of PCIe devices, and a link state detection result including a bandwidth reduction fault identification result and the fault source location information is generated;
[0101] If a speed reduction fault occurs in a link between two adjacent PCIe devices, the fault source location information is determined according to the hardware connection relationship between the two adjacent PCIe devices, and a link status detection result including a speed reduction fault identification result and the fault source location information is generated.
[0102] For example, in some other implementations of this embodiment, the fault identification and location module 504 may also be used to:
[0103] If it is determined that the upper-level PCIe device of the current-level PCIe device has a bandwidth allocation failure problem according to the link status of the two adjacent levels of PCIe devices, the cause of the bandwidth allocation failure is determined according to the bandwidth allocation scheme input source of the upper-level PCIe device;
[0104] Based on the bandwidth allocation failure cause, generating a link status detection result including the bandwidth allocation problem and the bandwidth allocation failure cause;
[0105] Among them, the cause of the bandwidth allocation failure includes incorrect identification of the corresponding type of the upper-level PCIe device.
[0106] Exemplarily, in some implementations of this embodiment, the link state detection module 503 may also be used for: the current parameter value is the link speed of the current connection state, the maximum allowed value of the parameter is the maximum supported link speed, if the link speed of the current connection state of the target PCIe device at the current level is less than its corresponding maximum supported link speed;
[0107] When the link speed of the current connection state of the upper-level PCIe device of the target PCIe device is equal to the corresponding maximum supported link speed, it is determined that the link state between the target PCIe device and the upper-level PCIe device is normal;
[0108] When the link speed of the current connection state of the upper-level PCIe device of the target PCIe device is less than its corresponding maximum supported link speed, it is determined that a speed reduction failure occurs in the link between the target PCIe device and its upper-level PCIe device.
[0109] Exemplarily, in some other implementations of the present embodiment, the above-mentioned device may also include an identification module, which is used to not perform a link status check on the current PCIe device during the process of checking each PCIe device step by step from the bottom layer to the top, if the device type corresponding to the current PCIe device is a first-class PCIe device type, and the current PCIe device has no connected device; wherein the first-class PCIe device type includes root ports, PCIe bridges, and switch downstream ports.
[0110] As an exemplary implementation of the above embodiment, the above fault identification and location module 504 may also be used for:
[0111] Pre-storing physical link information in the baseboard management controller; the physical link information is the correspondence between the physical slot number of the first type PCIe device and the connector pin position and the hardware board where it is located;
[0112] If the device type corresponding to the current PCIe device is a connected device, and the current PCIe device has a link failure or a bandwidth allocation failure, the target connector connected to the current PCIe device and the corresponding target hardware board are determined according to the physical link information. The target connector and the target hardware board are fault location information.
[0113] Illustratively, in some other implementations of this embodiment, the link status detection module 503 may also be used for:
[0114] The current parameter value is the link bandwidth value of the current connection state, and the maximum allowed value of the parameter is the maximum supported link bandwidth value. In the process of checking each PCIe device from the bottom layer to the top layer, for the target PCIe device that is not a first-class PCIe device type, if the link bandwidth value of the current connection state of the target PCIe device is less than its corresponding maximum supported link bandwidth value;
[0115] If the link bandwidth value of the current connection state of the upper-level PCIe device of the target PCIe device is equal to its corresponding maximum supported link bandwidth value, the link state of the upper-level PCIe device of the target PCIe device is normal;
[0116] If the link bandwidth value of the current connection state of the upper-level PCIe device of the target PCIe device is less than its corresponding maximum supported link bandwidth value, compare the maximum supported link bandwidth value of the target PCIe device with the maximum supported link bandwidth value of the upper-level PCIe device of the target PCIe device;
[0117] If the maximum link bandwidth value supported by the target PCIe device is less than or equal to the maximum link bandwidth value supported by the upper-level PCIe device of the target PCIe device, the link status of the target PCIe device is a bandwidth reduction fault;
[0118] If the maximum link bandwidth value supported by the target PCIe device is greater than the maximum link bandwidth value supported by the upper-level PCIe device of the target PCIe device, the link status of the upper-level PCIe device of the target PCIe device is a bandwidth allocation failure;
[0119] Among them, the first type of PCIe device types include root ports, PCIe bridges, and switch downstream ports.
[0120] The functions of the functional modules of the link status checking device described in this embodiment can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.
[0121] As can be seen from the above, this embodiment can solve the problem of misjudgment and inability to locate the source of the fault in the related technology, and achieve accurate detection of the PCIe link status and location of the source of the fault.
[0122] The link status checking device mentioned above is described from the perspective of functional modules. Furthermore, the present invention also provides an electronic device, which is described from the perspective of hardware. Figure 6 The following is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention in one implementation manner. Figure 6 As shown, the electronic device includes a memory 60 for storing a computer program; and a processor 61 for implementing the steps of the link status checking method mentioned in any of the above embodiments when executing the computer program.
[0123] Among them, the processor 61 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the processor 61 may also be a controller, a microcontroller, a microprocessor or other data processing chip. The processor 61 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 61 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 61 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 61 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0124] The memory 60 may include one or more computer non-volatile storage media, which may be non-transitory. The memory 60 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the memory 60 may be an internal storage unit of an electronic device, such as a hard disk of a server. In other embodiments, the memory 60 may also be an external storage device of an electronic device, such as a plug-in hard disk equipped on a server, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 60 may also include both an internal storage unit of an electronic device and an external storage device. The memory 60 may not only be used to store application software and various types of data installed in the electronic device, such as: the code of the program in the process of executing the link status check method, but also be used to temporarily store data that has been output or is to be output. In this embodiment, the memory 60 is at least used to store the following computer program 601, wherein, after the computer program is loaded and executed by the processor 61, the relevant steps of the link status check method disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, and the storage method may be temporary storage or permanent storage. The operating system 602 may include Windows, Unix, Linux, etc. The data 603 may include but is not limited to data corresponding to the link status check result.
[0125] In some embodiments, the electronic device may further include a display screen 62, an input / output interface 63, a communication interface 64 or a network interface, a power supply 65 and a communication bus 66. Among them, the display screen 62 and the input / output interface 63, such as a keyboard, belong to the user interface, and exemplary user interfaces may also include standard wired interfaces, wireless interfaces, etc. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface. The communication interface 64 may exemplarily include a wired interface and / or a wireless interface, such as a WI-FI interface, a Bluetooth interface, etc., which are generally used to establish a communication connection between the electronic device and other electronic devices. The communication bus 66 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0126] Those skilled in the art will understand that Figure 6 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than those shown in the figure, for example, it may also include a sensor 67 to implement various functions.
[0127] The functions of the functional modules of the electronic device described in this embodiment can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.
[0128] As can be seen from the above, this embodiment can solve the problem of misjudgment and inability to locate the source of the fault in the related technology, and achieve accurate detection of the PCIe link status and location of the source of the fault.
[0129] It is understandable that if the link status check method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes but is not limited to: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, removable disk, CD-ROM, magnetic disk or optical disk, etc. Various media that can store program codes. Based on this, the present invention also 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 link status check method recorded in any of the above embodiments are executed.
[0130] It is understandable that if the link status check method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, the computer software product does not need to be stored in a physical storage medium. For example, it can be directly transmitted to a computer or other device with information processing capabilities through a wired network or a wireless network to perform all or part of the steps of the methods of each embodiment of the present invention. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product. Based on this, the present invention also provides a computer program product that stores a computer program. When the computer program is executed by a processor, the steps of the link status check method described in any of the above embodiments are performed.
[0131] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the hardware disclosed in the embodiments, including devices, electronic devices, and non-volatile storage media, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0132] 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 composition and steps of each example have been generally described in the above description according to function. 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 to be beyond the scope of the present invention.
[0133] The above is a detailed introduction to a link status checking method, device, electronic device and non-volatile storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that based on the embodiments of the present invention, for ordinary technicians in this technical field, all other embodiments obtained without creative work are within the scope of protection of the present invention. Without departing from the principles of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A link status checking method, characterized in that: include: During the PCIe resource initialization process, obtain the status parameter information of each PCIe device; The state parameter information includes the current parameter value of each state parameter in the current connection state and the corresponding maximum allowable value of the parameter; If the current parameter value of the target state parameter of the current-level PCIe device is less than the corresponding maximum allowable value of the parameter, obtaining the corresponding target state parameter information of the previous-level PCIe device of the current-level PCIe device; Determine the link status of the two adjacent PCIe devices based on the comparison result of the target status parameter information of the two adjacent PCIe devices; According to the link status and the hardware connection relationship between two adjacent levels of PCIe devices, a link status detection result including a status identification result and fault source location information is generated.
2. The link status checking method according to claim 1, wherein: Generate a link status detection result including a status identification result and fault source location information based on the link status and the hardware connection relationship between two adjacent PCIe devices, including: If a bandwidth reduction fault occurs in the current-level PCIe device, the fault source location information is determined based on the hardware connection relationship between the two adjacent levels of PCIe devices, and a link status detection result including a bandwidth reduction fault identification result and the fault source location information is generated; If a speed reduction fault occurs in a link between two adjacent PCIe devices, the fault source location information is determined based on the hardware connection relationship between the two adjacent PCIe devices, and a link status detection result including a speed reduction fault identification result and the fault source location information is generated.
3. The link status checking method according to claim 1, wherein: After determining the link status of two adjacent levels of PCIe devices, the method further includes: If it is determined based on the link status of two adjacent PCIe devices that a bandwidth allocation failure occurs in the upper-level PCIe device of the current-level PCIe device, the cause of the bandwidth allocation failure is determined based on the bandwidth allocation scheme input source of the upper-level PCIe device; Based on the bandwidth allocation failure cause, generating a link status detection result including the bandwidth allocation problem and the bandwidth allocation failure cause; The bandwidth allocation failure cause includes an error in identifying the type of the upper-level PCIe device.
4. The link status checking method according to claim 1, wherein: The current parameter value is a link speed of a current connection state, the maximum allowed parameter value is a maximum supported link speed, and determining the link status of two adjacent PCIe devices based on a comparison result of target status parameter information of two adjacent PCIe devices includes: If the link speed of the current connection state of the target PCIe device at the current level is less than its corresponding maximum supported link speed; When the link speed of the current connection state of the upper-level PCIe device of the target PCIe device is equal to the corresponding maximum supported link speed, it is determined that the link state between the target PCIe device and the upper-level PCIe device is normal; When the link speed of the current connection state of the upper-level PCIe device of the target PCIe device is less than its corresponding maximum supported link speed, it is determined that a speed reduction fault occurs in the link between the target PCIe device and its upper-level PCIe device.
5. The link status checking method according to claim 1, wherein: If the current parameter value of the target state parameter of the current-level PCIe device is less than the corresponding maximum allowable value of the parameter, the method further includes: In the process of checking each PCIe device from the bottom layer upward, if the device type corresponding to the current PCIe device is the first type of PCIe device type and the current PCIe device has no connected device, then the link status check of the current PCIe device is not performed; The first type of PCIe device types include root ports, PCIe bridges, and switch downstream ports.
6. The link status checking method according to claim 5, wherein: If the device type corresponding to the current PCIe device is the first type of PCIe device, the method further includes: Pre-storing physical link information in a baseboard management controller; the physical link information is a correspondence between the physical slot number of the first type of PCIe device and the connector pin position and the hardware board where the device is located; If the device type corresponding to the current PCIe device is a connection device, and the current PCIe device has a link failure or a bandwidth allocation failure, the target connector connected to the current PCIe device and the corresponding target hardware board are determined according to the physical link information, and the target connector and the target hardware board are fault location information.
7. The link status checking method according to any one of claims 1 to 6, characterized in that: The current parameter value is a link bandwidth value of a current connection state, the maximum allowed parameter value is a maximum supported link bandwidth value, and determining the link status of two adjacent PCIe devices based on a comparison result of target status parameter information of two adjacent PCIe devices includes: In the process of checking each PCIe device from the bottom layer upward, if the target PCIe device of the current level is not a first-class PCIe device type, and the link bandwidth value of the current connection state of the target PCIe device is less than the corresponding maximum supported link bandwidth value; If the link bandwidth value of the current connection state of the upper-level PCIe device of the target PCIe device is equal to its corresponding maximum supported link bandwidth value, the link state of the upper-level PCIe device of the target PCIe device is normal; If the link bandwidth value of the current connection state of the upper-level PCIe device of the target PCIe device is less than its corresponding maximum supported link bandwidth value, then comparing the maximum supported link bandwidth value of the target PCIe device with the maximum supported link bandwidth value of the upper-level PCIe device of the target PCIe device; If the maximum link bandwidth value supported by the target PCIe device is less than or equal to the maximum link bandwidth value supported by the upper-level PCIe device of the target PCIe device, the link status of the target PCIe device is a bandwidth reduction fault; If the maximum link bandwidth value supported by the target PCIe device is greater than the maximum link bandwidth value supported by the upper-level PCIe device of the target PCIe device, the link status of the upper-level PCIe device of the target PCIe device is a bandwidth allocation failure; The first type of PCIe device types include root ports, PCIe bridges, and switch downstream ports.
8. A link status checking device, characterized in that: include: The data acquisition module is used to obtain the status parameter information of each PCIe device during the PCIe resource initialization process; The state parameter information includes the current parameter value of each state parameter in the current connection state and the corresponding maximum allowable value of the parameter; an adjacent link data acquisition module, configured to acquire target state parameter information corresponding to a previous-level PCIe device of the current-level PCIe device if the current parameter value of the target state parameter of the current-level PCIe device is less than the corresponding maximum allowable value of the parameter; A link status detection module is used to determine the link status of two adjacent PCIe devices based on the comparison results of the target status parameter information of the two adjacent PCIe devices; The fault identification and location module is used to generate a link status detection result including a status identification result and fault source location information according to the link status and the hardware connection relationship between the two adjacent PCIe devices.
9. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the processor is configured to implement the steps of the link status checking method according to any one of claims 1 to 7 when executing a computer program stored in the memory.
10. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the link status checking method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Link training test method, system, equipment and medium
CN120434149A
