PCIe device degradation detection method, device, terminal and storage medium

By comparing the actual rate and bandwidth of the PCIe device with the rated rate and bandwidth, if a degradation failure occurs, the link is repeatedly trained and the abnormal information is analyzed, which solves the problem of inaccurate diagnosis in the existing technology and improves the accuracy of PCIe device repair. and effectiveness.

CN115801540BActive Publication Date: 2024-10-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211449357.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2024-10-22
Estimated Expiration
2042-11-18

AI Technical Summary

Technical Problem

It is difficult to accurately diagnose the specific link faults of PCIe device degradation problems with existing technology, which affects the effectiveness of repairs.

Method used

By obtaining the actual rate and bandwidth of the PCIe device and comparing it with the rated rate and bandwidth, if a degradation failure occurs, the device link is repeatedly trained and the abnormal information during the training process is analyzed to determine the cause of the failure.

Benefits of technology

It improves the accuracy and effectiveness of PCIe device repair, can specifically determine the link fault location, and enhances the reliability of repair.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115801540B_ABST
    Figure CN115801540B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of PCIe device performance detection, and specifically discloses a PCIe device degradation detection method, device, terminal and storage medium, which obtain the actual rate and actual bandwidth of the PCIe device, obtain the rated rate and rated bandwidth of the PCIe device, and judge whether the PCIe device has a degradation fault according to the actual rate, actual bandwidth, rated rate and rated bandwidth of the PCIe device. If a degradation fault occurs, the PCIe device link is repeatedly trained, and the cause of the PCIe device degradation is determined according to abnormal information in the training process. When a degradation problem occurs in the PCIe device, the present invention repeatedly trains the PCIe device link, determines the specific link fault location, provides information for the repair of the PCIe device, and improves the effectiveness of the PCIe device repair.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of PCIe device performance detection, and in particular to a PCIe device degradation detection method, device, terminal and storage medium. Background Art

[0002] In the early days of computer development, ISA, MCA, PCI and other architectures and specifications were designed to achieve information exchange between CPU and external devices. Among them, PCI bus, as a type of local bus, is widely used in the server field. However, with the development of economy and technology, people have higher performance requirements for servers and external devices, and the bus frequency, bandwidth and robustness requirements have increased, so PCI bus is no longer suitable for modern technology.

[0003] Subsequently, PCIe was proposed by Intel as a high-speed serial computer expansion bus standard. The PCIe standard is based on the PCI specification and changes the parallel mode to serial, which effectively improves the signal's anti-interference ability. External devices that use the PCIe standard can be called PCIe devices. Common PCIe devices in the server field include network cards, RAID cards, GPUs, FPGA cards, NVME disks, etc.

[0004] The bandwidth and rate of PCIe devices are parameters that are of great concern during the normal use of servers. These two parameters have a great influence on the performance of PCIe devices. If the bandwidth and rate of PCIe devices are abnormal, the function of the device will be affected and cannot be used effectively. The bandwidth of PCIe devices refers to the number of lanes for data transmission. Generally, there are several types of bandwidth, such as x1, x2, x4, x8, and x16. The rate of PCIe devices refers to the rate of each lane, which includes Gen 1 (2.5Gb / s), Gen 2 (5Gb / s), Gen 3 (8Gb / s), and Gen 4 (16Gb / s). On the Intel Whitley platform, the maximum rate supported is Gen 4.

[0005] In fact, the bandwidth of PCIe devices can be divided into rated bandwidth and actual bandwidth, and the same rate can be divided into rated rate and actual rate. Rated bandwidth and rated rate refer to the maximum bandwidth and rate supported by the device, while the actual bandwidth and rate may be different from the rated bandwidth and rate, because the actual bandwidth and rate are the result of negotiation between the PCIe device and the server motherboard. For example, the rated bandwidth of the PCIe device is x16, but the port connected to the motherboard through the cable is only x8, so the negotiated actual bandwidth is x8.

[0006] PCIe device degradation refers to the situation where the actual bandwidth and actual rate of the PCIe device are less than the rated bandwidth and rated rate. When this problem occurs, the PCIe device is in an abnormal state and its functions are affected. Generally, this problem occurs due to poor signal quality on the physical link. Therefore, it is particularly important to diagnose PCIe device degradation.

[0007] The current detection scheme for PCIe devices generally detects whether there is a speed reduction based on the comparison between the rated bandwidth and rated rate and the actual bandwidth and actual rate. When a speed reduction problem occurs, it is repaired based on the information recorded in the PCIe log. However, obtaining fault information from the PCIe device log does not accurately know which link in the link has a problem, which affects the effectiveness of the repair. Summary of the invention

[0008] To solve the above problems, the present invention provides a PCIe device degradation detection method, device, terminal and storage medium. When a PCIe device has a degradation problem, the PCIe device link is repeatedly trained to determine the specific link failure, provide accurate information for repairing the PCIe device, and improve the effectiveness of PCIe device repair.

[0009] In a first aspect, the technical solution of the present invention provides a PCIe device degradation detection method, comprising the following steps:

[0010] Get the actual rate and actual bandwidth of the PCIe device;

[0011] Get the rated rate and rated bandwidth of the PCIe device;

[0012] Determine whether a degradation fault occurs in the PCIe device according to the actual rate, actual bandwidth, rated rate, and rated bandwidth of the PCIe device;

[0013] If a degradation failure occurs, the PCIe device link is repeatedly trained, and the cause of the PCIe device degradation is determined based on the abnormal information during the training process.

[0014] Further, judging whether a degradation fault occurs in the PCIe device according to the actual rate, actual bandwidth, rated rate, and rated bandwidth of the PCIe device specifically includes:

[0015] Detect the relationship between the actual rate and the rated rate of the PCIe device, as well as the relationship between the actual bandwidth and the rated bandwidth;

[0016] If the actual rate of the PCIe device is equal to the rated rate, and the actual bandwidth is equal to the rated bandwidth, then the PCIe device has no degradation fault;

[0017] If the actual rate of the PCIe device is less than the rated rate and / or the actual bandwidth is less than the rated bandwidth, the rated rates and rated bandwidths of all PCIe devices on the link where the PCIe device is located are obtained;

[0018] Select the minimum rated rate from the rated rates of all PCIe devices as the rated rate reference value, and select the minimum rated bandwidth from the rated bandwidths of all PCIe devices as the rated bandwidth reference value;

[0019] Detect the relationship between the actual rate of the PCIe device and the rated rate reference value, as well as the relationship between the actual bandwidth and the rated bandwidth reference value;

[0020] If the actual rate of the PCIe device is equal to the rated rate reference value, and the actual bandwidth is equal to the rated bandwidth reference value, then the PCIe device has no degradation fault;

[0021] If the actual rate of the PCIe device is less than the rated rate reference value and / or the actual bandwidth is less than the rated bandwidth reference value, a degradation fault occurs in the PCIe device.

[0022] Furthermore, if the PCIe device has both an upstream device and a downstream device on its link, when it is detected that the actual rate of the PCIe device is less than the rated rate and / or the actual bandwidth is less than the rated bandwidth, the method specifically includes the following steps:

[0023] Get the rated rate and rated bandwidth of all upstream devices;

[0024] Selecting a minimum rated rate from the rated rates of all upstream devices as a first rated rate reference value, and selecting a minimum rated bandwidth from the rated bandwidths of all upstream devices as a first rated bandwidth reference value;

[0025] Detecting a magnitude relationship between an actual rate of the PCIe device and a first rated rate reference value, and a magnitude relationship between an actual bandwidth and a first rated bandwidth reference value;

[0026] If the actual rate of the PCIe device is equal to the first rated rate reference value, and the actual bandwidth is equal to the first rated bandwidth reference value, then the PCIe device has no degradation fault;

[0027] If the actual rate of the PCIe device is less than the first rated rate reference value and / or the actual bandwidth is less than the first rated bandwidth reference value, then obtaining the rated rates and rated bandwidths of all downstream devices;

[0028] Selecting a minimum rated rate from the rated rates of all downstream devices as a second rated rate reference value, and selecting a minimum rated bandwidth from the rated bandwidths of all downstream devices as a second rated bandwidth reference value;

[0029] Detecting a magnitude relationship between an actual rate of the PCIe device and a second rated rate reference value, and a magnitude relationship between an actual bandwidth and a second rated bandwidth reference value;

[0030] If the actual rate of the PCIe device is equal to the second rated rate reference value, and the actual bandwidth is equal to the second rated bandwidth reference value, then the PCIe device has no degradation fault;

[0031] If the actual rate of the PCIe device is less than the second rated rate reference value and / or the actual bandwidth is less than the second rated bandwidth reference value, a degradation fault occurs in the PCIe device.

[0032] Furthermore, the method specifically comprises:

[0033] Read the PCIe device configuration space to obtain the actual rate, actual bandwidth, rated rate, and rated bandwidth of the PCIe device.

[0034] Furthermore, the method specifically comprises:

[0035] Determine a training link according to link information of a PCIe device;

[0036] Repeat training between the Detect state, Polling state, Configuration state, L0 state, and Recovery state;

[0037] Get the log of each state training;

[0038] Check the data in the log to see if there are any abnormalities in the training process;

[0039] When an exception occurs, the cause of PCIe device degradation is determined based on the exception information.

[0040] Furthermore, whether the training process is abnormal is detected, including:

[0041] Check whether the training result is the same as the standard value and whether the training time is less than the threshold;

[0042] If the training result is different from the standard value and / or if the training exceeds the threshold, the training is abnormal.

[0043] Furthermore, the method further comprises the following steps:

[0044] A diagnostic list is maintained in the database in advance, which includes training anomaly information, the corresponding PCIe device degradation reasons, and the corresponding recommended repair operations;

[0045] After obtaining training anomaly information, find the corresponding PCIe device degradation cause and recommended repair operations in the diagnostic list;

[0046] Display training exception information, corresponding PCIe device degradation reasons and recommended repair operations on the human-computer interaction interface;

[0047] The human-computer interaction interface also displays basic information of all PCIe devices and provides diagnostic trigger buttons.

[0048] In a second aspect, the technical solution of the present invention provides a PCIe device degradation detection device, comprising:

[0049] Information acquisition module: obtain the actual rate and actual bandwidth of the PCIe device; obtain the rated rate and rated bandwidth of the PCIe device;

[0050] Degradation judgment module: judges whether the PCIe device has a degradation fault according to the actual rate, actual bandwidth, rated rate and rated bandwidth of the PCIe device;

[0051] Degradation cause detection module: If a degradation fault occurs, the PCIe device link is repeatedly trained, and the cause of PCIe device degradation is determined based on the abnormal information during the training process.

[0052] In a third aspect, the technical solution of the present invention provides a terminal, including:

[0053] A memory, used for storing a PCIe device degradation detection program;

[0054] A processor is used to implement the steps of any one of the above-mentioned PCIe device degradation detection methods when executing the PCIe device degradation detection program.

[0055] In a fourth aspect, the technical solution of the present invention provides a computer-readable storage medium, on which a PCIe device degradation detection program is stored. When the PCIe device degradation detection program is executed by a processor, the steps of the PCIe device degradation detection method as described in any one of the above items are implemented.

[0056] A PCIe device degradation detection method, device, terminal and storage medium provided by the present invention have the following beneficial effects compared with the prior art: obtaining the actual rate, actual bandwidth and rated rate and rated bandwidth of the PCIe device, judging whether a degradation problem occurs according to the actual data and the rated data, and when a degradation problem occurs in the PCIe device, repeatedly training the PCIe device link to determine the specific link fault location, providing information for repairing the PCIe device, and improving the effectiveness of repairing the PCIe device. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying any creative work.

[0058] Figure 1 The present invention provides a flow chart of a PCIe device degradation detection method.

[0059] Figure 2 It is a schematic diagram of a PCIe device degradation fault determination process in an embodiment of the present invention.

[0060] Figure 3 The figure is another achievable PCIe device degradation fault determination process diagram in an embodiment of the present invention.

[0061] Figure 4 It is a schematic diagram of the principle of a specific embodiment of a PCIe device degradation detection method provided by an embodiment of the present invention.

[0062] Figure 5 The present invention provides a PCIe device degradation detection device structure schematic diagram.

[0063] Figure 6 It is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0064] Some English terms involved in the present invention are explained below.

[0065] ISA (Industry Standard Architecture) industrial standard architecture;

[0066] MCA(Micro Channel Architecture) micro channel architecture;

[0067] PCI (Peripheral Component Interconnect) peripheral component interconnect;

[0068] PCIe (Peripheral Component Interconnect Express) Peripheral Component Interconnect Express;

[0069] RAID (Redundant Array of Independent Disks) Redundant Array of Independent Disks.

[0070] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0071] Figure 1 1 is a flow chart of a PCIe device degradation detection method provided by an embodiment of the present invention. The method is applied in a Windows system, such as Figure 1 As shown, the method includes the following steps.

[0072] S1, obtain the actual rate and actual bandwidth of the PCIe device.

[0073] S2, obtaining the rated rate and rated bandwidth of the PCIe device.

[0074] S3: Determine whether a degradation fault occurs in the PCIe device according to the actual rate, actual bandwidth, rated rate, and rated bandwidth of the PCIe device.

[0075] S4: If a degradation failure occurs, the PCIe device link is repeatedly trained, and the cause of the PCIe device degradation is determined according to abnormal information during the training process.

[0076] This embodiment detects PCIe devices in real time. It can be understood that all PCIe devices on the server can be detected, and designated PCIe devices can also be detected. The actual rate and actual bandwidth of the PCIe device are obtained in real time. In specific implementation, the information of the corresponding bits of the register can be read from the PCIe configuration space to obtain the actual rate and actual bandwidth of the PCIe device. Similarly, the rated rate and rated bandwidth of the PCIe device are obtained by reading the corresponding information of the register from the PCIe device configuration space. After that, the actual rate and actual bandwidth of the PCIe device are compared with the rated rate and rated bandwidth respectively to determine whether a degradation fault occurs. If a degradation fault occurs, the PCIe device link is repeatedly trained to find the specific location of the degradation fault, provide information for the repair of the PCIe device, and improve the effectiveness of the PCIe device repair.

[0077] The above step S3 determines whether the PCIe device has a degradation fault according to the actual rate, actual bandwidth, rated rate and rated bandwidth of the PCIe device. If the actual rate is directly compared with the rated rate, and the actual bandwidth is directly compared with the rated bandwidth, if the actual rate is less than the rated rate or the actual bandwidth is less than the rated bandwidth, it cannot be accurately determined whether the PCIe device has a degradation fault. It is possible that the rate and bandwidth negotiated by the PCIe device and its upstream and downstream PCIe devices are less than its own rated rate and rated bandwidth. In order to improve the accuracy of determining whether the PCIe device has a degradation fault, this embodiment specifically implements the determination of the PCIe device's degradation fault through the following steps.

[0078] Figure 2 : is a schematic diagram of the PCIe device degradation fault determination process of this embodiment. Figure 2 As shown, the process includes the following steps.

[0079] S301, detecting the relationship between the actual rate and the rated rate of the PCIe device, and the relationship between the actual bandwidth and the rated bandwidth.

[0080] S302: If the actual rate of the PCIe device is equal to the rated rate, and the actual bandwidth is equal to the rated bandwidth, then the PCIe device has no degradation fault.

[0081] S303: If the actual rate of the PCIe device is less than the rated rate and / or the actual bandwidth is less than the rated bandwidth, the rated rates and rated bandwidths of all PCIe devices on the link where the PCIe device is located are obtained.

[0082] S304: Select a minimum rated rate from the rated rates of all PCIe devices as a rated rate reference value, and select a minimum rated bandwidth from the rated bandwidths of all PCIe devices as a rated bandwidth reference value.

[0083] S305, detecting the relationship between the actual rate of the PCIe device and the rated rate reference value, and the relationship between the actual bandwidth and the rated bandwidth reference value.

[0084] S306: If the actual rate of the PCIe device is equal to the rated rate reference value, and the actual bandwidth is equal to the rated bandwidth reference value, then the PCIe device has no degradation fault.

[0085] S307: If the actual rate of the PCIe device is less than the rated rate reference value and / or the actual bandwidth is less than the rated bandwidth reference value, a degradation fault occurs in the PCIe device.

[0086] First, compare the actual rate and actual bandwidth of the PCIe device with its own rated rate and rated bandwidth to preliminarily determine whether there may be a degradation fault. If the actual rate is smaller than the rated rate, or the actual bandwidth is smaller than the rated bandwidth, if either or both of them are met, it is preliminarily determined that there may be a degradation fault. At this time, obtain the rated rate and rated bandwidth of all PCIe devices on the link where the PCIe device is located to detect whether they are the bandwidth and rate negotiated by the PCIe device link.

[0087] The minimum rated rate is selected from the rated rates of all PCIe devices as the rated rate reference value, and the minimum rated bandwidth is selected from the rated bandwidth of all PCIe devices as the rated bandwidth reference value. The PCIe devices that are preliminarily judged to have PCIe device degradation failures are compared with these two reference values. If the actual rate and actual bandwidth are the same as the corresponding reference values, it means that the bandwidth and rate are negotiated by the link and there is no degradation failure. If they are smaller than the corresponding reference values, it means that a degradation failure has occurred.

[0088] It is preliminarily determined that a PCIe device that may have a degradation fault may have both upstream and downstream PCIe devices, or only upstream devices, or only downstream devices in its link. For a PCIe device to be detected that has only upstream devices or only downstream devices, obtain a rated rate comparison of all PCIe devices on its link. For a PCIe device to be detected that has both upstream and downstream PCIe devices, first compare the upstream PCIe device and then the downstream PCIe device, or first compare the downstream PCIe device and then the upstream PCIe device to improve efficiency.

[0089] Figure 3 FIG. 1 is another achievable PCIe device degradation fault determination process diagram of this embodiment, such as Figure 3 As shown, the process includes the following steps.

[0090] SS301 detects the relationship between the actual rate and the rated rate of the PCIe device, as well as the relationship between the actual bandwidth and the rated bandwidth.

[0091] SS302: If the actual rate of the PCIe device is equal to the rated rate, and the actual bandwidth is equal to the rated bandwidth, then the PCIe device has no degradation fault.

[0092] SS303: If the actual rate of the PCIe device is less than the rated rate and / or the actual bandwidth is less than the rated bandwidth, the rated rates and rated bandwidths of all upstream devices are obtained.

[0093] SS304, selects the minimum rated rate from the rated rates of all upstream devices as the first rated rate reference value, and selects the minimum rated bandwidth from the rated bandwidths of all upstream devices as the first rated bandwidth reference value.

[0094] SS305, detecting the relationship between the actual rate of the PCIe device and the first rated rate reference value, and the relationship between the actual bandwidth and the first rated bandwidth reference value.

[0095] SS306: If the actual rate of the PCIe device is equal to the first rated rate reference value, and the actual bandwidth is equal to the first rated bandwidth reference value, then the PCIe device has no degradation fault.

[0096] SS307: If the actual rate of the PCIe device is less than the first rated rate reference value and / or the actual bandwidth is less than the first rated bandwidth reference value, the rated rates and rated bandwidths of all downstream devices are obtained.

[0097] SS308, selects the minimum rated rate from the rated rates of all downstream devices as the second rated rate reference value, and selects the minimum rated bandwidth from the rated bandwidths of all downstream devices as the second rated bandwidth reference value.

[0098] SS309, detecting the relationship between the actual rate of the PCIe device and the second rated rate reference value, and the relationship between the actual bandwidth and the second rated bandwidth reference value.

[0099] SS310: If the actual rate of the PCIe device is equal to the second rated rate reference value, and the actual bandwidth is equal to the second rated bandwidth reference value, then the PCIe device has no degradation fault.

[0100] SS311: If the actual rate of the PCIe device is less than the second rated rate reference value and / or the actual bandwidth is less than the second rated bandwidth reference value, a degradation fault occurs in the PCIe device.

[0101] First compare with the upstream PCIe device. If the minimum rated rate and rated bandwidth are the same as those of the upstream PCIe device, it can be directly determined that there is no degradation fault. If they are less than the minimum rated rate and rated bandwidth of the upstream PCIe device, then compare with the downstream PCIe device to improve detection efficiency.

[0102] If it is finally determined that the PCIe device has a degradation fault, the PCIe device link is repeatedly trained, and the cause of the PCIe device degradation is determined according to abnormal information during the training process, which specifically includes the following steps.

[0103] S401, determining a training link according to link information of a PCIe device.

[0104] S402, repeat training between the Detect state, Polling state, Configuration state, L0 state, and Recovery state.

[0105] S403, obtaining the log of each state training.

[0106] S404, checking the data in the log to detect whether there is any abnormality in the training process.

[0107] S405: When an exception occurs, determine the cause of PCIe device degradation according to the exception information.

[0108] If a PCIe device has a degradation failure, a training anomaly will occur when the PCIe link is repeatedly trained. Therefore, the training link is first determined based on the link information of the PCIe device, the link is repeatedly trained, the training log is read, and the training anomaly information is obtained from the log to determine the cause of the PCIe device degradation. Among them, detecting whether the training process is abnormal includes: detecting whether the training result is the same as the standard value and whether the training time is less than the threshold; if the training result is different from the standard value and / or the training exceeds the threshold, the training is abnormal.

[0109] In addition, in order to determine the cause of PCIe device degradation, the present embodiment maintains a diagnostic list in the database in advance, and the diagnostic list includes training exception information, the corresponding cause of PCIe device degradation, and the corresponding recommended repair operation. After obtaining the training exception information, the corresponding cause of PCIe device degradation and the recommended repair operation are searched in the diagnostic list. At the same time, the training exception information, the corresponding cause of PCIe device degradation and the recommended repair operation are displayed on the human-computer interaction interface for the tester to view. The basic information of all PCIe devices is also displayed on the human-computer interaction interface, and a diagnostic trigger button is provided to facilitate the tester's operation.

[0110] In order to further understand the present invention, the present invention is further described in detail with a specific embodiment below. The specific embodiment mainly includes the following three processes: Figure 4 It is a schematic diagram of the principle of this specific embodiment.

[0111] 1. PCIe device degradation detection process

[0112] The actual speed and bandwidth of the PCIe device are negotiated with the server motherboard during the boot process.

[0113] 1) Write the function Read_Actual_PCIeBandwidthandSpeed() in Windows. The purpose of this function is to read the actual rate and actual bandwidth information in the PCIe configuration space according to the PCIe specification. More specifically, it reads the register with an offset of 0x52 and a data size of 2 bytes.

[0114] 2) Write the function Read_Rated_PCIeBandwidthandSpeed() to obtain the rated rate and rated bandwidth information of the PCIe device, specifically reading the offset of 0x42 and the data size of 2 bytes.

[0115] 3) Write the function Check_Degradation_problem(). The first step is to compare the actual rate, bandwidth, and rated rate, bandwidth to determine whether the PCIe device has a degradation problem. The second step is to determine whether the PCIe device is degraded due to a device failure. This function will obtain two sets of rated rates and rated bandwidths of the upstream devices of the PCIe device, and take the minimum of the two sets. If the minimum of the two sets is equal to the actual rate and actual bandwidth of the PCIe device, the PCIe device is not degraded due to a device failure, and no diagnosis is required. If the minimum of the two sets is greater than the actual rate and actual bandwidth of the PCIe device, the PCIe device needs to be diagnosed. Similarly, if there is a downstream device on the PCIe device, the comparison method is the same as that of the upstream device.

[0116] 2. Diagnostic process of PCIe device degradation problem

[0117] The link training of PCIe devices has the following states: Detect state, Polling state, Configuration state, L0 state, Recovery state, etc. The actual bandwidth of the PCIe device is formed in the Configuration state, and the actual rate is formed during the Recovery state. Therefore, when a PCIe device has a degradation problem, you can reproduce the problem by retraining the link and capture the specific training process to diagnose the specific step where the problem occurs.

[0118] First, determine the link to be trained through the Bus / Device / Function information of the PCIe device, and then use the LinkRetrain() function to retrain the link, repeating the training in sequence from the Detect state, Polling state, Configuration state to the L0 state. In addition, the LinkRetrain() function can capture the time and training results of the Detect state, Polling state, Configuration state, L0 state, and Recovery state in the log. When a PCIe device degradation problem occurs, the output of the LinkRetrain() function can be used to analyze which state has a problem.

[0119] According to the above process, you can find out the specific problem steps. This tool will also maintain a database, which is saved in the format of problem steps -> possible causes -> recommended operations. Therefore, after determining the problem steps, you can diagnose the cause of the problem and then fix the problem according to the recommended operations. For example, the network card has a speed reduction problem under the Windows system, and the problem step is found to be phase2 time out. The possible cause is the firmware problem of the network card. The recommended operation is to upgrade the firmware of the network card.

[0120] 3. Visualization of diagnostic tools

[0121] In order to improve the utilization rate and friendliness of the tool, the tool is visualized. The visualization interface includes three parts: PCIe device basic information, PCIe device one-click diagnosis, and PCIe device diagnosis results. In the PCIe device basic information section, the basic information of the PCIe device on the server is displayed, including the manufacturer ID, device ID, location information, and Bus / Device / Function information. This section displays the PCIe device information at a glance. In the PCIe device one-click diagnosis section, the diagnosis is performed through the detection of PCIe device degradation problems and the diagnosis process of PCIe device degradation problems, and then the diagnosis results are displayed on the PCIe device diagnosis result interface. The diagnosis results include whether the PCIe device has a degradation problem, the problem steps, possible causes, and recommended operations.

[0122] An embodiment of a PCIe device degradation detection method is described in detail above. Based on the PCIe device degradation detection method described in the above embodiment, an embodiment of the present invention further provides a PCIe device degradation detection apparatus corresponding to the method.

[0123] Figure 5 is a schematic block diagram of a PCIe device degradation detection device provided by an embodiment of the present invention, such as Figure 5As shown, the device includes: an information acquisition module, a degradation judgment module and a degradation cause detection module.

[0124] Information acquisition module: obtains the actual rate and actual bandwidth of the PCIe device; obtains the rated rate and rated bandwidth of the PCIe device.

[0125] Degradation judgment module: determines whether a degradation fault occurs in the PCIe device according to the actual rate, actual bandwidth, rated rate and rated bandwidth of the PCIe device.

[0126] Degradation cause detection module: If a degradation fault occurs, the PCIe device link is repeatedly trained, and the cause of PCIe device degradation is determined based on the abnormal information during the training process.

[0127] The PCIe device degradation detection apparatus of this embodiment is used to implement the aforementioned PCIe device degradation detection method. Therefore, the specific implementation method of the apparatus can be seen in the embodiment part of the PCIe device degradation detection method in the previous text. Therefore, its specific implementation method can refer to the description of the corresponding embodiments of each part, which will not be introduced in detail here.

[0128] In addition, since the PCIe device degradation detection apparatus of this embodiment is used to implement the aforementioned PCIe device degradation detection method, its function corresponds to that of the aforementioned method, and will not be described in detail here.

[0129] Figure 6 A schematic diagram of the structure of a terminal device 600 provided in an embodiment of the present invention includes: a processor 610, a memory 620 and a communication unit 630. The processor 610 is used to implement the following steps when implementing the PCIe device degradation detection program stored in the memory 620:

[0130] S1, obtain the actual rate and actual bandwidth of the PCIe device.

[0131] S2, obtaining the rated rate and rated bandwidth of the PCIe device.

[0132] S3: Determine whether a degradation fault occurs in the PCIe device according to the actual rate, actual bandwidth, rated rate, and rated bandwidth of the PCIe device.

[0133] S4: If a degradation failure occurs, the PCIe device link is repeatedly trained, and the cause of the PCIe device degradation is determined according to abnormal information during the training process.

[0134] The present invention obtains the actual rate, actual bandwidth and rated rate and rated bandwidth of a PCIe device, determines whether a degradation problem occurs according to the actual data and the rated data, and when a degradation problem occurs in the PCIe device, repeatedly trains the PCIe device link to determine the specific link fault location, provides information for repairing the PCIe device, and improves the effectiveness of repairing the PCIe device.

[0135] The terminal device 600 includes a processor 610, a memory 620 and a communication unit 630. These components communicate via one or more buses. It can be understood by those skilled in the art that the structure of the server shown in the figure does not constitute a limitation of the present invention, and it can be a bus structure or a star structure, and can also include more or less components than shown in the figure, or combine some components, or arrange the components differently.

[0136] The memory 620 can be used to store the execution instructions of the processor 610. The memory 620 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 620 are executed by the processor 610, the terminal 600 can execute some or all of the steps in the following method embodiments.

[0137] The processor 610 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 620, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 610 can only include a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0138] The communication unit 630 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.

[0139] The present invention also provides a computer storage medium, wherein the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0140] The computer storage medium stores a PCIe device degradation detection program, and when the PCIe device degradation detection program is executed by the processor, the following steps are implemented:

[0141] S1, obtain the actual rate and actual bandwidth of the PCIe device.

[0142] S2, obtaining the rated rate and rated bandwidth of the PCIe device.

[0143] S3: Determine whether a degradation fault occurs in the PCIe device according to the actual rate, actual bandwidth, rated rate, and rated bandwidth of the PCIe device.

[0144] S4: If a degradation failure occurs, the PCIe device link is repeatedly trained, and the cause of the PCIe device degradation is determined according to abnormal information during the training process.

[0145] The present invention obtains the actual rate, actual bandwidth and rated rate and rated bandwidth of a PCIe device, determines whether a degradation problem occurs according to the actual data and the rated data, and when a degradation problem occurs in the PCIe device, repeatedly trains the PCIe device link to determine the specific link fault location, provides information for repairing the PCIe device, and improves the effectiveness of repairing the PCIe device.

[0146] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.

[0147] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0148] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0149] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0150] The above disclosure is only a preferred embodiment of the present invention, but the present invention is not limited thereto. Any non-creative changes that can be thought of by a person skilled in the art, as well as several improvements and modifications made without departing from the principle of the present invention, should fall within the protection scope of the present invention.

Claims

1. A PCIe device degradation detection method, characterized in that: The following steps are involved: Get the actual rate and actual bandwidth of the PCIe device; Get the rated rate and rated bandwidth of the PCIe device; Determine whether a degradation fault occurs in the PCIe device according to the actual rate, actual bandwidth, rated rate, and rated bandwidth of the PCIe device; If a degradation failure occurs, the PCIe device link is repeatedly trained, and the cause of PCIe device degradation is determined based on the abnormal information during the training process; The actual rate, actual bandwidth, rated rate, and rated bandwidth of the PCIe device are used to determine whether the PCIe device has a degradation fault, including: Detect the relationship between the actual rate and the rated rate of the PCIe device, as well as the relationship between the actual bandwidth and the rated bandwidth; If the actual rate of the PCIe device is equal to the rated rate, and the actual bandwidth is equal to the rated bandwidth, then the PCIe device has no degradation fault; If the actual rate of the PCIe device is less than the rated rate and / or the actual bandwidth is less than the rated bandwidth, the rated rates and rated bandwidths of all PCIe devices on the link where the PCIe device is located are obtained; Select the minimum rated rate from the rated rates of all PCIe devices as the rated rate reference value, and select the minimum rated bandwidth from the rated bandwidths of all PCIe devices as the rated bandwidth reference value; Detect the relationship between the actual rate of the PCIe device and the rated rate reference value, as well as the relationship between the actual bandwidth and the rated bandwidth reference value; If the actual rate of the PCIe device is equal to the rated rate reference value, and the actual bandwidth is equal to the rated bandwidth reference value, then the PCIe device has no degradation fault; If the actual rate of the PCIe device is less than the rated rate reference value and / or the actual bandwidth is less than the rated bandwidth reference value, then a degradation fault occurs in the PCIe device; The method further includes: Determine a training link according to link information of a PCIe device; Repeat training between the Detect state, Polling state, Configuration state, L0 state, and Recovery state; Get the log of each state training; Check the data in the log to see if there are any abnormalities in the training process; When an exception occurs, determine the cause of PCIe device degradation based on the exception information; Among them, detecting whether there is an abnormality in the training process specifically includes: Check whether the training result is the same as the standard value and whether the training time is less than the threshold; If the training result is different from the standard value and / or if the training exceeds the threshold, the training is abnormal; The method further comprises the following steps: A diagnostic list is maintained in the database in advance, which includes training anomaly information, the corresponding PCIe device degradation reasons, and the corresponding recommended repair operations; After obtaining training anomaly information, find the corresponding PCIe device degradation cause and recommended repair operations in the diagnostic list; Display training exception information, corresponding PCIe device degradation reasons and recommended repair operations on the human-computer interaction interface; The human-computer interaction interface also displays basic information of all PCIe devices and provides diagnostic trigger buttons.

2. The PCIe device degradation detection method according to claim 1, characterized in that: If the PCIe device has both an upstream device and a downstream device on its link, when it is detected that the actual rate of the PCIe device is less than the rated rate and / or the actual bandwidth is less than the rated bandwidth, the method specifically includes the following steps: Get the rated rate and rated bandwidth of all upstream devices; Selecting a minimum rated rate from the rated rates of all upstream devices as a first rated rate reference value, and selecting a minimum rated bandwidth from the rated bandwidths of all upstream devices as a first rated bandwidth reference value; Detecting a magnitude relationship between an actual rate of the PCIe device and a first rated rate reference value, and a magnitude relationship between an actual bandwidth and a first rated bandwidth reference value; If the actual rate of the PCIe device is equal to the first rated rate reference value, and the actual bandwidth is equal to the first rated bandwidth reference value, then the PCIe device has no degradation fault; If the actual rate of the PCIe device is less than the first rated rate reference value and / or the actual bandwidth is less than the first rated bandwidth reference value, then obtaining the rated rates and rated bandwidths of all downstream devices; Selecting a minimum rated rate from the rated rates of all downstream devices as a second rated rate reference value, and selecting a minimum rated bandwidth from the rated bandwidths of all downstream devices as a second rated bandwidth reference value; Detecting a magnitude relationship between an actual rate of the PCIe device and a second rated rate reference value, and a magnitude relationship between an actual bandwidth and a second rated bandwidth reference value; If the actual rate of the PCIe device is equal to the second rated rate reference value, and the actual bandwidth is equal to the second rated bandwidth reference value, then the PCIe device has no degradation fault; If the actual rate of the PCIe device is less than the second rated rate reference value and / or the actual bandwidth is less than the second rated bandwidth reference value, a degradation fault occurs in the PCIe device.

3. The PCIe device degradation detection method according to claim 1 or 2, characterized in that: The method specifically includes: Read the PCIe device configuration space to obtain the actual rate, actual bandwidth, rated rate, and rated bandwidth of the PCIe device.

4. A PCIe device degradation detection device, characterized in that: include, Information acquisition module: obtain the actual rate and actual bandwidth of the PCIe device; obtain the rated rate and rated bandwidth of the PCIe device; Degradation judgment module: judges whether the PCIe device has a degradation fault according to the actual rate, actual bandwidth, rated rate and rated bandwidth of the PCIe device; Degradation cause detection module: If a degradation fault occurs, the PCIe device link is repeatedly trained, and the cause of PCIe device degradation is determined based on the abnormal information during the training process; The degradation judgment module judges whether the PCIe device has a degradation fault according to the actual rate, actual bandwidth, rated rate and rated bandwidth of the PCIe device, specifically including: Detect the relationship between the actual rate and the rated rate of the PCIe device, as well as the relationship between the actual bandwidth and the rated bandwidth; If the actual rate of the PCIe device is equal to the rated rate, and the actual bandwidth is equal to the rated bandwidth, then the PCIe device has no degradation fault; If the actual rate of the PCIe device is less than the rated rate and / or the actual bandwidth is less than the rated bandwidth, the rated rates and rated bandwidths of all PCIe devices on the link where the PCIe device is located are obtained; Select the minimum rated rate from the rated rates of all PCIe devices as the rated rate reference value, and select the minimum rated bandwidth from the rated bandwidths of all PCIe devices as the rated bandwidth reference value; Detect the relationship between the actual rate of the PCIe device and the rated rate reference value, as well as the relationship between the actual bandwidth and the rated bandwidth reference value; If the actual rate of the PCIe device is equal to the rated rate reference value, and the actual bandwidth is equal to the rated bandwidth reference value, then the PCIe device has no degradation fault; If the actual rate of the PCIe device is less than the rated rate reference value and / or the actual bandwidth is less than the rated bandwidth reference value, then a degradation fault occurs in the PCIe device; The device is also used to perform: Determine a training link according to link information of a PCIe device; Repeat training between the Detect state, Polling state, Configuration state, L0 state, and Recovery state; Get the log of each state training; Check the data in the log to see if there are any abnormalities in the training process; When an exception occurs, determine the cause of PCIe device degradation based on the exception information; Among them, detecting whether there is an abnormality in the training process specifically includes: Check whether the training result is the same as the standard value and whether the training time is less than the threshold; If the training result is different from the standard value and / or if the training exceeds the threshold, the training is abnormal; The device is also used to perform: A diagnostic list is maintained in the database in advance, which includes training anomaly information, the corresponding PCIe device degradation reasons, and the corresponding recommended repair operations; After obtaining training anomaly information, find the corresponding PCIe device degradation cause and recommended repair operations in the diagnostic list; Display training exception information, corresponding PCIe device degradation reasons and recommended repair operations on the human-computer interaction interface; The human-computer interaction interface also displays basic information of all PCIe devices and provides diagnostic trigger buttons.

5. A terminal, characterized in that: include: A memory, used for storing a PCIe device degradation detection program; A processor, configured to implement the steps of the PCIe device degradation detection method as described in any one of claims 1 to 3 when executing the PCIe device degradation detection program.

6. A computer-readable storage medium, characterized in that: The readable storage medium stores a PCIe device degradation detection program, and when the PCIe device degradation detection program is executed by the processor, the steps of the PCIe device degradation detection method according to any one of claims 1 to 3 are implemented.