CN114780325B - PCIe equipment detection method and device - Google Patents

PCIe equipment detection method and device Download PDF

Info

Publication number
CN114780325B
CN114780325B CN202210703546.8A CN202210703546A CN114780325B CN 114780325 B CN114780325 B CN 114780325B CN 202210703546 A CN202210703546 A CN 202210703546A CN 114780325 B CN114780325 B CN 114780325B
Authority
CN
China
Prior art keywords
configuration table
type configuration
linked list
pcie
list type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210703546.8A
Other languages
Chinese (zh)
Other versions
CN114780325A (en
Inventor
蔡锘晖
诸葛晓蕾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Information Technologies Co Ltd
Original Assignee
New H3C Information Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Information Technologies Co Ltd filed Critical New H3C Information Technologies Co Ltd
Priority to CN202210703546.8A priority Critical patent/CN114780325B/en
Publication of CN114780325A publication Critical patent/CN114780325A/en
Application granted granted Critical
Publication of CN114780325B publication Critical patent/CN114780325B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2289Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by configuration test
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

In the embodiment of the invention, when the PCIe equipment is tested, a server generates a first linked list type configuration table based on the topological structure of each online PCIe equipment in the server, and the server generates a second linked list type configuration table based on the topological structure of each online PCIe equipment in the server after being restarted so as to compare the first linked list type configuration table with the second linked list type configuration table after being restarted, so that the abnormal PCIe equipment is detected. Because the chain table type configuration table does not need to be moved back and forth when the chain table type configuration table is added and deleted, the operation amount is reduced, the configuration table is established by distributing the memory in real time through the online PCIe equipment, the size of the memory space does not need to be specified in advance, and when the two configuration tables are inconsistent, the failed node can be quickly positioned through the data structure of the chain table type configuration table to determine the corresponding PCIe equipment, so that the efficiency of positioning problems during detection is improved, and the labor cost is reduced.

Description

PCIe device detection method and device
Technical Field
The present application relates to the field of device detection, and in particular, to a PCIe device detection method and apparatus.
Background
In the whole machine product test and the production test, the high load and reliability test needs to be carried out on the product, and then whether the problems of part loss and the like occur in the test process is detected.
Particularly, in a GPU server test project, PCIe device configuration tables generated by two previous and subsequent boots are usually compared to detect whether a device has a card drop problem.
For the device configuration table generated in the test, a dynamic list mode is usually adopted in the industry, however, when the mode needs to add or delete the generated list type configuration table, the whole list needs to be moved back and forth, the operation amount is large, the test efficiency is reduced, and a space needs to be allocated in advance when the list type configuration table is created, if the space allocated in advance is too large, a large amount of space is left unused, and unnecessary memory resources are wasted; if the pre-allocated space is too small, the memory overflow is easily caused, and the test risk is increased.
Disclosure of Invention
In view of this, the present application provides a PCIe device detection method and apparatus, which are used to solve the problems that an operation amount is large when a list-type configuration table introduced during a test by using a dynamic list is used to perform add/delete operations, and a space needs to be allocated in advance when the list-type configuration table is created.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of the embodiments of the present application, a PCIe device detection method is provided, where the method is applied to a server, and the server is composed of at least one PCIe device; the method comprises the following steps:
when PCIe equipment is tested, a first linked list type configuration table is generated based on the topological structure of each online PCIe equipment in the server; the first linked list type configuration table is composed of different nodes, the different nodes represent different PCIe devices, each node at least comprises data and a pointer, the data is PCIe device information of the PCIe device represented by the node, and the pointer is used for pointing to the next node;
restarting the server in the appointed step of the PCIe device test or after the PCIe device test is executed, and generating a second linked list type configuration table based on the topological structure of each online PCIe device in the server after restarting;
and detecting abnormal PCIe equipment according to the first linked list type configuration table and the second linked list type configuration table.
Optionally, the detecting the abnormal PCIe device according to the first linked list configuration table and the second linked list configuration table includes:
comparing the lengths of the first linked list type configuration table and the second linked list type configuration table, if the lengths of the first linked list type configuration table and the second linked list type configuration table are consistent, determining that abnormal PCIe equipment does not exist currently, and if the lengths of the first linked list type configuration table and the second linked list type configuration table are inconsistent, determining that the abnormal PCIe equipment exists; the abnormal PCIe device at least refers to the PCIe device represented by the nodes in the first linked list type configuration table but not in the second linked list type configuration table.
Optionally, the method further comprises:
when online PCIe equipment is newly added, determining a target position in a current linked list type configuration table, wherein the current linked list type configuration table is the first linked list type configuration table or the second linked list type configuration table, and the target position is used for indicating and recording the position of the newly added PCIe equipment;
if the target position is located between any two nodes in the current chaining-type configuration table, a current node which currently represents the newly-added PCIe device is newly added to the target position, a pointer of a previous node of the current node points to the current node, and the pointer of the current node points to a next node.
Optionally, the method further comprises:
when the online PCIe device is deleted, the current node used for representing the PCIe device is determined in the current linked list type configuration table, the pointer of the previous node of the current node points to the next node of the current node, and the current node is deleted.
Optionally, the PCIe device test is a stress test;
the designating step is the last step of the stress test.
According to a second aspect of the embodiments of the present application, there is provided a PCIe device detection apparatus, where the apparatus is applied to a server, and the server is composed of at least one PCIe device; the device comprises:
generating a first configuration table unit: the PCIe equipment testing device is used for generating a first linked list type configuration table based on the topological structure of each online PCIe equipment in the server when testing the PCIe equipment; the first linked list type configuration table is composed of different nodes, the different nodes represent different PCIe devices, each node at least comprises data and a pointer, the data is PCIe device information of the PCIe device represented by the node, and the pointer is used for pointing to the next node;
generating a second configuration table unit: the PCIe equipment testing device is used for restarting the server in the specified step of the PCIe equipment testing or after the PCIe equipment testing is executed, and generating a second linked list type configuration table based on the topological structure of each online PCIe equipment in the server after restarting;
an abnormality detection unit: and the PCIe equipment detection device is used for detecting abnormal PCIe equipment according to the first linked list type configuration table and the second linked list type configuration table.
Optionally, the detecting abnormal PCIe device by the abnormality detecting unit according to the first linked list type configuration table and the second linked list type configuration table includes:
comparing the lengths of the first linked list type configuration table and the second linked list type configuration table, if the lengths of the first linked list type configuration table and the second linked list type configuration table are consistent, determining that abnormal PCIe equipment does not exist currently, and if the lengths of the first linked list type configuration table and the second linked list type configuration table are inconsistent, determining that the abnormal PCIe equipment exists; the abnormal PCIe device at least refers to the PCIe device represented by the nodes in the first linked list type configuration table but not in the second linked list type configuration table.
Optionally, the apparatus further comprises:
a newly added device processing unit: the method comprises the steps that when online PCIe equipment is newly added, a target position is determined in a current linked list type configuration table, the current linked list type configuration table is the first linked list type configuration table or the second linked list type configuration table, and the target position is used for representing and recording the position of the newly added PCIe equipment;
if the target position is located between any two nodes in the current chaining-type configuration table, adding a current node which currently represents the newly added PCIe device at the target position, pointing the pointer of the previous node of the current node to the current node, and pointing the pointer of the current node to the next node.
Optionally, the apparatus further comprises:
a delete device processing unit: the method is used for determining a current node used for representing the PCIe device in a current linked list type configuration table when the online PCIe device is deleted, pointing a pointer of a node which is arranged at the last of the current node to a node which is arranged at the next node of the current node, and deleting the current node.
Optionally, the PCIe device test in the first configuration table generating unit is a stress test;
the step designated in the generating of the second configuration table unit is the last step of the stress test.
It can be seen from the above description that, in the present application, the link table type configuration table is generated through the topology structure of each PCIe device in the server, so that when the configuration table needs to be added or deleted, the whole list does not need to be moved back and forth, thereby reducing the operation amount and improving the test efficiency. And the chaining-type configuration table is composed of different nodes representing different PCIe devices, each creation of the configuration table is realized by distributing the memory through the current online PCIe device in real time, each node points to the next memory address without continuous memory or the memory space size is not required to be specified in advance.
Furthermore, first linked list type configuration table and second linked list type configuration table all constitute by the different nodes that represent different PCIe equipment in this application, and when both were inconsistent, can fix a position the node that breaks down fast through the data structure of linked list type configuration table to confirm corresponding PCIe equipment, this efficiency of location problem when having improved the detection has reduced the human cost.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the description below are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to these drawings.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a diagram illustrating a structure of a tabular configuration table in the prior art;
FIG. 2 is a flow chart of a PCIe device detection method in the present application;
FIG. 3 is a schematic structural diagram of a configuration table of the present application for chaining-type phenotypes;
FIG. 4 is an exemplary memory structure diagram of a chain-type PCIe device of the present application;
FIG. 5 is a schematic diagram illustrating the operation of adding PCIe devices to the Linked Table type configuration table of the present application;
FIG. 6 is a schematic diagram illustrating the operation of the present application chaining-type configuration table for PCIe device deletion;
FIG. 7 is a flowchart illustrating PCIe device detection for a chained list type of the present application;
fig. 8 is a diagram showing a structure of an apparatus according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one type of device from another. For example, a first device may also be referred to as a second device, and similarly, a second device may also be referred to as a first device, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to make the technical solutions provided in the embodiments of the present application better understood and make the above objects, features and advantages of the embodiments of the present application more comprehensible, the technical solutions in the embodiments of the present application are described in further detail below with reference to the accompanying drawings.
First, a method for performing server detection using a list-type configuration table in the prior art will be briefly described. The method needs to allocate enough space to the list type configuration table in advance to avoid memory overflow, and then stores all the component information traversing the server into the configuration table one by one, and each component information is stored in an array form and used for generating a standard configuration table.
After the server is subjected to a pressure test, the program traverses the information of the electrified equipment and detects the information of the electrified equipment and the standard configuration table one by one. The list-type configuration table is shown in fig. 1 below, and each test is performed by pairing the head of the table and the tail of the table in strict sequence according to the subscript of the array, and the test is stopped after the mismatch problem occurs.
However, the above method for performing server detection through the list-type configuration table has the following problems:
firstly, when the generated list type configuration table needs to be added and deleted, the whole list type configuration table needs to be moved back and forth, the operation amount is large, and the test efficiency is reduced.
Secondly, space needs to be allocated in advance when the list type configuration table is created, if the estimated space is too large, a large amount of space is idle, and unnecessary memory resources are wasted; if the estimation is too small, the memory overflow is easy to cause, and the test risk is increased.
And thirdly, the list type configuration table is a linear table stored in an array form, cannot correspond to the PCIe topology one to one, and cannot completely reflect the topology condition of the PCIe link of the server. The difficulty of problem location is increased, resulting in increased location cost.
In view of the above problems, embodiments of the present invention provide a PCIe device detection method, in the method, a list-type configuration table is replaced by a chain-type configuration table generated based on a topology structure of each PCIe device in a server to perform device testing, and when an add/delete operation needs to be performed on the configuration table, a forward/backward movement operation does not need to be performed on the entire configuration table, so that an operation amount is reduced, and testing efficiency is improved. And the chaining-type configuration table is composed of different nodes representing different PCIe devices, each creation of the configuration table is realized by distributing the memory through the current online PCIe device in real time, each node points to the next memory address without continuous memory or the memory space size is not required to be specified in advance.
And in addition, the nodes can be quickly positioned through the data structure of the linked list type configuration table so as to determine the corresponding lost or removed PCIe equipment, so that the efficiency of positioning problems during detection is improved, and the labor cost is reduced.
In order to make the objects, technical solutions and advantages of the present invention clearer, the following detailed description of the present invention is provided with reference to the accompanying drawings and specific embodiments:
referring to fig. 2, a flowchart of a PCIe device detection method according to an embodiment of the present invention is shown, where the flowchart is applied to a server, and the server is composed of at least one PCIe device.
As shown in fig. 2, the process may include the following steps:
step S201, when testing the PCIe device, generating a first linked list type configuration table based on the topology structure of each online PCIe device in the server.
In this embodiment, the first linked list type configuration table is composed of different nodes, where the different nodes represent different PCIe devices, and different node orders in the first linked list type configuration table may be connection orders of the online PCIe devices represented by the different node orders, where each node at least includes data and a pointer, where the data is PCIe device information of the PCIe device represented by the node, and the pointer is used for pointing to a next node.
Referring to fig. 3, the linked list configuration table in fig. 3 is formed by nodes, each node includes two units, i.e., a data unit and a pointer unit, the data unit is used to record bus numbers such as 0e, 0f, and 11 of PCIe devices, and the pointer field is used to store a pointer pointing to a next device in a PCIe link. Both the Head and tail lists are used to store the first device number and the last device number in the PCIe device link.
In this embodiment, the PCIe device in the server includes a chip, a network card, a hard disk, a GPU, and other devices on a motherboard in the server, and when performing a PCIe device test, for example, when a worker starts a device test through a script or a command, the server creates a first linked list configuration table through a topology structure formed by the PCIe devices currently online, the first linked list configuration table allocates a memory during creation, and each node in the configuration table has a next memory address pointing to the next node, as shown in fig. 4, the device node 1 points to the next device node 2, and the device node 2 points to the next device node 3.
Step S202, restarting the server in the designated step of the PCIe device test or after the PCIe device test is executed, and generating a second linked list type configuration table based on the topology structure of each online PCIe device in the server after the restart.
In the present embodiment, the structure of the second linked-list type configuration table is also as shown in fig. 3. In this embodiment, when the server is restarted, a part of PCIe devices in the server may be disconnected. And the second linked list type configuration table generated based on the topology structure of each online PCIe device in the server after the restart represents the connection relationship of each online PCIe device in the server after the restart.
Optionally, the PCIe device test is a stress test;
the above-mentioned designated step is the last step of the pressure test.
In the present embodiment, the specified step in step S202 is set as the last step in the stress test, and this step is followed by restarting the server in S202. The server is repeatedly restarted in the testing process, so that the PCIe equipment in the server is subjected to pressure testing, and the problem that the PCIe equipment is lost or not in the repeated restarting process of the server is detected.
Step S203, performing PCIe device exception detection according to the first linked list type configuration table and the second linked list type configuration table.
In this embodiment, the staff may detect the first linked list type configuration table, and when it is determined that all PCIe devices in the server are online, the staff generates the first linked list type configuration table, so as to ensure that the first linked list type configuration table records data information of all PCIe devices in the server. At this time, the second linked list type configuration table generated after the server is restarted is compared with the first linked list type configuration table, and when the data in the two configuration tables are inconsistent, partial PCIe equipment loss after the server is restarted can be determined. And by comparing the two configuration tables, the lost PCIe device can be quickly determined through the data in the nodes which are lacked when the second linked list type configuration table is compared with the first linked list type configuration table.
Optionally, the detecting the abnormal PCIe device according to the first linked list type configuration table and the second linked list type configuration table includes:
and comparing the lengths of the first linked list type configuration table and the second linked list type configuration table, if the lengths of the first linked list type configuration table and the second linked list type configuration table are consistent, determining that the abnormal PCIe equipment does not exist currently, and if the lengths of the first linked list type configuration table and the second linked list type configuration table are inconsistent, determining that the abnormal PCIe equipment exists.
In this embodiment, the above-mentioned abnormal PCIe device at least refers to a PCIe device represented by a node in the first linked list configuration table but not in the second linked list configuration table.
When the specific lost PCIe equipment does not need to be determined, the lengths of the first linked list type configuration table and the second linked list type configuration table are compared to detect the abnormal PCIe equipment, the specific contents in the two configuration tables do not need to be compared, and as long as the lengths of the two configuration tables are inconsistent, the PCIe equipment loss after the server is restarted can be determined, so that the equipment detection efficiency can be increased.
Thus, the flow shown in fig. 2 is completed.
As can be seen from the flow shown in fig. 2, in the embodiment of the present invention, a chaining-type configuration table is formed by nodes representing different PCIe devices, each creation of the configuration table allocates a memory in real time through the currently online PCIe device, each node has a memory address pointing to the next memory address, a continuous memory is not required, and the size of a memory space is not required to be specified in advance, which solves the risk of memory resource waste or memory overflow caused by allocating a space in advance when device detection is performed through a list-type configuration table.
In addition, in the embodiment of the application, when the first chain table type configuration table and the second chain table type configuration table are inconsistent, the failed node can be quickly positioned through the data structure of the chain table type configuration table so as to determine the corresponding PCIe equipment, so that the efficiency of positioning problems during detection is improved, and the labor cost is reduced.
Optionally, the method further includes:
when an online PCIe device is newly added, a target position is determined in a current linked list type configuration table, the current linked list type configuration table is the first linked list type configuration table or the second linked list type configuration table, and the target position is used for representing and recording the position of the newly added PCIe device.
In this embodiment, when the PCIe device is newly added to the server in the device detection, PCIe device information needs to be added to the chaining-type configuration table. As shown in fig. 5, when the PCIe device C is added between the PCIe device a and the PCIe device B, it is only necessary to point the node pointer of the previous node device a of the operation location device C to the bus number 09 of the device C, and point the pointer of the device C to the bus number 0e of the device B, and it is not necessary to move all the nodes.
Optionally, the method further includes:
when the online PCIe device is deleted, the current node used for representing the PCIe device is determined in the current linked list type configuration table, the pointer of the previous node of the current node points to the next node of the current node, and the current node is deleted.
In this embodiment, when the server pulls the PCIe device during device detection or the loss of the PCIe device occurs, the PCIe device information needs to be added to the chaining-type configuration table. As shown in fig. 6, when the PCIe device B is pulled out between the PCIe device a and the PCIe device C, only the node pointer of the device a needs to point to the next device node of the device B, that is, the bus number 11 of the device C, and not all the nodes need to be moved.
As can be seen from the two embodiments of fig. 5 and fig. 6, when the add/delete operation is performed on the chaining-type configuration table, the forward and backward movement operation on the whole configuration table is not required like the list-type configuration table, which reduces the operation amount and increases the test efficiency.
The above method is explained below by a specific example, as shown in fig. 7:
in step S701, when the stress test starts, a chaining-table-type PCIe device configuration table 1 is generated.
Step S702, a restart test is performed, and a chain-table PCIe device configuration table 2 is generated after the boot.
In this step, if the PCIe device in the server has a card drop problem after the server is restarted, the configuration table 2 with the content different from that of the configuration table 1 is generated, and if the PCIe device in the server has no card drop problem after the server is restarted, the configuration table 2 with the content identical to that of the configuration table 1 is generated.
Step S703, comparing the configuration table 1 with the configuration table 2, if the PCIe device table 2 is the same as the PCIe device table 1, continuing to restart the test; if the equipment of a certain link node 2 is lost in a certain startup, the test equipment table is not in accordance with the standard equipment table at the moment, and the test is stopped.
In this embodiment, by comparing the chain-type PCIe device configuration table 1 generated at the start of the stress test with the chain-type PCIe device configuration table 2 generated after the server is restarted, if the comparison results are consistent, the test is continued, and if the comparison results are inconsistent, the lost position is quickly located by the topology structure of the PCIe device.
Thus, the description of the embodiments of the present invention is completed.
The method provided by the embodiment of the present invention is described above, and the apparatus provided by the embodiment of the present invention is described below:
referring to fig. 8, the present application further provides a PCIe device detection apparatus, which is applied to a server, where the server is composed of at least one PCIe device; the device comprises:
generate first configuration table unit 801: the PCIe equipment testing device is used for generating a first linked list type configuration table based on the topological structure of each online PCIe equipment in the server when testing the PCIe equipment; the first linked list type configuration table is composed of different nodes, the different nodes represent different PCIe devices, each node at least comprises data and a pointer, the data is PCIe device information of the PCIe device represented by the node, and the pointer is used for pointing to the next node;
generate second configuration table unit 802: the PCIe equipment testing device is used for restarting the server in the specified step of the PCIe equipment testing or after the PCIe equipment testing is executed, and generating a second linked list type configuration table based on the topological structure of each online PCIe equipment in the server after restarting;
the abnormality detection unit 803: and the PCIe equipment detection device is used for detecting abnormal PCIe equipment according to the first linked list type configuration table and the second linked list type configuration table.
Optionally, the performing, by the exception detecting unit 803 according to the first linked list type configuration table and the second linked list type configuration table, the exception PCIe device detection includes:
comparing the lengths of the first linked list type configuration table and the second linked list type configuration table, if the lengths of the first linked list type configuration table and the second linked list type configuration table are consistent, determining that abnormal PCIe equipment does not exist currently, and if the lengths of the first linked list type configuration table and the second linked list type configuration table are inconsistent, determining that the abnormal PCIe equipment exists; the abnormal PCIe device at least refers to the PCIe device represented by the nodes in the first linked list type configuration table but not in the second linked list type configuration table.
Optionally, the apparatus further comprises:
newly added device processing unit 804: the PCIe node is used for determining a target position in a current linked list type configuration table when online PCIe equipment is newly added, wherein the current linked list type configuration table is the first linked list type configuration table or the second linked list type configuration table, and the target position is used for representing and recording the position of the newly added PCIe equipment;
if the target position is located between any two nodes in the current chaining-type configuration table, adding a current node which currently represents the newly added PCIe device at the target position, pointing the pointer of the previous node of the current node to the current node, and pointing the pointer of the current node to the next node.
Optionally, the apparatus further comprises:
the delete device processing unit 805: the method is used for determining a current node used for representing the PCIe device in a current linked list type configuration table when the online PCIe device is deleted, pointing a pointer of a node which is arranged at the last of the current node to a node which is arranged at the next node of the current node, and deleting the current node.
Optionally, the PCIe device test in the first configuration table generating unit 801 is a stress test;
the step designated in the generate second configuration table unit 802 is the last step of the stress test.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for apparatus or system embodiments, since they are substantially similar to method embodiments, they are described in relative terms, as long as they are described in partial descriptions of method embodiments. The above-described apparatus or system embodiments are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the functions of the modules may be implemented in one or more of software and/or hardware when implementing the aspects of the present application. And part or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment. One of ordinary skill in the art can understand and implement without inventive effort.
The foregoing is directed to embodiments of the present application and it is noted that numerous modifications and adaptations may be made by those skilled in the art without departing from the principles of the present application and are intended to be within the scope of the present application.

Claims (10)

1. The PCIe device detection method is applied to a server, and the server is composed of at least one PCIe device; the method comprises the following steps:
when PCIe equipment is tested, a first linked list type configuration table is generated based on the topological structure of each online PCIe equipment in the server; the first linked list type configuration table is composed of different nodes, the different nodes represent different PCIe devices, each node at least comprises data and a pointer, the data is PCIe device information of the PCIe device represented by the node, and the pointer is used for pointing to the next node;
restarting the server in the appointed step of the PCIe device test or after the PCIe device test is executed, and generating a second linked list type configuration table based on the topological structure of each online PCIe device in the server after restarting;
and detecting abnormal PCIe equipment according to the first linked list type configuration table and the second linked list type configuration table.
2. The method of claim 1, wherein the performing anomalous PCIe device detection in accordance with the first linked-list configuration table and the second linked-list configuration table comprises:
comparing the lengths of the first linked list type configuration table and the second linked list type configuration table, if the lengths of the first linked list type configuration table and the second linked list type configuration table are consistent, determining that abnormal PCIe equipment does not exist currently, and if the lengths of the first linked list type configuration table and the second linked list type configuration table are inconsistent, determining that the abnormal PCIe equipment exists; the abnormal PCIe device at least refers to the PCIe device represented by the nodes in the first linked list type configuration table but not in the second linked list type configuration table.
3. The method of claim 1, further comprising:
when online PCIe equipment is newly added, determining a target position in a current linked list type configuration table, wherein the current linked list type configuration table is the first linked list type configuration table or the second linked list type configuration table, and the target position is used for representing and recording the position of the newly added online PCIe equipment;
and if the target position is positioned between any two nodes in the current chaining-type configuration table, newly adding a current node which currently represents the newly added online PCIe device at the target position, pointing the pointer of the previous node of the current node to the current node, and pointing the pointer of the current node to the next node.
4. The method of claim 1, further comprising:
when the online PCIe device is deleted, the current node used for representing the PCIe device is determined in the current linked list type configuration table, the pointer of the previous node of the current node points to the next node of the current node, and the current node is deleted.
5. The method of claim 1, wherein the PCIe device test is a stress test;
the designating step is the last step of the stress test.
6. The PCIe device detection device is applied to a server, and the server is composed of at least one PCIe device; the device comprises:
generating a first configuration table unit: the PCIe equipment testing device is used for generating a first linked list type configuration table based on the topological structure of each online PCIe equipment in the server when testing the PCIe equipment; the first linked list type configuration table is composed of different nodes, the different nodes represent different PCIe devices, each node at least comprises data and a pointer, the data is PCIe device information of the PCIe device represented by the node, and the pointer is used for pointing to the next node;
generating a second configuration table unit: the PCIe equipment testing device is used for restarting the server in the specified step of the PCIe equipment testing or after the PCIe equipment testing is executed, and generating a second linked list type configuration table based on the topological structure of each online PCIe equipment in the server after restarting;
an abnormality detection unit: and the PCIe equipment detection device is used for detecting abnormal PCIe equipment according to the first linked list type configuration table and the second linked list type configuration table.
7. The apparatus of claim 6, wherein the means for performing the anomalous PCIe device detection based on the first linked list configuration table and the second linked list configuration table comprises:
comparing the lengths of the first linked list type configuration table and the second linked list type configuration table, if the lengths of the first linked list type configuration table and the second linked list type configuration table are consistent, determining that abnormal PCIe equipment does not exist currently, and if the lengths of the first linked list type configuration table and the second linked list type configuration table are inconsistent, determining that the abnormal PCIe equipment exists; the abnormal PCIe device at least refers to the PCIe device represented by the nodes in the first linked list type configuration table but not in the second linked list type configuration table.
8. The apparatus of claim 6, further comprising:
a newly added device processing unit: the method comprises the steps that when online PCIe equipment is newly added, a target position is determined in a current linked list type configuration table, the current linked list type configuration table is the first linked list type configuration table or the second linked list type configuration table, and the target position is used for representing and recording the position of the newly added online PCIe equipment;
and if the target position is positioned between any two nodes in the current chaining-type configuration table, newly adding a current node which currently represents the newly added online PCIe device at the target position, pointing the pointer of the previous node of the current node to the current node, and pointing the pointer of the current node to the next node.
9. The apparatus of claim 6, further comprising:
a delete device processing unit: the method is used for determining a current node used for representing the PCIe device in a current linked list type configuration table when the online PCIe device is deleted, pointing a pointer of a node which is arranged at the last of the current node to a node which is arranged at the next node of the current node, and deleting the current node.
10. The apparatus of claim 6, wherein the PCIe device test in the generate first configuration table unit is a stress test;
the step designated in the generating of the second configuration table unit is the last step of the stress test.
CN202210703546.8A 2022-06-21 2022-06-21 PCIe equipment detection method and device Active CN114780325B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210703546.8A CN114780325B (en) 2022-06-21 2022-06-21 PCIe equipment detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210703546.8A CN114780325B (en) 2022-06-21 2022-06-21 PCIe equipment detection method and device

Publications (2)

Publication Number Publication Date
CN114780325A CN114780325A (en) 2022-07-22
CN114780325B true CN114780325B (en) 2022-09-30

Family

ID=82420930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210703546.8A Active CN114780325B (en) 2022-06-21 2022-06-21 PCIe equipment detection method and device

Country Status (1)

Country Link
CN (1) CN114780325B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117055988A (en) * 2023-07-11 2023-11-14 荣耀终端有限公司 Lightweight operating system optimization processing method and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004287673A (en) * 2003-03-20 2004-10-14 Fuji Xerox Co Ltd Failure diagnostic system, connection device used for information processor, and program
CN1545048A (en) * 2003-11-17 2004-11-10 中兴通讯股份有限公司 Method for implementing tree storage and access by two-dimensional table
CN102841833A (en) * 2011-06-24 2012-12-26 鸿富锦精密工业(深圳)有限公司 PCI (peripheral component interconnect) resource traversal method and system
CN111382080A (en) * 2020-03-16 2020-07-07 深圳市吉祥腾达科技有限公司 Stability test method for equipment cloud management platform system
CN112948190A (en) * 2021-02-26 2021-06-11 浪潮电子信息产业股份有限公司 Hardware testing method, system and related device of server
CN113448786A (en) * 2021-06-18 2021-09-28 苏州浪潮智能科技有限公司 PCIe equipment testing method, device, equipment and readable storage medium
CN113656490A (en) * 2020-05-12 2021-11-16 华为技术有限公司 Data synchronization method, device, terminal and storage medium
CN113868051A (en) * 2021-09-18 2021-12-31 苏州浪潮智能科技有限公司 PCIe fault detection device, method, equipment and storage medium
CN114385537A (en) * 2022-03-24 2022-04-22 浪潮(山东)计算机科技有限公司 Page slot number dynamic allocation method, device, equipment and medium
CN216388068U (en) * 2021-12-15 2022-04-26 成都海光集成电路设计有限公司 PCIE interface verification board and test system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8977651B2 (en) * 2004-04-14 2015-03-10 Hewlett-Packard Development Company, L.P. Method and apparatus for multi-process access to a linked-list
US10114658B2 (en) * 2016-05-23 2018-10-30 Baida USA LLC Concurrent testing of PCI express devices on a server platform
US10572623B2 (en) * 2016-10-25 2020-02-25 Mentor Graphics Corporation Back-pressure in virtual machine interface
CN109388490B (en) * 2017-08-07 2020-11-17 华为技术有限公司 Memory allocation method and server
CN112087379B (en) * 2019-06-12 2023-08-01 南京中兴新软件有限责任公司 Service chain arranging method and device, storage medium and electronic device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004287673A (en) * 2003-03-20 2004-10-14 Fuji Xerox Co Ltd Failure diagnostic system, connection device used for information processor, and program
CN1545048A (en) * 2003-11-17 2004-11-10 中兴通讯股份有限公司 Method for implementing tree storage and access by two-dimensional table
CN102841833A (en) * 2011-06-24 2012-12-26 鸿富锦精密工业(深圳)有限公司 PCI (peripheral component interconnect) resource traversal method and system
CN111382080A (en) * 2020-03-16 2020-07-07 深圳市吉祥腾达科技有限公司 Stability test method for equipment cloud management platform system
CN113656490A (en) * 2020-05-12 2021-11-16 华为技术有限公司 Data synchronization method, device, terminal and storage medium
CN112948190A (en) * 2021-02-26 2021-06-11 浪潮电子信息产业股份有限公司 Hardware testing method, system and related device of server
CN113448786A (en) * 2021-06-18 2021-09-28 苏州浪潮智能科技有限公司 PCIe equipment testing method, device, equipment and readable storage medium
CN113868051A (en) * 2021-09-18 2021-12-31 苏州浪潮智能科技有限公司 PCIe fault detection device, method, equipment and storage medium
CN216388068U (en) * 2021-12-15 2022-04-26 成都海光集成电路设计有限公司 PCIE interface verification board and test system
CN114385537A (en) * 2022-03-24 2022-04-22 浪潮(山东)计算机科技有限公司 Page slot number dynamic allocation method, device, equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
保护定值在线校核系统与故障信息系统接口技术及应用;杨增力等;《水电能源科学》;20130925(第09期);全文 *

Also Published As

Publication number Publication date
CN114780325A (en) 2022-07-22

Similar Documents

Publication Publication Date Title
CN107391628B (en) Data synchronization method and device
CN108205424B (en) Data migration method and device based on disk and electronic equipment
US9367598B2 (en) Merging an out of synchronization indicator and a change recording indicator in response to a failure in consistency group formation
CN111737230B (en) Data verification method, device, electronic equipment and readable storage medium
CN112100071B (en) Test case generation method and device, computer equipment and storage medium
CN110008129B (en) Reliability test method, device and equipment for storage timing snapshot
CN107181636B (en) Health check method and device in load balancing system
CN114780325B (en) PCIe equipment detection method and device
WO2018177205A1 (en) Regression testing method, device, computer apparatus, and storage medium
CN111190823A (en) UI automation test method, electronic device and computer readable storage medium
CN111930716A (en) Database capacity expansion method, device and system
US7506212B2 (en) Distributed exception handling testing
CN109388615B (en) Spark-based task processing method and system
CN114064435A (en) Database test method, device, medium and electronic equipment
CN107864209B (en) Data writing method and device and server
CN103092955B (en) Checkpointed method, Apparatus and system
CN111984196B (en) File migration method, device, equipment and readable storage medium
CN110825758B (en) Transaction processing method and device
CN106844480B (en) A kind of cleaning comparison storage method
CN113886342A (en) File format conversion method and device, storage medium and processor
CN108459925A (en) The restorative procedure of private clound equipment and its database, the device with store function
CN114416689A (en) Data migration method and device, computer equipment and storage medium
CN110704244B (en) Disk offline processing method, device and equipment and readable storage medium
CN113806309A (en) Metadata deleting method, system, terminal and storage medium based on distributed lock
CN112612773A (en) Database synchronization test method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant